Version Description
Download this release
Release Info
Developer | nsinelnikov |
Plugin | Ultimate Member – User Profile & Membership Plugin |
Version | 2.0.44 |
Comparing to | |
See all releases |
Code changes from version 2.0.43 to 2.0.44
- assets/css/simplebar.css +190 -0
- assets/css/um-fonticons-fa.css +3 -0
- assets/css/um-scrollbar.css +0 -1267
- assets/js/simplebar.js +4452 -0
- assets/js/simplebar.min.js +1 -0
- assets/js/um-functions.js +1 -9
- assets/js/um-functions.min.js +1 -1
- assets/js/um-scripts.js +432 -407
- assets/js/um-scripts.min.js +1 -1
- assets/js/um-scrollbar.js +0 -2683
- assets/js/um-scrollbar.min.js +0 -1
- includes/admin/assets/js/um-admin-modal.js +2 -0
- includes/admin/assets/js/um-admin-scripts.js +79 -0
- includes/admin/core/class-admin-enqueue.php +38 -6
- includes/admin/core/class-admin-metabox.php +23 -6
- includes/admin/core/class-admin-settings.php +15 -2
- includes/admin/core/class-admin-theme-updater.php +187 -0
- includes/admin/core/class-admin-users.php +7 -0
- includes/admin/core/list-tables/emails-list-table.php +9 -2
- includes/admin/core/packages/2.0.44/functions.php +14 -0
- includes/admin/core/packages/2.0.44/hooks.php +5 -0
- includes/admin/core/packages/2.0.44/init.php +31 -0
- includes/admin/core/packages/2.0.44/metafields.php +33 -0
- includes/class-config.php +2 -1
- includes/class-dependencies.php +4 -1
- includes/class-functions.php +21 -0
- includes/class-init.php +62 -12
- includes/core/class-access.php +137 -4
- includes/core/class-builtin.php +13 -8
- includes/core/class-enqueue.php +4 -3
- includes/core/class-external-integrations.php +53 -9
- includes/core/class-fields.php +22 -4
- includes/core/class-form.php +1 -1
- includes/core/class-logout.php +6 -6
- includes/core/class-mail.php +59 -3
- includes/core/class-members.php +19 -18
- includes/core/class-modal.php +13 -5
- includes/core/class-multisite.php +62 -0
- includes/core/class-password.php +62 -9
- includes/core/class-permalinks.php +7 -1
- includes/core/class-plugin-updater.php +29 -7
- includes/core/class-profile.php +31 -0
- includes/core/class-rest-api.php +0 -1160
- includes/core/class-shortcodes.php +33 -0
- includes/core/class-user.php +33 -2
- includes/core/rest/class-api-v1.php +541 -0
- includes/core/rest/class-api-v2.php +540 -0
- includes/core/rest/class-api.php +615 -0
- includes/core/um-actions-core.php +6 -0
- includes/core/um-actions-form.php +8 -8
- includes/core/um-actions-profile.php +1 -1
- includes/core/um-filters-members.php +23 -14
- includes/core/um-filters-profile.php +1 -1
- includes/um-deprecated-functions.php +5 -5
- includes/um-short-functions.php +106 -52
- languages/ultimate-member-en.po +5 -0
- languages/ultimate-member-en_US.mo +0 -0
- languages/ultimate-member-en_US.po +914 -870
- languages/ultimatemember-en_US.po +5 -0
- readme.txt +31 -3
- ultimate-member.php +1 -1
assets/css/simplebar.css
ADDED
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[data-simplebar] {
|
2 |
+
position: relative;
|
3 |
+
flex-direction: column;
|
4 |
+
flex-wrap: wrap;
|
5 |
+
justify-content: flex-start;
|
6 |
+
align-content: flex-start;
|
7 |
+
align-items: flex-start;
|
8 |
+
}
|
9 |
+
|
10 |
+
.simplebar-wrapper {
|
11 |
+
overflow: hidden;
|
12 |
+
width: inherit;
|
13 |
+
height: inherit;
|
14 |
+
max-width: inherit;
|
15 |
+
max-height: inherit;
|
16 |
+
}
|
17 |
+
|
18 |
+
.simplebar-mask {
|
19 |
+
direction: inherit;
|
20 |
+
position: absolute;
|
21 |
+
overflow: hidden;
|
22 |
+
padding: 0;
|
23 |
+
margin: 0;
|
24 |
+
left: 0;
|
25 |
+
top: 0;
|
26 |
+
bottom: 0;
|
27 |
+
right: 0;
|
28 |
+
width: auto !important;
|
29 |
+
height: auto !important;
|
30 |
+
z-index: 0;
|
31 |
+
}
|
32 |
+
|
33 |
+
.simplebar-offset {
|
34 |
+
direction: inherit !important;
|
35 |
+
box-sizing: inherit !important;
|
36 |
+
resize: none !important;
|
37 |
+
position: absolute;
|
38 |
+
top: 0;
|
39 |
+
left: 0;
|
40 |
+
bottom: 0;
|
41 |
+
right: 0;
|
42 |
+
padding: 0;
|
43 |
+
margin: 0;
|
44 |
+
-webkit-overflow-scrolling: touch;
|
45 |
+
}
|
46 |
+
|
47 |
+
.simplebar-content-wrapper {
|
48 |
+
direction: inherit;
|
49 |
+
box-sizing: border-box !important;
|
50 |
+
position: relative;
|
51 |
+
display: block;
|
52 |
+
height: 100%; /* Required for horizontal native scrollbar to not appear if parent is taller than natural height */
|
53 |
+
width: auto;
|
54 |
+
visibility: visible;
|
55 |
+
overflow: auto; /* Scroll on this element otherwise element can't have a padding applied properly */
|
56 |
+
max-width: 100%; /* Not required for horizontal scroll to trigger */
|
57 |
+
max-height: 100%; /* Needed for vertical scroll to trigger */
|
58 |
+
}
|
59 |
+
|
60 |
+
.simplebar-content:before,
|
61 |
+
.simplebar-content:after {
|
62 |
+
content: " ";
|
63 |
+
display: table;
|
64 |
+
}
|
65 |
+
|
66 |
+
.simplebar-placeholder {
|
67 |
+
max-height: 100%;
|
68 |
+
max-width: 100%;
|
69 |
+
width: 100%;
|
70 |
+
pointer-events: none;
|
71 |
+
}
|
72 |
+
|
73 |
+
.simplebar-height-auto-observer-wrapper {
|
74 |
+
box-sizing: inherit !important;
|
75 |
+
height: 100%;
|
76 |
+
width: inherit;
|
77 |
+
max-width: 1px;
|
78 |
+
position: relative;
|
79 |
+
float: left;
|
80 |
+
max-height: 1px;
|
81 |
+
overflow: hidden;
|
82 |
+
z-index: -1;
|
83 |
+
padding: 0;
|
84 |
+
margin: 0;
|
85 |
+
pointer-events: none;
|
86 |
+
flex-grow: inherit;
|
87 |
+
flex-shrink: 0;
|
88 |
+
flex-basis: 0;
|
89 |
+
}
|
90 |
+
|
91 |
+
.simplebar-height-auto-observer {
|
92 |
+
box-sizing: inherit;
|
93 |
+
display: block;
|
94 |
+
opacity: 0;
|
95 |
+
position: absolute;
|
96 |
+
top: 0;
|
97 |
+
left: 0;
|
98 |
+
height: 1000%;
|
99 |
+
width: 1000%;
|
100 |
+
min-height: 1px;
|
101 |
+
min-width: 1px;
|
102 |
+
overflow: hidden;
|
103 |
+
pointer-events: none;
|
104 |
+
z-index: -1;
|
105 |
+
}
|
106 |
+
|
107 |
+
.simplebar-track {
|
108 |
+
z-index: 1;
|
109 |
+
position: absolute;
|
110 |
+
right: 0;
|
111 |
+
bottom: 0;
|
112 |
+
pointer-events: none;
|
113 |
+
overflow: hidden;
|
114 |
+
}
|
115 |
+
|
116 |
+
[data-simplebar].simplebar-dragging .simplebar-track {
|
117 |
+
pointer-events: all;
|
118 |
+
}
|
119 |
+
|
120 |
+
.simplebar-scrollbar {
|
121 |
+
position: absolute;
|
122 |
+
right: 2px;
|
123 |
+
width: 7px;
|
124 |
+
min-height: 10px;
|
125 |
+
}
|
126 |
+
|
127 |
+
.simplebar-scrollbar:before {
|
128 |
+
position: absolute;
|
129 |
+
content: "";
|
130 |
+
background: black;
|
131 |
+
border-radius: 7px;
|
132 |
+
left: 0;
|
133 |
+
right: 0;
|
134 |
+
opacity: 0;
|
135 |
+
transition: opacity 0.2s linear;
|
136 |
+
}
|
137 |
+
|
138 |
+
.simplebar-track .simplebar-scrollbar.simplebar-visible:before {
|
139 |
+
/* When hovered, remove all transitions from drag handle */
|
140 |
+
opacity: 0.5;
|
141 |
+
transition: opacity 0s linear;
|
142 |
+
}
|
143 |
+
|
144 |
+
.simplebar-track.simplebar-vertical {
|
145 |
+
top: 0;
|
146 |
+
width: 11px;
|
147 |
+
}
|
148 |
+
|
149 |
+
.simplebar-track.simplebar-vertical .simplebar-scrollbar:before {
|
150 |
+
top: 2px;
|
151 |
+
bottom: 2px;
|
152 |
+
}
|
153 |
+
|
154 |
+
.simplebar-track.simplebar-horizontal {
|
155 |
+
left: 0;
|
156 |
+
height: 11px;
|
157 |
+
}
|
158 |
+
|
159 |
+
.simplebar-track.simplebar-horizontal .simplebar-scrollbar:before {
|
160 |
+
height: 100%;
|
161 |
+
left: 2px;
|
162 |
+
right: 2px;
|
163 |
+
}
|
164 |
+
|
165 |
+
.simplebar-track.simplebar-horizontal .simplebar-scrollbar {
|
166 |
+
right: auto;
|
167 |
+
left: 0;
|
168 |
+
top: 2px;
|
169 |
+
height: 7px;
|
170 |
+
min-height: 0;
|
171 |
+
min-width: 10px;
|
172 |
+
width: auto;
|
173 |
+
}
|
174 |
+
|
175 |
+
/* Rtl support */
|
176 |
+
[data-simplebar-direction="rtl"] .simplebar-track.simplebar-vertical {
|
177 |
+
right: auto;
|
178 |
+
left: 0;
|
179 |
+
}
|
180 |
+
|
181 |
+
.hs-dummy-scrollbar-size {
|
182 |
+
direction: rtl;
|
183 |
+
position: fixed;
|
184 |
+
opacity: 0;
|
185 |
+
visibility: hidden;
|
186 |
+
height: 500px;
|
187 |
+
width: 500px;
|
188 |
+
overflow-y: hidden;
|
189 |
+
overflow-x: scroll;
|
190 |
+
}
|
assets/css/um-fonticons-fa.css
CHANGED
@@ -24,6 +24,9 @@
|
|
24 |
-moz-osx-font-smoothing: grayscale;
|
25 |
}
|
26 |
|
|
|
|
|
|
|
27 |
.um-faicon-glass:before {
|
28 |
content: "\f000";
|
29 |
}
|
24 |
-moz-osx-font-smoothing: grayscale;
|
25 |
}
|
26 |
|
27 |
+
.um-faicon-sticky-note:before {
|
28 |
+
content: "\f249";
|
29 |
+
}
|
30 |
.um-faicon-glass:before {
|
31 |
content: "\f000";
|
32 |
}
|
assets/css/um-scrollbar.css
DELETED
@@ -1,1267 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
== malihu jquery custom scrollbar plugin ==
|
3 |
-
Plugin URI: http://manos.malihu.gr/jquery-custom-content-scroller
|
4 |
-
*/
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
/*
|
9 |
-
CONTENTS:
|
10 |
-
1. BASIC STYLE - Plugin's basic/essential CSS properties (normally, should not be edited).
|
11 |
-
2. VERTICAL SCROLLBAR - Positioning and dimensions of vertical scrollbar.
|
12 |
-
3. HORIZONTAL SCROLLBAR - Positioning and dimensions of horizontal scrollbar.
|
13 |
-
4. VERTICAL AND HORIZONTAL SCROLLBARS - Positioning and dimensions of 2-axis scrollbars.
|
14 |
-
5. TRANSITIONS - CSS3 transitions for hover events, auto-expanded and auto-hidden scrollbars.
|
15 |
-
6. SCROLLBAR COLORS, OPACITY AND BACKGROUNDS
|
16 |
-
6.1 THEMES - Scrollbar colors, opacity, dimensions, backgrounds etc. via ready-to-use themes.
|
17 |
-
*/
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
/*
|
22 |
-
------------------------------------------------------------------------------------------------------------------------
|
23 |
-
1. BASIC STYLE
|
24 |
-
------------------------------------------------------------------------------------------------------------------------
|
25 |
-
*/
|
26 |
-
|
27 |
-
.mCustomScrollbar{ -ms-touch-action: pinch-zoom; touch-action: pinch-zoom; /* direct pointer events to js */ }
|
28 |
-
.mCustomScrollbar.mCS_no_scrollbar, .mCustomScrollbar.mCS_touch_action{ -ms-touch-action: auto; touch-action: auto; }
|
29 |
-
|
30 |
-
.mCustomScrollBox{ /* contains plugin's markup */
|
31 |
-
position: relative;
|
32 |
-
overflow: hidden;
|
33 |
-
height: 100%;
|
34 |
-
max-width: 100%;
|
35 |
-
outline: none;
|
36 |
-
direction: ltr;
|
37 |
-
}
|
38 |
-
|
39 |
-
.mCSB_container{ /* contains the original content */
|
40 |
-
overflow: hidden;
|
41 |
-
width: auto;
|
42 |
-
height: auto;
|
43 |
-
}
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
/*
|
48 |
-
------------------------------------------------------------------------------------------------------------------------
|
49 |
-
2. VERTICAL SCROLLBAR
|
50 |
-
y-axis
|
51 |
-
------------------------------------------------------------------------------------------------------------------------
|
52 |
-
*/
|
53 |
-
|
54 |
-
.mCSB_inside > .mCSB_container{ margin-right: 30px; }
|
55 |
-
|
56 |
-
.mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{ margin-right: 0; } /* non-visible scrollbar */
|
57 |
-
|
58 |
-
.mCS-dir-rtl > .mCSB_inside > .mCSB_container{ /* RTL direction/left-side scrollbar */
|
59 |
-
margin-right: 0;
|
60 |
-
margin-left: 30px;
|
61 |
-
}
|
62 |
-
|
63 |
-
.mCS-dir-rtl > .mCSB_inside > .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{ margin-left: 0; } /* RTL direction/left-side scrollbar */
|
64 |
-
|
65 |
-
.mCSB_scrollTools{ /* contains scrollbar markup (draggable element, dragger rail, buttons etc.) */
|
66 |
-
position: absolute;
|
67 |
-
width: 16px;
|
68 |
-
height: auto;
|
69 |
-
left: auto;
|
70 |
-
top: 0;
|
71 |
-
right: 0;
|
72 |
-
bottom: 0;
|
73 |
-
}
|
74 |
-
|
75 |
-
.mCSB_outside + .mCSB_scrollTools{ right: -26px; } /* scrollbar position: outside */
|
76 |
-
|
77 |
-
.mCS-dir-rtl > .mCSB_inside > .mCSB_scrollTools,
|
78 |
-
.mCS-dir-rtl > .mCSB_outside + .mCSB_scrollTools{ /* RTL direction/left-side scrollbar */
|
79 |
-
right: auto;
|
80 |
-
left: 0;
|
81 |
-
}
|
82 |
-
|
83 |
-
.mCS-dir-rtl > .mCSB_outside + .mCSB_scrollTools{ left: -26px; } /* RTL direction/left-side scrollbar (scrollbar position: outside) */
|
84 |
-
|
85 |
-
.mCSB_scrollTools .mCSB_draggerContainer{ /* contains the draggable element and dragger rail markup */
|
86 |
-
position: absolute;
|
87 |
-
top: 0;
|
88 |
-
left: 0;
|
89 |
-
bottom: 0;
|
90 |
-
right: 0;
|
91 |
-
height: auto;
|
92 |
-
}
|
93 |
-
|
94 |
-
.mCSB_scrollTools a + .mCSB_draggerContainer{ margin: 20px 0; }
|
95 |
-
|
96 |
-
.mCSB_scrollTools .mCSB_draggerRail{
|
97 |
-
width: 2px;
|
98 |
-
height: 100%;
|
99 |
-
margin: 0 auto;
|
100 |
-
-webkit-border-radius: 16px; -moz-border-radius: 16px; border-radius: 16px;
|
101 |
-
}
|
102 |
-
|
103 |
-
.mCSB_scrollTools .mCSB_dragger{ /* the draggable element */
|
104 |
-
cursor: pointer;
|
105 |
-
width: 100%;
|
106 |
-
height: 30px; /* minimum dragger height */
|
107 |
-
z-index: 1;
|
108 |
-
}
|
109 |
-
|
110 |
-
.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ /* the dragger element */
|
111 |
-
position: relative;
|
112 |
-
width: 4px;
|
113 |
-
height: 100%;
|
114 |
-
margin: 0 auto;
|
115 |
-
-webkit-border-radius: 16px; -moz-border-radius: 16px; border-radius: 16px;
|
116 |
-
text-align: center;
|
117 |
-
}
|
118 |
-
|
119 |
-
.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
|
120 |
-
.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{ width: 12px; /* auto-expanded scrollbar */ }
|
121 |
-
|
122 |
-
.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
|
123 |
-
.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ width: 8px; /* auto-expanded scrollbar */ }
|
124 |
-
|
125 |
-
.mCSB_scrollTools .mCSB_buttonUp,
|
126 |
-
.mCSB_scrollTools .mCSB_buttonDown{
|
127 |
-
display: block;
|
128 |
-
position: absolute;
|
129 |
-
height: 20px;
|
130 |
-
width: 100%;
|
131 |
-
overflow: hidden;
|
132 |
-
margin: 0 auto;
|
133 |
-
cursor: pointer;
|
134 |
-
}
|
135 |
-
|
136 |
-
.mCSB_scrollTools .mCSB_buttonDown{ bottom: 0; }
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
/*
|
141 |
-
------------------------------------------------------------------------------------------------------------------------
|
142 |
-
3. HORIZONTAL SCROLLBAR
|
143 |
-
x-axis
|
144 |
-
------------------------------------------------------------------------------------------------------------------------
|
145 |
-
*/
|
146 |
-
|
147 |
-
.mCSB_horizontal.mCSB_inside > .mCSB_container{
|
148 |
-
margin-right: 0;
|
149 |
-
margin-bottom: 30px;
|
150 |
-
}
|
151 |
-
|
152 |
-
.mCSB_horizontal.mCSB_outside > .mCSB_container{ min-height: 100%; }
|
153 |
-
|
154 |
-
.mCSB_horizontal > .mCSB_container.mCS_no_scrollbar_x.mCS_x_hidden{ margin-bottom: 0; } /* non-visible scrollbar */
|
155 |
-
|
156 |
-
.mCSB_scrollTools.mCSB_scrollTools_horizontal{
|
157 |
-
width: auto;
|
158 |
-
height: 16px;
|
159 |
-
top: auto;
|
160 |
-
right: 0;
|
161 |
-
bottom: 0;
|
162 |
-
left: 0;
|
163 |
-
}
|
164 |
-
|
165 |
-
.mCustomScrollBox + .mCSB_scrollTools.mCSB_scrollTools_horizontal,
|
166 |
-
.mCustomScrollBox + .mCSB_scrollTools + .mCSB_scrollTools.mCSB_scrollTools_horizontal{ bottom: -26px; } /* scrollbar position: outside */
|
167 |
-
|
168 |
-
.mCSB_scrollTools.mCSB_scrollTools_horizontal a + .mCSB_draggerContainer{ margin: 0 20px; }
|
169 |
-
|
170 |
-
.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_draggerRail{
|
171 |
-
width: 100%;
|
172 |
-
height: 2px;
|
173 |
-
margin: 7px 0;
|
174 |
-
}
|
175 |
-
|
176 |
-
.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger{
|
177 |
-
width: 30px; /* minimum dragger width */
|
178 |
-
height: 100%;
|
179 |
-
left: 0;
|
180 |
-
}
|
181 |
-
|
182 |
-
.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
|
183 |
-
width: 100%;
|
184 |
-
height: 4px;
|
185 |
-
margin: 6px auto;
|
186 |
-
}
|
187 |
-
|
188 |
-
.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
|
189 |
-
.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{
|
190 |
-
height: 12px; /* auto-expanded scrollbar */
|
191 |
-
margin: 2px auto;
|
192 |
-
}
|
193 |
-
|
194 |
-
.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
|
195 |
-
.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{
|
196 |
-
height: 8px; /* auto-expanded scrollbar */
|
197 |
-
margin: 4px 0;
|
198 |
-
}
|
199 |
-
|
200 |
-
.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonLeft,
|
201 |
-
.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonRight{
|
202 |
-
display: block;
|
203 |
-
position: absolute;
|
204 |
-
width: 20px;
|
205 |
-
height: 100%;
|
206 |
-
overflow: hidden;
|
207 |
-
margin: 0 auto;
|
208 |
-
cursor: pointer;
|
209 |
-
}
|
210 |
-
|
211 |
-
.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonLeft{ left: 0; }
|
212 |
-
|
213 |
-
.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonRight{ right: 0; }
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
/*
|
218 |
-
------------------------------------------------------------------------------------------------------------------------
|
219 |
-
4. VERTICAL AND HORIZONTAL SCROLLBARS
|
220 |
-
yx-axis
|
221 |
-
------------------------------------------------------------------------------------------------------------------------
|
222 |
-
*/
|
223 |
-
|
224 |
-
.mCSB_container_wrapper{
|
225 |
-
position: absolute;
|
226 |
-
height: auto;
|
227 |
-
width: auto;
|
228 |
-
overflow: hidden;
|
229 |
-
top: 0;
|
230 |
-
left: 0;
|
231 |
-
right: 0;
|
232 |
-
bottom: 0;
|
233 |
-
margin-right: 30px;
|
234 |
-
margin-bottom: 30px;
|
235 |
-
}
|
236 |
-
|
237 |
-
.mCSB_container_wrapper > .mCSB_container{
|
238 |
-
padding-right: 30px;
|
239 |
-
padding-bottom: 30px;
|
240 |
-
-webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
|
241 |
-
}
|
242 |
-
|
243 |
-
.mCSB_vertical_horizontal > .mCSB_scrollTools.mCSB_scrollTools_vertical{ bottom: 20px; }
|
244 |
-
|
245 |
-
.mCSB_vertical_horizontal > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ right: 20px; }
|
246 |
-
|
247 |
-
/* non-visible horizontal scrollbar */
|
248 |
-
.mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden + .mCSB_scrollTools.mCSB_scrollTools_vertical{ bottom: 0; }
|
249 |
-
|
250 |
-
/* non-visible vertical scrollbar/RTL direction/left-side scrollbar */
|
251 |
-
.mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden + .mCSB_scrollTools ~ .mCSB_scrollTools.mCSB_scrollTools_horizontal,
|
252 |
-
.mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ right: 0; }
|
253 |
-
|
254 |
-
/* RTL direction/left-side scrollbar */
|
255 |
-
.mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ left: 20px; }
|
256 |
-
|
257 |
-
/* non-visible scrollbar/RTL direction/left-side scrollbar */
|
258 |
-
.mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden + .mCSB_scrollTools ~ .mCSB_scrollTools.mCSB_scrollTools_horizontal{ left: 0; }
|
259 |
-
|
260 |
-
.mCS-dir-rtl > .mCSB_inside > .mCSB_container_wrapper{ /* RTL direction/left-side scrollbar */
|
261 |
-
margin-right: 0;
|
262 |
-
margin-left: 30px;
|
263 |
-
}
|
264 |
-
|
265 |
-
.mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden > .mCSB_container{ padding-right: 0; }
|
266 |
-
|
267 |
-
.mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden > .mCSB_container{ padding-bottom: 0; }
|
268 |
-
|
269 |
-
.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden{
|
270 |
-
margin-right: 0; /* non-visible scrollbar */
|
271 |
-
margin-left: 0;
|
272 |
-
}
|
273 |
-
|
274 |
-
/* non-visible horizontal scrollbar */
|
275 |
-
.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden{ margin-bottom: 0; }
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
/*
|
280 |
-
------------------------------------------------------------------------------------------------------------------------
|
281 |
-
5. TRANSITIONS
|
282 |
-
------------------------------------------------------------------------------------------------------------------------
|
283 |
-
*/
|
284 |
-
|
285 |
-
.mCSB_scrollTools,
|
286 |
-
.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
287 |
-
.mCSB_scrollTools .mCSB_buttonUp,
|
288 |
-
.mCSB_scrollTools .mCSB_buttonDown,
|
289 |
-
.mCSB_scrollTools .mCSB_buttonLeft,
|
290 |
-
.mCSB_scrollTools .mCSB_buttonRight{
|
291 |
-
-webkit-transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
|
292 |
-
-moz-transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
|
293 |
-
-o-transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
|
294 |
-
transition: opacity .2s ease-in-out, background-color .2s ease-in-out;
|
295 |
-
}
|
296 |
-
|
297 |
-
.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar, /* auto-expanded scrollbar */
|
298 |
-
.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail,
|
299 |
-
.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar,
|
300 |
-
.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail{
|
301 |
-
-webkit-transition: width .2s ease-out .2s, height .2s ease-out .2s,
|
302 |
-
margin-left .2s ease-out .2s, margin-right .2s ease-out .2s,
|
303 |
-
margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s,
|
304 |
-
opacity .2s ease-in-out, background-color .2s ease-in-out;
|
305 |
-
-moz-transition: width .2s ease-out .2s, height .2s ease-out .2s,
|
306 |
-
margin-left .2s ease-out .2s, margin-right .2s ease-out .2s,
|
307 |
-
margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s,
|
308 |
-
opacity .2s ease-in-out, background-color .2s ease-in-out;
|
309 |
-
-o-transition: width .2s ease-out .2s, height .2s ease-out .2s,
|
310 |
-
margin-left .2s ease-out .2s, margin-right .2s ease-out .2s,
|
311 |
-
margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s,
|
312 |
-
opacity .2s ease-in-out, background-color .2s ease-in-out;
|
313 |
-
transition: width .2s ease-out .2s, height .2s ease-out .2s,
|
314 |
-
margin-left .2s ease-out .2s, margin-right .2s ease-out .2s,
|
315 |
-
margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s,
|
316 |
-
opacity .2s ease-in-out, background-color .2s ease-in-out;
|
317 |
-
}
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
/*
|
322 |
-
------------------------------------------------------------------------------------------------------------------------
|
323 |
-
6. SCROLLBAR COLORS, OPACITY AND BACKGROUNDS
|
324 |
-
------------------------------------------------------------------------------------------------------------------------
|
325 |
-
*/
|
326 |
-
|
327 |
-
/*
|
328 |
-
----------------------------------------
|
329 |
-
6.1 THEMES
|
330 |
-
----------------------------------------
|
331 |
-
*/
|
332 |
-
|
333 |
-
/* default theme ("light") */
|
334 |
-
|
335 |
-
.mCSB_scrollTools{ opacity: 0.75; filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)"; }
|
336 |
-
|
337 |
-
.mCS-autoHide > .mCustomScrollBox > .mCSB_scrollTools,
|
338 |
-
.mCS-autoHide > .mCustomScrollBox ~ .mCSB_scrollTools{ opacity: 0; filter: "alpha(opacity=0)"; -ms-filter: "alpha(opacity=0)"; }
|
339 |
-
|
340 |
-
.mCustomScrollbar > .mCustomScrollBox > .mCSB_scrollTools.mCSB_scrollTools_onDrag,
|
341 |
-
.mCustomScrollbar > .mCustomScrollBox ~ .mCSB_scrollTools.mCSB_scrollTools_onDrag,
|
342 |
-
.mCustomScrollBox:hover > .mCSB_scrollTools,
|
343 |
-
.mCustomScrollBox:hover ~ .mCSB_scrollTools,
|
344 |
-
.mCS-autoHide:hover > .mCustomScrollBox > .mCSB_scrollTools,
|
345 |
-
.mCS-autoHide:hover > .mCustomScrollBox ~ .mCSB_scrollTools{ opacity: 1; filter: "alpha(opacity=100)"; -ms-filter: "alpha(opacity=100)"; }
|
346 |
-
|
347 |
-
.mCSB_scrollTools .mCSB_draggerRail{
|
348 |
-
background-color: #000; background-color: rgba(0,0,0,0.4);
|
349 |
-
filter: "alpha(opacity=40)"; -ms-filter: "alpha(opacity=40)";
|
350 |
-
}
|
351 |
-
|
352 |
-
.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
353 |
-
background-color: #fff; background-color: rgba(255,255,255,0.75);
|
354 |
-
filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)";
|
355 |
-
}
|
356 |
-
|
357 |
-
.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
|
358 |
-
background-color: #fff; background-color: rgba(255,255,255,0.85);
|
359 |
-
filter: "alpha(opacity=85)"; -ms-filter: "alpha(opacity=85)";
|
360 |
-
}
|
361 |
-
.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
362 |
-
.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
|
363 |
-
background-color: #fff; background-color: rgba(255,255,255,0.9);
|
364 |
-
filter: "alpha(opacity=90)"; -ms-filter: "alpha(opacity=90)";
|
365 |
-
}
|
366 |
-
|
367 |
-
.mCSB_scrollTools .mCSB_buttonUp,
|
368 |
-
.mCSB_scrollTools .mCSB_buttonDown,
|
369 |
-
.mCSB_scrollTools .mCSB_buttonLeft,
|
370 |
-
.mCSB_scrollTools .mCSB_buttonRight{
|
371 |
-
background-image: url(mCSB_buttons.png); /* css sprites */
|
372 |
-
background-repeat: no-repeat;
|
373 |
-
opacity: 0.4; filter: "alpha(opacity=40)"; -ms-filter: "alpha(opacity=40)";
|
374 |
-
}
|
375 |
-
|
376 |
-
.mCSB_scrollTools .mCSB_buttonUp{
|
377 |
-
background-position: 0 0;
|
378 |
-
/*
|
379 |
-
sprites locations
|
380 |
-
light: 0 0, -16px 0, -32px 0, -48px 0, 0 -72px, -16px -72px, -32px -72px
|
381 |
-
dark: -80px 0, -96px 0, -112px 0, -128px 0, -80px -72px, -96px -72px, -112px -72px
|
382 |
-
*/
|
383 |
-
}
|
384 |
-
|
385 |
-
.mCSB_scrollTools .mCSB_buttonDown{
|
386 |
-
background-position: 0 -20px;
|
387 |
-
/*
|
388 |
-
sprites locations
|
389 |
-
light: 0 -20px, -16px -20px, -32px -20px, -48px -20px, 0 -92px, -16px -92px, -32px -92px
|
390 |
-
dark: -80px -20px, -96px -20px, -112px -20px, -128px -20px, -80px -92px, -96px -92px, -112 -92px
|
391 |
-
*/
|
392 |
-
}
|
393 |
-
|
394 |
-
.mCSB_scrollTools .mCSB_buttonLeft{
|
395 |
-
background-position: 0 -40px;
|
396 |
-
/*
|
397 |
-
sprites locations
|
398 |
-
light: 0 -40px, -20px -40px, -40px -40px, -60px -40px, 0 -112px, -20px -112px, -40px -112px
|
399 |
-
dark: -80px -40px, -100px -40px, -120px -40px, -140px -40px, -80px -112px, -100px -112px, -120px -112px
|
400 |
-
*/
|
401 |
-
}
|
402 |
-
|
403 |
-
.mCSB_scrollTools .mCSB_buttonRight{
|
404 |
-
background-position: 0 -56px;
|
405 |
-
/*
|
406 |
-
sprites locations
|
407 |
-
light: 0 -56px, -20px -56px, -40px -56px, -60px -56px, 0 -128px, -20px -128px, -40px -128px
|
408 |
-
dark: -80px -56px, -100px -56px, -120px -56px, -140px -56px, -80px -128px, -100px -128px, -120px -128px
|
409 |
-
*/
|
410 |
-
}
|
411 |
-
|
412 |
-
.mCSB_scrollTools .mCSB_buttonUp:hover,
|
413 |
-
.mCSB_scrollTools .mCSB_buttonDown:hover,
|
414 |
-
.mCSB_scrollTools .mCSB_buttonLeft:hover,
|
415 |
-
.mCSB_scrollTools .mCSB_buttonRight:hover{ opacity: 0.75; filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)"; }
|
416 |
-
|
417 |
-
.mCSB_scrollTools .mCSB_buttonUp:active,
|
418 |
-
.mCSB_scrollTools .mCSB_buttonDown:active,
|
419 |
-
.mCSB_scrollTools .mCSB_buttonLeft:active,
|
420 |
-
.mCSB_scrollTools .mCSB_buttonRight:active{ opacity: 0.9; filter: "alpha(opacity=90)"; -ms-filter: "alpha(opacity=90)"; }
|
421 |
-
|
422 |
-
|
423 |
-
/* theme: "dark" */
|
424 |
-
|
425 |
-
.mCS-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.15); }
|
426 |
-
|
427 |
-
.mCS-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
|
428 |
-
|
429 |
-
.mCS-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: rgba(0,0,0,0.85); }
|
430 |
-
|
431 |
-
.mCS-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
432 |
-
.mCS-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: rgba(0,0,0,0.9); }
|
433 |
-
|
434 |
-
.mCS-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -80px 0; }
|
435 |
-
|
436 |
-
.mCS-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -80px -20px; }
|
437 |
-
|
438 |
-
.mCS-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -80px -40px; }
|
439 |
-
|
440 |
-
.mCS-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -80px -56px; }
|
441 |
-
|
442 |
-
/* ---------------------------------------- */
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
/* theme: "light-2", "dark-2" */
|
447 |
-
|
448 |
-
.mCS-light-2.mCSB_scrollTools .mCSB_draggerRail,
|
449 |
-
.mCS-dark-2.mCSB_scrollTools .mCSB_draggerRail{
|
450 |
-
width: 4px;
|
451 |
-
background-color: #fff; background-color: rgba(255,255,255,0.1);
|
452 |
-
-webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px;
|
453 |
-
}
|
454 |
-
|
455 |
-
.mCS-light-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
456 |
-
.mCS-dark-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
457 |
-
width: 4px;
|
458 |
-
background-color: #fff; background-color: rgba(255,255,255,0.75);
|
459 |
-
-webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px;
|
460 |
-
}
|
461 |
-
|
462 |
-
.mCS-light-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
463 |
-
.mCS-dark-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
464 |
-
.mCS-light-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
465 |
-
.mCS-dark-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
|
466 |
-
width: 100%;
|
467 |
-
height: 4px;
|
468 |
-
margin: 6px auto;
|
469 |
-
}
|
470 |
-
|
471 |
-
.mCS-light-2.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.85); }
|
472 |
-
|
473 |
-
.mCS-light-2.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
474 |
-
.mCS-light-2.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.9); }
|
475 |
-
|
476 |
-
.mCS-light-2.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px 0; }
|
477 |
-
|
478 |
-
.mCS-light-2.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -20px; }
|
479 |
-
|
480 |
-
.mCS-light-2.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -40px; }
|
481 |
-
|
482 |
-
.mCS-light-2.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -56px; }
|
483 |
-
|
484 |
-
|
485 |
-
/* theme: "dark-2" */
|
486 |
-
|
487 |
-
.mCS-dark-2.mCSB_scrollTools .mCSB_draggerRail{
|
488 |
-
background-color: #000; background-color: rgba(0,0,0,0.1);
|
489 |
-
-webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px;
|
490 |
-
}
|
491 |
-
|
492 |
-
.mCS-dark-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
493 |
-
background-color: #000; background-color: rgba(0,0,0,0.75);
|
494 |
-
-webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px;
|
495 |
-
}
|
496 |
-
|
497 |
-
.mCS-dark-2.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
|
498 |
-
|
499 |
-
.mCS-dark-2.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
500 |
-
.mCS-dark-2.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
|
501 |
-
|
502 |
-
.mCS-dark-2.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px 0; }
|
503 |
-
|
504 |
-
.mCS-dark-2.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -20px; }
|
505 |
-
|
506 |
-
.mCS-dark-2.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -40px; }
|
507 |
-
|
508 |
-
.mCS-dark-2.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -56px; }
|
509 |
-
|
510 |
-
/* ---------------------------------------- */
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
/* theme: "light-thick", "dark-thick" */
|
515 |
-
|
516 |
-
.mCS-light-thick.mCSB_scrollTools .mCSB_draggerRail,
|
517 |
-
.mCS-dark-thick.mCSB_scrollTools .mCSB_draggerRail{
|
518 |
-
width: 4px;
|
519 |
-
background-color: #fff; background-color: rgba(255,255,255,0.1);
|
520 |
-
-webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px;
|
521 |
-
}
|
522 |
-
|
523 |
-
.mCS-light-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
524 |
-
.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
525 |
-
width: 6px;
|
526 |
-
background-color: #fff; background-color: rgba(255,255,255,0.75);
|
527 |
-
-webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px;
|
528 |
-
}
|
529 |
-
|
530 |
-
.mCS-light-thick.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
531 |
-
.mCS-dark-thick.mCSB_scrollTools_horizontal .mCSB_draggerRail{
|
532 |
-
width: 100%;
|
533 |
-
height: 4px;
|
534 |
-
margin: 6px 0;
|
535 |
-
}
|
536 |
-
|
537 |
-
.mCS-light-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
538 |
-
.mCS-dark-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
|
539 |
-
width: 100%;
|
540 |
-
height: 6px;
|
541 |
-
margin: 5px auto;
|
542 |
-
}
|
543 |
-
|
544 |
-
.mCS-light-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.85); }
|
545 |
-
|
546 |
-
.mCS-light-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
547 |
-
.mCS-light-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.9); }
|
548 |
-
|
549 |
-
.mCS-light-thick.mCSB_scrollTools .mCSB_buttonUp{ background-position: -16px 0; }
|
550 |
-
|
551 |
-
.mCS-light-thick.mCSB_scrollTools .mCSB_buttonDown{ background-position: -16px -20px; }
|
552 |
-
|
553 |
-
.mCS-light-thick.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -20px -40px; }
|
554 |
-
|
555 |
-
.mCS-light-thick.mCSB_scrollTools .mCSB_buttonRight{ background-position: -20px -56px; }
|
556 |
-
|
557 |
-
|
558 |
-
/* theme: "dark-thick" */
|
559 |
-
|
560 |
-
.mCS-dark-thick.mCSB_scrollTools .mCSB_draggerRail{
|
561 |
-
background-color: #000; background-color: rgba(0,0,0,0.1);
|
562 |
-
-webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px;
|
563 |
-
}
|
564 |
-
|
565 |
-
.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
566 |
-
background-color: #000; background-color: rgba(0,0,0,0.75);
|
567 |
-
-webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px;
|
568 |
-
}
|
569 |
-
|
570 |
-
.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
|
571 |
-
|
572 |
-
.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
573 |
-
.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
|
574 |
-
|
575 |
-
.mCS-dark-thick.mCSB_scrollTools .mCSB_buttonUp{ background-position: -96px 0; }
|
576 |
-
|
577 |
-
.mCS-dark-thick.mCSB_scrollTools .mCSB_buttonDown{ background-position: -96px -20px; }
|
578 |
-
|
579 |
-
.mCS-dark-thick.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -100px -40px; }
|
580 |
-
|
581 |
-
.mCS-dark-thick.mCSB_scrollTools .mCSB_buttonRight{ background-position: -100px -56px; }
|
582 |
-
|
583 |
-
/* ---------------------------------------- */
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
/* theme: "light-thin", "dark-thin" */
|
588 |
-
|
589 |
-
.mCS-light-thin.mCSB_scrollTools .mCSB_draggerRail{ background-color: #fff; background-color: rgba(255,255,255,0.1); }
|
590 |
-
|
591 |
-
.mCS-light-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
592 |
-
.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ width: 2px; }
|
593 |
-
|
594 |
-
.mCS-light-thin.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
595 |
-
.mCS-dark-thin.mCSB_scrollTools_horizontal .mCSB_draggerRail{ width: 100%; }
|
596 |
-
|
597 |
-
.mCS-light-thin.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
598 |
-
.mCS-dark-thin.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
|
599 |
-
width: 100%;
|
600 |
-
height: 2px;
|
601 |
-
margin: 7px auto;
|
602 |
-
}
|
603 |
-
|
604 |
-
|
605 |
-
/* theme "dark-thin" */
|
606 |
-
|
607 |
-
.mCS-dark-thin.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.15); }
|
608 |
-
|
609 |
-
.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
|
610 |
-
|
611 |
-
.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
|
612 |
-
|
613 |
-
.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
614 |
-
.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
|
615 |
-
|
616 |
-
.mCS-dark-thin.mCSB_scrollTools .mCSB_buttonUp{ background-position: -80px 0; }
|
617 |
-
|
618 |
-
.mCS-dark-thin.mCSB_scrollTools .mCSB_buttonDown{ background-position: -80px -20px; }
|
619 |
-
|
620 |
-
.mCS-dark-thin.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -80px -40px; }
|
621 |
-
|
622 |
-
.mCS-dark-thin.mCSB_scrollTools .mCSB_buttonRight{ background-position: -80px -56px; }
|
623 |
-
|
624 |
-
/* ---------------------------------------- */
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
/* theme "rounded", "rounded-dark", "rounded-dots", "rounded-dots-dark" */
|
629 |
-
|
630 |
-
.mCS-rounded.mCSB_scrollTools .mCSB_draggerRail{ background-color: #fff; background-color: rgba(255,255,255,0.15); }
|
631 |
-
|
632 |
-
.mCS-rounded.mCSB_scrollTools .mCSB_dragger,
|
633 |
-
.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger,
|
634 |
-
.mCS-rounded-dots.mCSB_scrollTools .mCSB_dragger,
|
635 |
-
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger{ height: 14px; }
|
636 |
-
|
637 |
-
.mCS-rounded.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
638 |
-
.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
639 |
-
.mCS-rounded-dots.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
640 |
-
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
641 |
-
width: 14px;
|
642 |
-
margin: 0 1px;
|
643 |
-
}
|
644 |
-
|
645 |
-
.mCS-rounded.mCSB_scrollTools_horizontal .mCSB_dragger,
|
646 |
-
.mCS-rounded-dark.mCSB_scrollTools_horizontal .mCSB_dragger,
|
647 |
-
.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_dragger,
|
648 |
-
.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_dragger{ width: 14px; }
|
649 |
-
|
650 |
-
.mCS-rounded.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
651 |
-
.mCS-rounded-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
652 |
-
.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
653 |
-
.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
|
654 |
-
height: 14px;
|
655 |
-
margin: 1px 0;
|
656 |
-
}
|
657 |
-
|
658 |
-
.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
|
659 |
-
.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar,
|
660 |
-
.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
|
661 |
-
.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{
|
662 |
-
width: 16px; /* auto-expanded scrollbar */
|
663 |
-
height: 16px;
|
664 |
-
margin: -1px 0;
|
665 |
-
}
|
666 |
-
|
667 |
-
.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
|
668 |
-
.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,
|
669 |
-
.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
|
670 |
-
.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ width: 4px; /* auto-expanded scrollbar */ }
|
671 |
-
|
672 |
-
.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
|
673 |
-
.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar,
|
674 |
-
.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,
|
675 |
-
.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{
|
676 |
-
height: 16px; /* auto-expanded scrollbar */
|
677 |
-
width: 16px;
|
678 |
-
margin: 0 -1px;
|
679 |
-
}
|
680 |
-
|
681 |
-
.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
|
682 |
-
.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,
|
683 |
-
.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
|
684 |
-
.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{
|
685 |
-
height: 4px; /* auto-expanded scrollbar */
|
686 |
-
margin: 6px 0;
|
687 |
-
}
|
688 |
-
|
689 |
-
.mCS-rounded.mCSB_scrollTools .mCSB_buttonUp{ background-position: 0 -72px; }
|
690 |
-
|
691 |
-
.mCS-rounded.mCSB_scrollTools .mCSB_buttonDown{ background-position: 0 -92px; }
|
692 |
-
|
693 |
-
.mCS-rounded.mCSB_scrollTools .mCSB_buttonLeft{ background-position: 0 -112px; }
|
694 |
-
|
695 |
-
.mCS-rounded.mCSB_scrollTools .mCSB_buttonRight{ background-position: 0 -128px; }
|
696 |
-
|
697 |
-
|
698 |
-
/* theme "rounded-dark", "rounded-dots-dark" */
|
699 |
-
|
700 |
-
.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
701 |
-
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
|
702 |
-
|
703 |
-
.mCS-rounded-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.15); }
|
704 |
-
|
705 |
-
.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
|
706 |
-
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
|
707 |
-
|
708 |
-
.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
709 |
-
.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,
|
710 |
-
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
711 |
-
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
|
712 |
-
|
713 |
-
.mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -80px -72px; }
|
714 |
-
|
715 |
-
.mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -80px -92px; }
|
716 |
-
|
717 |
-
.mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -80px -112px; }
|
718 |
-
|
719 |
-
.mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -80px -128px; }
|
720 |
-
|
721 |
-
|
722 |
-
/* theme "rounded-dots", "rounded-dots-dark" */
|
723 |
-
|
724 |
-
.mCS-rounded-dots.mCSB_scrollTools_vertical .mCSB_draggerRail,
|
725 |
-
.mCS-rounded-dots-dark.mCSB_scrollTools_vertical .mCSB_draggerRail{ width: 4px; }
|
726 |
-
|
727 |
-
.mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail,
|
728 |
-
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail,
|
729 |
-
.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
730 |
-
.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{
|
731 |
-
background-color: transparent;
|
732 |
-
background-position: center;
|
733 |
-
}
|
734 |
-
|
735 |
-
.mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail,
|
736 |
-
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail{
|
737 |
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAANElEQVQYV2NkIAAYiVbw//9/Y6DiM1ANJoyMjGdBbLgJQAX/kU0DKgDLkaQAvxW4HEvQFwCRcxIJK1XznAAAAABJRU5ErkJggg==");
|
738 |
-
background-repeat: repeat-y;
|
739 |
-
opacity: 0.3;
|
740 |
-
filter: "alpha(opacity=30)"; -ms-filter: "alpha(opacity=30)";
|
741 |
-
}
|
742 |
-
|
743 |
-
.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
744 |
-
.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{
|
745 |
-
height: 4px;
|
746 |
-
margin: 6px 0;
|
747 |
-
background-repeat: repeat-x;
|
748 |
-
}
|
749 |
-
|
750 |
-
.mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonUp{ background-position: -16px -72px; }
|
751 |
-
|
752 |
-
.mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonDown{ background-position: -16px -92px; }
|
753 |
-
|
754 |
-
.mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -20px -112px; }
|
755 |
-
|
756 |
-
.mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonRight{ background-position: -20px -128px; }
|
757 |
-
|
758 |
-
|
759 |
-
/* theme "rounded-dots-dark" */
|
760 |
-
|
761 |
-
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail{
|
762 |
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAALElEQVQYV2NkIAAYSVFgDFR8BqrBBEifBbGRTfiPZhpYjiQFBK3A6l6CvgAAE9kGCd1mvgEAAAAASUVORK5CYII=");
|
763 |
-
}
|
764 |
-
|
765 |
-
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -96px -72px; }
|
766 |
-
|
767 |
-
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -96px -92px; }
|
768 |
-
|
769 |
-
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -100px -112px; }
|
770 |
-
|
771 |
-
.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -100px -128px; }
|
772 |
-
|
773 |
-
/* ---------------------------------------- */
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
/* theme "3d", "3d-dark", "3d-thick", "3d-thick-dark" */
|
778 |
-
|
779 |
-
.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
780 |
-
.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
781 |
-
.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
782 |
-
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
783 |
-
background-repeat: repeat-y;
|
784 |
-
background-image: -moz-linear-gradient(left, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
|
785 |
-
background-image: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(255,255,255,0.5)), color-stop(100%,rgba(255,255,255,0)));
|
786 |
-
background-image: -webkit-linear-gradient(left, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
|
787 |
-
background-image: -o-linear-gradient(left, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
|
788 |
-
background-image: -ms-linear-gradient(left, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
|
789 |
-
background-image: linear-gradient(to right, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
|
790 |
-
}
|
791 |
-
|
792 |
-
.mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
793 |
-
.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
794 |
-
.mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
795 |
-
.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
|
796 |
-
background-repeat: repeat-x;
|
797 |
-
background-image: -moz-linear-gradient(top, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
|
798 |
-
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.5)), color-stop(100%,rgba(255,255,255,0)));
|
799 |
-
background-image: -webkit-linear-gradient(top, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
|
800 |
-
background-image: -o-linear-gradient(top, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
|
801 |
-
background-image: -ms-linear-gradient(top, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
|
802 |
-
background-image: linear-gradient(to bottom, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%);
|
803 |
-
}
|
804 |
-
|
805 |
-
|
806 |
-
/* theme "3d", "3d-dark" */
|
807 |
-
|
808 |
-
.mCS-3d.mCSB_scrollTools_vertical .mCSB_dragger,
|
809 |
-
.mCS-3d-dark.mCSB_scrollTools_vertical .mCSB_dragger{ height: 70px; }
|
810 |
-
|
811 |
-
.mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger,
|
812 |
-
.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger{ width: 70px; }
|
813 |
-
|
814 |
-
.mCS-3d.mCSB_scrollTools,
|
815 |
-
.mCS-3d-dark.mCSB_scrollTools{
|
816 |
-
opacity: 1;
|
817 |
-
filter: "alpha(opacity=30)"; -ms-filter: "alpha(opacity=30)";
|
818 |
-
}
|
819 |
-
|
820 |
-
.mCS-3d.mCSB_scrollTools .mCSB_draggerRail,
|
821 |
-
.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
822 |
-
.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail,
|
823 |
-
.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ -webkit-border-radius: 16px; -moz-border-radius: 16px; border-radius: 16px; }
|
824 |
-
|
825 |
-
.mCS-3d.mCSB_scrollTools .mCSB_draggerRail,
|
826 |
-
.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail{
|
827 |
-
width: 8px;
|
828 |
-
background-color: #000; background-color: rgba(0,0,0,0.2);
|
829 |
-
box-shadow: inset 1px 0 1px rgba(0,0,0,0.5), inset -1px 0 1px rgba(255,255,255,0.2);
|
830 |
-
}
|
831 |
-
|
832 |
-
.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
833 |
-
.mCS-3d.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
|
834 |
-
.mCS-3d.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
835 |
-
.mCS-3d.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,
|
836 |
-
.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
837 |
-
.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
|
838 |
-
.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
839 |
-
.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #555; }
|
840 |
-
|
841 |
-
.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
842 |
-
.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ width: 8px; }
|
843 |
-
|
844 |
-
.mCS-3d.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
845 |
-
.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{
|
846 |
-
width: 100%;
|
847 |
-
height: 8px;
|
848 |
-
margin: 4px 0;
|
849 |
-
box-shadow: inset 0 1px 1px rgba(0,0,0,0.5), inset 0 -1px 1px rgba(255,255,255,0.2);
|
850 |
-
}
|
851 |
-
|
852 |
-
.mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
853 |
-
.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
|
854 |
-
width: 100%;
|
855 |
-
height: 8px;
|
856 |
-
margin: 4px auto;
|
857 |
-
}
|
858 |
-
|
859 |
-
.mCS-3d.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; }
|
860 |
-
|
861 |
-
.mCS-3d.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; }
|
862 |
-
|
863 |
-
.mCS-3d.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; }
|
864 |
-
|
865 |
-
.mCS-3d.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; }
|
866 |
-
|
867 |
-
|
868 |
-
/* theme "3d-dark" */
|
869 |
-
|
870 |
-
.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail{
|
871 |
-
background-color: #000; background-color: rgba(0,0,0,0.1);
|
872 |
-
box-shadow: inset 1px 0 1px rgba(0,0,0,0.1);
|
873 |
-
}
|
874 |
-
|
875 |
-
.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{ box-shadow: inset 0 1px 1px rgba(0,0,0,0.1); }
|
876 |
-
|
877 |
-
.mCS-3d-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; }
|
878 |
-
|
879 |
-
.mCS-3d-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; }
|
880 |
-
|
881 |
-
.mCS-3d-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; }
|
882 |
-
|
883 |
-
.mCS-3d-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; }
|
884 |
-
|
885 |
-
/* ---------------------------------------- */
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
/* theme: "3d-thick", "3d-thick-dark" */
|
890 |
-
|
891 |
-
.mCS-3d-thick.mCSB_scrollTools,
|
892 |
-
.mCS-3d-thick-dark.mCSB_scrollTools{
|
893 |
-
opacity: 1;
|
894 |
-
filter: "alpha(opacity=30)"; -ms-filter: "alpha(opacity=30)";
|
895 |
-
}
|
896 |
-
|
897 |
-
.mCS-3d-thick.mCSB_scrollTools,
|
898 |
-
.mCS-3d-thick-dark.mCSB_scrollTools,
|
899 |
-
.mCS-3d-thick.mCSB_scrollTools .mCSB_draggerContainer,
|
900 |
-
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerContainer{ -webkit-border-radius: 7px; -moz-border-radius: 7px; border-radius: 7px; }
|
901 |
-
|
902 |
-
.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
903 |
-
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; }
|
904 |
-
|
905 |
-
.mCSB_inside + .mCS-3d-thick.mCSB_scrollTools_vertical,
|
906 |
-
.mCSB_inside + .mCS-3d-thick-dark.mCSB_scrollTools_vertical{ right: 1px; }
|
907 |
-
|
908 |
-
.mCS-3d-thick.mCSB_scrollTools_vertical,
|
909 |
-
.mCS-3d-thick-dark.mCSB_scrollTools_vertical{ box-shadow: inset 1px 0 1px rgba(0,0,0,0.1), inset 0 0 14px rgba(0,0,0,0.5); }
|
910 |
-
|
911 |
-
.mCS-3d-thick.mCSB_scrollTools_horizontal,
|
912 |
-
.mCS-3d-thick-dark.mCSB_scrollTools_horizontal{
|
913 |
-
bottom: 1px;
|
914 |
-
box-shadow: inset 0 1px 1px rgba(0,0,0,0.1), inset 0 0 14px rgba(0,0,0,0.5);
|
915 |
-
}
|
916 |
-
|
917 |
-
.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
918 |
-
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
919 |
-
box-shadow: inset 1px 0 0 rgba(255,255,255,0.4);
|
920 |
-
width: 12px;
|
921 |
-
margin: 2px;
|
922 |
-
position: absolute;
|
923 |
-
height: auto;
|
924 |
-
top: 0;
|
925 |
-
bottom: 0;
|
926 |
-
left: 0;
|
927 |
-
right: 0;
|
928 |
-
}
|
929 |
-
|
930 |
-
.mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
931 |
-
.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ box-shadow: inset 0 1px 0 rgba(255,255,255,0.4); }
|
932 |
-
|
933 |
-
.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
934 |
-
.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
|
935 |
-
.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
936 |
-
.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #555; }
|
937 |
-
|
938 |
-
.mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
939 |
-
.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
|
940 |
-
height: 12px;
|
941 |
-
width: auto;
|
942 |
-
}
|
943 |
-
|
944 |
-
.mCS-3d-thick.mCSB_scrollTools .mCSB_draggerContainer{
|
945 |
-
background-color: #000; background-color: rgba(0,0,0,0.05);
|
946 |
-
box-shadow: inset 1px 1px 16px rgba(0,0,0,0.1);
|
947 |
-
}
|
948 |
-
|
949 |
-
.mCS-3d-thick.mCSB_scrollTools .mCSB_draggerRail{ background-color: transparent; }
|
950 |
-
|
951 |
-
.mCS-3d-thick.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; }
|
952 |
-
|
953 |
-
.mCS-3d-thick.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; }
|
954 |
-
|
955 |
-
.mCS-3d-thick.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; }
|
956 |
-
|
957 |
-
.mCS-3d-thick.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; }
|
958 |
-
|
959 |
-
|
960 |
-
/* theme: "3d-thick-dark" */
|
961 |
-
|
962 |
-
.mCS-3d-thick-dark.mCSB_scrollTools{ box-shadow: inset 0 0 14px rgba(0,0,0,0.2); }
|
963 |
-
|
964 |
-
.mCS-3d-thick-dark.mCSB_scrollTools_horizontal{ box-shadow: inset 0 1px 1px rgba(0,0,0,0.1), inset 0 0 14px rgba(0,0,0,0.2); }
|
965 |
-
|
966 |
-
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ box-shadow: inset 1px 0 0 rgba(255,255,255,0.4), inset -1px 0 0 rgba(0,0,0,0.2); }
|
967 |
-
|
968 |
-
.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -1px 0 rgba(0,0,0,0.2); }
|
969 |
-
|
970 |
-
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
971 |
-
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
|
972 |
-
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
973 |
-
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #777; }
|
974 |
-
|
975 |
-
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerContainer{
|
976 |
-
background-color: #fff; background-color: rgba(0,0,0,0.05);
|
977 |
-
box-shadow: inset 1px 1px 16px rgba(0,0,0,0.1);
|
978 |
-
}
|
979 |
-
|
980 |
-
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: transparent; }
|
981 |
-
|
982 |
-
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; }
|
983 |
-
|
984 |
-
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; }
|
985 |
-
|
986 |
-
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; }
|
987 |
-
|
988 |
-
.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; }
|
989 |
-
|
990 |
-
/* ---------------------------------------- */
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
/* theme: "minimal", "minimal-dark" */
|
995 |
-
|
996 |
-
.mCSB_outside + .mCS-minimal.mCSB_scrollTools_vertical,
|
997 |
-
.mCSB_outside + .mCS-minimal-dark.mCSB_scrollTools_vertical{
|
998 |
-
right: 0;
|
999 |
-
margin: 12px 0;
|
1000 |
-
}
|
1001 |
-
|
1002 |
-
.mCustomScrollBox.mCS-minimal + .mCSB_scrollTools.mCSB_scrollTools_horizontal,
|
1003 |
-
.mCustomScrollBox.mCS-minimal + .mCSB_scrollTools + .mCSB_scrollTools.mCSB_scrollTools_horizontal,
|
1004 |
-
.mCustomScrollBox.mCS-minimal-dark + .mCSB_scrollTools.mCSB_scrollTools_horizontal,
|
1005 |
-
.mCustomScrollBox.mCS-minimal-dark + .mCSB_scrollTools + .mCSB_scrollTools.mCSB_scrollTools_horizontal{
|
1006 |
-
bottom: 0;
|
1007 |
-
margin: 0 12px;
|
1008 |
-
}
|
1009 |
-
|
1010 |
-
/* RTL direction/left-side scrollbar */
|
1011 |
-
.mCS-dir-rtl > .mCSB_outside + .mCS-minimal.mCSB_scrollTools_vertical,
|
1012 |
-
.mCS-dir-rtl > .mCSB_outside + .mCS-minimal-dark.mCSB_scrollTools_vertical{
|
1013 |
-
left: 0;
|
1014 |
-
right: auto;
|
1015 |
-
}
|
1016 |
-
|
1017 |
-
.mCS-minimal.mCSB_scrollTools .mCSB_draggerRail,
|
1018 |
-
.mCS-minimal-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: transparent; }
|
1019 |
-
|
1020 |
-
.mCS-minimal.mCSB_scrollTools_vertical .mCSB_dragger,
|
1021 |
-
.mCS-minimal-dark.mCSB_scrollTools_vertical .mCSB_dragger{ height: 50px; }
|
1022 |
-
|
1023 |
-
.mCS-minimal.mCSB_scrollTools_horizontal .mCSB_dragger,
|
1024 |
-
.mCS-minimal-dark.mCSB_scrollTools_horizontal .mCSB_dragger{ width: 50px; }
|
1025 |
-
|
1026 |
-
.mCS-minimal.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
1027 |
-
background-color: #fff; background-color: rgba(255,255,255,0.2);
|
1028 |
-
filter: "alpha(opacity=20)"; -ms-filter: "alpha(opacity=20)";
|
1029 |
-
}
|
1030 |
-
|
1031 |
-
.mCS-minimal.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
1032 |
-
.mCS-minimal.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
|
1033 |
-
background-color: #fff; background-color: rgba(255,255,255,0.5);
|
1034 |
-
filter: "alpha(opacity=50)"; -ms-filter: "alpha(opacity=50)";
|
1035 |
-
}
|
1036 |
-
|
1037 |
-
|
1038 |
-
/* theme: "minimal-dark" */
|
1039 |
-
|
1040 |
-
.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
1041 |
-
background-color: #000; background-color: rgba(0,0,0,0.2);
|
1042 |
-
filter: "alpha(opacity=20)"; -ms-filter: "alpha(opacity=20)";
|
1043 |
-
}
|
1044 |
-
|
1045 |
-
.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
1046 |
-
.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
|
1047 |
-
background-color: #000; background-color: rgba(0,0,0,0.5);
|
1048 |
-
filter: "alpha(opacity=50)"; -ms-filter: "alpha(opacity=50)";
|
1049 |
-
}
|
1050 |
-
|
1051 |
-
/* ---------------------------------------- */
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
/* theme "light-3", "dark-3" */
|
1056 |
-
|
1057 |
-
.mCS-light-3.mCSB_scrollTools .mCSB_draggerRail,
|
1058 |
-
.mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail{
|
1059 |
-
width: 6px;
|
1060 |
-
background-color: #000; background-color: rgba(0,0,0,0.2);
|
1061 |
-
}
|
1062 |
-
|
1063 |
-
.mCS-light-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
1064 |
-
.mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ width: 6px; }
|
1065 |
-
|
1066 |
-
.mCS-light-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
1067 |
-
.mCS-dark-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
1068 |
-
.mCS-light-3.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
1069 |
-
.mCS-dark-3.mCSB_scrollTools_horizontal .mCSB_draggerRail{
|
1070 |
-
width: 100%;
|
1071 |
-
height: 6px;
|
1072 |
-
margin: 5px 0;
|
1073 |
-
}
|
1074 |
-
|
1075 |
-
.mCS-light-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
|
1076 |
-
.mCS-light-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,
|
1077 |
-
.mCS-dark-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
|
1078 |
-
.mCS-dark-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{
|
1079 |
-
width: 12px;
|
1080 |
-
}
|
1081 |
-
|
1082 |
-
.mCS-light-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
|
1083 |
-
.mCS-light-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,
|
1084 |
-
.mCS-dark-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail,
|
1085 |
-
.mCS-dark-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{
|
1086 |
-
height: 12px;
|
1087 |
-
margin: 2px 0;
|
1088 |
-
}
|
1089 |
-
|
1090 |
-
.mCS-light-3.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; }
|
1091 |
-
|
1092 |
-
.mCS-light-3.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; }
|
1093 |
-
|
1094 |
-
.mCS-light-3.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; }
|
1095 |
-
|
1096 |
-
.mCS-light-3.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; }
|
1097 |
-
|
1098 |
-
|
1099 |
-
/* theme "dark-3" */
|
1100 |
-
|
1101 |
-
.mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
|
1102 |
-
|
1103 |
-
.mCS-dark-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
|
1104 |
-
|
1105 |
-
.mCS-dark-3.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
1106 |
-
.mCS-dark-3.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
|
1107 |
-
|
1108 |
-
.mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.1); }
|
1109 |
-
|
1110 |
-
.mCS-dark-3.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; }
|
1111 |
-
|
1112 |
-
.mCS-dark-3.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; }
|
1113 |
-
|
1114 |
-
.mCS-dark-3.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; }
|
1115 |
-
|
1116 |
-
.mCS-dark-3.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; }
|
1117 |
-
|
1118 |
-
/* ---------------------------------------- */
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
/* theme "inset", "inset-dark", "inset-2", "inset-2-dark", "inset-3", "inset-3-dark" */
|
1123 |
-
|
1124 |
-
.mCS-inset.mCSB_scrollTools .mCSB_draggerRail,
|
1125 |
-
.mCS-inset-dark.mCSB_scrollTools .mCSB_draggerRail,
|
1126 |
-
.mCS-inset-2.mCSB_scrollTools .mCSB_draggerRail,
|
1127 |
-
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail,
|
1128 |
-
.mCS-inset-3.mCSB_scrollTools .mCSB_draggerRail,
|
1129 |
-
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{
|
1130 |
-
width: 12px;
|
1131 |
-
background-color: #000; background-color: rgba(0,0,0,0.2);
|
1132 |
-
}
|
1133 |
-
|
1134 |
-
.mCS-inset.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
1135 |
-
.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
1136 |
-
.mCS-inset-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
1137 |
-
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
1138 |
-
.mCS-inset-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
1139 |
-
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
|
1140 |
-
width: 6px;
|
1141 |
-
margin: 3px 5px;
|
1142 |
-
position: absolute;
|
1143 |
-
height: auto;
|
1144 |
-
top: 0;
|
1145 |
-
bottom: 0;
|
1146 |
-
left: 0;
|
1147 |
-
right: 0;
|
1148 |
-
}
|
1149 |
-
|
1150 |
-
.mCS-inset.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
1151 |
-
.mCS-inset-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
1152 |
-
.mCS-inset-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
1153 |
-
.mCS-inset-2-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
1154 |
-
.mCS-inset-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,
|
1155 |
-
.mCS-inset-3-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{
|
1156 |
-
height: 6px;
|
1157 |
-
margin: 5px 3px;
|
1158 |
-
position: absolute;
|
1159 |
-
width: auto;
|
1160 |
-
top: 0;
|
1161 |
-
bottom: 0;
|
1162 |
-
left: 0;
|
1163 |
-
right: 0;
|
1164 |
-
}
|
1165 |
-
|
1166 |
-
.mCS-inset.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
1167 |
-
.mCS-inset-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
1168 |
-
.mCS-inset-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
1169 |
-
.mCS-inset-2-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
1170 |
-
.mCS-inset-3.mCSB_scrollTools_horizontal .mCSB_draggerRail,
|
1171 |
-
.mCS-inset-3-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{
|
1172 |
-
width: 100%;
|
1173 |
-
height: 12px;
|
1174 |
-
margin: 2px 0;
|
1175 |
-
}
|
1176 |
-
|
1177 |
-
.mCS-inset.mCSB_scrollTools .mCSB_buttonUp,
|
1178 |
-
.mCS-inset-2.mCSB_scrollTools .mCSB_buttonUp,
|
1179 |
-
.mCS-inset-3.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; }
|
1180 |
-
|
1181 |
-
.mCS-inset.mCSB_scrollTools .mCSB_buttonDown,
|
1182 |
-
.mCS-inset-2.mCSB_scrollTools .mCSB_buttonDown,
|
1183 |
-
.mCS-inset-3.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; }
|
1184 |
-
|
1185 |
-
.mCS-inset.mCSB_scrollTools .mCSB_buttonLeft,
|
1186 |
-
.mCS-inset-2.mCSB_scrollTools .mCSB_buttonLeft,
|
1187 |
-
.mCS-inset-3.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; }
|
1188 |
-
|
1189 |
-
.mCS-inset.mCSB_scrollTools .mCSB_buttonRight,
|
1190 |
-
.mCS-inset-2.mCSB_scrollTools .mCSB_buttonRight,
|
1191 |
-
.mCS-inset-3.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; }
|
1192 |
-
|
1193 |
-
|
1194 |
-
/* theme "inset-dark", "inset-2-dark", "inset-3-dark" */
|
1195 |
-
|
1196 |
-
.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
1197 |
-
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,
|
1198 |
-
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
|
1199 |
-
|
1200 |
-
.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
|
1201 |
-
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,
|
1202 |
-
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
|
1203 |
-
|
1204 |
-
.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
1205 |
-
.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,
|
1206 |
-
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
1207 |
-
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,
|
1208 |
-
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
1209 |
-
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
|
1210 |
-
|
1211 |
-
.mCS-inset-dark.mCSB_scrollTools .mCSB_draggerRail,
|
1212 |
-
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail,
|
1213 |
-
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.1); }
|
1214 |
-
|
1215 |
-
.mCS-inset-dark.mCSB_scrollTools .mCSB_buttonUp,
|
1216 |
-
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonUp,
|
1217 |
-
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; }
|
1218 |
-
|
1219 |
-
.mCS-inset-dark.mCSB_scrollTools .mCSB_buttonDown,
|
1220 |
-
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonDown,
|
1221 |
-
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; }
|
1222 |
-
|
1223 |
-
.mCS-inset-dark.mCSB_scrollTools .mCSB_buttonLeft,
|
1224 |
-
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonLeft,
|
1225 |
-
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; }
|
1226 |
-
|
1227 |
-
.mCS-inset-dark.mCSB_scrollTools .mCSB_buttonRight,
|
1228 |
-
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonRight,
|
1229 |
-
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; }
|
1230 |
-
|
1231 |
-
|
1232 |
-
/* theme "inset-2", "inset-2-dark" */
|
1233 |
-
|
1234 |
-
.mCS-inset-2.mCSB_scrollTools .mCSB_draggerRail,
|
1235 |
-
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail{
|
1236 |
-
background-color: transparent;
|
1237 |
-
border-width: 1px;
|
1238 |
-
border-style: solid;
|
1239 |
-
border-color: #fff;
|
1240 |
-
border-color: rgba(255,255,255,0.2);
|
1241 |
-
-webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
|
1242 |
-
}
|
1243 |
-
|
1244 |
-
.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail{ border-color: #000; border-color: rgba(0,0,0,0.2); }
|
1245 |
-
|
1246 |
-
|
1247 |
-
/* theme "inset-3", "inset-3-dark" */
|
1248 |
-
|
1249 |
-
.mCS-inset-3.mCSB_scrollTools .mCSB_draggerRail{ background-color: #fff; background-color: rgba(255,255,255,0.6); }
|
1250 |
-
|
1251 |
-
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.6); }
|
1252 |
-
|
1253 |
-
.mCS-inset-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); }
|
1254 |
-
|
1255 |
-
.mCS-inset-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); }
|
1256 |
-
|
1257 |
-
.mCS-inset-3.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
1258 |
-
.mCS-inset-3.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); }
|
1259 |
-
|
1260 |
-
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.75); }
|
1261 |
-
|
1262 |
-
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.85); }
|
1263 |
-
|
1264 |
-
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
|
1265 |
-
.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.9); }
|
1266 |
-
|
1267 |
-
/* ---------------------------------------- */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/simplebar.js
ADDED
@@ -0,0 +1,4452 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* SimpleBar.js - v4.0.0-alpha.5
|
3 |
+
* Scrollbars, simpler.
|
4 |
+
* https://grsmto.github.io/simplebar/
|
5 |
+
*
|
6 |
+
* Made by Adrien Denat from a fork by Jonathan Nicol
|
7 |
+
* Under MIT License
|
8 |
+
*/
|
9 |
+
|
10 |
+
(function (global, factory) {
|
11 |
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
12 |
+
typeof define === 'function' && define.amd ? define(factory) :
|
13 |
+
(global = global || self, global.SimpleBar = factory());
|
14 |
+
}(this, function () { 'use strict';
|
15 |
+
|
16 |
+
var aFunction = function (it) {
|
17 |
+
if (typeof it != 'function') {
|
18 |
+
throw TypeError(String(it) + ' is not a function');
|
19 |
+
} return it;
|
20 |
+
};
|
21 |
+
|
22 |
+
// optional / simple context binding
|
23 |
+
var bindContext = function (fn, that, length) {
|
24 |
+
aFunction(fn);
|
25 |
+
if (that === undefined) return fn;
|
26 |
+
switch (length) {
|
27 |
+
case 0: return function () {
|
28 |
+
return fn.call(that);
|
29 |
+
};
|
30 |
+
case 1: return function (a) {
|
31 |
+
return fn.call(that, a);
|
32 |
+
};
|
33 |
+
case 2: return function (a, b) {
|
34 |
+
return fn.call(that, a, b);
|
35 |
+
};
|
36 |
+
case 3: return function (a, b, c) {
|
37 |
+
return fn.call(that, a, b, c);
|
38 |
+
};
|
39 |
+
}
|
40 |
+
return function (/* ...args */) {
|
41 |
+
return fn.apply(that, arguments);
|
42 |
+
};
|
43 |
+
};
|
44 |
+
|
45 |
+
var fails = function (exec) {
|
46 |
+
try {
|
47 |
+
return !!exec();
|
48 |
+
} catch (error) {
|
49 |
+
return true;
|
50 |
+
}
|
51 |
+
};
|
52 |
+
|
53 |
+
var toString = {}.toString;
|
54 |
+
|
55 |
+
var classofRaw = function (it) {
|
56 |
+
return toString.call(it).slice(8, -1);
|
57 |
+
};
|
58 |
+
|
59 |
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
60 |
+
|
61 |
+
|
62 |
+
var split = ''.split;
|
63 |
+
|
64 |
+
var indexedObject = fails(function () {
|
65 |
+
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
66 |
+
// eslint-disable-next-line no-prototype-builtins
|
67 |
+
return !Object('z').propertyIsEnumerable(0);
|
68 |
+
}) ? function (it) {
|
69 |
+
return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
|
70 |
+
} : Object;
|
71 |
+
|
72 |
+
// `RequireObjectCoercible` abstract operation
|
73 |
+
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
|
74 |
+
var requireObjectCoercible = function (it) {
|
75 |
+
if (it == undefined) throw TypeError("Can't call method on " + it);
|
76 |
+
return it;
|
77 |
+
};
|
78 |
+
|
79 |
+
// `ToObject` abstract operation
|
80 |
+
// https://tc39.github.io/ecma262/#sec-toobject
|
81 |
+
var toObject = function (argument) {
|
82 |
+
return Object(requireObjectCoercible(argument));
|
83 |
+
};
|
84 |
+
|
85 |
+
var ceil = Math.ceil;
|
86 |
+
var floor = Math.floor;
|
87 |
+
|
88 |
+
// `ToInteger` abstract operation
|
89 |
+
// https://tc39.github.io/ecma262/#sec-tointeger
|
90 |
+
var toInteger = function (argument) {
|
91 |
+
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
|
92 |
+
};
|
93 |
+
|
94 |
+
var min = Math.min;
|
95 |
+
|
96 |
+
// `ToLength` abstract operation
|
97 |
+
// https://tc39.github.io/ecma262/#sec-tolength
|
98 |
+
var toLength = function (argument) {
|
99 |
+
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
100 |
+
};
|
101 |
+
|
102 |
+
var isObject = function (it) {
|
103 |
+
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
104 |
+
};
|
105 |
+
|
106 |
+
// `IsArray` abstract operation
|
107 |
+
// https://tc39.github.io/ecma262/#sec-isarray
|
108 |
+
var isArray = Array.isArray || function isArray(arg) {
|
109 |
+
return classofRaw(arg) == 'Array';
|
110 |
+
};
|
111 |
+
|
112 |
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
113 |
+
|
114 |
+
function createCommonjsModule(fn, module) {
|
115 |
+
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
116 |
+
}
|
117 |
+
|
118 |
+
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
119 |
+
var global$1 = typeof window == 'object' && window && window.Math == Math ? window
|
120 |
+
: typeof self == 'object' && self && self.Math == Math ? self
|
121 |
+
// eslint-disable-next-line no-new-func
|
122 |
+
: Function('return this')();
|
123 |
+
|
124 |
+
// Thank's IE8 for his funny defineProperty
|
125 |
+
var descriptors = !fails(function () {
|
126 |
+
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
127 |
+
});
|
128 |
+
|
129 |
+
var document$1 = global$1.document;
|
130 |
+
// typeof document.createElement is 'object' in old IE
|
131 |
+
var exist = isObject(document$1) && isObject(document$1.createElement);
|
132 |
+
|
133 |
+
var documentCreateElement = function (it) {
|
134 |
+
return exist ? document$1.createElement(it) : {};
|
135 |
+
};
|
136 |
+
|
137 |
+
// Thank's IE8 for his funny defineProperty
|
138 |
+
var ie8DomDefine = !descriptors && !fails(function () {
|
139 |
+
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
140 |
+
get: function () { return 7; }
|
141 |
+
}).a != 7;
|
142 |
+
});
|
143 |
+
|
144 |
+
var anObject = function (it) {
|
145 |
+
if (!isObject(it)) {
|
146 |
+
throw TypeError(String(it) + ' is not an object');
|
147 |
+
} return it;
|
148 |
+
};
|
149 |
+
|
150 |
+
// 7.1.1 ToPrimitive(input [, PreferredType])
|
151 |
+
|
152 |
+
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
153 |
+
// and the second argument - flag - preferred type is a string
|
154 |
+
var toPrimitive = function (it, S) {
|
155 |
+
if (!isObject(it)) return it;
|
156 |
+
var fn, val;
|
157 |
+
if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
|
158 |
+
if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
|
159 |
+
if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
|
160 |
+
throw TypeError("Can't convert object to primitive value");
|
161 |
+
};
|
162 |
+
|
163 |
+
var nativeDefineProperty = Object.defineProperty;
|
164 |
+
|
165 |
+
var f = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
|
166 |
+
anObject(O);
|
167 |
+
P = toPrimitive(P, true);
|
168 |
+
anObject(Attributes);
|
169 |
+
if (ie8DomDefine) try {
|
170 |
+
return nativeDefineProperty(O, P, Attributes);
|
171 |
+
} catch (error) { /* empty */ }
|
172 |
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
173 |
+
if ('value' in Attributes) O[P] = Attributes.value;
|
174 |
+
return O;
|
175 |
+
};
|
176 |
+
|
177 |
+
var objectDefineProperty = {
|
178 |
+
f: f
|
179 |
+
};
|
180 |
+
|
181 |
+
var createPropertyDescriptor = function (bitmap, value) {
|
182 |
+
return {
|
183 |
+
enumerable: !(bitmap & 1),
|
184 |
+
configurable: !(bitmap & 2),
|
185 |
+
writable: !(bitmap & 4),
|
186 |
+
value: value
|
187 |
+
};
|
188 |
+
};
|
189 |
+
|
190 |
+
var hide = descriptors ? function (object, key, value) {
|
191 |
+
return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
|
192 |
+
} : function (object, key, value) {
|
193 |
+
object[key] = value;
|
194 |
+
return object;
|
195 |
+
};
|
196 |
+
|
197 |
+
var setGlobal = function (key, value) {
|
198 |
+
try {
|
199 |
+
hide(global$1, key, value);
|
200 |
+
} catch (error) {
|
201 |
+
global$1[key] = value;
|
202 |
+
} return value;
|
203 |
+
};
|
204 |
+
|
205 |
+
var shared = createCommonjsModule(function (module) {
|
206 |
+
var SHARED = '__core-js_shared__';
|
207 |
+
var store = global$1[SHARED] || setGlobal(SHARED, {});
|
208 |
+
|
209 |
+
(module.exports = function (key, value) {
|
210 |
+
return store[key] || (store[key] = value !== undefined ? value : {});
|
211 |
+
})('versions', []).push({
|
212 |
+
version: '3.0.1',
|
213 |
+
mode: 'global',
|
214 |
+
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
|
215 |
+
});
|
216 |
+
});
|
217 |
+
|
218 |
+
var id = 0;
|
219 |
+
var postfix = Math.random();
|
220 |
+
|
221 |
+
var uid = function (key) {
|
222 |
+
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + postfix).toString(36));
|
223 |
+
};
|
224 |
+
|
225 |
+
// Chrome 38 Symbol has incorrect toString conversion
|
226 |
+
var nativeSymbol = !fails(function () {
|
227 |
+
// eslint-disable-next-line no-undef
|
228 |
+
return !String(Symbol());
|
229 |
+
});
|
230 |
+
|
231 |
+
var store = shared('wks');
|
232 |
+
|
233 |
+
var Symbol$1 = global$1.Symbol;
|
234 |
+
|
235 |
+
|
236 |
+
var wellKnownSymbol = function (name) {
|
237 |
+
return store[name] || (store[name] = nativeSymbol && Symbol$1[name]
|
238 |
+
|| (nativeSymbol ? Symbol$1 : uid)('Symbol.' + name));
|
239 |
+
};
|
240 |
+
|
241 |
+
var SPECIES = wellKnownSymbol('species');
|
242 |
+
|
243 |
+
// `ArraySpeciesCreate` abstract operation
|
244 |
+
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
245 |
+
var arraySpeciesCreate = function (originalArray, length) {
|
246 |
+
var C;
|
247 |
+
if (isArray(originalArray)) {
|
248 |
+
C = originalArray.constructor;
|
249 |
+
// cross-realm fallback
|
250 |
+
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
|
251 |
+
else if (isObject(C)) {
|
252 |
+
C = C[SPECIES];
|
253 |
+
if (C === null) C = undefined;
|
254 |
+
}
|
255 |
+
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
256 |
+
};
|
257 |
+
|
258 |
+
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
|
259 |
+
// 0 -> Array#forEach
|
260 |
+
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
261 |
+
// 1 -> Array#map
|
262 |
+
// https://tc39.github.io/ecma262/#sec-array.prototype.map
|
263 |
+
// 2 -> Array#filter
|
264 |
+
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
|
265 |
+
// 3 -> Array#some
|
266 |
+
// https://tc39.github.io/ecma262/#sec-array.prototype.some
|
267 |
+
// 4 -> Array#every
|
268 |
+
// https://tc39.github.io/ecma262/#sec-array.prototype.every
|
269 |
+
// 5 -> Array#find
|
270 |
+
// https://tc39.github.io/ecma262/#sec-array.prototype.find
|
271 |
+
// 6 -> Array#findIndex
|
272 |
+
// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
|
273 |
+
var arrayMethods = function (TYPE, specificCreate) {
|
274 |
+
var IS_MAP = TYPE == 1;
|
275 |
+
var IS_FILTER = TYPE == 2;
|
276 |
+
var IS_SOME = TYPE == 3;
|
277 |
+
var IS_EVERY = TYPE == 4;
|
278 |
+
var IS_FIND_INDEX = TYPE == 6;
|
279 |
+
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
280 |
+
var create = specificCreate || arraySpeciesCreate;
|
281 |
+
return function ($this, callbackfn, that) {
|
282 |
+
var O = toObject($this);
|
283 |
+
var self = indexedObject(O);
|
284 |
+
var boundFunction = bindContext(callbackfn, that, 3);
|
285 |
+
var length = toLength(self.length);
|
286 |
+
var index = 0;
|
287 |
+
var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
|
288 |
+
var value, result;
|
289 |
+
for (;length > index; index++) if (NO_HOLES || index in self) {
|
290 |
+
value = self[index];
|
291 |
+
result = boundFunction(value, index, O);
|
292 |
+
if (TYPE) {
|
293 |
+
if (IS_MAP) target[index] = result; // map
|
294 |
+
else if (result) switch (TYPE) {
|
295 |
+
case 3: return true; // some
|
296 |
+
case 5: return value; // find
|
297 |
+
case 6: return index; // findIndex
|
298 |
+
case 2: target.push(value); // filter
|
299 |
+
} else if (IS_EVERY) return false; // every
|
300 |
+
}
|
301 |
+
}
|
302 |
+
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
|
303 |
+
};
|
304 |
+
};
|
305 |
+
|
306 |
+
var SPECIES$1 = wellKnownSymbol('species');
|
307 |
+
|
308 |
+
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
309 |
+
return !fails(function () {
|
310 |
+
var array = [];
|
311 |
+
var constructor = array.constructor = {};
|
312 |
+
constructor[SPECIES$1] = function () {
|
313 |
+
return { foo: 1 };
|
314 |
+
};
|
315 |
+
return array[METHOD_NAME](Boolean).foo !== 1;
|
316 |
+
});
|
317 |
+
};
|
318 |
+
|
319 |
+
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
|
320 |
+
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
321 |
+
|
322 |
+
// Nashorn ~ JDK8 bug
|
323 |
+
var NASHORN_BUG = nativeGetOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
|
324 |
+
|
325 |
+
var f$1 = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
326 |
+
var descriptor = nativeGetOwnPropertyDescriptor(this, V);
|
327 |
+
return !!descriptor && descriptor.enumerable;
|
328 |
+
} : nativePropertyIsEnumerable;
|
329 |
+
|
330 |
+
var objectPropertyIsEnumerable = {
|
331 |
+
f: f$1
|
332 |
+
};
|
333 |
+
|
334 |
+
// toObject with fallback for non-array-like ES3 strings
|
335 |
+
|
336 |
+
|
337 |
+
|
338 |
+
var toIndexedObject = function (it) {
|
339 |
+
return indexedObject(requireObjectCoercible(it));
|
340 |
+
};
|
341 |
+
|
342 |
+
var hasOwnProperty = {}.hasOwnProperty;
|
343 |
+
|
344 |
+
var has = function (it, key) {
|
345 |
+
return hasOwnProperty.call(it, key);
|
346 |
+
};
|
347 |
+
|
348 |
+
var nativeGetOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
349 |
+
|
350 |
+
var f$2 = descriptors ? nativeGetOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
351 |
+
O = toIndexedObject(O);
|
352 |
+
P = toPrimitive(P, true);
|
353 |
+
if (ie8DomDefine) try {
|
354 |
+
return nativeGetOwnPropertyDescriptor$1(O, P);
|
355 |
+
} catch (error) { /* empty */ }
|
356 |
+
if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
|
357 |
+
};
|
358 |
+
|
359 |
+
var objectGetOwnPropertyDescriptor = {
|
360 |
+
f: f$2
|
361 |
+
};
|
362 |
+
|
363 |
+
var functionToString = shared('native-function-to-string', Function.toString);
|
364 |
+
|
365 |
+
var WeakMap$1 = global$1.WeakMap;
|
366 |
+
|
367 |
+
var nativeWeakMap = typeof WeakMap$1 === 'function' && /native code/.test(functionToString.call(WeakMap$1));
|
368 |
+
|
369 |
+
var shared$1 = shared('keys');
|
370 |
+
|
371 |
+
|
372 |
+
var sharedKey = function (key) {
|
373 |
+
return shared$1[key] || (shared$1[key] = uid(key));
|
374 |
+
};
|
375 |
+
|
376 |
+
var hiddenKeys = {};
|
377 |
+
|
378 |
+
var WeakMap$2 = global$1.WeakMap;
|
379 |
+
var set, get, has$1;
|
380 |
+
|
381 |
+
var enforce = function (it) {
|
382 |
+
return has$1(it) ? get(it) : set(it, {});
|
383 |
+
};
|
384 |
+
|
385 |
+
var getterFor = function (TYPE) {
|
386 |
+
return function (it) {
|
387 |
+
var state;
|
388 |
+
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
389 |
+
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
390 |
+
} return state;
|
391 |
+
};
|
392 |
+
};
|
393 |
+
|
394 |
+
if (nativeWeakMap) {
|
395 |
+
var store$1 = new WeakMap$2();
|
396 |
+
var wmget = store$1.get;
|
397 |
+
var wmhas = store$1.has;
|
398 |
+
var wmset = store$1.set;
|
399 |
+
set = function (it, metadata) {
|
400 |
+
wmset.call(store$1, it, metadata);
|
401 |
+
return metadata;
|
402 |
+
};
|
403 |
+
get = function (it) {
|
404 |
+
return wmget.call(store$1, it) || {};
|
405 |
+
};
|
406 |
+
has$1 = function (it) {
|
407 |
+
return wmhas.call(store$1, it);
|
408 |
+
};
|
409 |
+
} else {
|
410 |
+
var STATE = sharedKey('state');
|
411 |
+
hiddenKeys[STATE] = true;
|
412 |
+
set = function (it, metadata) {
|
413 |
+
hide(it, STATE, metadata);
|
414 |
+
return metadata;
|
415 |
+
};
|
416 |
+
get = function (it) {
|
417 |
+
return has(it, STATE) ? it[STATE] : {};
|
418 |
+
};
|
419 |
+
has$1 = function (it) {
|
420 |
+
return has(it, STATE);
|
421 |
+
};
|
422 |
+
}
|
423 |
+
|
424 |
+
var internalState = {
|
425 |
+
set: set,
|
426 |
+
get: get,
|
427 |
+
has: has$1,
|
428 |
+
enforce: enforce,
|
429 |
+
getterFor: getterFor
|
430 |
+
};
|
431 |
+
|
432 |
+
var redefine = createCommonjsModule(function (module) {
|
433 |
+
var getInternalState = internalState.get;
|
434 |
+
var enforceInternalState = internalState.enforce;
|
435 |
+
var TEMPLATE = String(functionToString).split('toString');
|
436 |
+
|
437 |
+
shared('inspectSource', function (it) {
|
438 |
+
return functionToString.call(it);
|
439 |
+
});
|
440 |
+
|
441 |
+
(module.exports = function (O, key, value, options) {
|
442 |
+
var unsafe = options ? !!options.unsafe : false;
|
443 |
+
var simple = options ? !!options.enumerable : false;
|
444 |
+
var noTargetGet = options ? !!options.noTargetGet : false;
|
445 |
+
if (typeof value == 'function') {
|
446 |
+
if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);
|
447 |
+
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
448 |
+
}
|
449 |
+
if (O === global$1) {
|
450 |
+
if (simple) O[key] = value;
|
451 |
+
else setGlobal(key, value);
|
452 |
+
return;
|
453 |
+
} else if (!unsafe) {
|
454 |
+
delete O[key];
|
455 |
+
} else if (!noTargetGet && O[key]) {
|
456 |
+
simple = true;
|
457 |
+
}
|
458 |
+
if (simple) O[key] = value;
|
459 |
+
else hide(O, key, value);
|
460 |
+
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
461 |
+
})(Function.prototype, 'toString', function toString() {
|
462 |
+
return typeof this == 'function' && getInternalState(this).source || functionToString.call(this);
|
463 |
+
});
|
464 |
+
});
|
465 |
+
|
466 |
+
var max = Math.max;
|
467 |
+
var min$1 = Math.min;
|
468 |
+
|
469 |
+
// Helper for a popular repeating case of the spec:
|
470 |
+
// Let integer be ? ToInteger(index).
|
471 |
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).
|
472 |
+
var toAbsoluteIndex = function (index, length) {
|
473 |
+
var integer = toInteger(index);
|
474 |
+
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
475 |
+
};
|
476 |
+
|
477 |
+
// `Array.prototype.{ indexOf, includes }` methods implementation
|
478 |
+
// false -> Array#indexOf
|
479 |
+
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
|
480 |
+
// true -> Array#includes
|
481 |
+
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
|
482 |
+
var arrayIncludes = function (IS_INCLUDES) {
|
483 |
+
return function ($this, el, fromIndex) {
|
484 |
+
var O = toIndexedObject($this);
|
485 |
+
var length = toLength(O.length);
|
486 |
+
var index = toAbsoluteIndex(fromIndex, length);
|
487 |
+
var value;
|
488 |
+
// Array#includes uses SameValueZero equality algorithm
|
489 |
+
// eslint-disable-next-line no-self-compare
|
490 |
+
if (IS_INCLUDES && el != el) while (length > index) {
|
491 |
+
value = O[index++];
|
492 |
+
// eslint-disable-next-line no-self-compare
|
493 |
+
if (value != value) return true;
|
494 |
+
// Array#indexOf ignores holes, Array#includes - not
|
495 |
+
} else for (;length > index; index++) if (IS_INCLUDES || index in O) {
|
496 |
+
if (O[index] === el) return IS_INCLUDES || index || 0;
|
497 |
+
} return !IS_INCLUDES && -1;
|
498 |
+
};
|
499 |
+
};
|
500 |
+
|
501 |
+
var arrayIndexOf = arrayIncludes(false);
|
502 |
+
|
503 |
+
|
504 |
+
var objectKeysInternal = function (object, names) {
|
505 |
+
var O = toIndexedObject(object);
|
506 |
+
var i = 0;
|
507 |
+
var result = [];
|
508 |
+
var key;
|
509 |
+
for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
|
510 |
+
// Don't enum bug & hidden keys
|
511 |
+
while (names.length > i) if (has(O, key = names[i++])) {
|
512 |
+
~arrayIndexOf(result, key) || result.push(key);
|
513 |
+
}
|
514 |
+
return result;
|
515 |
+
};
|
516 |
+
|
517 |
+
// IE8- don't enum bug keys
|
518 |
+
var enumBugKeys = [
|
519 |
+
'constructor',
|
520 |
+
'hasOwnProperty',
|
521 |
+
'isPrototypeOf',
|
522 |
+
'propertyIsEnumerable',
|
523 |
+
'toLocaleString',
|
524 |
+
'toString',
|
525 |
+
'valueOf'
|
526 |
+
];
|
527 |
+
|
528 |
+
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
|
529 |
+
|
530 |
+
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
531 |
+
|
532 |
+
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
533 |
+
return objectKeysInternal(O, hiddenKeys$1);
|
534 |
+
};
|
535 |
+
|
536 |
+
var objectGetOwnPropertyNames = {
|
537 |
+
f: f$3
|
538 |
+
};
|
539 |
+
|
540 |
+
var f$4 = Object.getOwnPropertySymbols;
|
541 |
+
|
542 |
+
var objectGetOwnPropertySymbols = {
|
543 |
+
f: f$4
|
544 |
+
};
|
545 |
+
|
546 |
+
var Reflect = global$1.Reflect;
|
547 |
+
|
548 |
+
// all object keys, includes non-enumerable and symbols
|
549 |
+
var ownKeys = Reflect && Reflect.ownKeys || function ownKeys(it) {
|
550 |
+
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
551 |
+
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
552 |
+
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
|
553 |
+
};
|
554 |
+
|
555 |
+
var copyConstructorProperties = function (target, source) {
|
556 |
+
var keys = ownKeys(source);
|
557 |
+
var defineProperty = objectDefineProperty.f;
|
558 |
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
559 |
+
for (var i = 0; i < keys.length; i++) {
|
560 |
+
var key = keys[i];
|
561 |
+
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
562 |
+
}
|
563 |
+
};
|
564 |
+
|
565 |
+
var replacement = /#|\.prototype\./;
|
566 |
+
|
567 |
+
var isForced = function (feature, detection) {
|
568 |
+
var value = data[normalize(feature)];
|
569 |
+
return value == POLYFILL ? true
|
570 |
+
: value == NATIVE ? false
|
571 |
+
: typeof detection == 'function' ? fails(detection)
|
572 |
+
: !!detection;
|
573 |
+
};
|
574 |
+
|
575 |
+
var normalize = isForced.normalize = function (string) {
|
576 |
+
return String(string).replace(replacement, '.').toLowerCase();
|
577 |
+
};
|
578 |
+
|
579 |
+
var data = isForced.data = {};
|
580 |
+
var NATIVE = isForced.NATIVE = 'N';
|
581 |
+
var POLYFILL = isForced.POLYFILL = 'P';
|
582 |
+
|
583 |
+
var isForced_1 = isForced;
|
584 |
+
|
585 |
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
586 |
+
|
587 |
+
|
588 |
+
|
589 |
+
|
590 |
+
|
591 |
+
|
592 |
+
/*
|
593 |
+
options.target - name of the target object
|
594 |
+
options.global - target is the global object
|
595 |
+
options.stat - export as static methods of target
|
596 |
+
options.proto - export as prototype methods of target
|
597 |
+
options.real - real prototype method for the `pure` version
|
598 |
+
options.forced - export even if the native feature is available
|
599 |
+
options.bind - bind methods to the target, required for the `pure` version
|
600 |
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
601 |
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
602 |
+
options.sham - add a flag to not completely full polyfills
|
603 |
+
options.enumerable - export as enumerable property
|
604 |
+
options.noTargetGet - prevent calling a getter on target
|
605 |
+
*/
|
606 |
+
var _export = function (options, source) {
|
607 |
+
var TARGET = options.target;
|
608 |
+
var GLOBAL = options.global;
|
609 |
+
var STATIC = options.stat;
|
610 |
+
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
611 |
+
if (GLOBAL) {
|
612 |
+
target = global$1;
|
613 |
+
} else if (STATIC) {
|
614 |
+
target = global$1[TARGET] || setGlobal(TARGET, {});
|
615 |
+
} else {
|
616 |
+
target = (global$1[TARGET] || {}).prototype;
|
617 |
+
}
|
618 |
+
if (target) for (key in source) {
|
619 |
+
sourceProperty = source[key];
|
620 |
+
if (options.noTargetGet) {
|
621 |
+
descriptor = getOwnPropertyDescriptor(target, key);
|
622 |
+
targetProperty = descriptor && descriptor.value;
|
623 |
+
} else targetProperty = target[key];
|
624 |
+
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
625 |
+
// contained in target
|
626 |
+
if (!FORCED && targetProperty !== undefined) {
|
627 |
+
if (typeof sourceProperty === typeof targetProperty) continue;
|
628 |
+
copyConstructorProperties(sourceProperty, targetProperty);
|
629 |
+
}
|
630 |
+
// add a flag to not completely full polyfills
|
631 |
+
if (options.sham || (targetProperty && targetProperty.sham)) {
|
632 |
+
hide(sourceProperty, 'sham', true);
|
633 |
+
}
|
634 |
+
// extend global
|
635 |
+
redefine(target, key, sourceProperty, options);
|
636 |
+
}
|
637 |
+
};
|
638 |
+
|
639 |
+
var internalFilter = arrayMethods(2);
|
640 |
+
|
641 |
+
var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
|
642 |
+
|
643 |
+
// `Array.prototype.filter` method
|
644 |
+
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
|
645 |
+
// with adding support of @@species
|
646 |
+
_export({ target: 'Array', proto: true, forced: !SPECIES_SUPPORT }, {
|
647 |
+
filter: function filter(callbackfn /* , thisArg */) {
|
648 |
+
return internalFilter(this, callbackfn, arguments[1]);
|
649 |
+
}
|
650 |
+
});
|
651 |
+
|
652 |
+
var sloppyArrayMethod = function (METHOD_NAME, argument) {
|
653 |
+
var method = [][METHOD_NAME];
|
654 |
+
return !method || !fails(function () {
|
655 |
+
// eslint-disable-next-line no-useless-call,no-throw-literal
|
656 |
+
method.call(null, argument || function () { throw 1; }, 1);
|
657 |
+
});
|
658 |
+
};
|
659 |
+
|
660 |
+
var nativeForEach = [].forEach;
|
661 |
+
var internalForEach = arrayMethods(0);
|
662 |
+
|
663 |
+
var SLOPPY_METHOD = sloppyArrayMethod('forEach');
|
664 |
+
|
665 |
+
// `Array.prototype.forEach` method implementation
|
666 |
+
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
667 |
+
var arrayForEach = SLOPPY_METHOD ? function forEach(callbackfn /* , thisArg */) {
|
668 |
+
return internalForEach(this, callbackfn, arguments[1]);
|
669 |
+
} : nativeForEach;
|
670 |
+
|
671 |
+
// `Array.prototype.forEach` method
|
672 |
+
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
673 |
+
_export({ target: 'Array', proto: true, forced: [].forEach != arrayForEach }, { forEach: arrayForEach });
|
674 |
+
|
675 |
+
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
676 |
+
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
677 |
+
// https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
|
678 |
+
var arrayReduce = function (that, callbackfn, argumentsLength, memo, isRight) {
|
679 |
+
aFunction(callbackfn);
|
680 |
+
var O = toObject(that);
|
681 |
+
var self = indexedObject(O);
|
682 |
+
var length = toLength(O.length);
|
683 |
+
var index = isRight ? length - 1 : 0;
|
684 |
+
var i = isRight ? -1 : 1;
|
685 |
+
if (argumentsLength < 2) while (true) {
|
686 |
+
if (index in self) {
|
687 |
+
memo = self[index];
|
688 |
+
index += i;
|
689 |
+
break;
|
690 |
+
}
|
691 |
+
index += i;
|
692 |
+
if (isRight ? index < 0 : length <= index) {
|
693 |
+
throw TypeError('Reduce of empty array with no initial value');
|
694 |
+
}
|
695 |
+
}
|
696 |
+
for (;isRight ? index >= 0 : length > index; index += i) if (index in self) {
|
697 |
+
memo = callbackfn(memo, self[index], index, O);
|
698 |
+
}
|
699 |
+
return memo;
|
700 |
+
};
|
701 |
+
|
702 |
+
var SLOPPY_METHOD$1 = sloppyArrayMethod('reduce');
|
703 |
+
|
704 |
+
// `Array.prototype.reduce` method
|
705 |
+
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
706 |
+
_export({ target: 'Array', proto: true, forced: SLOPPY_METHOD$1 }, {
|
707 |
+
reduce: function reduce(callbackfn /* , initialValue */) {
|
708 |
+
return arrayReduce(this, callbackfn, arguments.length, arguments[1], false);
|
709 |
+
}
|
710 |
+
});
|
711 |
+
|
712 |
+
var defineProperty = objectDefineProperty.f;
|
713 |
+
var FunctionPrototype = Function.prototype;
|
714 |
+
var FunctionPrototypeToString = FunctionPrototype.toString;
|
715 |
+
var nameRE = /^\s*function ([^ (]*)/;
|
716 |
+
var NAME = 'name';
|
717 |
+
|
718 |
+
// Function instances `.name` property
|
719 |
+
// https://tc39.github.io/ecma262/#sec-function-instances-name
|
720 |
+
if (descriptors && !(NAME in FunctionPrototype)) {
|
721 |
+
defineProperty(FunctionPrototype, NAME, {
|
722 |
+
configurable: true,
|
723 |
+
get: function () {
|
724 |
+
try {
|
725 |
+
return FunctionPrototypeToString.call(this).match(nameRE)[1];
|
726 |
+
} catch (error) {
|
727 |
+
return '';
|
728 |
+
}
|
729 |
+
}
|
730 |
+
});
|
731 |
+
}
|
732 |
+
|
733 |
+
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
734 |
+
|
735 |
+
|
736 |
+
|
737 |
+
var objectKeys = Object.keys || function keys(O) {
|
738 |
+
return objectKeysInternal(O, enumBugKeys);
|
739 |
+
};
|
740 |
+
|
741 |
+
// 19.1.2.1 Object.assign(target, source, ...)
|
742 |
+
|
743 |
+
|
744 |
+
|
745 |
+
|
746 |
+
|
747 |
+
var nativeAssign = Object.assign;
|
748 |
+
|
749 |
+
// should work with symbols and should have deterministic property order (V8 bug)
|
750 |
+
var objectAssign = !nativeAssign || fails(function () {
|
751 |
+
var A = {};
|
752 |
+
var B = {};
|
753 |
+
// eslint-disable-next-line no-undef
|
754 |
+
var symbol = Symbol();
|
755 |
+
var alphabet = 'abcdefghijklmnopqrst';
|
756 |
+
A[symbol] = 7;
|
757 |
+
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
758 |
+
return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
|
759 |
+
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
|
760 |
+
var T = toObject(target);
|
761 |
+
var argumentsLength = arguments.length;
|
762 |
+
var index = 1;
|
763 |
+
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
764 |
+
var propertyIsEnumerable = objectPropertyIsEnumerable.f;
|
765 |
+
while (argumentsLength > index) {
|
766 |
+
var S = indexedObject(arguments[index++]);
|
767 |
+
var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
|
768 |
+
var length = keys.length;
|
769 |
+
var j = 0;
|
770 |
+
var key;
|
771 |
+
while (length > j) if (propertyIsEnumerable.call(S, key = keys[j++])) T[key] = S[key];
|
772 |
+
} return T;
|
773 |
+
} : nativeAssign;
|
774 |
+
|
775 |
+
// `Object.assign` method
|
776 |
+
// https://tc39.github.io/ecma262/#sec-object.assign
|
777 |
+
_export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, { assign: objectAssign });
|
778 |
+
|
779 |
+
// a string of all valid unicode whitespaces
|
780 |
+
// eslint-disable-next-line max-len
|
781 |
+
var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
782 |
+
|
783 |
+
var whitespace = '[' + whitespaces + ']';
|
784 |
+
var ltrim = RegExp('^' + whitespace + whitespace + '*');
|
785 |
+
var rtrim = RegExp(whitespace + whitespace + '*$');
|
786 |
+
|
787 |
+
// 1 -> String#trimStart
|
788 |
+
// 2 -> String#trimEnd
|
789 |
+
// 3 -> String#trim
|
790 |
+
var stringTrim = function (string, TYPE) {
|
791 |
+
string = String(requireObjectCoercible(string));
|
792 |
+
if (TYPE & 1) string = string.replace(ltrim, '');
|
793 |
+
if (TYPE & 2) string = string.replace(rtrim, '');
|
794 |
+
return string;
|
795 |
+
};
|
796 |
+
|
797 |
+
var nativeParseInt = global$1.parseInt;
|
798 |
+
|
799 |
+
|
800 |
+
var hex = /^[-+]?0[xX]/;
|
801 |
+
var FORCED = nativeParseInt(whitespaces + '08') !== 8 || nativeParseInt(whitespaces + '0x16') !== 22;
|
802 |
+
|
803 |
+
var _parseInt = FORCED ? function parseInt(str, radix) {
|
804 |
+
var string = stringTrim(String(str), 3);
|
805 |
+
return nativeParseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
|
806 |
+
} : nativeParseInt;
|
807 |
+
|
808 |
+
// `parseInt` method
|
809 |
+
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
810 |
+
_export({ global: true, forced: parseInt != _parseInt }, {
|
811 |
+
parseInt: _parseInt
|
812 |
+
});
|
813 |
+
|
814 |
+
// `RegExp.prototype.flags` getter implementation
|
815 |
+
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
|
816 |
+
var regexpFlags = function () {
|
817 |
+
var that = anObject(this);
|
818 |
+
var result = '';
|
819 |
+
if (that.global) result += 'g';
|
820 |
+
if (that.ignoreCase) result += 'i';
|
821 |
+
if (that.multiline) result += 'm';
|
822 |
+
if (that.unicode) result += 'u';
|
823 |
+
if (that.sticky) result += 'y';
|
824 |
+
return result;
|
825 |
+
};
|
826 |
+
|
827 |
+
var nativeExec = RegExp.prototype.exec;
|
828 |
+
// This always refers to the native implementation, because the
|
829 |
+
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
|
830 |
+
// which loads this file before patching the method.
|
831 |
+
var nativeReplace = String.prototype.replace;
|
832 |
+
|
833 |
+
var patchedExec = nativeExec;
|
834 |
+
|
835 |
+
var UPDATES_LAST_INDEX_WRONG = (function () {
|
836 |
+
var re1 = /a/;
|
837 |
+
var re2 = /b*/g;
|
838 |
+
nativeExec.call(re1, 'a');
|
839 |
+
nativeExec.call(re2, 'a');
|
840 |
+
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
841 |
+
})();
|
842 |
+
|
843 |
+
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
844 |
+
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
845 |
+
|
846 |
+
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
|
847 |
+
|
848 |
+
if (PATCH) {
|
849 |
+
patchedExec = function exec(str) {
|
850 |
+
var re = this;
|
851 |
+
var lastIndex, reCopy, match, i;
|
852 |
+
|
853 |
+
if (NPCG_INCLUDED) {
|
854 |
+
reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
|
855 |
+
}
|
856 |
+
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
857 |
+
|
858 |
+
match = nativeExec.call(re, str);
|
859 |
+
|
860 |
+
if (UPDATES_LAST_INDEX_WRONG && match) {
|
861 |
+
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
862 |
+
}
|
863 |
+
if (NPCG_INCLUDED && match && match.length > 1) {
|
864 |
+
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
865 |
+
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
866 |
+
nativeReplace.call(match[0], reCopy, function () {
|
867 |
+
for (i = 1; i < arguments.length - 2; i++) {
|
868 |
+
if (arguments[i] === undefined) match[i] = undefined;
|
869 |
+
}
|
870 |
+
});
|
871 |
+
}
|
872 |
+
|
873 |
+
return match;
|
874 |
+
};
|
875 |
+
}
|
876 |
+
|
877 |
+
var regexpExec = patchedExec;
|
878 |
+
|
879 |
+
_export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
|
880 |
+
exec: regexpExec
|
881 |
+
});
|
882 |
+
|
883 |
+
// CONVERT_TO_STRING: true -> String#at
|
884 |
+
// CONVERT_TO_STRING: false -> String#codePointAt
|
885 |
+
var stringAt = function (that, pos, CONVERT_TO_STRING) {
|
886 |
+
var S = String(requireObjectCoercible(that));
|
887 |
+
var position = toInteger(pos);
|
888 |
+
var size = S.length;
|
889 |
+
var first, second;
|
890 |
+
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
891 |
+
first = S.charCodeAt(position);
|
892 |
+
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
893 |
+
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
|
894 |
+
? CONVERT_TO_STRING ? S.charAt(position) : first
|
895 |
+
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
896 |
+
};
|
897 |
+
|
898 |
+
// `AdvanceStringIndex` abstract operation
|
899 |
+
// https://tc39.github.io/ecma262/#sec-advancestringindex
|
900 |
+
var advanceStringIndex = function (S, index, unicode) {
|
901 |
+
return index + (unicode ? stringAt(S, index, true).length : 1);
|
902 |
+
};
|
903 |
+
|
904 |
+
// `RegExpExec` abstract operation
|
905 |
+
// https://tc39.github.io/ecma262/#sec-regexpexec
|
906 |
+
var regexpExecAbstract = function (R, S) {
|
907 |
+
var exec = R.exec;
|
908 |
+
if (typeof exec === 'function') {
|
909 |
+
var result = exec.call(R, S);
|
910 |
+
if (typeof result !== 'object') {
|
911 |
+
throw TypeError('RegExp exec method returned something other than an Object or null');
|
912 |
+
}
|
913 |
+
return result;
|
914 |
+
}
|
915 |
+
|
916 |
+
if (classofRaw(R) !== 'RegExp') {
|
917 |
+
throw TypeError('RegExp#exec called on incompatible receiver');
|
918 |
+
}
|
919 |
+
|
920 |
+
return regexpExec.call(R, S);
|
921 |
+
};
|
922 |
+
|
923 |
+
var SPECIES$2 = wellKnownSymbol('species');
|
924 |
+
|
925 |
+
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
926 |
+
// #replace needs built-in support for named groups.
|
927 |
+
// #match works fine because it just return the exec results, even if it has
|
928 |
+
// a "grops" property.
|
929 |
+
var re = /./;
|
930 |
+
re.exec = function () {
|
931 |
+
var result = [];
|
932 |
+
result.groups = { a: '7' };
|
933 |
+
return result;
|
934 |
+
};
|
935 |
+
return ''.replace(re, '$<a>') !== '7';
|
936 |
+
});
|
937 |
+
|
938 |
+
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
939 |
+
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
940 |
+
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
941 |
+
var re = /(?:)/;
|
942 |
+
var originalExec = re.exec;
|
943 |
+
re.exec = function () { return originalExec.apply(this, arguments); };
|
944 |
+
var result = 'ab'.split(re);
|
945 |
+
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
946 |
+
});
|
947 |
+
|
948 |
+
var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
|
949 |
+
var SYMBOL = wellKnownSymbol(KEY);
|
950 |
+
|
951 |
+
var DELEGATES_TO_SYMBOL = !fails(function () {
|
952 |
+
// String methods call symbol-named RegEp methods
|
953 |
+
var O = {};
|
954 |
+
O[SYMBOL] = function () { return 7; };
|
955 |
+
return ''[KEY](O) != 7;
|
956 |
+
});
|
957 |
+
|
958 |
+
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
|
959 |
+
// Symbol-named RegExp methods call .exec
|
960 |
+
var execCalled = false;
|
961 |
+
var re = /a/;
|
962 |
+
re.exec = function () { execCalled = true; return null; };
|
963 |
+
|
964 |
+
if (KEY === 'split') {
|
965 |
+
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
966 |
+
// a new one. We need to return the patched regex when creating the new one.
|
967 |
+
re.constructor = {};
|
968 |
+
re.constructor[SPECIES$2] = function () { return re; };
|
969 |
+
}
|
970 |
+
|
971 |
+
re[SYMBOL]('');
|
972 |
+
return !execCalled;
|
973 |
+
});
|
974 |
+
|
975 |
+
if (
|
976 |
+
!DELEGATES_TO_SYMBOL ||
|
977 |
+
!DELEGATES_TO_EXEC ||
|
978 |
+
(KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
|
979 |
+
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
|
980 |
+
) {
|
981 |
+
var nativeRegExpMethod = /./[SYMBOL];
|
982 |
+
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
983 |
+
if (regexp.exec === regexpExec) {
|
984 |
+
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
985 |
+
// The native String method already delegates to @@method (this
|
986 |
+
// polyfilled function), leasing to infinite recursion.
|
987 |
+
// We avoid it by directly calling the native @@method method.
|
988 |
+
return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
|
989 |
+
}
|
990 |
+
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
|
991 |
+
}
|
992 |
+
return { done: false };
|
993 |
+
});
|
994 |
+
var stringMethod = methods[0];
|
995 |
+
var regexMethod = methods[1];
|
996 |
+
|
997 |
+
redefine(String.prototype, KEY, stringMethod);
|
998 |
+
redefine(RegExp.prototype, SYMBOL, length == 2
|
999 |
+
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
|
1000 |
+
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
|
1001 |
+
? function (string, arg) { return regexMethod.call(string, this, arg); }
|
1002 |
+
// 21.2.5.6 RegExp.prototype[@@match](string)
|
1003 |
+
// 21.2.5.9 RegExp.prototype[@@search](string)
|
1004 |
+
: function (string) { return regexMethod.call(string, this); }
|
1005 |
+
);
|
1006 |
+
if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true);
|
1007 |
+
}
|
1008 |
+
};
|
1009 |
+
|
1010 |
+
// @@match logic
|
1011 |
+
fixRegexpWellKnownSymbolLogic(
|
1012 |
+
'match',
|
1013 |
+
1,
|
1014 |
+
function (MATCH, nativeMatch, maybeCallNative) {
|
1015 |
+
return [
|
1016 |
+
// `String.prototype.match` method
|
1017 |
+
// https://tc39.github.io/ecma262/#sec-string.prototype.match
|
1018 |
+
function match(regexp) {
|
1019 |
+
var O = requireObjectCoercible(this);
|
1020 |
+
var matcher = regexp == undefined ? undefined : regexp[MATCH];
|
1021 |
+
return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
|
1022 |
+
},
|
1023 |
+
// `RegExp.prototype[@@match]` method
|
1024 |
+
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
|
1025 |
+
function (regexp) {
|
1026 |
+
var res = maybeCallNative(nativeMatch, regexp, this);
|
1027 |
+
if (res.done) return res.value;
|
1028 |
+
|
1029 |
+
var rx = anObject(regexp);
|
1030 |
+
var S = String(this);
|
1031 |
+
|
1032 |
+
if (!rx.global) return regexpExecAbstract(rx, S);
|
1033 |
+
|
1034 |
+
var fullUnicode = rx.unicode;
|
1035 |
+
rx.lastIndex = 0;
|
1036 |
+
var A = [];
|
1037 |
+
var n = 0;
|
1038 |
+
var result;
|
1039 |
+
while ((result = regexpExecAbstract(rx, S)) !== null) {
|
1040 |
+
var matchStr = String(result[0]);
|
1041 |
+
A[n] = matchStr;
|
1042 |
+
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
1043 |
+
n++;
|
1044 |
+
}
|
1045 |
+
return n === 0 ? null : A;
|
1046 |
+
}
|
1047 |
+
];
|
1048 |
+
}
|
1049 |
+
);
|
1050 |
+
|
1051 |
+
var max$1 = Math.max;
|
1052 |
+
var min$2 = Math.min;
|
1053 |
+
var floor$1 = Math.floor;
|
1054 |
+
var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g;
|
1055 |
+
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g;
|
1056 |
+
|
1057 |
+
var maybeToString = function (it) {
|
1058 |
+
return it === undefined ? it : String(it);
|
1059 |
+
};
|
1060 |
+
|
1061 |
+
// @@replace logic
|
1062 |
+
fixRegexpWellKnownSymbolLogic(
|
1063 |
+
'replace',
|
1064 |
+
2,
|
1065 |
+
function (REPLACE, nativeReplace, maybeCallNative) {
|
1066 |
+
return [
|
1067 |
+
// `String.prototype.replace` method
|
1068 |
+
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
|
1069 |
+
function replace(searchValue, replaceValue) {
|
1070 |
+
var O = requireObjectCoercible(this);
|
1071 |
+
var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
|
1072 |
+
return replacer !== undefined
|
1073 |
+
? replacer.call(searchValue, O, replaceValue)
|
1074 |
+
: nativeReplace.call(String(O), searchValue, replaceValue);
|
1075 |
+
},
|
1076 |
+
// `RegExp.prototype[@@replace]` method
|
1077 |
+
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
|
1078 |
+
function (regexp, replaceValue) {
|
1079 |
+
var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
|
1080 |
+
if (res.done) return res.value;
|
1081 |
+
|
1082 |
+
var rx = anObject(regexp);
|
1083 |
+
var S = String(this);
|
1084 |
+
|
1085 |
+
var functionalReplace = typeof replaceValue === 'function';
|
1086 |
+
if (!functionalReplace) replaceValue = String(replaceValue);
|
1087 |
+
|
1088 |
+
var global = rx.global;
|
1089 |
+
if (global) {
|
1090 |
+
var fullUnicode = rx.unicode;
|
1091 |
+
rx.lastIndex = 0;
|
1092 |
+
}
|
1093 |
+
var results = [];
|
1094 |
+
while (true) {
|
1095 |
+
var result = regexpExecAbstract(rx, S);
|
1096 |
+
if (result === null) break;
|
1097 |
+
|
1098 |
+
results.push(result);
|
1099 |
+
if (!global) break;
|
1100 |
+
|
1101 |
+
var matchStr = String(result[0]);
|
1102 |
+
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
1103 |
+
}
|
1104 |
+
|
1105 |
+
var accumulatedResult = '';
|
1106 |
+
var nextSourcePosition = 0;
|
1107 |
+
for (var i = 0; i < results.length; i++) {
|
1108 |
+
result = results[i];
|
1109 |
+
|
1110 |
+
var matched = String(result[0]);
|
1111 |
+
var position = max$1(min$2(toInteger(result.index), S.length), 0);
|
1112 |
+
var captures = [];
|
1113 |
+
// NOTE: This is equivalent to
|
1114 |
+
// captures = result.slice(1).map(maybeToString)
|
1115 |
+
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
1116 |
+
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
1117 |
+
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
1118 |
+
for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
|
1119 |
+
var namedCaptures = result.groups;
|
1120 |
+
if (functionalReplace) {
|
1121 |
+
var replacerArgs = [matched].concat(captures, position, S);
|
1122 |
+
if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
|
1123 |
+
var replacement = String(replaceValue.apply(undefined, replacerArgs));
|
1124 |
+
} else {
|
1125 |
+
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
1126 |
+
}
|
1127 |
+
if (position >= nextSourcePosition) {
|
1128 |
+
accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
|
1129 |
+
nextSourcePosition = position + matched.length;
|
1130 |
+
}
|
1131 |
+
}
|
1132 |
+
return accumulatedResult + S.slice(nextSourcePosition);
|
1133 |
+
}
|
1134 |
+
];
|
1135 |
+
|
1136 |
+
// https://tc39.github.io/ecma262/#sec-getsubstitution
|
1137 |
+
function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
|
1138 |
+
var tailPos = position + matched.length;
|
1139 |
+
var m = captures.length;
|
1140 |
+
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
1141 |
+
if (namedCaptures !== undefined) {
|
1142 |
+
namedCaptures = toObject(namedCaptures);
|
1143 |
+
symbols = SUBSTITUTION_SYMBOLS;
|
1144 |
+
}
|
1145 |
+
return nativeReplace.call(replacement, symbols, function (match, ch) {
|
1146 |
+
var capture;
|
1147 |
+
switch (ch.charAt(0)) {
|
1148 |
+
case '$': return '$';
|
1149 |
+
case '&': return matched;
|
1150 |
+
case '`': return str.slice(0, position);
|
1151 |
+
case "'": return str.slice(tailPos);
|
1152 |
+
case '<':
|
1153 |
+
capture = namedCaptures[ch.slice(1, -1)];
|
1154 |
+
break;
|
1155 |
+
default: // \d\d?
|
1156 |
+
var n = +ch;
|
1157 |
+
if (n === 0) return match;
|
1158 |
+
if (n > m) {
|
1159 |
+
var f = floor$1(n / 10);
|
1160 |
+
if (f === 0) return match;
|
1161 |
+
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
|
1162 |
+
return match;
|
1163 |
+
}
|
1164 |
+
capture = captures[n - 1];
|
1165 |
+
}
|
1166 |
+
return capture === undefined ? '' : capture;
|
1167 |
+
});
|
1168 |
+
}
|
1169 |
+
}
|
1170 |
+
);
|
1171 |
+
|
1172 |
+
// iterable DOM collections
|
1173 |
+
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
1174 |
+
var domIterables = {
|
1175 |
+
CSSRuleList: 0,
|
1176 |
+
CSSStyleDeclaration: 0,
|
1177 |
+
CSSValueList: 0,
|
1178 |
+
ClientRectList: 0,
|
1179 |
+
DOMRectList: 0,
|
1180 |
+
DOMStringList: 0,
|
1181 |
+
DOMTokenList: 1,
|
1182 |
+
DataTransferItemList: 0,
|
1183 |
+
FileList: 0,
|
1184 |
+
HTMLAllCollection: 0,
|
1185 |
+
HTMLCollection: 0,
|
1186 |
+
HTMLFormElement: 0,
|
1187 |
+
HTMLSelectElement: 0,
|
1188 |
+
MediaList: 0,
|
1189 |
+
MimeTypeArray: 0,
|
1190 |
+
NamedNodeMap: 0,
|
1191 |
+
NodeList: 1,
|
1192 |
+
PaintRequestList: 0,
|
1193 |
+
Plugin: 0,
|
1194 |
+
PluginArray: 0,
|
1195 |
+
SVGLengthList: 0,
|
1196 |
+
SVGNumberList: 0,
|
1197 |
+
SVGPathSegList: 0,
|
1198 |
+
SVGPointList: 0,
|
1199 |
+
SVGStringList: 0,
|
1200 |
+
SVGTransformList: 0,
|
1201 |
+
SourceBufferList: 0,
|
1202 |
+
StyleSheetList: 0,
|
1203 |
+
TextTrackCueList: 0,
|
1204 |
+
TextTrackList: 0,
|
1205 |
+
TouchList: 0
|
1206 |
+
};
|
1207 |
+
|
1208 |
+
for (var COLLECTION_NAME in domIterables) {
|
1209 |
+
var Collection = global$1[COLLECTION_NAME];
|
1210 |
+
var CollectionPrototype = Collection && Collection.prototype;
|
1211 |
+
// some Chrome versions have non-configurable methods on DOMTokenList
|
1212 |
+
if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
|
1213 |
+
hide(CollectionPrototype, 'forEach', arrayForEach);
|
1214 |
+
} catch (error) {
|
1215 |
+
CollectionPrototype.forEach = arrayForEach;
|
1216 |
+
}
|
1217 |
+
}
|
1218 |
+
|
1219 |
+
var scrollbarWidth = createCommonjsModule(function (module, exports) {
|
1220 |
+
/*! scrollbarWidth.js v0.1.3 | felixexter | MIT | https://github.com/felixexter/scrollbarWidth */
|
1221 |
+
(function (root, factory) {
|
1222 |
+
{
|
1223 |
+
module.exports = factory();
|
1224 |
+
}
|
1225 |
+
}(commonjsGlobal, function () {
|
1226 |
+
|
1227 |
+
function scrollbarWidth() {
|
1228 |
+
if (typeof document === 'undefined') {
|
1229 |
+
return 0
|
1230 |
+
}
|
1231 |
+
|
1232 |
+
var
|
1233 |
+
body = document.body,
|
1234 |
+
box = document.createElement('div'),
|
1235 |
+
boxStyle = box.style,
|
1236 |
+
width;
|
1237 |
+
|
1238 |
+
boxStyle.position = 'absolute';
|
1239 |
+
boxStyle.top = boxStyle.left = '-9999px';
|
1240 |
+
boxStyle.width = boxStyle.height = '100px';
|
1241 |
+
boxStyle.overflow = 'scroll';
|
1242 |
+
|
1243 |
+
body.appendChild(box);
|
1244 |
+
|
1245 |
+
width = box.offsetWidth - box.clientWidth;
|
1246 |
+
|
1247 |
+
body.removeChild(box);
|
1248 |
+
|
1249 |
+
return width;
|
1250 |
+
}
|
1251 |
+
|
1252 |
+
return scrollbarWidth;
|
1253 |
+
}));
|
1254 |
+
});
|
1255 |
+
|
1256 |
+
/**
|
1257 |
+
* lodash (Custom Build) <https://lodash.com/>
|
1258 |
+
* Build: `lodash modularize exports="npm" -o ./`
|
1259 |
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
1260 |
+
* Released under MIT license <https://lodash.com/license>
|
1261 |
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
1262 |
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
1263 |
+
*/
|
1264 |
+
|
1265 |
+
/** Used as the `TypeError` message for "Functions" methods. */
|
1266 |
+
var FUNC_ERROR_TEXT = 'Expected a function';
|
1267 |
+
|
1268 |
+
/** Used as references for various `Number` constants. */
|
1269 |
+
var NAN = 0 / 0;
|
1270 |
+
|
1271 |
+
/** `Object#toString` result references. */
|
1272 |
+
var symbolTag = '[object Symbol]';
|
1273 |
+
|
1274 |
+
/** Used to match leading and trailing whitespace. */
|
1275 |
+
var reTrim = /^\s+|\s+$/g;
|
1276 |
+
|
1277 |
+
/** Used to detect bad signed hexadecimal string values. */
|
1278 |
+
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
1279 |
+
|
1280 |
+
/** Used to detect binary string values. */
|
1281 |
+
var reIsBinary = /^0b[01]+$/i;
|
1282 |
+
|
1283 |
+
/** Used to detect octal string values. */
|
1284 |
+
var reIsOctal = /^0o[0-7]+$/i;
|
1285 |
+
|
1286 |
+
/** Built-in method references without a dependency on `root`. */
|
1287 |
+
var freeParseInt = parseInt;
|
1288 |
+
|
1289 |
+
/** Detect free variable `global` from Node.js. */
|
1290 |
+
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
1291 |
+
|
1292 |
+
/** Detect free variable `self`. */
|
1293 |
+
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
1294 |
+
|
1295 |
+
/** Used as a reference to the global object. */
|
1296 |
+
var root = freeGlobal || freeSelf || Function('return this')();
|
1297 |
+
|
1298 |
+
/** Used for built-in method references. */
|
1299 |
+
var objectProto = Object.prototype;
|
1300 |
+
|
1301 |
+
/**
|
1302 |
+
* Used to resolve the
|
1303 |
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
1304 |
+
* of values.
|
1305 |
+
*/
|
1306 |
+
var objectToString = objectProto.toString;
|
1307 |
+
|
1308 |
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
1309 |
+
var nativeMax = Math.max,
|
1310 |
+
nativeMin = Math.min;
|
1311 |
+
|
1312 |
+
/**
|
1313 |
+
* Gets the timestamp of the number of milliseconds that have elapsed since
|
1314 |
+
* the Unix epoch (1 January 1970 00:00:00 UTC).
|
1315 |
+
*
|
1316 |
+
* @static
|
1317 |
+
* @memberOf _
|
1318 |
+
* @since 2.4.0
|
1319 |
+
* @category Date
|
1320 |
+
* @returns {number} Returns the timestamp.
|
1321 |
+
* @example
|
1322 |
+
*
|
1323 |
+
* _.defer(function(stamp) {
|
1324 |
+
* console.log(_.now() - stamp);
|
1325 |
+
* }, _.now());
|
1326 |
+
* // => Logs the number of milliseconds it took for the deferred invocation.
|
1327 |
+
*/
|
1328 |
+
var now = function() {
|
1329 |
+
return root.Date.now();
|
1330 |
+
};
|
1331 |
+
|
1332 |
+
/**
|
1333 |
+
* Creates a debounced function that delays invoking `func` until after `wait`
|
1334 |
+
* milliseconds have elapsed since the last time the debounced function was
|
1335 |
+
* invoked. The debounced function comes with a `cancel` method to cancel
|
1336 |
+
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
1337 |
+
* Provide `options` to indicate whether `func` should be invoked on the
|
1338 |
+
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
1339 |
+
* with the last arguments provided to the debounced function. Subsequent
|
1340 |
+
* calls to the debounced function return the result of the last `func`
|
1341 |
+
* invocation.
|
1342 |
+
*
|
1343 |
+
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
1344 |
+
* invoked on the trailing edge of the timeout only if the debounced function
|
1345 |
+
* is invoked more than once during the `wait` timeout.
|
1346 |
+
*
|
1347 |
+
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
1348 |
+
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
1349 |
+
*
|
1350 |
+
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
1351 |
+
* for details over the differences between `_.debounce` and `_.throttle`.
|
1352 |
+
*
|
1353 |
+
* @static
|
1354 |
+
* @memberOf _
|
1355 |
+
* @since 0.1.0
|
1356 |
+
* @category Function
|
1357 |
+
* @param {Function} func The function to debounce.
|
1358 |
+
* @param {number} [wait=0] The number of milliseconds to delay.
|
1359 |
+
* @param {Object} [options={}] The options object.
|
1360 |
+
* @param {boolean} [options.leading=false]
|
1361 |
+
* Specify invoking on the leading edge of the timeout.
|
1362 |
+
* @param {number} [options.maxWait]
|
1363 |
+
* The maximum time `func` is allowed to be delayed before it's invoked.
|
1364 |
+
* @param {boolean} [options.trailing=true]
|
1365 |
+
* Specify invoking on the trailing edge of the timeout.
|
1366 |
+
* @returns {Function} Returns the new debounced function.
|
1367 |
+
* @example
|
1368 |
+
*
|
1369 |
+
* // Avoid costly calculations while the window size is in flux.
|
1370 |
+
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
|
1371 |
+
*
|
1372 |
+
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
|
1373 |
+
* jQuery(element).on('click', _.debounce(sendMail, 300, {
|
1374 |
+
* 'leading': true,
|
1375 |
+
* 'trailing': false
|
1376 |
+
* }));
|
1377 |
+
*
|
1378 |
+
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
|
1379 |
+
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
|
1380 |
+
* var source = new EventSource('/stream');
|
1381 |
+
* jQuery(source).on('message', debounced);
|
1382 |
+
*
|
1383 |
+
* // Cancel the trailing debounced invocation.
|
1384 |
+
* jQuery(window).on('popstate', debounced.cancel);
|
1385 |
+
*/
|
1386 |
+
function debounce(func, wait, options) {
|
1387 |
+
var lastArgs,
|
1388 |
+
lastThis,
|
1389 |
+
maxWait,
|
1390 |
+
result,
|
1391 |
+
timerId,
|
1392 |
+
lastCallTime,
|
1393 |
+
lastInvokeTime = 0,
|
1394 |
+
leading = false,
|
1395 |
+
maxing = false,
|
1396 |
+
trailing = true;
|
1397 |
+
|
1398 |
+
if (typeof func != 'function') {
|
1399 |
+
throw new TypeError(FUNC_ERROR_TEXT);
|
1400 |
+
}
|
1401 |
+
wait = toNumber(wait) || 0;
|
1402 |
+
if (isObject$1(options)) {
|
1403 |
+
leading = !!options.leading;
|
1404 |
+
maxing = 'maxWait' in options;
|
1405 |
+
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
1406 |
+
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
1407 |
+
}
|
1408 |
+
|
1409 |
+
function invokeFunc(time) {
|
1410 |
+
var args = lastArgs,
|
1411 |
+
thisArg = lastThis;
|
1412 |
+
|
1413 |
+
lastArgs = lastThis = undefined;
|
1414 |
+
lastInvokeTime = time;
|
1415 |
+
result = func.apply(thisArg, args);
|
1416 |
+
return result;
|
1417 |
+
}
|
1418 |
+
|
1419 |
+
function leadingEdge(time) {
|
1420 |
+
// Reset any `maxWait` timer.
|
1421 |
+
lastInvokeTime = time;
|
1422 |
+
// Start the timer for the trailing edge.
|
1423 |
+
timerId = setTimeout(timerExpired, wait);
|
1424 |
+
// Invoke the leading edge.
|
1425 |
+
return leading ? invokeFunc(time) : result;
|
1426 |
+
}
|
1427 |
+
|
1428 |
+
function remainingWait(time) {
|
1429 |
+
var timeSinceLastCall = time - lastCallTime,
|
1430 |
+
timeSinceLastInvoke = time - lastInvokeTime,
|
1431 |
+
result = wait - timeSinceLastCall;
|
1432 |
+
|
1433 |
+
return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
|
1434 |
+
}
|
1435 |
+
|
1436 |
+
function shouldInvoke(time) {
|
1437 |
+
var timeSinceLastCall = time - lastCallTime,
|
1438 |
+
timeSinceLastInvoke = time - lastInvokeTime;
|
1439 |
+
|
1440 |
+
// Either this is the first call, activity has stopped and we're at the
|
1441 |
+
// trailing edge, the system time has gone backwards and we're treating
|
1442 |
+
// it as the trailing edge, or we've hit the `maxWait` limit.
|
1443 |
+
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
|
1444 |
+
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
|
1445 |
+
}
|
1446 |
+
|
1447 |
+
function timerExpired() {
|
1448 |
+
var time = now();
|
1449 |
+
if (shouldInvoke(time)) {
|
1450 |
+
return trailingEdge(time);
|
1451 |
+
}
|
1452 |
+
// Restart the timer.
|
1453 |
+
timerId = setTimeout(timerExpired, remainingWait(time));
|
1454 |
+
}
|
1455 |
+
|
1456 |
+
function trailingEdge(time) {
|
1457 |
+
timerId = undefined;
|
1458 |
+
|
1459 |
+
// Only invoke if we have `lastArgs` which means `func` has been
|
1460 |
+
// debounced at least once.
|
1461 |
+
if (trailing && lastArgs) {
|
1462 |
+
return invokeFunc(time);
|
1463 |
+
}
|
1464 |
+
lastArgs = lastThis = undefined;
|
1465 |
+
return result;
|
1466 |
+
}
|
1467 |
+
|
1468 |
+
function cancel() {
|
1469 |
+
if (timerId !== undefined) {
|
1470 |
+
clearTimeout(timerId);
|
1471 |
+
}
|
1472 |
+
lastInvokeTime = 0;
|
1473 |
+
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
1474 |
+
}
|
1475 |
+
|
1476 |
+
function flush() {
|
1477 |
+
return timerId === undefined ? result : trailingEdge(now());
|
1478 |
+
}
|
1479 |
+
|
1480 |
+
function debounced() {
|
1481 |
+
var time = now(),
|
1482 |
+
isInvoking = shouldInvoke(time);
|
1483 |
+
|
1484 |
+
lastArgs = arguments;
|
1485 |
+
lastThis = this;
|
1486 |
+
lastCallTime = time;
|
1487 |
+
|
1488 |
+
if (isInvoking) {
|
1489 |
+
if (timerId === undefined) {
|
1490 |
+
return leadingEdge(lastCallTime);
|
1491 |
+
}
|
1492 |
+
if (maxing) {
|
1493 |
+
// Handle invocations in a tight loop.
|
1494 |
+
timerId = setTimeout(timerExpired, wait);
|
1495 |
+
return invokeFunc(lastCallTime);
|
1496 |
+
}
|
1497 |
+
}
|
1498 |
+
if (timerId === undefined) {
|
1499 |
+
timerId = setTimeout(timerExpired, wait);
|
1500 |
+
}
|
1501 |
+
return result;
|
1502 |
+
}
|
1503 |
+
debounced.cancel = cancel;
|
1504 |
+
debounced.flush = flush;
|
1505 |
+
return debounced;
|
1506 |
+
}
|
1507 |
+
|
1508 |
+
/**
|
1509 |
+
* Creates a throttled function that only invokes `func` at most once per
|
1510 |
+
* every `wait` milliseconds. The throttled function comes with a `cancel`
|
1511 |
+
* method to cancel delayed `func` invocations and a `flush` method to
|
1512 |
+
* immediately invoke them. Provide `options` to indicate whether `func`
|
1513 |
+
* should be invoked on the leading and/or trailing edge of the `wait`
|
1514 |
+
* timeout. The `func` is invoked with the last arguments provided to the
|
1515 |
+
* throttled function. Subsequent calls to the throttled function return the
|
1516 |
+
* result of the last `func` invocation.
|
1517 |
+
*
|
1518 |
+
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
1519 |
+
* invoked on the trailing edge of the timeout only if the throttled function
|
1520 |
+
* is invoked more than once during the `wait` timeout.
|
1521 |
+
*
|
1522 |
+
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
1523 |
+
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
1524 |
+
*
|
1525 |
+
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
1526 |
+
* for details over the differences between `_.throttle` and `_.debounce`.
|
1527 |
+
*
|
1528 |
+
* @static
|
1529 |
+
* @memberOf _
|
1530 |
+
* @since 0.1.0
|
1531 |
+
* @category Function
|
1532 |
+
* @param {Function} func The function to throttle.
|
1533 |
+
* @param {number} [wait=0] The number of milliseconds to throttle invocations to.
|
1534 |
+
* @param {Object} [options={}] The options object.
|
1535 |
+
* @param {boolean} [options.leading=true]
|
1536 |
+
* Specify invoking on the leading edge of the timeout.
|
1537 |
+
* @param {boolean} [options.trailing=true]
|
1538 |
+
* Specify invoking on the trailing edge of the timeout.
|
1539 |
+
* @returns {Function} Returns the new throttled function.
|
1540 |
+
* @example
|
1541 |
+
*
|
1542 |
+
* // Avoid excessively updating the position while scrolling.
|
1543 |
+
* jQuery(window).on('scroll', _.throttle(updatePosition, 100));
|
1544 |
+
*
|
1545 |
+
* // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
|
1546 |
+
* var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
|
1547 |
+
* jQuery(element).on('click', throttled);
|
1548 |
+
*
|
1549 |
+
* // Cancel the trailing throttled invocation.
|
1550 |
+
* jQuery(window).on('popstate', throttled.cancel);
|
1551 |
+
*/
|
1552 |
+
function throttle(func, wait, options) {
|
1553 |
+
var leading = true,
|
1554 |
+
trailing = true;
|
1555 |
+
|
1556 |
+
if (typeof func != 'function') {
|
1557 |
+
throw new TypeError(FUNC_ERROR_TEXT);
|
1558 |
+
}
|
1559 |
+
if (isObject$1(options)) {
|
1560 |
+
leading = 'leading' in options ? !!options.leading : leading;
|
1561 |
+
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
1562 |
+
}
|
1563 |
+
return debounce(func, wait, {
|
1564 |
+
'leading': leading,
|
1565 |
+
'maxWait': wait,
|
1566 |
+
'trailing': trailing
|
1567 |
+
});
|
1568 |
+
}
|
1569 |
+
|
1570 |
+
/**
|
1571 |
+
* Checks if `value` is the
|
1572 |
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
1573 |
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
1574 |
+
*
|
1575 |
+
* @static
|
1576 |
+
* @memberOf _
|
1577 |
+
* @since 0.1.0
|
1578 |
+
* @category Lang
|
1579 |
+
* @param {*} value The value to check.
|
1580 |
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
1581 |
+
* @example
|
1582 |
+
*
|
1583 |
+
* _.isObject({});
|
1584 |
+
* // => true
|
1585 |
+
*
|
1586 |
+
* _.isObject([1, 2, 3]);
|
1587 |
+
* // => true
|
1588 |
+
*
|
1589 |
+
* _.isObject(_.noop);
|
1590 |
+
* // => true
|
1591 |
+
*
|
1592 |
+
* _.isObject(null);
|
1593 |
+
* // => false
|
1594 |
+
*/
|
1595 |
+
function isObject$1(value) {
|
1596 |
+
var type = typeof value;
|
1597 |
+
return !!value && (type == 'object' || type == 'function');
|
1598 |
+
}
|
1599 |
+
|
1600 |
+
/**
|
1601 |
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
1602 |
+
* and has a `typeof` result of "object".
|
1603 |
+
*
|
1604 |
+
* @static
|
1605 |
+
* @memberOf _
|
1606 |
+
* @since 4.0.0
|
1607 |
+
* @category Lang
|
1608 |
+
* @param {*} value The value to check.
|
1609 |
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
1610 |
+
* @example
|
1611 |
+
*
|
1612 |
+
* _.isObjectLike({});
|
1613 |
+
* // => true
|
1614 |
+
*
|
1615 |
+
* _.isObjectLike([1, 2, 3]);
|
1616 |
+
* // => true
|
1617 |
+
*
|
1618 |
+
* _.isObjectLike(_.noop);
|
1619 |
+
* // => false
|
1620 |
+
*
|
1621 |
+
* _.isObjectLike(null);
|
1622 |
+
* // => false
|
1623 |
+
*/
|
1624 |
+
function isObjectLike(value) {
|
1625 |
+
return !!value && typeof value == 'object';
|
1626 |
+
}
|
1627 |
+
|
1628 |
+
/**
|
1629 |
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
1630 |
+
*
|
1631 |
+
* @static
|
1632 |
+
* @memberOf _
|
1633 |
+
* @since 4.0.0
|
1634 |
+
* @category Lang
|
1635 |
+
* @param {*} value The value to check.
|
1636 |
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
1637 |
+
* @example
|
1638 |
+
*
|
1639 |
+
* _.isSymbol(Symbol.iterator);
|
1640 |
+
* // => true
|
1641 |
+
*
|
1642 |
+
* _.isSymbol('abc');
|
1643 |
+
* // => false
|
1644 |
+
*/
|
1645 |
+
function isSymbol(value) {
|
1646 |
+
return typeof value == 'symbol' ||
|
1647 |
+
(isObjectLike(value) && objectToString.call(value) == symbolTag);
|
1648 |
+
}
|
1649 |
+
|
1650 |
+
/**
|
1651 |
+
* Converts `value` to a number.
|
1652 |
+
*
|
1653 |
+
* @static
|
1654 |
+
* @memberOf _
|
1655 |
+
* @since 4.0.0
|
1656 |
+
* @category Lang
|
1657 |
+
* @param {*} value The value to process.
|
1658 |
+
* @returns {number} Returns the number.
|
1659 |
+
* @example
|
1660 |
+
*
|
1661 |
+
* _.toNumber(3.2);
|
1662 |
+
* // => 3.2
|
1663 |
+
*
|
1664 |
+
* _.toNumber(Number.MIN_VALUE);
|
1665 |
+
* // => 5e-324
|
1666 |
+
*
|
1667 |
+
* _.toNumber(Infinity);
|
1668 |
+
* // => Infinity
|
1669 |
+
*
|
1670 |
+
* _.toNumber('3.2');
|
1671 |
+
* // => 3.2
|
1672 |
+
*/
|
1673 |
+
function toNumber(value) {
|
1674 |
+
if (typeof value == 'number') {
|
1675 |
+
return value;
|
1676 |
+
}
|
1677 |
+
if (isSymbol(value)) {
|
1678 |
+
return NAN;
|
1679 |
+
}
|
1680 |
+
if (isObject$1(value)) {
|
1681 |
+
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
1682 |
+
value = isObject$1(other) ? (other + '') : other;
|
1683 |
+
}
|
1684 |
+
if (typeof value != 'string') {
|
1685 |
+
return value === 0 ? value : +value;
|
1686 |
+
}
|
1687 |
+
value = value.replace(reTrim, '');
|
1688 |
+
var isBinary = reIsBinary.test(value);
|
1689 |
+
return (isBinary || reIsOctal.test(value))
|
1690 |
+
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
1691 |
+
: (reIsBadHex.test(value) ? NAN : +value);
|
1692 |
+
}
|
1693 |
+
|
1694 |
+
var lodash_throttle = throttle;
|
1695 |
+
|
1696 |
+
/**
|
1697 |
+
* lodash (Custom Build) <https://lodash.com/>
|
1698 |
+
* Build: `lodash modularize exports="npm" -o ./`
|
1699 |
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
1700 |
+
* Released under MIT license <https://lodash.com/license>
|
1701 |
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
1702 |
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
1703 |
+
*/
|
1704 |
+
|
1705 |
+
/** Used as the `TypeError` message for "Functions" methods. */
|
1706 |
+
var FUNC_ERROR_TEXT$1 = 'Expected a function';
|
1707 |
+
|
1708 |
+
/** Used as references for various `Number` constants. */
|
1709 |
+
var NAN$1 = 0 / 0;
|
1710 |
+
|
1711 |
+
/** `Object#toString` result references. */
|
1712 |
+
var symbolTag$1 = '[object Symbol]';
|
1713 |
+
|
1714 |
+
/** Used to match leading and trailing whitespace. */
|
1715 |
+
var reTrim$1 = /^\s+|\s+$/g;
|
1716 |
+
|
1717 |
+
/** Used to detect bad signed hexadecimal string values. */
|
1718 |
+
var reIsBadHex$1 = /^[-+]0x[0-9a-f]+$/i;
|
1719 |
+
|
1720 |
+
/** Used to detect binary string values. */
|
1721 |
+
var reIsBinary$1 = /^0b[01]+$/i;
|
1722 |
+
|
1723 |
+
/** Used to detect octal string values. */
|
1724 |
+
var reIsOctal$1 = /^0o[0-7]+$/i;
|
1725 |
+
|
1726 |
+
/** Built-in method references without a dependency on `root`. */
|
1727 |
+
var freeParseInt$1 = parseInt;
|
1728 |
+
|
1729 |
+
/** Detect free variable `global` from Node.js. */
|
1730 |
+
var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
1731 |
+
|
1732 |
+
/** Detect free variable `self`. */
|
1733 |
+
var freeSelf$1 = typeof self == 'object' && self && self.Object === Object && self;
|
1734 |
+
|
1735 |
+
/** Used as a reference to the global object. */
|
1736 |
+
var root$1 = freeGlobal$1 || freeSelf$1 || Function('return this')();
|
1737 |
+
|
1738 |
+
/** Used for built-in method references. */
|
1739 |
+
var objectProto$1 = Object.prototype;
|
1740 |
+
|
1741 |
+
/**
|
1742 |
+
* Used to resolve the
|
1743 |
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
1744 |
+
* of values.
|
1745 |
+
*/
|
1746 |
+
var objectToString$1 = objectProto$1.toString;
|
1747 |
+
|
1748 |
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
1749 |
+
var nativeMax$1 = Math.max,
|
1750 |
+
nativeMin$1 = Math.min;
|
1751 |
+
|
1752 |
+
/**
|
1753 |
+
* Gets the timestamp of the number of milliseconds that have elapsed since
|
1754 |
+
* the Unix epoch (1 January 1970 00:00:00 UTC).
|
1755 |
+
*
|
1756 |
+
* @static
|
1757 |
+
* @memberOf _
|
1758 |
+
* @since 2.4.0
|
1759 |
+
* @category Date
|
1760 |
+
* @returns {number} Returns the timestamp.
|
1761 |
+
* @example
|
1762 |
+
*
|
1763 |
+
* _.defer(function(stamp) {
|
1764 |
+
* console.log(_.now() - stamp);
|
1765 |
+
* }, _.now());
|
1766 |
+
* // => Logs the number of milliseconds it took for the deferred invocation.
|
1767 |
+
*/
|
1768 |
+
var now$1 = function() {
|
1769 |
+
return root$1.Date.now();
|
1770 |
+
};
|
1771 |
+
|
1772 |
+
/**
|
1773 |
+
* Creates a debounced function that delays invoking `func` until after `wait`
|
1774 |
+
* milliseconds have elapsed since the last time the debounced function was
|
1775 |
+
* invoked. The debounced function comes with a `cancel` method to cancel
|
1776 |
+
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
1777 |
+
* Provide `options` to indicate whether `func` should be invoked on the
|
1778 |
+
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
1779 |
+
* with the last arguments provided to the debounced function. Subsequent
|
1780 |
+
* calls to the debounced function return the result of the last `func`
|
1781 |
+
* invocation.
|
1782 |
+
*
|
1783 |
+
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
1784 |
+
* invoked on the trailing edge of the timeout only if the debounced function
|
1785 |
+
* is invoked more than once during the `wait` timeout.
|
1786 |
+
*
|
1787 |
+
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
1788 |
+
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
1789 |
+
*
|
1790 |
+
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
1791 |
+
* for details over the differences between `_.debounce` and `_.throttle`.
|
1792 |
+
*
|
1793 |
+
* @static
|
1794 |
+
* @memberOf _
|
1795 |
+
* @since 0.1.0
|
1796 |
+
* @category Function
|
1797 |
+
* @param {Function} func The function to debounce.
|
1798 |
+
* @param {number} [wait=0] The number of milliseconds to delay.
|
1799 |
+
* @param {Object} [options={}] The options object.
|
1800 |
+
* @param {boolean} [options.leading=false]
|
1801 |
+
* Specify invoking on the leading edge of the timeout.
|
1802 |
+
* @param {number} [options.maxWait]
|
1803 |
+
* The maximum time `func` is allowed to be delayed before it's invoked.
|
1804 |
+
* @param {boolean} [options.trailing=true]
|
1805 |
+
* Specify invoking on the trailing edge of the timeout.
|
1806 |
+
* @returns {Function} Returns the new debounced function.
|
1807 |
+
* @example
|
1808 |
+
*
|
1809 |
+
* // Avoid costly calculations while the window size is in flux.
|
1810 |
+
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
|
1811 |
+
*
|
1812 |
+
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
|
1813 |
+
* jQuery(element).on('click', _.debounce(sendMail, 300, {
|
1814 |
+
* 'leading': true,
|
1815 |
+
* 'trailing': false
|
1816 |
+
* }));
|
1817 |
+
*
|
1818 |
+
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
|
1819 |
+
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
|
1820 |
+
* var source = new EventSource('/stream');
|
1821 |
+
* jQuery(source).on('message', debounced);
|
1822 |
+
*
|
1823 |
+
* // Cancel the trailing debounced invocation.
|
1824 |
+
* jQuery(window).on('popstate', debounced.cancel);
|
1825 |
+
*/
|
1826 |
+
function debounce$1(func, wait, options) {
|
1827 |
+
var lastArgs,
|
1828 |
+
lastThis,
|
1829 |
+
maxWait,
|
1830 |
+
result,
|
1831 |
+
timerId,
|
1832 |
+
lastCallTime,
|
1833 |
+
lastInvokeTime = 0,
|
1834 |
+
leading = false,
|
1835 |
+
maxing = false,
|
1836 |
+
trailing = true;
|
1837 |
+
|
1838 |
+
if (typeof func != 'function') {
|
1839 |
+
throw new TypeError(FUNC_ERROR_TEXT$1);
|
1840 |
+
}
|
1841 |
+
wait = toNumber$1(wait) || 0;
|
1842 |
+
if (isObject$2(options)) {
|
1843 |
+
leading = !!options.leading;
|
1844 |
+
maxing = 'maxWait' in options;
|
1845 |
+
maxWait = maxing ? nativeMax$1(toNumber$1(options.maxWait) || 0, wait) : maxWait;
|
1846 |
+
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
1847 |
+
}
|
1848 |
+
|
1849 |
+
function invokeFunc(time) {
|
1850 |
+
var args = lastArgs,
|
1851 |
+
thisArg = lastThis;
|
1852 |
+
|
1853 |
+
lastArgs = lastThis = undefined;
|
1854 |
+
lastInvokeTime = time;
|
1855 |
+
result = func.apply(thisArg, args);
|
1856 |
+
return result;
|
1857 |
+
}
|
1858 |
+
|
1859 |
+
function leadingEdge(time) {
|
1860 |
+
// Reset any `maxWait` timer.
|
1861 |
+
lastInvokeTime = time;
|
1862 |
+
// Start the timer for the trailing edge.
|
1863 |
+
timerId = setTimeout(timerExpired, wait);
|
1864 |
+
// Invoke the leading edge.
|
1865 |
+
return leading ? invokeFunc(time) : result;
|
1866 |
+
}
|
1867 |
+
|
1868 |
+
function remainingWait(time) {
|
1869 |
+
var timeSinceLastCall = time - lastCallTime,
|
1870 |
+
timeSinceLastInvoke = time - lastInvokeTime,
|
1871 |
+
result = wait - timeSinceLastCall;
|
1872 |
+
|
1873 |
+
return maxing ? nativeMin$1(result, maxWait - timeSinceLastInvoke) : result;
|
1874 |
+
}
|
1875 |
+
|
1876 |
+
function shouldInvoke(time) {
|
1877 |
+
var timeSinceLastCall = time - lastCallTime,
|
1878 |
+
timeSinceLastInvoke = time - lastInvokeTime;
|
1879 |
+
|
1880 |
+
// Either this is the first call, activity has stopped and we're at the
|
1881 |
+
// trailing edge, the system time has gone backwards and we're treating
|
1882 |
+
// it as the trailing edge, or we've hit the `maxWait` limit.
|
1883 |
+
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
|
1884 |
+
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
|
1885 |
+
}
|
1886 |
+
|
1887 |
+
function timerExpired() {
|
1888 |
+
var time = now$1();
|
1889 |
+
if (shouldInvoke(time)) {
|
1890 |
+
return trailingEdge(time);
|
1891 |
+
}
|
1892 |
+
// Restart the timer.
|
1893 |
+
timerId = setTimeout(timerExpired, remainingWait(time));
|
1894 |
+
}
|
1895 |
+
|
1896 |
+
function trailingEdge(time) {
|
1897 |
+
timerId = undefined;
|
1898 |
+
|
1899 |
+
// Only invoke if we have `lastArgs` which means `func` has been
|
1900 |
+
// debounced at least once.
|
1901 |
+
if (trailing && lastArgs) {
|
1902 |
+
return invokeFunc(time);
|
1903 |
+
}
|
1904 |
+
lastArgs = lastThis = undefined;
|
1905 |
+
return result;
|
1906 |
+
}
|
1907 |
+
|
1908 |
+
function cancel() {
|
1909 |
+
if (timerId !== undefined) {
|
1910 |
+
clearTimeout(timerId);
|
1911 |
+
}
|
1912 |
+
lastInvokeTime = 0;
|
1913 |
+
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
1914 |
+
}
|
1915 |
+
|
1916 |
+
function flush() {
|
1917 |
+
return timerId === undefined ? result : trailingEdge(now$1());
|
1918 |
+
}
|
1919 |
+
|
1920 |
+
function debounced() {
|
1921 |
+
var time = now$1(),
|
1922 |
+
isInvoking = shouldInvoke(time);
|
1923 |
+
|
1924 |
+
lastArgs = arguments;
|
1925 |
+
lastThis = this;
|
1926 |
+
lastCallTime = time;
|
1927 |
+
|
1928 |
+
if (isInvoking) {
|
1929 |
+
if (timerId === undefined) {
|
1930 |
+
return leadingEdge(lastCallTime);
|
1931 |
+
}
|
1932 |
+
if (maxing) {
|
1933 |
+
// Handle invocations in a tight loop.
|
1934 |
+
timerId = setTimeout(timerExpired, wait);
|
1935 |
+
return invokeFunc(lastCallTime);
|
1936 |
+
}
|
1937 |
+
}
|
1938 |
+
if (timerId === undefined) {
|
1939 |
+
timerId = setTimeout(timerExpired, wait);
|
1940 |
+
}
|
1941 |
+
return result;
|
1942 |
+
}
|
1943 |
+
debounced.cancel = cancel;
|
1944 |
+
debounced.flush = flush;
|
1945 |
+
return debounced;
|
1946 |
+
}
|
1947 |
+
|
1948 |
+
/**
|
1949 |
+
* Checks if `value` is the
|
1950 |
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
1951 |
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
1952 |
+
*
|
1953 |
+
* @static
|
1954 |
+
* @memberOf _
|
1955 |
+
* @since 0.1.0
|
1956 |
+
* @category Lang
|
1957 |
+
* @param {*} value The value to check.
|
1958 |
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
1959 |
+
* @example
|
1960 |
+
*
|
1961 |
+
* _.isObject({});
|
1962 |
+
* // => true
|
1963 |
+
*
|
1964 |
+
* _.isObject([1, 2, 3]);
|
1965 |
+
* // => true
|
1966 |
+
*
|
1967 |
+
* _.isObject(_.noop);
|
1968 |
+
* // => true
|
1969 |
+
*
|
1970 |
+
* _.isObject(null);
|
1971 |
+
* // => false
|
1972 |
+
*/
|
1973 |
+
function isObject$2(value) {
|
1974 |
+
var type = typeof value;
|
1975 |
+
return !!value && (type == 'object' || type == 'function');
|
1976 |
+
}
|
1977 |
+
|
1978 |
+
/**
|
1979 |
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
1980 |
+
* and has a `typeof` result of "object".
|
1981 |
+
*
|
1982 |
+
* @static
|
1983 |
+
* @memberOf _
|
1984 |
+
* @since 4.0.0
|
1985 |
+
* @category Lang
|
1986 |
+
* @param {*} value The value to check.
|
1987 |
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
1988 |
+
* @example
|
1989 |
+
*
|
1990 |
+
* _.isObjectLike({});
|
1991 |
+
* // => true
|
1992 |
+
*
|
1993 |
+
* _.isObjectLike([1, 2, 3]);
|
1994 |
+
* // => true
|
1995 |
+
*
|
1996 |
+
* _.isObjectLike(_.noop);
|
1997 |
+
* // => false
|
1998 |
+
*
|
1999 |
+
* _.isObjectLike(null);
|
2000 |
+
* // => false
|
2001 |
+
*/
|
2002 |
+
function isObjectLike$1(value) {
|
2003 |
+
return !!value && typeof value == 'object';
|
2004 |
+
}
|
2005 |
+
|
2006 |
+
/**
|
2007 |
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
2008 |
+
*
|
2009 |
+
* @static
|
2010 |
+
* @memberOf _
|
2011 |
+
* @since 4.0.0
|
2012 |
+
* @category Lang
|
2013 |
+
* @param {*} value The value to check.
|
2014 |
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
2015 |
+
* @example
|
2016 |
+
*
|
2017 |
+
* _.isSymbol(Symbol.iterator);
|
2018 |
+
* // => true
|
2019 |
+
*
|
2020 |
+
* _.isSymbol('abc');
|
2021 |
+
* // => false
|
2022 |
+
*/
|
2023 |
+
function isSymbol$1(value) {
|
2024 |
+
return typeof value == 'symbol' ||
|
2025 |
+
(isObjectLike$1(value) && objectToString$1.call(value) == symbolTag$1);
|
2026 |
+
}
|
2027 |
+
|
2028 |
+
/**
|
2029 |
+
* Converts `value` to a number.
|
2030 |
+
*
|
2031 |
+
* @static
|
2032 |
+
* @memberOf _
|
2033 |
+
* @since 4.0.0
|
2034 |
+
* @category Lang
|
2035 |
+
* @param {*} value The value to process.
|
2036 |
+
* @returns {number} Returns the number.
|
2037 |
+
* @example
|
2038 |
+
*
|
2039 |
+
* _.toNumber(3.2);
|
2040 |
+
* // => 3.2
|
2041 |
+
*
|
2042 |
+
* _.toNumber(Number.MIN_VALUE);
|
2043 |
+
* // => 5e-324
|
2044 |
+
*
|
2045 |
+
* _.toNumber(Infinity);
|
2046 |
+
* // => Infinity
|
2047 |
+
*
|
2048 |
+
* _.toNumber('3.2');
|
2049 |
+
* // => 3.2
|
2050 |
+
*/
|
2051 |
+
function toNumber$1(value) {
|
2052 |
+
if (typeof value == 'number') {
|
2053 |
+
return value;
|
2054 |
+
}
|
2055 |
+
if (isSymbol$1(value)) {
|
2056 |
+
return NAN$1;
|
2057 |
+
}
|
2058 |
+
if (isObject$2(value)) {
|
2059 |
+
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
2060 |
+
value = isObject$2(other) ? (other + '') : other;
|
2061 |
+
}
|
2062 |
+
if (typeof value != 'string') {
|
2063 |
+
return value === 0 ? value : +value;
|
2064 |
+
}
|
2065 |
+
value = value.replace(reTrim$1, '');
|
2066 |
+
var isBinary = reIsBinary$1.test(value);
|
2067 |
+
return (isBinary || reIsOctal$1.test(value))
|
2068 |
+
? freeParseInt$1(value.slice(2), isBinary ? 2 : 8)
|
2069 |
+
: (reIsBadHex$1.test(value) ? NAN$1 : +value);
|
2070 |
+
}
|
2071 |
+
|
2072 |
+
var lodash_debounce = debounce$1;
|
2073 |
+
|
2074 |
+
/**
|
2075 |
+
* lodash (Custom Build) <https://lodash.com/>
|
2076 |
+
* Build: `lodash modularize exports="npm" -o ./`
|
2077 |
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
2078 |
+
* Released under MIT license <https://lodash.com/license>
|
2079 |
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
2080 |
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
2081 |
+
*/
|
2082 |
+
|
2083 |
+
/** Used as the `TypeError` message for "Functions" methods. */
|
2084 |
+
var FUNC_ERROR_TEXT$2 = 'Expected a function';
|
2085 |
+
|
2086 |
+
/** Used to stand-in for `undefined` hash values. */
|
2087 |
+
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
2088 |
+
|
2089 |
+
/** `Object#toString` result references. */
|
2090 |
+
var funcTag = '[object Function]',
|
2091 |
+
genTag = '[object GeneratorFunction]';
|
2092 |
+
|
2093 |
+
/**
|
2094 |
+
* Used to match `RegExp`
|
2095 |
+
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
2096 |
+
*/
|
2097 |
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
2098 |
+
|
2099 |
+
/** Used to detect host constructors (Safari). */
|
2100 |
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
2101 |
+
|
2102 |
+
/** Detect free variable `global` from Node.js. */
|
2103 |
+
var freeGlobal$2 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
2104 |
+
|
2105 |
+
/** Detect free variable `self`. */
|
2106 |
+
var freeSelf$2 = typeof self == 'object' && self && self.Object === Object && self;
|
2107 |
+
|
2108 |
+
/** Used as a reference to the global object. */
|
2109 |
+
var root$2 = freeGlobal$2 || freeSelf$2 || Function('return this')();
|
2110 |
+
|
2111 |
+
/**
|
2112 |
+
* Gets the value at `key` of `object`.
|
2113 |
+
*
|
2114 |
+
* @private
|
2115 |
+
* @param {Object} [object] The object to query.
|
2116 |
+
* @param {string} key The key of the property to get.
|
2117 |
+
* @returns {*} Returns the property value.
|
2118 |
+
*/
|
2119 |
+
function getValue(object, key) {
|
2120 |
+
return object == null ? undefined : object[key];
|
2121 |
+
}
|
2122 |
+
|
2123 |
+
/**
|
2124 |
+
* Checks if `value` is a host object in IE < 9.
|
2125 |
+
*
|
2126 |
+
* @private
|
2127 |
+
* @param {*} value The value to check.
|
2128 |
+
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
2129 |
+
*/
|
2130 |
+
function isHostObject(value) {
|
2131 |
+
// Many host objects are `Object` objects that can coerce to strings
|
2132 |
+
// despite having improperly defined `toString` methods.
|
2133 |
+
var result = false;
|
2134 |
+
if (value != null && typeof value.toString != 'function') {
|
2135 |
+
try {
|
2136 |
+
result = !!(value + '');
|
2137 |
+
} catch (e) {}
|
2138 |
+
}
|
2139 |
+
return result;
|
2140 |
+
}
|
2141 |
+
|
2142 |
+
/** Used for built-in method references. */
|
2143 |
+
var arrayProto = Array.prototype,
|
2144 |
+
funcProto = Function.prototype,
|
2145 |
+
objectProto$2 = Object.prototype;
|
2146 |
+
|
2147 |
+
/** Used to detect overreaching core-js shims. */
|
2148 |
+
var coreJsData = root$2['__core-js_shared__'];
|
2149 |
+
|
2150 |
+
/** Used to detect methods masquerading as native. */
|
2151 |
+
var maskSrcKey = (function() {
|
2152 |
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
2153 |
+
return uid ? ('Symbol(src)_1.' + uid) : '';
|
2154 |
+
}());
|
2155 |
+
|
2156 |
+
/** Used to resolve the decompiled source of functions. */
|
2157 |
+
var funcToString = funcProto.toString;
|
2158 |
+
|
2159 |
+
/** Used to check objects for own properties. */
|
2160 |
+
var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
|
2161 |
+
|
2162 |
+
/**
|
2163 |
+
* Used to resolve the
|
2164 |
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
2165 |
+
* of values.
|
2166 |
+
*/
|
2167 |
+
var objectToString$2 = objectProto$2.toString;
|
2168 |
+
|
2169 |
+
/** Used to detect if a method is native. */
|
2170 |
+
var reIsNative = RegExp('^' +
|
2171 |
+
funcToString.call(hasOwnProperty$1).replace(reRegExpChar, '\\$&')
|
2172 |
+
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
2173 |
+
);
|
2174 |
+
|
2175 |
+
/** Built-in value references. */
|
2176 |
+
var splice = arrayProto.splice;
|
2177 |
+
|
2178 |
+
/* Built-in method references that are verified to be native. */
|
2179 |
+
var Map$1 = getNative(root$2, 'Map'),
|
2180 |
+
nativeCreate = getNative(Object, 'create');
|
2181 |
+
|
2182 |
+
/**
|
2183 |
+
* Creates a hash object.
|
2184 |
+
*
|
2185 |
+
* @private
|
2186 |
+
* @constructor
|
2187 |
+
* @param {Array} [entries] The key-value pairs to cache.
|
2188 |
+
*/
|
2189 |
+
function Hash(entries) {
|
2190 |
+
var index = -1,
|
2191 |
+
length = entries ? entries.length : 0;
|
2192 |
+
|
2193 |
+
this.clear();
|
2194 |
+
while (++index < length) {
|
2195 |
+
var entry = entries[index];
|
2196 |
+
this.set(entry[0], entry[1]);
|
2197 |
+
}
|
2198 |
+
}
|
2199 |
+
|
2200 |
+
/**
|
2201 |
+
* Removes all key-value entries from the hash.
|
2202 |
+
*
|
2203 |
+
* @private
|
2204 |
+
* @name clear
|
2205 |
+
* @memberOf Hash
|
2206 |
+
*/
|
2207 |
+
function hashClear() {
|
2208 |
+
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
2209 |
+
}
|
2210 |
+
|
2211 |
+
/**
|
2212 |
+
* Removes `key` and its value from the hash.
|
2213 |
+
*
|
2214 |
+
* @private
|
2215 |
+
* @name delete
|
2216 |
+
* @memberOf Hash
|
2217 |
+
* @param {Object} hash The hash to modify.
|
2218 |
+
* @param {string} key The key of the value to remove.
|
2219 |
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
2220 |
+
*/
|
2221 |
+
function hashDelete(key) {
|
2222 |
+
return this.has(key) && delete this.__data__[key];
|
2223 |
+
}
|
2224 |
+
|
2225 |
+
/**
|
2226 |
+
* Gets the hash value for `key`.
|
2227 |
+
*
|
2228 |
+
* @private
|
2229 |
+
* @name get
|
2230 |
+
* @memberOf Hash
|
2231 |
+
* @param {string} key The key of the value to get.
|
2232 |
+
* @returns {*} Returns the entry value.
|
2233 |
+
*/
|
2234 |
+
function hashGet(key) {
|
2235 |
+
var data = this.__data__;
|
2236 |
+
if (nativeCreate) {
|
2237 |
+
var result = data[key];
|
2238 |
+
return result === HASH_UNDEFINED ? undefined : result;
|
2239 |
+
}
|
2240 |
+
return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
|
2241 |
+
}
|
2242 |
+
|
2243 |
+
/**
|
2244 |
+
* Checks if a hash value for `key` exists.
|
2245 |
+
*
|
2246 |
+
* @private
|
2247 |
+
* @name has
|
2248 |
+
* @memberOf Hash
|
2249 |
+
* @param {string} key The key of the entry to check.
|
2250 |
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
2251 |
+
*/
|
2252 |
+
function hashHas(key) {
|
2253 |
+
var data = this.__data__;
|
2254 |
+
return nativeCreate ? data[key] !== undefined : hasOwnProperty$1.call(data, key);
|
2255 |
+
}
|
2256 |
+
|
2257 |
+
/**
|
2258 |
+
* Sets the hash `key` to `value`.
|
2259 |
+
*
|
2260 |
+
* @private
|
2261 |
+
* @name set
|
2262 |
+
* @memberOf Hash
|
2263 |
+
* @param {string} key The key of the value to set.
|
2264 |
+
* @param {*} value The value to set.
|
2265 |
+
* @returns {Object} Returns the hash instance.
|
2266 |
+
*/
|
2267 |
+
function hashSet(key, value) {
|
2268 |
+
var data = this.__data__;
|
2269 |
+
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
2270 |
+
return this;
|
2271 |
+
}
|
2272 |
+
|
2273 |
+
// Add methods to `Hash`.
|
2274 |
+
Hash.prototype.clear = hashClear;
|
2275 |
+
Hash.prototype['delete'] = hashDelete;
|
2276 |
+
Hash.prototype.get = hashGet;
|
2277 |
+
Hash.prototype.has = hashHas;
|
2278 |
+
Hash.prototype.set = hashSet;
|
2279 |
+
|
2280 |
+
/**
|
2281 |
+
* Creates an list cache object.
|
2282 |
+
*
|
2283 |
+
* @private
|
2284 |
+
* @constructor
|
2285 |
+
* @param {Array} [entries] The key-value pairs to cache.
|
2286 |
+
*/
|
2287 |
+
function ListCache(entries) {
|
2288 |
+
var index = -1,
|
2289 |
+
length = entries ? entries.length : 0;
|
2290 |
+
|
2291 |
+
this.clear();
|
2292 |
+
while (++index < length) {
|
2293 |
+
var entry = entries[index];
|
2294 |
+
this.set(entry[0], entry[1]);
|
2295 |
+
}
|
2296 |
+
}
|
2297 |
+
|
2298 |
+
/**
|
2299 |
+
* Removes all key-value entries from the list cache.
|
2300 |
+
*
|
2301 |
+
* @private
|
2302 |
+
* @name clear
|
2303 |
+
* @memberOf ListCache
|
2304 |
+
*/
|
2305 |
+
function listCacheClear() {
|
2306 |
+
this.__data__ = [];
|
2307 |
+
}
|
2308 |
+
|
2309 |
+
/**
|
2310 |
+
* Removes `key` and its value from the list cache.
|
2311 |
+
*
|
2312 |
+
* @private
|
2313 |
+
* @name delete
|
2314 |
+
* @memberOf ListCache
|
2315 |
+
* @param {string} key The key of the value to remove.
|
2316 |
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
2317 |
+
*/
|
2318 |
+
function listCacheDelete(key) {
|
2319 |
+
var data = this.__data__,
|
2320 |
+
index = assocIndexOf(data, key);
|
2321 |
+
|
2322 |
+
if (index < 0) {
|
2323 |
+
return false;
|
2324 |
+
}
|
2325 |
+
var lastIndex = data.length - 1;
|
2326 |
+
if (index == lastIndex) {
|
2327 |
+
data.pop();
|
2328 |
+
} else {
|
2329 |
+
splice.call(data, index, 1);
|
2330 |
+
}
|
2331 |
+
return true;
|
2332 |
+
}
|
2333 |
+
|
2334 |
+
/**
|
2335 |
+
* Gets the list cache value for `key`.
|
2336 |
+
*
|
2337 |
+
* @private
|
2338 |
+
* @name get
|
2339 |
+
* @memberOf ListCache
|
2340 |
+
* @param {string} key The key of the value to get.
|
2341 |
+
* @returns {*} Returns the entry value.
|
2342 |
+
*/
|
2343 |
+
function listCacheGet(key) {
|
2344 |
+
var data = this.__data__,
|
2345 |
+
index = assocIndexOf(data, key);
|
2346 |
+
|
2347 |
+
return index < 0 ? undefined : data[index][1];
|
2348 |
+
}
|
2349 |
+
|
2350 |
+
/**
|
2351 |
+
* Checks if a list cache value for `key` exists.
|
2352 |
+
*
|
2353 |
+
* @private
|
2354 |
+
* @name has
|
2355 |
+
* @memberOf ListCache
|
2356 |
+
* @param {string} key The key of the entry to check.
|
2357 |
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
2358 |
+
*/
|
2359 |
+
function listCacheHas(key) {
|
2360 |
+
return assocIndexOf(this.__data__, key) > -1;
|
2361 |
+
}
|
2362 |
+
|
2363 |
+
/**
|
2364 |
+
* Sets the list cache `key` to `value`.
|
2365 |
+
*
|
2366 |
+
* @private
|
2367 |
+
* @name set
|
2368 |
+
* @memberOf ListCache
|
2369 |
+
* @param {string} key The key of the value to set.
|
2370 |
+
* @param {*} value The value to set.
|
2371 |
+
* @returns {Object} Returns the list cache instance.
|
2372 |
+
*/
|
2373 |
+
function listCacheSet(key, value) {
|
2374 |
+
var data = this.__data__,
|
2375 |
+
index = assocIndexOf(data, key);
|
2376 |
+
|
2377 |
+
if (index < 0) {
|
2378 |
+
data.push([key, value]);
|
2379 |
+
} else {
|
2380 |
+
data[index][1] = value;
|
2381 |
+
}
|
2382 |
+
return this;
|
2383 |
+
}
|
2384 |
+
|
2385 |
+
// Add methods to `ListCache`.
|
2386 |
+
ListCache.prototype.clear = listCacheClear;
|
2387 |
+
ListCache.prototype['delete'] = listCacheDelete;
|
2388 |
+
ListCache.prototype.get = listCacheGet;
|
2389 |
+
ListCache.prototype.has = listCacheHas;
|
2390 |
+
ListCache.prototype.set = listCacheSet;
|
2391 |
+
|
2392 |
+
/**
|
2393 |
+
* Creates a map cache object to store key-value pairs.
|
2394 |
+
*
|
2395 |
+
* @private
|
2396 |
+
* @constructor
|
2397 |
+
* @param {Array} [entries] The key-value pairs to cache.
|
2398 |
+
*/
|
2399 |
+
function MapCache(entries) {
|
2400 |
+
var index = -1,
|
2401 |
+
length = entries ? entries.length : 0;
|
2402 |
+
|
2403 |
+
this.clear();
|
2404 |
+
while (++index < length) {
|
2405 |
+
var entry = entries[index];
|
2406 |
+
this.set(entry[0], entry[1]);
|
2407 |
+
}
|
2408 |
+
}
|
2409 |
+
|
2410 |
+
/**
|
2411 |
+
* Removes all key-value entries from the map.
|
2412 |
+
*
|
2413 |
+
* @private
|
2414 |
+
* @name clear
|
2415 |
+
* @memberOf MapCache
|
2416 |
+
*/
|
2417 |
+
function mapCacheClear() {
|
2418 |
+
this.__data__ = {
|
2419 |
+
'hash': new Hash,
|
2420 |
+
'map': new (Map$1 || ListCache),
|
2421 |
+
'string': new Hash
|
2422 |
+
};
|
2423 |
+
}
|
2424 |
+
|
2425 |
+
/**
|
2426 |
+
* Removes `key` and its value from the map.
|
2427 |
+
*
|
2428 |
+
* @private
|
2429 |
+
* @name delete
|
2430 |
+
* @memberOf MapCache
|
2431 |
+
* @param {string} key The key of the value to remove.
|
2432 |
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
2433 |
+
*/
|
2434 |
+
function mapCacheDelete(key) {
|
2435 |
+
return getMapData(this, key)['delete'](key);
|
2436 |
+
}
|
2437 |
+
|
2438 |
+
/**
|
2439 |
+
* Gets the map value for `key`.
|
2440 |
+
*
|
2441 |
+
* @private
|
2442 |
+
* @name get
|
2443 |
+
* @memberOf MapCache
|
2444 |
+
* @param {string} key The key of the value to get.
|
2445 |
+
* @returns {*} Returns the entry value.
|
2446 |
+
*/
|
2447 |
+
function mapCacheGet(key) {
|
2448 |
+
return getMapData(this, key).get(key);
|
2449 |
+
}
|
2450 |
+
|
2451 |
+
/**
|
2452 |
+
* Checks if a map value for `key` exists.
|
2453 |
+
*
|
2454 |
+
* @private
|
2455 |
+
* @name has
|
2456 |
+
* @memberOf MapCache
|
2457 |
+
* @param {string} key The key of the entry to check.
|
2458 |
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
2459 |
+
*/
|
2460 |
+
function mapCacheHas(key) {
|
2461 |
+
return getMapData(this, key).has(key);
|
2462 |
+
}
|
2463 |
+
|
2464 |
+
/**
|
2465 |
+
* Sets the map `key` to `value`.
|
2466 |
+
*
|
2467 |
+
* @private
|
2468 |
+
* @name set
|
2469 |
+
* @memberOf MapCache
|
2470 |
+
* @param {string} key The key of the value to set.
|
2471 |
+
* @param {*} value The value to set.
|
2472 |
+
* @returns {Object} Returns the map cache instance.
|
2473 |
+
*/
|
2474 |
+
function mapCacheSet(key, value) {
|
2475 |
+
getMapData(this, key).set(key, value);
|
2476 |
+
return this;
|
2477 |
+
}
|
2478 |
+
|
2479 |
+
// Add methods to `MapCache`.
|
2480 |
+
MapCache.prototype.clear = mapCacheClear;
|
2481 |
+
MapCache.prototype['delete'] = mapCacheDelete;
|
2482 |
+
MapCache.prototype.get = mapCacheGet;
|
2483 |
+
MapCache.prototype.has = mapCacheHas;
|
2484 |
+
MapCache.prototype.set = mapCacheSet;
|
2485 |
+
|
2486 |
+
/**
|
2487 |
+
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
2488 |
+
*
|
2489 |
+
* @private
|
2490 |
+
* @param {Array} array The array to inspect.
|
2491 |
+
* @param {*} key The key to search for.
|
2492 |
+
* @returns {number} Returns the index of the matched value, else `-1`.
|
2493 |
+
*/
|
2494 |
+
function assocIndexOf(array, key) {
|
2495 |
+
var length = array.length;
|
2496 |
+
while (length--) {
|
2497 |
+
if (eq(array[length][0], key)) {
|
2498 |
+
return length;
|
2499 |
+
}
|
2500 |
+
}
|
2501 |
+
return -1;
|
2502 |
+
}
|
2503 |
+
|
2504 |
+
/**
|
2505 |
+
* The base implementation of `_.isNative` without bad shim checks.
|
2506 |
+
*
|
2507 |
+
* @private
|
2508 |
+
* @param {*} value The value to check.
|
2509 |
+
* @returns {boolean} Returns `true` if `value` is a native function,
|
2510 |
+
* else `false`.
|
2511 |
+
*/
|
2512 |
+
function baseIsNative(value) {
|
2513 |
+
if (!isObject$3(value) || isMasked(value)) {
|
2514 |
+
return false;
|
2515 |
+
}
|
2516 |
+
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
|
2517 |
+
return pattern.test(toSource(value));
|
2518 |
+
}
|
2519 |
+
|
2520 |
+
/**
|
2521 |
+
* Gets the data for `map`.
|
2522 |
+
*
|
2523 |
+
* @private
|
2524 |
+
* @param {Object} map The map to query.
|
2525 |
+
* @param {string} key The reference key.
|
2526 |
+
* @returns {*} Returns the map data.
|
2527 |
+
*/
|
2528 |
+
function getMapData(map, key) {
|
2529 |
+
var data = map.__data__;
|
2530 |
+
return isKeyable(key)
|
2531 |
+
? data[typeof key == 'string' ? 'string' : 'hash']
|
2532 |
+
: data.map;
|
2533 |
+
}
|
2534 |
+
|
2535 |
+
/**
|
2536 |
+
* Gets the native function at `key` of `object`.
|
2537 |
+
*
|
2538 |
+
* @private
|
2539 |
+
* @param {Object} object The object to query.
|
2540 |
+
* @param {string} key The key of the method to get.
|
2541 |
+
* @returns {*} Returns the function if it's native, else `undefined`.
|
2542 |
+
*/
|
2543 |
+
function getNative(object, key) {
|
2544 |
+
var value = getValue(object, key);
|
2545 |
+
return baseIsNative(value) ? value : undefined;
|
2546 |
+
}
|
2547 |
+
|
2548 |
+
/**
|
2549 |
+
* Checks if `value` is suitable for use as unique object key.
|
2550 |
+
*
|
2551 |
+
* @private
|
2552 |
+
* @param {*} value The value to check.
|
2553 |
+
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
2554 |
+
*/
|
2555 |
+
function isKeyable(value) {
|
2556 |
+
var type = typeof value;
|
2557 |
+
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
2558 |
+
? (value !== '__proto__')
|
2559 |
+
: (value === null);
|
2560 |
+
}
|
2561 |
+
|
2562 |
+
/**
|
2563 |
+
* Checks if `func` has its source masked.
|
2564 |
+
*
|
2565 |
+
* @private
|
2566 |
+
* @param {Function} func The function to check.
|
2567 |
+
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
2568 |
+
*/
|
2569 |
+
function isMasked(func) {
|
2570 |
+
return !!maskSrcKey && (maskSrcKey in func);
|
2571 |
+
}
|
2572 |
+
|
2573 |
+
/**
|
2574 |
+
* Converts `func` to its source code.
|
2575 |
+
*
|
2576 |
+
* @private
|
2577 |
+
* @param {Function} func The function to process.
|
2578 |
+
* @returns {string} Returns the source code.
|
2579 |
+
*/
|
2580 |
+
function toSource(func) {
|
2581 |
+
if (func != null) {
|
2582 |
+
try {
|
2583 |
+
return funcToString.call(func);
|
2584 |
+
} catch (e) {}
|
2585 |
+
try {
|
2586 |
+
return (func + '');
|
2587 |
+
} catch (e) {}
|
2588 |
+
}
|
2589 |
+
return '';
|
2590 |
+
}
|
2591 |
+
|
2592 |
+
/**
|
2593 |
+
* Creates a function that memoizes the result of `func`. If `resolver` is
|
2594 |
+
* provided, it determines the cache key for storing the result based on the
|
2595 |
+
* arguments provided to the memoized function. By default, the first argument
|
2596 |
+
* provided to the memoized function is used as the map cache key. The `func`
|
2597 |
+
* is invoked with the `this` binding of the memoized function.
|
2598 |
+
*
|
2599 |
+
* **Note:** The cache is exposed as the `cache` property on the memoized
|
2600 |
+
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
2601 |
+
* constructor with one whose instances implement the
|
2602 |
+
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
2603 |
+
* method interface of `delete`, `get`, `has`, and `set`.
|
2604 |
+
*
|
2605 |
+
* @static
|
2606 |
+
* @memberOf _
|
2607 |
+
* @since 0.1.0
|
2608 |
+
* @category Function
|
2609 |
+
* @param {Function} func The function to have its output memoized.
|
2610 |
+
* @param {Function} [resolver] The function to resolve the cache key.
|
2611 |
+
* @returns {Function} Returns the new memoized function.
|
2612 |
+
* @example
|
2613 |
+
*
|
2614 |
+
* var object = { 'a': 1, 'b': 2 };
|
2615 |
+
* var other = { 'c': 3, 'd': 4 };
|
2616 |
+
*
|
2617 |
+
* var values = _.memoize(_.values);
|
2618 |
+
* values(object);
|
2619 |
+
* // => [1, 2]
|
2620 |
+
*
|
2621 |
+
* values(other);
|
2622 |
+
* // => [3, 4]
|
2623 |
+
*
|
2624 |
+
* object.a = 2;
|
2625 |
+
* values(object);
|
2626 |
+
* // => [1, 2]
|
2627 |
+
*
|
2628 |
+
* // Modify the result cache.
|
2629 |
+
* values.cache.set(object, ['a', 'b']);
|
2630 |
+
* values(object);
|
2631 |
+
* // => ['a', 'b']
|
2632 |
+
*
|
2633 |
+
* // Replace `_.memoize.Cache`.
|
2634 |
+
* _.memoize.Cache = WeakMap;
|
2635 |
+
*/
|
2636 |
+
function memoize(func, resolver) {
|
2637 |
+
if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
|
2638 |
+
throw new TypeError(FUNC_ERROR_TEXT$2);
|
2639 |
+
}
|
2640 |
+
var memoized = function() {
|
2641 |
+
var args = arguments,
|
2642 |
+
key = resolver ? resolver.apply(this, args) : args[0],
|
2643 |
+
cache = memoized.cache;
|
2644 |
+
|
2645 |
+
if (cache.has(key)) {
|
2646 |
+
return cache.get(key);
|
2647 |
+
}
|
2648 |
+
var result = func.apply(this, args);
|
2649 |
+
memoized.cache = cache.set(key, result);
|
2650 |
+
return result;
|
2651 |
+
};
|
2652 |
+
memoized.cache = new (memoize.Cache || MapCache);
|
2653 |
+
return memoized;
|
2654 |
+
}
|
2655 |
+
|
2656 |
+
// Assign cache to `_.memoize`.
|
2657 |
+
memoize.Cache = MapCache;
|
2658 |
+
|
2659 |
+
/**
|
2660 |
+
* Performs a
|
2661 |
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
2662 |
+
* comparison between two values to determine if they are equivalent.
|
2663 |
+
*
|
2664 |
+
* @static
|
2665 |
+
* @memberOf _
|
2666 |
+
* @since 4.0.0
|
2667 |
+
* @category Lang
|
2668 |
+
* @param {*} value The value to compare.
|
2669 |
+
* @param {*} other The other value to compare.
|
2670 |
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
2671 |
+
* @example
|
2672 |
+
*
|
2673 |
+
* var object = { 'a': 1 };
|
2674 |
+
* var other = { 'a': 1 };
|
2675 |
+
*
|
2676 |
+
* _.eq(object, object);
|
2677 |
+
* // => true
|
2678 |
+
*
|
2679 |
+
* _.eq(object, other);
|
2680 |
+
* // => false
|
2681 |
+
*
|
2682 |
+
* _.eq('a', 'a');
|
2683 |
+
* // => true
|
2684 |
+
*
|
2685 |
+
* _.eq('a', Object('a'));
|
2686 |
+
* // => false
|
2687 |
+
*
|
2688 |
+
* _.eq(NaN, NaN);
|
2689 |
+
* // => true
|
2690 |
+
*/
|
2691 |
+
function eq(value, other) {
|
2692 |
+
return value === other || (value !== value && other !== other);
|
2693 |
+
}
|
2694 |
+
|
2695 |
+
/**
|
2696 |
+
* Checks if `value` is classified as a `Function` object.
|
2697 |
+
*
|
2698 |
+
* @static
|
2699 |
+
* @memberOf _
|
2700 |
+
* @since 0.1.0
|
2701 |
+
* @category Lang
|
2702 |
+
* @param {*} value The value to check.
|
2703 |
+
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
2704 |
+
* @example
|
2705 |
+
*
|
2706 |
+
* _.isFunction(_);
|
2707 |
+
* // => true
|
2708 |
+
*
|
2709 |
+
* _.isFunction(/abc/);
|
2710 |
+
* // => false
|
2711 |
+
*/
|
2712 |
+
function isFunction(value) {
|
2713 |
+
// The use of `Object#toString` avoids issues with the `typeof` operator
|
2714 |
+
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
2715 |
+
var tag = isObject$3(value) ? objectToString$2.call(value) : '';
|
2716 |
+
return tag == funcTag || tag == genTag;
|
2717 |
+
}
|
2718 |
+
|
2719 |
+
/**
|
2720 |
+
* Checks if `value` is the
|
2721 |
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
2722 |
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
2723 |
+
*
|
2724 |
+
* @static
|
2725 |
+
* @memberOf _
|
2726 |
+
* @since 0.1.0
|
2727 |
+
* @category Lang
|
2728 |
+
* @param {*} value The value to check.
|
2729 |
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
2730 |
+
* @example
|
2731 |
+
*
|
2732 |
+
* _.isObject({});
|
2733 |
+
* // => true
|
2734 |
+
*
|
2735 |
+
* _.isObject([1, 2, 3]);
|
2736 |
+
* // => true
|
2737 |
+
*
|
2738 |
+
* _.isObject(_.noop);
|
2739 |
+
* // => true
|
2740 |
+
*
|
2741 |
+
* _.isObject(null);
|
2742 |
+
* // => false
|
2743 |
+
*/
|
2744 |
+
function isObject$3(value) {
|
2745 |
+
var type = typeof value;
|
2746 |
+
return !!value && (type == 'object' || type == 'function');
|
2747 |
+
}
|
2748 |
+
|
2749 |
+
var lodash_memoize = memoize;
|
2750 |
+
|
2751 |
+
/**
|
2752 |
+
* A collection of shims that provide minimal functionality of the ES6 collections.
|
2753 |
+
*
|
2754 |
+
* These implementations are not meant to be used outside of the ResizeObserver
|
2755 |
+
* modules as they cover only a limited range of use cases.
|
2756 |
+
*/
|
2757 |
+
/* eslint-disable require-jsdoc, valid-jsdoc */
|
2758 |
+
var MapShim = (function () {
|
2759 |
+
if (typeof Map !== 'undefined') {
|
2760 |
+
return Map;
|
2761 |
+
}
|
2762 |
+
/**
|
2763 |
+
* Returns index in provided array that matches the specified key.
|
2764 |
+
*
|
2765 |
+
* @param {Array<Array>} arr
|
2766 |
+
* @param {*} key
|
2767 |
+
* @returns {number}
|
2768 |
+
*/
|
2769 |
+
function getIndex(arr, key) {
|
2770 |
+
var result = -1;
|
2771 |
+
arr.some(function (entry, index) {
|
2772 |
+
if (entry[0] === key) {
|
2773 |
+
result = index;
|
2774 |
+
return true;
|
2775 |
+
}
|
2776 |
+
return false;
|
2777 |
+
});
|
2778 |
+
return result;
|
2779 |
+
}
|
2780 |
+
return /** @class */ (function () {
|
2781 |
+
function class_1() {
|
2782 |
+
this.__entries__ = [];
|
2783 |
+
}
|
2784 |
+
Object.defineProperty(class_1.prototype, "size", {
|
2785 |
+
/**
|
2786 |
+
* @returns {boolean}
|
2787 |
+
*/
|
2788 |
+
get: function () {
|
2789 |
+
return this.__entries__.length;
|
2790 |
+
},
|
2791 |
+
enumerable: true,
|
2792 |
+
configurable: true
|
2793 |
+
});
|
2794 |
+
/**
|
2795 |
+
* @param {*} key
|
2796 |
+
* @returns {*}
|
2797 |
+
*/
|
2798 |
+
class_1.prototype.get = function (key) {
|
2799 |
+
var index = getIndex(this.__entries__, key);
|
2800 |
+
var entry = this.__entries__[index];
|
2801 |
+
return entry && entry[1];
|
2802 |
+
};
|
2803 |
+
/**
|
2804 |
+
* @param {*} key
|
2805 |
+
* @param {*} value
|
2806 |
+
* @returns {void}
|
2807 |
+
*/
|
2808 |
+
class_1.prototype.set = function (key, value) {
|
2809 |
+
var index = getIndex(this.__entries__, key);
|
2810 |
+
if (~index) {
|
2811 |
+
this.__entries__[index][1] = value;
|
2812 |
+
}
|
2813 |
+
else {
|
2814 |
+
this.__entries__.push([key, value]);
|
2815 |
+
}
|
2816 |
+
};
|
2817 |
+
/**
|
2818 |
+
* @param {*} key
|
2819 |
+
* @returns {void}
|
2820 |
+
*/
|
2821 |
+
class_1.prototype.delete = function (key) {
|
2822 |
+
var entries = this.__entries__;
|
2823 |
+
var index = getIndex(entries, key);
|
2824 |
+
if (~index) {
|
2825 |
+
entries.splice(index, 1);
|
2826 |
+
}
|
2827 |
+
};
|
2828 |
+
/**
|
2829 |
+
* @param {*} key
|
2830 |
+
* @returns {void}
|
2831 |
+
*/
|
2832 |
+
class_1.prototype.has = function (key) {
|
2833 |
+
return !!~getIndex(this.__entries__, key);
|
2834 |
+
};
|
2835 |
+
/**
|
2836 |
+
* @returns {void}
|
2837 |
+
*/
|
2838 |
+
class_1.prototype.clear = function () {
|
2839 |
+
this.__entries__.splice(0);
|
2840 |
+
};
|
2841 |
+
/**
|
2842 |
+
* @param {Function} callback
|
2843 |
+
* @param {*} [ctx=null]
|
2844 |
+
* @returns {void}
|
2845 |
+
*/
|
2846 |
+
class_1.prototype.forEach = function (callback, ctx) {
|
2847 |
+
if (ctx === void 0) { ctx = null; }
|
2848 |
+
for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
|
2849 |
+
var entry = _a[_i];
|
2850 |
+
callback.call(ctx, entry[1], entry[0]);
|
2851 |
+
}
|
2852 |
+
};
|
2853 |
+
return class_1;
|
2854 |
+
}());
|
2855 |
+
})();
|
2856 |
+
|
2857 |
+
/**
|
2858 |
+
* Detects whether window and document objects are available in current environment.
|
2859 |
+
*/
|
2860 |
+
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
|
2861 |
+
|
2862 |
+
// Returns global object of a current environment.
|
2863 |
+
var global$1$1 = (function () {
|
2864 |
+
if (typeof global !== 'undefined' && global.Math === Math) {
|
2865 |
+
return global;
|
2866 |
+
}
|
2867 |
+
if (typeof self !== 'undefined' && self.Math === Math) {
|
2868 |
+
return self;
|
2869 |
+
}
|
2870 |
+
if (typeof window !== 'undefined' && window.Math === Math) {
|
2871 |
+
return window;
|
2872 |
+
}
|
2873 |
+
// eslint-disable-next-line no-new-func
|
2874 |
+
return Function('return this')();
|
2875 |
+
})();
|
2876 |
+
|
2877 |
+
/**
|
2878 |
+
* A shim for the requestAnimationFrame which falls back to the setTimeout if
|
2879 |
+
* first one is not supported.
|
2880 |
+
*
|
2881 |
+
* @returns {number} Requests' identifier.
|
2882 |
+
*/
|
2883 |
+
var requestAnimationFrame$1 = (function () {
|
2884 |
+
if (typeof requestAnimationFrame === 'function') {
|
2885 |
+
// It's required to use a bounded function because IE sometimes throws
|
2886 |
+
// an "Invalid calling object" error if rAF is invoked without the global
|
2887 |
+
// object on the left hand side.
|
2888 |
+
return requestAnimationFrame.bind(global$1$1);
|
2889 |
+
}
|
2890 |
+
return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
|
2891 |
+
})();
|
2892 |
+
|
2893 |
+
// Defines minimum timeout before adding a trailing call.
|
2894 |
+
var trailingTimeout = 2;
|
2895 |
+
/**
|
2896 |
+
* Creates a wrapper function which ensures that provided callback will be
|
2897 |
+
* invoked only once during the specified delay period.
|
2898 |
+
*
|
2899 |
+
* @param {Function} callback - Function to be invoked after the delay period.
|
2900 |
+
* @param {number} delay - Delay after which to invoke callback.
|
2901 |
+
* @returns {Function}
|
2902 |
+
*/
|
2903 |
+
function throttle$1 (callback, delay) {
|
2904 |
+
var leadingCall = false, trailingCall = false, lastCallTime = 0;
|
2905 |
+
/**
|
2906 |
+
* Invokes the original callback function and schedules new invocation if
|
2907 |
+
* the "proxy" was called during current request.
|
2908 |
+
*
|
2909 |
+
* @returns {void}
|
2910 |
+
*/
|
2911 |
+
function resolvePending() {
|
2912 |
+
if (leadingCall) {
|
2913 |
+
leadingCall = false;
|
2914 |
+
callback();
|
2915 |
+
}
|
2916 |
+
if (trailingCall) {
|
2917 |
+
proxy();
|
2918 |
+
}
|
2919 |
+
}
|
2920 |
+
/**
|
2921 |
+
* Callback invoked after the specified delay. It will further postpone
|
2922 |
+
* invocation of the original function delegating it to the
|
2923 |
+
* requestAnimationFrame.
|
2924 |
+
*
|
2925 |
+
* @returns {void}
|
2926 |
+
*/
|
2927 |
+
function timeoutCallback() {
|
2928 |
+
requestAnimationFrame$1(resolvePending);
|
2929 |
+
}
|
2930 |
+
/**
|
2931 |
+
* Schedules invocation of the original function.
|
2932 |
+
*
|
2933 |
+
* @returns {void}
|
2934 |
+
*/
|
2935 |
+
function proxy() {
|
2936 |
+
var timeStamp = Date.now();
|
2937 |
+
if (leadingCall) {
|
2938 |
+
// Reject immediately following calls.
|
2939 |
+
if (timeStamp - lastCallTime < trailingTimeout) {
|
2940 |
+
return;
|
2941 |
+
}
|
2942 |
+
// Schedule new call to be in invoked when the pending one is resolved.
|
2943 |
+
// This is important for "transitions" which never actually start
|
2944 |
+
// immediately so there is a chance that we might miss one if change
|
2945 |
+
// happens amids the pending invocation.
|
2946 |
+
trailingCall = true;
|
2947 |
+
}
|
2948 |
+
else {
|
2949 |
+
leadingCall = true;
|
2950 |
+
trailingCall = false;
|
2951 |
+
setTimeout(timeoutCallback, delay);
|
2952 |
+
}
|
2953 |
+
lastCallTime = timeStamp;
|
2954 |
+
}
|
2955 |
+
return proxy;
|
2956 |
+
}
|
2957 |
+
|
2958 |
+
// Minimum delay before invoking the update of observers.
|
2959 |
+
var REFRESH_DELAY = 20;
|
2960 |
+
// A list of substrings of CSS properties used to find transition events that
|
2961 |
+
// might affect dimensions of observed elements.
|
2962 |
+
var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
|
2963 |
+
// Check if MutationObserver is available.
|
2964 |
+
var mutationObserverSupported = typeof MutationObserver !== 'undefined';
|
2965 |
+
/**
|
2966 |
+
* Singleton controller class which handles updates of ResizeObserver instances.
|
2967 |
+
*/
|
2968 |
+
var ResizeObserverController = /** @class */ (function () {
|
2969 |
+
/**
|
2970 |
+
* Creates a new instance of ResizeObserverController.
|
2971 |
+
*
|
2972 |
+
* @private
|
2973 |
+
*/
|
2974 |
+
function ResizeObserverController() {
|
2975 |
+
/**
|
2976 |
+
* Indicates whether DOM listeners have been added.
|
2977 |
+
*
|
2978 |
+
* @private {boolean}
|
2979 |
+
*/
|
2980 |
+
this.connected_ = false;
|
2981 |
+
/**
|
2982 |
+
* Tells that controller has subscribed for Mutation Events.
|
2983 |
+
*
|
2984 |
+
* @private {boolean}
|
2985 |
+
*/
|
2986 |
+
this.mutationEventsAdded_ = false;
|
2987 |
+
/**
|
2988 |
+
* Keeps reference to the instance of MutationObserver.
|
2989 |
+
*
|
2990 |
+
* @private {MutationObserver}
|
2991 |
+
*/
|
2992 |
+
this.mutationsObserver_ = null;
|
2993 |
+
/**
|
2994 |
+
* A list of connected observers.
|
2995 |
+
*
|
2996 |
+
* @private {Array<ResizeObserverSPI>}
|
2997 |
+
*/
|
2998 |
+
this.observers_ = [];
|
2999 |
+
this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
|
3000 |
+
this.refresh = throttle$1(this.refresh.bind(this), REFRESH_DELAY);
|
3001 |
+
}
|
3002 |
+
/**
|
3003 |
+
* Adds observer to observers list.
|
3004 |
+
*
|
3005 |
+
* @param {ResizeObserverSPI} observer - Observer to be added.
|
3006 |
+
* @returns {void}
|
3007 |
+
*/
|
3008 |
+
ResizeObserverController.prototype.addObserver = function (observer) {
|
3009 |
+
if (!~this.observers_.indexOf(observer)) {
|
3010 |
+
this.observers_.push(observer);
|
3011 |
+
}
|
3012 |
+
// Add listeners if they haven't been added yet.
|
3013 |
+
if (!this.connected_) {
|
3014 |
+
this.connect_();
|
3015 |
+
}
|
3016 |
+
};
|
3017 |
+
/**
|
3018 |
+
* Removes observer from observers list.
|
3019 |
+
*
|
3020 |
+
* @param {ResizeObserverSPI} observer - Observer to be removed.
|
3021 |
+
* @returns {void}
|
3022 |
+
*/
|
3023 |
+
ResizeObserverController.prototype.removeObserver = function (observer) {
|
3024 |
+
var observers = this.observers_;
|
3025 |
+
var index = observers.indexOf(observer);
|
3026 |
+
// Remove observer if it's present in registry.
|
3027 |
+
if (~index) {
|
3028 |
+
observers.splice(index, 1);
|
3029 |
+
}
|
3030 |
+
// Remove listeners if controller has no connected observers.
|
3031 |
+
if (!observers.length && this.connected_) {
|
3032 |
+
this.disconnect_();
|
3033 |
+
}
|
3034 |
+
};
|
3035 |
+
/**
|
3036 |
+
* Invokes the update of observers. It will continue running updates insofar
|
3037 |
+
* it detects changes.
|
3038 |
+
*
|
3039 |
+
* @returns {void}
|
3040 |
+
*/
|
3041 |
+
ResizeObserverController.prototype.refresh = function () {
|
3042 |
+
var changesDetected = this.updateObservers_();
|
3043 |
+
// Continue running updates if changes have been detected as there might
|
3044 |
+
// be future ones caused by CSS transitions.
|
3045 |
+
if (changesDetected) {
|
3046 |
+
this.refresh();
|
3047 |
+
}
|
3048 |
+
};
|
3049 |
+
/**
|
3050 |
+
* Updates every observer from observers list and notifies them of queued
|
3051 |
+
* entries.
|
3052 |
+
*
|
3053 |
+
* @private
|
3054 |
+
* @returns {boolean} Returns "true" if any observer has detected changes in
|
3055 |
+
* dimensions of it's elements.
|
3056 |
+
*/
|
3057 |
+
ResizeObserverController.prototype.updateObservers_ = function () {
|
3058 |
+
// Collect observers that have active observations.
|
3059 |
+
var activeObservers = this.observers_.filter(function (observer) {
|
3060 |
+
return observer.gatherActive(), observer.hasActive();
|
3061 |
+
});
|
3062 |
+
// Deliver notifications in a separate cycle in order to avoid any
|
3063 |
+
// collisions between observers, e.g. when multiple instances of
|
3064 |
+
// ResizeObserver are tracking the same element and the callback of one
|
3065 |
+
// of them changes content dimensions of the observed target. Sometimes
|
3066 |
+
// this may result in notifications being blocked for the rest of observers.
|
3067 |
+
activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
|
3068 |
+
return activeObservers.length > 0;
|
3069 |
+
};
|
3070 |
+
/**
|
3071 |
+
* Initializes DOM listeners.
|
3072 |
+
*
|
3073 |
+
* @private
|
3074 |
+
* @returns {void}
|
3075 |
+
*/
|
3076 |
+
ResizeObserverController.prototype.connect_ = function () {
|
3077 |
+
// Do nothing if running in a non-browser environment or if listeners
|
3078 |
+
// have been already added.
|
3079 |
+
if (!isBrowser || this.connected_) {
|
3080 |
+
return;
|
3081 |
+
}
|
3082 |
+
// Subscription to the "Transitionend" event is used as a workaround for
|
3083 |
+
// delayed transitions. This way it's possible to capture at least the
|
3084 |
+
// final state of an element.
|
3085 |
+
document.addEventListener('transitionend', this.onTransitionEnd_);
|
3086 |
+
window.addEventListener('resize', this.refresh);
|
3087 |
+
if (mutationObserverSupported) {
|
3088 |
+
this.mutationsObserver_ = new MutationObserver(this.refresh);
|
3089 |
+
this.mutationsObserver_.observe(document, {
|
3090 |
+
attributes: true,
|
3091 |
+
childList: true,
|
3092 |
+
characterData: true,
|
3093 |
+
subtree: true
|
3094 |
+
});
|
3095 |
+
}
|
3096 |
+
else {
|
3097 |
+
document.addEventListener('DOMSubtreeModified', this.refresh);
|
3098 |
+
this.mutationEventsAdded_ = true;
|
3099 |
+
}
|
3100 |
+
this.connected_ = true;
|
3101 |
+
};
|
3102 |
+
/**
|
3103 |
+
* Removes DOM listeners.
|
3104 |
+
*
|
3105 |
+
* @private
|
3106 |
+
* @returns {void}
|
3107 |
+
*/
|
3108 |
+
ResizeObserverController.prototype.disconnect_ = function () {
|
3109 |
+
// Do nothing if running in a non-browser environment or if listeners
|
3110 |
+
// have been already removed.
|
3111 |
+
if (!isBrowser || !this.connected_) {
|
3112 |
+
return;
|
3113 |
+
}
|
3114 |
+
document.removeEventListener('transitionend', this.onTransitionEnd_);
|
3115 |
+
window.removeEventListener('resize', this.refresh);
|
3116 |
+
if (this.mutationsObserver_) {
|
3117 |
+
this.mutationsObserver_.disconnect();
|
3118 |
+
}
|
3119 |
+
if (this.mutationEventsAdded_) {
|
3120 |
+
document.removeEventListener('DOMSubtreeModified', this.refresh);
|
3121 |
+
}
|
3122 |
+
this.mutationsObserver_ = null;
|
3123 |
+
this.mutationEventsAdded_ = false;
|
3124 |
+
this.connected_ = false;
|
3125 |
+
};
|
3126 |
+
/**
|
3127 |
+
* "Transitionend" event handler.
|
3128 |
+
*
|
3129 |
+
* @private
|
3130 |
+
* @param {TransitionEvent} event
|
3131 |
+
* @returns {void}
|
3132 |
+
*/
|
3133 |
+
ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
|
3134 |
+
var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
|
3135 |
+
// Detect whether transition may affect dimensions of an element.
|
3136 |
+
var isReflowProperty = transitionKeys.some(function (key) {
|
3137 |
+
return !!~propertyName.indexOf(key);
|
3138 |
+
});
|
3139 |
+
if (isReflowProperty) {
|
3140 |
+
this.refresh();
|
3141 |
+
}
|
3142 |
+
};
|
3143 |
+
/**
|
3144 |
+
* Returns instance of the ResizeObserverController.
|
3145 |
+
*
|
3146 |
+
* @returns {ResizeObserverController}
|
3147 |
+
*/
|
3148 |
+
ResizeObserverController.getInstance = function () {
|
3149 |
+
if (!this.instance_) {
|
3150 |
+
this.instance_ = new ResizeObserverController();
|
3151 |
+
}
|
3152 |
+
return this.instance_;
|
3153 |
+
};
|
3154 |
+
/**
|
3155 |
+
* Holds reference to the controller's instance.
|
3156 |
+
*
|
3157 |
+
* @private {ResizeObserverController}
|
3158 |
+
*/
|
3159 |
+
ResizeObserverController.instance_ = null;
|
3160 |
+
return ResizeObserverController;
|
3161 |
+
}());
|
3162 |
+
|
3163 |
+
/**
|
3164 |
+
* Defines non-writable/enumerable properties of the provided target object.
|
3165 |
+
*
|
3166 |
+
* @param {Object} target - Object for which to define properties.
|
3167 |
+
* @param {Object} props - Properties to be defined.
|
3168 |
+
* @returns {Object} Target object.
|
3169 |
+
*/
|
3170 |
+
var defineConfigurable = (function (target, props) {
|
3171 |
+
for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
|
3172 |
+
var key = _a[_i];
|
3173 |
+
Object.defineProperty(target, key, {
|
3174 |
+
value: props[key],
|
3175 |
+
enumerable: false,
|
3176 |
+
writable: false,
|
3177 |
+
configurable: true
|
3178 |
+
});
|
3179 |
+
}
|
3180 |
+
return target;
|
3181 |
+
});
|
3182 |
+
|
3183 |
+
/**
|
3184 |
+
* Returns the global object associated with provided element.
|
3185 |
+
*
|
3186 |
+
* @param {Object} target
|
3187 |
+
* @returns {Object}
|
3188 |
+
*/
|
3189 |
+
var getWindowOf = (function (target) {
|
3190 |
+
// Assume that the element is an instance of Node, which means that it
|
3191 |
+
// has the "ownerDocument" property from which we can retrieve a
|
3192 |
+
// corresponding global object.
|
3193 |
+
var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
|
3194 |
+
// Return the local global object if it's not possible extract one from
|
3195 |
+
// provided element.
|
3196 |
+
return ownerGlobal || global$1$1;
|
3197 |
+
});
|
3198 |
+
|
3199 |
+
// Placeholder of an empty content rectangle.
|
3200 |
+
var emptyRect = createRectInit(0, 0, 0, 0);
|
3201 |
+
/**
|
3202 |
+
* Converts provided string to a number.
|
3203 |
+
*
|
3204 |
+
* @param {number|string} value
|
3205 |
+
* @returns {number}
|
3206 |
+
*/
|
3207 |
+
function toFloat(value) {
|
3208 |
+
return parseFloat(value) || 0;
|
3209 |
+
}
|
3210 |
+
/**
|
3211 |
+
* Extracts borders size from provided styles.
|
3212 |
+
*
|
3213 |
+
* @param {CSSStyleDeclaration} styles
|
3214 |
+
* @param {...string} positions - Borders positions (top, right, ...)
|
3215 |
+
* @returns {number}
|
3216 |
+
*/
|
3217 |
+
function getBordersSize(styles) {
|
3218 |
+
var positions = [];
|
3219 |
+
for (var _i = 1; _i < arguments.length; _i++) {
|
3220 |
+
positions[_i - 1] = arguments[_i];
|
3221 |
+
}
|
3222 |
+
return positions.reduce(function (size, position) {
|
3223 |
+
var value = styles['border-' + position + '-width'];
|
3224 |
+
return size + toFloat(value);
|
3225 |
+
}, 0);
|
3226 |
+
}
|
3227 |
+
/**
|
3228 |
+
* Extracts paddings sizes from provided styles.
|
3229 |
+
*
|
3230 |
+
* @param {CSSStyleDeclaration} styles
|
3231 |
+
* @returns {Object} Paddings box.
|
3232 |
+
*/
|
3233 |
+
function getPaddings(styles) {
|
3234 |
+
var positions = ['top', 'right', 'bottom', 'left'];
|
3235 |
+
var paddings = {};
|
3236 |
+
for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
|
3237 |
+
var position = positions_1[_i];
|
3238 |
+
var value = styles['padding-' + position];
|
3239 |
+
paddings[position] = toFloat(value);
|
3240 |
+
}
|
3241 |
+
return paddings;
|
3242 |
+
}
|
3243 |
+
/**
|
3244 |
+
* Calculates content rectangle of provided SVG element.
|
3245 |
+
*
|
3246 |
+
* @param {SVGGraphicsElement} target - Element content rectangle of which needs
|
3247 |
+
* to be calculated.
|
3248 |
+
* @returns {DOMRectInit}
|
3249 |
+
*/
|
3250 |
+
function getSVGContentRect(target) {
|
3251 |
+
var bbox = target.getBBox();
|
3252 |
+
return createRectInit(0, 0, bbox.width, bbox.height);
|
3253 |
+
}
|
3254 |
+
/**
|
3255 |
+
* Calculates content rectangle of provided HTMLElement.
|
3256 |
+
*
|
3257 |
+
* @param {HTMLElement} target - Element for which to calculate the content rectangle.
|
3258 |
+
* @returns {DOMRectInit}
|
3259 |
+
*/
|
3260 |
+
function getHTMLElementContentRect(target) {
|
3261 |
+
// Client width & height properties can't be
|
3262 |
+
// used exclusively as they provide rounded values.
|
3263 |
+
var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
|
3264 |
+
// By this condition we can catch all non-replaced inline, hidden and
|
3265 |
+
// detached elements. Though elements with width & height properties less
|
3266 |
+
// than 0.5 will be discarded as well.
|
3267 |
+
//
|
3268 |
+
// Without it we would need to implement separate methods for each of
|
3269 |
+
// those cases and it's not possible to perform a precise and performance
|
3270 |
+
// effective test for hidden elements. E.g. even jQuery's ':visible' filter
|
3271 |
+
// gives wrong results for elements with width & height less than 0.5.
|
3272 |
+
if (!clientWidth && !clientHeight) {
|
3273 |
+
return emptyRect;
|
3274 |
+
}
|
3275 |
+
var styles = getWindowOf(target).getComputedStyle(target);
|
3276 |
+
var paddings = getPaddings(styles);
|
3277 |
+
var horizPad = paddings.left + paddings.right;
|
3278 |
+
var vertPad = paddings.top + paddings.bottom;
|
3279 |
+
// Computed styles of width & height are being used because they are the
|
3280 |
+
// only dimensions available to JS that contain non-rounded values. It could
|
3281 |
+
// be possible to utilize the getBoundingClientRect if only it's data wasn't
|
3282 |
+
// affected by CSS transformations let alone paddings, borders and scroll bars.
|
3283 |
+
var width = toFloat(styles.width), height = toFloat(styles.height);
|
3284 |
+
// Width & height include paddings and borders when the 'border-box' box
|
3285 |
+
// model is applied (except for IE).
|
3286 |
+
if (styles.boxSizing === 'border-box') {
|
3287 |
+
// Following conditions are required to handle Internet Explorer which
|
3288 |
+
// doesn't include paddings and borders to computed CSS dimensions.
|
3289 |
+
//
|
3290 |
+
// We can say that if CSS dimensions + paddings are equal to the "client"
|
3291 |
+
// properties then it's either IE, and thus we don't need to subtract
|
3292 |
+
// anything, or an element merely doesn't have paddings/borders styles.
|
3293 |
+
if (Math.round(width + horizPad) !== clientWidth) {
|
3294 |
+
width -= getBordersSize(styles, 'left', 'right') + horizPad;
|
3295 |
+
}
|
3296 |
+
if (Math.round(height + vertPad) !== clientHeight) {
|
3297 |
+
height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
|
3298 |
+
}
|
3299 |
+
}
|
3300 |
+
// Following steps can't be applied to the document's root element as its
|
3301 |
+
// client[Width/Height] properties represent viewport area of the window.
|
3302 |
+
// Besides, it's as well not necessary as the <html> itself neither has
|
3303 |
+
// rendered scroll bars nor it can be clipped.
|
3304 |
+
if (!isDocumentElement(target)) {
|
3305 |
+
// In some browsers (only in Firefox, actually) CSS width & height
|
3306 |
+
// include scroll bars size which can be removed at this step as scroll
|
3307 |
+
// bars are the only difference between rounded dimensions + paddings
|
3308 |
+
// and "client" properties, though that is not always true in Chrome.
|
3309 |
+
var vertScrollbar = Math.round(width + horizPad) - clientWidth;
|
3310 |
+
var horizScrollbar = Math.round(height + vertPad) - clientHeight;
|
3311 |
+
// Chrome has a rather weird rounding of "client" properties.
|
3312 |
+
// E.g. for an element with content width of 314.2px it sometimes gives
|
3313 |
+
// the client width of 315px and for the width of 314.7px it may give
|
3314 |
+
// 314px. And it doesn't happen all the time. So just ignore this delta
|
3315 |
+
// as a non-relevant.
|
3316 |
+
if (Math.abs(vertScrollbar) !== 1) {
|
3317 |
+
width -= vertScrollbar;
|
3318 |
+
}
|
3319 |
+
if (Math.abs(horizScrollbar) !== 1) {
|
3320 |
+
height -= horizScrollbar;
|
3321 |
+
}
|
3322 |
+
}
|
3323 |
+
return createRectInit(paddings.left, paddings.top, width, height);
|
3324 |
+
}
|
3325 |
+
/**
|
3326 |
+
* Checks whether provided element is an instance of the SVGGraphicsElement.
|
3327 |
+
*
|
3328 |
+
* @param {Element} target - Element to be checked.
|
3329 |
+
* @returns {boolean}
|
3330 |
+
*/
|
3331 |
+
var isSVGGraphicsElement = (function () {
|
3332 |
+
// Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
|
3333 |
+
// interface.
|
3334 |
+
if (typeof SVGGraphicsElement !== 'undefined') {
|
3335 |
+
return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
|
3336 |
+
}
|
3337 |
+
// If it's so, then check that element is at least an instance of the
|
3338 |
+
// SVGElement and that it has the "getBBox" method.
|
3339 |
+
// eslint-disable-next-line no-extra-parens
|
3340 |
+
return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
|
3341 |
+
typeof target.getBBox === 'function'); };
|
3342 |
+
})();
|
3343 |
+
/**
|
3344 |
+
* Checks whether provided element is a document element (<html>).
|
3345 |
+
*
|
3346 |
+
* @param {Element} target - Element to be checked.
|
3347 |
+
* @returns {boolean}
|
3348 |
+
*/
|
3349 |
+
function isDocumentElement(target) {
|
3350 |
+
return target === getWindowOf(target).document.documentElement;
|
3351 |
+
}
|
3352 |
+
/**
|
3353 |
+
* Calculates an appropriate content rectangle for provided html or svg element.
|
3354 |
+
*
|
3355 |
+
* @param {Element} target - Element content rectangle of which needs to be calculated.
|
3356 |
+
* @returns {DOMRectInit}
|
3357 |
+
*/
|
3358 |
+
function getContentRect(target) {
|
3359 |
+
if (!isBrowser) {
|
3360 |
+
return emptyRect;
|
3361 |
+
}
|
3362 |
+
if (isSVGGraphicsElement(target)) {
|
3363 |
+
return getSVGContentRect(target);
|
3364 |
+
}
|
3365 |
+
return getHTMLElementContentRect(target);
|
3366 |
+
}
|
3367 |
+
/**
|
3368 |
+
* Creates rectangle with an interface of the DOMRectReadOnly.
|
3369 |
+
* Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
|
3370 |
+
*
|
3371 |
+
* @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
|
3372 |
+
* @returns {DOMRectReadOnly}
|
3373 |
+
*/
|
3374 |
+
function createReadOnlyRect(_a) {
|
3375 |
+
var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
|
3376 |
+
// If DOMRectReadOnly is available use it as a prototype for the rectangle.
|
3377 |
+
var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
|
3378 |
+
var rect = Object.create(Constr.prototype);
|
3379 |
+
// Rectangle's properties are not writable and non-enumerable.
|
3380 |
+
defineConfigurable(rect, {
|
3381 |
+
x: x, y: y, width: width, height: height,
|
3382 |
+
top: y,
|
3383 |
+
right: x + width,
|
3384 |
+
bottom: height + y,
|
3385 |
+
left: x
|
3386 |
+
});
|
3387 |
+
return rect;
|
3388 |
+
}
|
3389 |
+
/**
|
3390 |
+
* Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
|
3391 |
+
* Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
|
3392 |
+
*
|
3393 |
+
* @param {number} x - X coordinate.
|
3394 |
+
* @param {number} y - Y coordinate.
|
3395 |
+
* @param {number} width - Rectangle's width.
|
3396 |
+
* @param {number} height - Rectangle's height.
|
3397 |
+
* @returns {DOMRectInit}
|
3398 |
+
*/
|
3399 |
+
function createRectInit(x, y, width, height) {
|
3400 |
+
return { x: x, y: y, width: width, height: height };
|
3401 |
+
}
|
3402 |
+
|
3403 |
+
/**
|
3404 |
+
* Class that is responsible for computations of the content rectangle of
|
3405 |
+
* provided DOM element and for keeping track of it's changes.
|
3406 |
+
*/
|
3407 |
+
var ResizeObservation = /** @class */ (function () {
|
3408 |
+
/**
|
3409 |
+
* Creates an instance of ResizeObservation.
|
3410 |
+
*
|
3411 |
+
* @param {Element} target - Element to be observed.
|
3412 |
+
*/
|
3413 |
+
function ResizeObservation(target) {
|
3414 |
+
/**
|
3415 |
+
* Broadcasted width of content rectangle.
|
3416 |
+
*
|
3417 |
+
* @type {number}
|
3418 |
+
*/
|
3419 |
+
this.broadcastWidth = 0;
|
3420 |
+
/**
|
3421 |
+
* Broadcasted height of content rectangle.
|
3422 |
+
*
|
3423 |
+
* @type {number}
|
3424 |
+
*/
|
3425 |
+
this.broadcastHeight = 0;
|
3426 |
+
/**
|
3427 |
+
* Reference to the last observed content rectangle.
|
3428 |
+
*
|
3429 |
+
* @private {DOMRectInit}
|
3430 |
+
*/
|
3431 |
+
this.contentRect_ = createRectInit(0, 0, 0, 0);
|
3432 |
+
this.target = target;
|
3433 |
+
}
|
3434 |
+
/**
|
3435 |
+
* Updates content rectangle and tells whether it's width or height properties
|
3436 |
+
* have changed since the last broadcast.
|
3437 |
+
*
|
3438 |
+
* @returns {boolean}
|
3439 |
+
*/
|
3440 |
+
ResizeObservation.prototype.isActive = function () {
|
3441 |
+
var rect = getContentRect(this.target);
|
3442 |
+
this.contentRect_ = rect;
|
3443 |
+
return (rect.width !== this.broadcastWidth ||
|
3444 |
+
rect.height !== this.broadcastHeight);
|
3445 |
+
};
|
3446 |
+
/**
|
3447 |
+
* Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
|
3448 |
+
* from the corresponding properties of the last observed content rectangle.
|
3449 |
+
*
|
3450 |
+
* @returns {DOMRectInit} Last observed content rectangle.
|
3451 |
+
*/
|
3452 |
+
ResizeObservation.prototype.broadcastRect = function () {
|
3453 |
+
var rect = this.contentRect_;
|
3454 |
+
this.broadcastWidth = rect.width;
|
3455 |
+
this.broadcastHeight = rect.height;
|
3456 |
+
return rect;
|
3457 |
+
};
|
3458 |
+
return ResizeObservation;
|
3459 |
+
}());
|
3460 |
+
|
3461 |
+
var ResizeObserverEntry = /** @class */ (function () {
|
3462 |
+
/**
|
3463 |
+
* Creates an instance of ResizeObserverEntry.
|
3464 |
+
*
|
3465 |
+
* @param {Element} target - Element that is being observed.
|
3466 |
+
* @param {DOMRectInit} rectInit - Data of the element's content rectangle.
|
3467 |
+
*/
|
3468 |
+
function ResizeObserverEntry(target, rectInit) {
|
3469 |
+
var contentRect = createReadOnlyRect(rectInit);
|
3470 |
+
// According to the specification following properties are not writable
|
3471 |
+
// and are also not enumerable in the native implementation.
|
3472 |
+
//
|
3473 |
+
// Property accessors are not being used as they'd require to define a
|
3474 |
+
// private WeakMap storage which may cause memory leaks in browsers that
|
3475 |
+
// don't support this type of collections.
|
3476 |
+
defineConfigurable(this, { target: target, contentRect: contentRect });
|
3477 |
+
}
|
3478 |
+
return ResizeObserverEntry;
|
3479 |
+
}());
|
3480 |
+
|
3481 |
+
var ResizeObserverSPI = /** @class */ (function () {
|
3482 |
+
/**
|
3483 |
+
* Creates a new instance of ResizeObserver.
|
3484 |
+
*
|
3485 |
+
* @param {ResizeObserverCallback} callback - Callback function that is invoked
|
3486 |
+
* when one of the observed elements changes it's content dimensions.
|
3487 |
+
* @param {ResizeObserverController} controller - Controller instance which
|
3488 |
+
* is responsible for the updates of observer.
|
3489 |
+
* @param {ResizeObserver} callbackCtx - Reference to the public
|
3490 |
+
* ResizeObserver instance which will be passed to callback function.
|
3491 |
+
*/
|
3492 |
+
function ResizeObserverSPI(callback, controller, callbackCtx) {
|
3493 |
+
/**
|
3494 |
+
* Collection of resize observations that have detected changes in dimensions
|
3495 |
+
* of elements.
|
3496 |
+
*
|
3497 |
+
* @private {Array<ResizeObservation>}
|
3498 |
+
*/
|
3499 |
+
this.activeObservations_ = [];
|
3500 |
+
/**
|
3501 |
+
* Registry of the ResizeObservation instances.
|
3502 |
+
*
|
3503 |
+
* @private {Map<Element, ResizeObservation>}
|
3504 |
+
*/
|
3505 |
+
this.observations_ = new MapShim();
|
3506 |
+
if (typeof callback !== 'function') {
|
3507 |
+
throw new TypeError('The callback provided as parameter 1 is not a function.');
|
3508 |
+
}
|
3509 |
+
this.callback_ = callback;
|
3510 |
+
this.controller_ = controller;
|
3511 |
+
this.callbackCtx_ = callbackCtx;
|
3512 |
+
}
|
3513 |
+
/**
|
3514 |
+
* Starts observing provided element.
|
3515 |
+
*
|
3516 |
+
* @param {Element} target - Element to be observed.
|
3517 |
+
* @returns {void}
|
3518 |
+
*/
|
3519 |
+
ResizeObserverSPI.prototype.observe = function (target) {
|
3520 |
+
if (!arguments.length) {
|
3521 |
+
throw new TypeError('1 argument required, but only 0 present.');
|
3522 |
+
}
|
3523 |
+
// Do nothing if current environment doesn't have the Element interface.
|
3524 |
+
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
3525 |
+
return;
|
3526 |
+
}
|
3527 |
+
if (!(target instanceof getWindowOf(target).Element)) {
|
3528 |
+
throw new TypeError('parameter 1 is not of type "Element".');
|
3529 |
+
}
|
3530 |
+
var observations = this.observations_;
|
3531 |
+
// Do nothing if element is already being observed.
|
3532 |
+
if (observations.has(target)) {
|
3533 |
+
return;
|
3534 |
+
}
|
3535 |
+
observations.set(target, new ResizeObservation(target));
|
3536 |
+
this.controller_.addObserver(this);
|
3537 |
+
// Force the update of observations.
|
3538 |
+
this.controller_.refresh();
|
3539 |
+
};
|
3540 |
+
/**
|
3541 |
+
* Stops observing provided element.
|
3542 |
+
*
|
3543 |
+
* @param {Element} target - Element to stop observing.
|
3544 |
+
* @returns {void}
|
3545 |
+
*/
|
3546 |
+
ResizeObserverSPI.prototype.unobserve = function (target) {
|
3547 |
+
if (!arguments.length) {
|
3548 |
+
throw new TypeError('1 argument required, but only 0 present.');
|
3549 |
+
}
|
3550 |
+
// Do nothing if current environment doesn't have the Element interface.
|
3551 |
+
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
3552 |
+
return;
|
3553 |
+
}
|
3554 |
+
if (!(target instanceof getWindowOf(target).Element)) {
|
3555 |
+
throw new TypeError('parameter 1 is not of type "Element".');
|
3556 |
+
}
|
3557 |
+
var observations = this.observations_;
|
3558 |
+
// Do nothing if element is not being observed.
|
3559 |
+
if (!observations.has(target)) {
|
3560 |
+
return;
|
3561 |
+
}
|
3562 |
+
observations.delete(target);
|
3563 |
+
if (!observations.size) {
|
3564 |
+
this.controller_.removeObserver(this);
|
3565 |
+
}
|
3566 |
+
};
|
3567 |
+
/**
|
3568 |
+
* Stops observing all elements.
|
3569 |
+
*
|
3570 |
+
* @returns {void}
|
3571 |
+
*/
|
3572 |
+
ResizeObserverSPI.prototype.disconnect = function () {
|
3573 |
+
this.clearActive();
|
3574 |
+
this.observations_.clear();
|
3575 |
+
this.controller_.removeObserver(this);
|
3576 |
+
};
|
3577 |
+
/**
|
3578 |
+
* Collects observation instances the associated element of which has changed
|
3579 |
+
* it's content rectangle.
|
3580 |
+
*
|
3581 |
+
* @returns {void}
|
3582 |
+
*/
|
3583 |
+
ResizeObserverSPI.prototype.gatherActive = function () {
|
3584 |
+
var _this = this;
|
3585 |
+
this.clearActive();
|
3586 |
+
this.observations_.forEach(function (observation) {
|
3587 |
+
if (observation.isActive()) {
|
3588 |
+
_this.activeObservations_.push(observation);
|
3589 |
+
}
|
3590 |
+
});
|
3591 |
+
};
|
3592 |
+
/**
|
3593 |
+
* Invokes initial callback function with a list of ResizeObserverEntry
|
3594 |
+
* instances collected from active resize observations.
|
3595 |
+
*
|
3596 |
+
* @returns {void}
|
3597 |
+
*/
|
3598 |
+
ResizeObserverSPI.prototype.broadcastActive = function () {
|
3599 |
+
// Do nothing if observer doesn't have active observations.
|
3600 |
+
if (!this.hasActive()) {
|
3601 |
+
return;
|
3602 |
+
}
|
3603 |
+
var ctx = this.callbackCtx_;
|
3604 |
+
// Create ResizeObserverEntry instance for every active observation.
|
3605 |
+
var entries = this.activeObservations_.map(function (observation) {
|
3606 |
+
return new ResizeObserverEntry(observation.target, observation.broadcastRect());
|
3607 |
+
});
|
3608 |
+
this.callback_.call(ctx, entries, ctx);
|
3609 |
+
this.clearActive();
|
3610 |
+
};
|
3611 |
+
/**
|
3612 |
+
* Clears the collection of active observations.
|
3613 |
+
*
|
3614 |
+
* @returns {void}
|
3615 |
+
*/
|
3616 |
+
ResizeObserverSPI.prototype.clearActive = function () {
|
3617 |
+
this.activeObservations_.splice(0);
|
3618 |
+
};
|
3619 |
+
/**
|
3620 |
+
* Tells whether observer has active observations.
|
3621 |
+
*
|
3622 |
+
* @returns {boolean}
|
3623 |
+
*/
|
3624 |
+
ResizeObserverSPI.prototype.hasActive = function () {
|
3625 |
+
return this.activeObservations_.length > 0;
|
3626 |
+
};
|
3627 |
+
return ResizeObserverSPI;
|
3628 |
+
}());
|
3629 |
+
|
3630 |
+
// Registry of internal observers. If WeakMap is not available use current shim
|
3631 |
+
// for the Map collection as it has all required methods and because WeakMap
|
3632 |
+
// can't be fully polyfilled anyway.
|
3633 |
+
var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
|
3634 |
+
/**
|
3635 |
+
* ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
|
3636 |
+
* exposing only those methods and properties that are defined in the spec.
|
3637 |
+
*/
|
3638 |
+
var ResizeObserver = /** @class */ (function () {
|
3639 |
+
/**
|
3640 |
+
* Creates a new instance of ResizeObserver.
|
3641 |
+
*
|
3642 |
+
* @param {ResizeObserverCallback} callback - Callback that is invoked when
|
3643 |
+
* dimensions of the observed elements change.
|
3644 |
+
*/
|
3645 |
+
function ResizeObserver(callback) {
|
3646 |
+
if (!(this instanceof ResizeObserver)) {
|
3647 |
+
throw new TypeError('Cannot call a class as a function.');
|
3648 |
+
}
|
3649 |
+
if (!arguments.length) {
|
3650 |
+
throw new TypeError('1 argument required, but only 0 present.');
|
3651 |
+
}
|
3652 |
+
var controller = ResizeObserverController.getInstance();
|
3653 |
+
var observer = new ResizeObserverSPI(callback, controller, this);
|
3654 |
+
observers.set(this, observer);
|
3655 |
+
}
|
3656 |
+
return ResizeObserver;
|
3657 |
+
}());
|
3658 |
+
// Expose public methods of ResizeObserver.
|
3659 |
+
[
|
3660 |
+
'observe',
|
3661 |
+
'unobserve',
|
3662 |
+
'disconnect'
|
3663 |
+
].forEach(function (method) {
|
3664 |
+
ResizeObserver.prototype[method] = function () {
|
3665 |
+
var _a;
|
3666 |
+
return (_a = observers.get(this))[method].apply(_a, arguments);
|
3667 |
+
};
|
3668 |
+
});
|
3669 |
+
|
3670 |
+
var index = (function () {
|
3671 |
+
// Export existing implementation if available.
|
3672 |
+
if (typeof global$1$1.ResizeObserver !== 'undefined') {
|
3673 |
+
return global$1$1.ResizeObserver;
|
3674 |
+
}
|
3675 |
+
return ResizeObserver;
|
3676 |
+
})();
|
3677 |
+
|
3678 |
+
var canUseDOM = !!(
|
3679 |
+
typeof window !== 'undefined' &&
|
3680 |
+
window.document &&
|
3681 |
+
window.document.createElement
|
3682 |
+
);
|
3683 |
+
|
3684 |
+
var canUseDom = canUseDOM;
|
3685 |
+
|
3686 |
+
var SimpleBar =
|
3687 |
+
/*#__PURE__*/
|
3688 |
+
function () {
|
3689 |
+
function SimpleBar(element, options) {
|
3690 |
+
var _this = this;
|
3691 |
+
|
3692 |
+
this.onScroll = function () {
|
3693 |
+
if (!_this.scrollXTicking) {
|
3694 |
+
window.requestAnimationFrame(_this.scrollX);
|
3695 |
+
_this.scrollXTicking = true;
|
3696 |
+
}
|
3697 |
+
|
3698 |
+
if (!_this.scrollYTicking) {
|
3699 |
+
window.requestAnimationFrame(_this.scrollY);
|
3700 |
+
_this.scrollYTicking = true;
|
3701 |
+
}
|
3702 |
+
};
|
3703 |
+
|
3704 |
+
this.scrollX = function () {
|
3705 |
+
if (_this.axis.x.isOverflowing) {
|
3706 |
+
_this.showScrollbar('x');
|
3707 |
+
|
3708 |
+
_this.positionScrollbar('x');
|
3709 |
+
}
|
3710 |
+
|
3711 |
+
_this.scrollXTicking = false;
|
3712 |
+
};
|
3713 |
+
|
3714 |
+
this.scrollY = function () {
|
3715 |
+
if (_this.axis.y.isOverflowing) {
|
3716 |
+
_this.showScrollbar('y');
|
3717 |
+
|
3718 |
+
_this.positionScrollbar('y');
|
3719 |
+
}
|
3720 |
+
|
3721 |
+
_this.scrollYTicking = false;
|
3722 |
+
};
|
3723 |
+
|
3724 |
+
this.onMouseEnter = function () {
|
3725 |
+
_this.showScrollbar('x');
|
3726 |
+
|
3727 |
+
_this.showScrollbar('y');
|
3728 |
+
};
|
3729 |
+
|
3730 |
+
this.onMouseMove = function (e) {
|
3731 |
+
_this.mouseX = e.clientX;
|
3732 |
+
_this.mouseY = e.clientY;
|
3733 |
+
|
3734 |
+
if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
|
3735 |
+
_this.onMouseMoveForAxis('x');
|
3736 |
+
}
|
3737 |
+
|
3738 |
+
if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
|
3739 |
+
_this.onMouseMoveForAxis('y');
|
3740 |
+
}
|
3741 |
+
};
|
3742 |
+
|
3743 |
+
this.onMouseLeave = function () {
|
3744 |
+
_this.onMouseMove.cancel();
|
3745 |
+
|
3746 |
+
if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
|
3747 |
+
_this.onMouseLeaveForAxis('x');
|
3748 |
+
}
|
3749 |
+
|
3750 |
+
if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
|
3751 |
+
_this.onMouseLeaveForAxis('y');
|
3752 |
+
}
|
3753 |
+
|
3754 |
+
_this.mouseX = -1;
|
3755 |
+
_this.mouseY = -1;
|
3756 |
+
};
|
3757 |
+
|
3758 |
+
this.onWindowResize = function () {
|
3759 |
+
// Recalculate scrollbarWidth in case it's a zoom
|
3760 |
+
_this.scrollbarWidth = scrollbarWidth();
|
3761 |
+
|
3762 |
+
_this.hideNativeScrollbar();
|
3763 |
+
};
|
3764 |
+
|
3765 |
+
this.hideScrollbars = function () {
|
3766 |
+
_this.axis.x.track.rect = _this.axis.x.track.el.getBoundingClientRect();
|
3767 |
+
_this.axis.y.track.rect = _this.axis.y.track.el.getBoundingClientRect();
|
3768 |
+
|
3769 |
+
if (!_this.isWithinBounds(_this.axis.y.track.rect)) {
|
3770 |
+
_this.axis.y.scrollbar.el.classList.remove(_this.classNames.visible);
|
3771 |
+
|
3772 |
+
_this.axis.y.isVisible = false;
|
3773 |
+
}
|
3774 |
+
|
3775 |
+
if (!_this.isWithinBounds(_this.axis.x.track.rect)) {
|
3776 |
+
_this.axis.x.scrollbar.el.classList.remove(_this.classNames.visible);
|
3777 |
+
|
3778 |
+
_this.axis.x.isVisible = false;
|
3779 |
+
}
|
3780 |
+
};
|
3781 |
+
|
3782 |
+
this.onPointerEvent = function (e) {
|
3783 |
+
var isWithinBoundsY, isWithinBoundsX;
|
3784 |
+
_this.axis.x.scrollbar.rect = _this.axis.x.scrollbar.el.getBoundingClientRect();
|
3785 |
+
_this.axis.y.scrollbar.rect = _this.axis.y.scrollbar.el.getBoundingClientRect();
|
3786 |
+
|
3787 |
+
if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
|
3788 |
+
isWithinBoundsX = _this.isWithinBounds(_this.axis.x.scrollbar.rect);
|
3789 |
+
}
|
3790 |
+
|
3791 |
+
if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
|
3792 |
+
isWithinBoundsY = _this.isWithinBounds(_this.axis.y.scrollbar.rect);
|
3793 |
+
} // If any pointer event is called on the scrollbar
|
3794 |
+
|
3795 |
+
|
3796 |
+
if (isWithinBoundsY || isWithinBoundsX) {
|
3797 |
+
// Preventing the event's default action stops text being
|
3798 |
+
// selectable during the drag.
|
3799 |
+
e.preventDefault(); // Prevent event leaking
|
3800 |
+
|
3801 |
+
e.stopPropagation();
|
3802 |
+
|
3803 |
+
if (e.type === 'mousedown') {
|
3804 |
+
if (isWithinBoundsY) {
|
3805 |
+
_this.onDragStart(e, 'y');
|
3806 |
+
}
|
3807 |
+
|
3808 |
+
if (isWithinBoundsX) {
|
3809 |
+
_this.onDragStart(e, 'x');
|
3810 |
+
}
|
3811 |
+
}
|
3812 |
+
}
|
3813 |
+
};
|
3814 |
+
|
3815 |
+
this.drag = function (e) {
|
3816 |
+
var eventOffset;
|
3817 |
+
var track = _this.axis[_this.draggedAxis].track;
|
3818 |
+
var trackSize = track.rect[_this.axis[_this.draggedAxis].sizeAttr];
|
3819 |
+
var scrollbar = _this.axis[_this.draggedAxis].scrollbar;
|
3820 |
+
e.preventDefault();
|
3821 |
+
e.stopPropagation();
|
3822 |
+
|
3823 |
+
if (_this.draggedAxis === 'y') {
|
3824 |
+
eventOffset = e.pageY;
|
3825 |
+
} else {
|
3826 |
+
eventOffset = e.pageX;
|
3827 |
+
} // Calculate how far the user's mouse is from the top/left of the scrollbar (minus the dragOffset).
|
3828 |
+
|
3829 |
+
|
3830 |
+
var dragPos = eventOffset - track.rect[_this.axis[_this.draggedAxis].offsetAttr] - _this.axis[_this.draggedAxis].dragOffset; // Convert the mouse position into a percentage of the scrollbar height/width.
|
3831 |
+
|
3832 |
+
var dragPerc = dragPos / track.rect[_this.axis[_this.draggedAxis].sizeAttr]; // Scroll the content by the same percentage.
|
3833 |
+
|
3834 |
+
var scrollPos = dragPerc * _this.contentWrapperEl[_this.axis[_this.draggedAxis].scrollSizeAttr]; // Fix browsers inconsistency on RTL
|
3835 |
+
|
3836 |
+
if (_this.draggedAxis === 'x') {
|
3837 |
+
scrollPos = _this.isRtl && SimpleBar.getRtlHelpers().isRtlScrollbarInverted ? scrollPos - (trackSize + scrollbar.size) : scrollPos;
|
3838 |
+
scrollPos = _this.isRtl && SimpleBar.getRtlHelpers().isRtlScrollingInverted ? -scrollPos : scrollPos;
|
3839 |
+
}
|
3840 |
+
|
3841 |
+
_this.contentWrapperEl[_this.axis[_this.draggedAxis].scrollOffsetAttr] = scrollPos;
|
3842 |
+
};
|
3843 |
+
|
3844 |
+
this.onEndDrag = function (e) {
|
3845 |
+
e.preventDefault();
|
3846 |
+
e.stopPropagation();
|
3847 |
+
|
3848 |
+
_this.el.classList.remove(_this.classNames.dragging);
|
3849 |
+
|
3850 |
+
document.removeEventListener('mousemove', _this.drag);
|
3851 |
+
document.removeEventListener('mouseup', _this.onEndDrag);
|
3852 |
+
};
|
3853 |
+
|
3854 |
+
this.el = element;
|
3855 |
+
this.flashTimeout;
|
3856 |
+
this.contentEl;
|
3857 |
+
this.contentWrapperEl;
|
3858 |
+
this.offsetEl;
|
3859 |
+
this.maskEl;
|
3860 |
+
this.globalObserver;
|
3861 |
+
this.mutationObserver;
|
3862 |
+
this.resizeObserver;
|
3863 |
+
this.scrollbarWidth;
|
3864 |
+
this.minScrollbarWidth = 20;
|
3865 |
+
this.options = Object.assign({}, SimpleBar.defaultOptions, options);
|
3866 |
+
this.classNames = Object.assign({}, SimpleBar.defaultOptions.classNames, this.options.classNames);
|
3867 |
+
this.isRtl;
|
3868 |
+
this.axis = {
|
3869 |
+
x: {
|
3870 |
+
scrollOffsetAttr: 'scrollLeft',
|
3871 |
+
sizeAttr: 'width',
|
3872 |
+
scrollSizeAttr: 'scrollWidth',
|
3873 |
+
offsetAttr: 'left',
|
3874 |
+
overflowAttr: 'overflowX',
|
3875 |
+
dragOffset: 0,
|
3876 |
+
isOverflowing: true,
|
3877 |
+
isVisible: false,
|
3878 |
+
forceVisible: false,
|
3879 |
+
track: {},
|
3880 |
+
scrollbar: {}
|
3881 |
+
},
|
3882 |
+
y: {
|
3883 |
+
scrollOffsetAttr: 'scrollTop',
|
3884 |
+
sizeAttr: 'height',
|
3885 |
+
scrollSizeAttr: 'scrollHeight',
|
3886 |
+
offsetAttr: 'top',
|
3887 |
+
overflowAttr: 'overflowY',
|
3888 |
+
dragOffset: 0,
|
3889 |
+
isOverflowing: true,
|
3890 |
+
isVisible: false,
|
3891 |
+
forceVisible: false,
|
3892 |
+
track: {},
|
3893 |
+
scrollbar: {}
|
3894 |
+
}
|
3895 |
+
}; // Don't re-instantiate over an existing one
|
3896 |
+
|
3897 |
+
if (this.el.SimpleBar) {
|
3898 |
+
return;
|
3899 |
+
}
|
3900 |
+
|
3901 |
+
this.recalculate = lodash_throttle(this.recalculate.bind(this), 64);
|
3902 |
+
this.onMouseMove = lodash_throttle(this.onMouseMove.bind(this), 64);
|
3903 |
+
this.hideScrollbars = lodash_debounce(this.hideScrollbars.bind(this), this.options.timeout);
|
3904 |
+
this.onWindowResize = lodash_debounce(this.onWindowResize.bind(this), 64, {
|
3905 |
+
leading: true
|
3906 |
+
});
|
3907 |
+
SimpleBar.getRtlHelpers = lodash_memoize(SimpleBar.getRtlHelpers);
|
3908 |
+
this.init();
|
3909 |
+
}
|
3910 |
+
/**
|
3911 |
+
* Static properties
|
3912 |
+
*/
|
3913 |
+
|
3914 |
+
/**
|
3915 |
+
* Helper to fix browsers inconsistency on RTL:
|
3916 |
+
* - Firefox inverts the scrollbar initial position
|
3917 |
+
* - IE11 inverts both scrollbar position and scrolling offset
|
3918 |
+
* Directly inspired by @KingSora's OverlayScrollbars https://github.com/KingSora/OverlayScrollbars/blob/master/js/OverlayScrollbars.js#L1634
|
3919 |
+
*/
|
3920 |
+
|
3921 |
+
|
3922 |
+
SimpleBar.getRtlHelpers = function getRtlHelpers() {
|
3923 |
+
var dummyDiv = document.createElement('div');
|
3924 |
+
dummyDiv.innerHTML = '<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';
|
3925 |
+
var scrollbarDummyEl = dummyDiv.firstElementChild;
|
3926 |
+
document.body.appendChild(scrollbarDummyEl);
|
3927 |
+
var dummyContainerChild = scrollbarDummyEl.firstElementChild;
|
3928 |
+
scrollbarDummyEl.scrollLeft = 0;
|
3929 |
+
var dummyContainerOffset = SimpleBar.getOffset(scrollbarDummyEl);
|
3930 |
+
var dummyContainerChildOffset = SimpleBar.getOffset(dummyContainerChild);
|
3931 |
+
scrollbarDummyEl.scrollLeft = 999;
|
3932 |
+
var dummyContainerScrollOffsetAfterScroll = SimpleBar.getOffset(dummyContainerChild);
|
3933 |
+
return {
|
3934 |
+
// determines if the scrolling is responding with negative values
|
3935 |
+
isRtlScrollingInverted: dummyContainerOffset.left !== dummyContainerChildOffset.left && dummyContainerChildOffset.left - dummyContainerScrollOffsetAfterScroll.left !== 0,
|
3936 |
+
// determines if the origin scrollbar position is inverted or not (positioned on left or right)
|
3937 |
+
isRtlScrollbarInverted: dummyContainerOffset.left !== dummyContainerChildOffset.left
|
3938 |
+
};
|
3939 |
+
};
|
3940 |
+
|
3941 |
+
SimpleBar.initHtmlApi = function initHtmlApi() {
|
3942 |
+
this.initDOMLoadedElements = this.initDOMLoadedElements.bind(this); // MutationObserver is IE11+
|
3943 |
+
|
3944 |
+
if (typeof MutationObserver !== 'undefined') {
|
3945 |
+
// Mutation observer to observe dynamically added elements
|
3946 |
+
this.globalObserver = new MutationObserver(function (mutations) {
|
3947 |
+
mutations.forEach(function (mutation) {
|
3948 |
+
Array.prototype.forEach.call(mutation.addedNodes, function (addedNode) {
|
3949 |
+
if (addedNode.nodeType === 1) {
|
3950 |
+
if (addedNode.hasAttribute('data-simplebar')) {
|
3951 |
+
!addedNode.SimpleBar && new SimpleBar(addedNode, SimpleBar.getElOptions(addedNode));
|
3952 |
+
} else {
|
3953 |
+
Array.prototype.forEach.call(addedNode.querySelectorAll('[data-simplebar]'), function (el) {
|
3954 |
+
!el.SimpleBar && new SimpleBar(el, SimpleBar.getElOptions(el));
|
3955 |
+
});
|
3956 |
+
}
|
3957 |
+
}
|
3958 |
+
});
|
3959 |
+
Array.prototype.forEach.call(mutation.removedNodes, function (removedNode) {
|
3960 |
+
if (removedNode.nodeType === 1) {
|
3961 |
+
if (removedNode.hasAttribute('data-simplebar')) {
|
3962 |
+
removedNode.SimpleBar && removedNode.SimpleBar.unMount();
|
3963 |
+
} else {
|
3964 |
+
Array.prototype.forEach.call(removedNode.querySelectorAll('[data-simplebar]'), function (el) {
|
3965 |
+
el.SimpleBar && el.SimpleBar.unMount();
|
3966 |
+
});
|
3967 |
+
}
|
3968 |
+
}
|
3969 |
+
});
|
3970 |
+
});
|
3971 |
+
});
|
3972 |
+
this.globalObserver.observe(document, {
|
3973 |
+
childList: true,
|
3974 |
+
subtree: true
|
3975 |
+
});
|
3976 |
+
} // Taken from jQuery `ready` function
|
3977 |
+
// Instantiate elements already present on the page
|
3978 |
+
|
3979 |
+
|
3980 |
+
if (document.readyState === 'complete' || document.readyState !== 'loading' && !document.documentElement.doScroll) {
|
3981 |
+
// Handle it asynchronously to allow scripts the opportunity to delay init
|
3982 |
+
window.setTimeout(this.initDOMLoadedElements);
|
3983 |
+
} else {
|
3984 |
+
document.addEventListener('DOMContentLoaded', this.initDOMLoadedElements);
|
3985 |
+
window.addEventListener('load', this.initDOMLoadedElements);
|
3986 |
+
}
|
3987 |
+
} // Helper function to retrieve options from element attributes
|
3988 |
+
;
|
3989 |
+
|
3990 |
+
SimpleBar.getElOptions = function getElOptions(el) {
|
3991 |
+
var options = Array.prototype.reduce.call(el.attributes, function (acc, attribute) {
|
3992 |
+
var option = attribute.name.match(/data-simplebar-(.+)/);
|
3993 |
+
|
3994 |
+
if (option) {
|
3995 |
+
var key = option[1].replace(/\W+(.)/g, function (x, chr) {
|
3996 |
+
return chr.toUpperCase();
|
3997 |
+
});
|
3998 |
+
|
3999 |
+
switch (attribute.value) {
|
4000 |
+
case 'true':
|
4001 |
+
acc[key] = true;
|
4002 |
+
break;
|
4003 |
+
|
4004 |
+
case 'false':
|
4005 |
+
acc[key] = false;
|
4006 |
+
break;
|
4007 |
+
|
4008 |
+
case undefined:
|
4009 |
+
acc[key] = true;
|
4010 |
+
break;
|
4011 |
+
|
4012 |
+
default:
|
4013 |
+
acc[key] = attribute.value;
|
4014 |
+
}
|
4015 |
+
}
|
4016 |
+
|
4017 |
+
return acc;
|
4018 |
+
}, {});
|
4019 |
+
return options;
|
4020 |
+
};
|
4021 |
+
|
4022 |
+
SimpleBar.removeObserver = function removeObserver() {
|
4023 |
+
this.globalObserver.disconnect();
|
4024 |
+
};
|
4025 |
+
|
4026 |
+
SimpleBar.initDOMLoadedElements = function initDOMLoadedElements() {
|
4027 |
+
document.removeEventListener('DOMContentLoaded', this.initDOMLoadedElements);
|
4028 |
+
window.removeEventListener('load', this.initDOMLoadedElements);
|
4029 |
+
Array.prototype.forEach.call(document.querySelectorAll('[data-simplebar]'), function (el) {
|
4030 |
+
if (!el.SimpleBar) new SimpleBar(el, SimpleBar.getElOptions(el));
|
4031 |
+
});
|
4032 |
+
};
|
4033 |
+
|
4034 |
+
SimpleBar.getOffset = function getOffset(el) {
|
4035 |
+
var rect = el.getBoundingClientRect();
|
4036 |
+
return {
|
4037 |
+
top: rect.top + (window.pageYOffset || document.documentElement.scrollTop),
|
4038 |
+
left: rect.left + (window.pageXOffset || document.documentElement.scrollLeft)
|
4039 |
+
};
|
4040 |
+
};
|
4041 |
+
|
4042 |
+
var _proto = SimpleBar.prototype;
|
4043 |
+
|
4044 |
+
_proto.init = function init() {
|
4045 |
+
// Save a reference to the instance, so we know this DOM node has already been instancied
|
4046 |
+
this.el.SimpleBar = this; // We stop here on server-side
|
4047 |
+
|
4048 |
+
if (canUseDom) {
|
4049 |
+
this.initDOM();
|
4050 |
+
this.scrollbarWidth = scrollbarWidth();
|
4051 |
+
this.recalculate();
|
4052 |
+
this.initListeners();
|
4053 |
+
}
|
4054 |
+
};
|
4055 |
+
|
4056 |
+
_proto.initDOM = function initDOM() {
|
4057 |
+
var _this2 = this;
|
4058 |
+
|
4059 |
+
// make sure this element doesn't have the elements yet
|
4060 |
+
if (Array.prototype.filter.call(this.el.children, function (child) {
|
4061 |
+
return child.classList.contains(_this2.classNames.wrapper);
|
4062 |
+
}).length) {
|
4063 |
+
// assume that element has his DOM already initiated
|
4064 |
+
this.wrapperEl = this.el.querySelector("." + this.classNames.wrapper);
|
4065 |
+
this.contentWrapperEl = this.el.querySelector("." + this.classNames.contentWrapper);
|
4066 |
+
this.offsetEl = this.el.querySelector("." + this.classNames.offset);
|
4067 |
+
this.maskEl = this.el.querySelector("." + this.classNames.mask);
|
4068 |
+
this.contentEl = this.el.querySelector("." + this.classNames.contentEl);
|
4069 |
+
this.placeholderEl = this.el.querySelector("." + this.classNames.placeholder);
|
4070 |
+
this.heightAutoObserverWrapperEl = this.el.querySelector("." + this.classNames.heightAutoObserverWrapperEl);
|
4071 |
+
this.heightAutoObserverEl = this.el.querySelector("." + this.classNames.heightAutoObserverEl);
|
4072 |
+
this.axis.x.track.el = this.el.querySelector("." + this.classNames.track + "." + this.classNames.horizontal);
|
4073 |
+
this.axis.y.track.el = this.el.querySelector("." + this.classNames.track + "." + this.classNames.vertical);
|
4074 |
+
} else {
|
4075 |
+
// Prepare DOM
|
4076 |
+
this.wrapperEl = document.createElement('div');
|
4077 |
+
this.contentWrapperEl = document.createElement('div');
|
4078 |
+
this.offsetEl = document.createElement('div');
|
4079 |
+
this.maskEl = document.createElement('div');
|
4080 |
+
this.contentEl = document.createElement('div');
|
4081 |
+
this.placeholderEl = document.createElement('div');
|
4082 |
+
this.heightAutoObserverWrapperEl = document.createElement('div');
|
4083 |
+
this.heightAutoObserverEl = document.createElement('div');
|
4084 |
+
this.wrapperEl.classList.add(this.classNames.wrapper);
|
4085 |
+
this.contentWrapperEl.classList.add(this.classNames.contentWrapper);
|
4086 |
+
this.offsetEl.classList.add(this.classNames.offset);
|
4087 |
+
this.maskEl.classList.add(this.classNames.mask);
|
4088 |
+
this.contentEl.classList.add(this.classNames.contentEl);
|
4089 |
+
this.placeholderEl.classList.add(this.classNames.placeholder);
|
4090 |
+
this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl);
|
4091 |
+
this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);
|
4092 |
+
|
4093 |
+
while (this.el.firstChild) {
|
4094 |
+
this.contentEl.appendChild(this.el.firstChild);
|
4095 |
+
}
|
4096 |
+
|
4097 |
+
this.contentWrapperEl.appendChild(this.contentEl);
|
4098 |
+
this.offsetEl.appendChild(this.contentWrapperEl);
|
4099 |
+
this.maskEl.appendChild(this.offsetEl);
|
4100 |
+
this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl);
|
4101 |
+
this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl);
|
4102 |
+
this.wrapperEl.appendChild(this.maskEl);
|
4103 |
+
this.wrapperEl.appendChild(this.placeholderEl);
|
4104 |
+
this.el.appendChild(this.wrapperEl);
|
4105 |
+
}
|
4106 |
+
|
4107 |
+
if (!this.axis.x.track.el || !this.axis.y.track.el) {
|
4108 |
+
var track = document.createElement('div');
|
4109 |
+
var scrollbar = document.createElement('div');
|
4110 |
+
track.classList.add(this.classNames.track);
|
4111 |
+
scrollbar.classList.add(this.classNames.scrollbar);
|
4112 |
+
track.appendChild(scrollbar);
|
4113 |
+
this.axis.x.track.el = track.cloneNode(true);
|
4114 |
+
this.axis.x.track.el.classList.add(this.classNames.horizontal);
|
4115 |
+
this.axis.y.track.el = track.cloneNode(true);
|
4116 |
+
this.axis.y.track.el.classList.add(this.classNames.vertical);
|
4117 |
+
this.el.appendChild(this.axis.x.track.el);
|
4118 |
+
this.el.appendChild(this.axis.y.track.el);
|
4119 |
+
}
|
4120 |
+
|
4121 |
+
this.axis.x.scrollbar.el = this.axis.x.track.el.querySelector("." + this.classNames.scrollbar);
|
4122 |
+
this.axis.y.scrollbar.el = this.axis.y.track.el.querySelector("." + this.classNames.scrollbar);
|
4123 |
+
|
4124 |
+
if (!this.options.autoHide) {
|
4125 |
+
this.axis.x.scrollbar.el.classList.add(this.classNames.visible);
|
4126 |
+
this.axis.y.scrollbar.el.classList.add(this.classNames.visible);
|
4127 |
+
}
|
4128 |
+
|
4129 |
+
this.el.setAttribute('data-simplebar', 'init');
|
4130 |
+
};
|
4131 |
+
|
4132 |
+
_proto.initListeners = function initListeners() {
|
4133 |
+
var _this3 = this;
|
4134 |
+
|
4135 |
+
// Event listeners
|
4136 |
+
if (this.options.autoHide) {
|
4137 |
+
this.el.addEventListener('mouseenter', this.onMouseEnter);
|
4138 |
+
}
|
4139 |
+
|
4140 |
+
['mousedown', 'click', 'dblclick', 'touchstart', 'touchend', 'touchmove'].forEach(function (e) {
|
4141 |
+
_this3.el.addEventListener(e, _this3.onPointerEvent, true);
|
4142 |
+
});
|
4143 |
+
this.el.addEventListener('mousemove', this.onMouseMove);
|
4144 |
+
this.el.addEventListener('mouseleave', this.onMouseLeave);
|
4145 |
+
this.contentWrapperEl.addEventListener('scroll', this.onScroll); // Browser zoom triggers a window resize
|
4146 |
+
|
4147 |
+
window.addEventListener('resize', this.onWindowResize);
|
4148 |
+
this.resizeObserver = new index(this.recalculate);
|
4149 |
+
this.resizeObserver.observe(this.el);
|
4150 |
+
this.resizeObserver.observe(this.contentEl);
|
4151 |
+
};
|
4152 |
+
|
4153 |
+
_proto.recalculate = function recalculate() {
|
4154 |
+
var isHeightAuto = this.heightAutoObserverEl.offsetHeight <= 1;
|
4155 |
+
var isWidthAuto = this.heightAutoObserverEl.offsetWidth <= 1;
|
4156 |
+
this.elStyles = window.getComputedStyle(this.el);
|
4157 |
+
this.isRtl = this.elStyles.direction === 'rtl';
|
4158 |
+
this.contentEl.style.padding = this.elStyles.paddingTop + " " + this.elStyles.paddingRight + " " + this.elStyles.paddingBottom + " " + this.elStyles.paddingLeft;
|
4159 |
+
this.wrapperEl.style.margin = "-" + this.elStyles.paddingTop + " -" + this.elStyles.paddingRight + " -" + this.elStyles.paddingBottom + " -" + this.elStyles.paddingLeft;
|
4160 |
+
this.contentWrapperEl.style.height = isHeightAuto ? 'auto' : '100%'; // Determine placeholder size
|
4161 |
+
|
4162 |
+
this.placeholderEl.style.width = isWidthAuto ? this.contentEl.offsetWidth + "px" : 'auto';
|
4163 |
+
this.placeholderEl.style.height = this.contentEl.scrollHeight + "px"; // Set isOverflowing to false if scrollbar is not necessary (content is shorter than offset)
|
4164 |
+
|
4165 |
+
this.axis.x.isOverflowing = this.contentWrapperEl.scrollWidth > this.contentWrapperEl.offsetWidth;
|
4166 |
+
this.axis.y.isOverflowing = this.contentWrapperEl.scrollHeight > this.contentWrapperEl.offsetHeight; // Set isOverflowing to false if user explicitely set hidden overflow
|
4167 |
+
|
4168 |
+
this.axis.x.isOverflowing = this.elStyles.overflowX === 'hidden' ? false : this.axis.x.isOverflowing;
|
4169 |
+
this.axis.y.isOverflowing = this.elStyles.overflowY === 'hidden' ? false : this.axis.y.isOverflowing;
|
4170 |
+
this.axis.x.forceVisible = this.options.forceVisible === 'x' || this.options.forceVisible === true;
|
4171 |
+
this.axis.y.forceVisible = this.options.forceVisible === 'y' || this.options.forceVisible === true;
|
4172 |
+
this.hideNativeScrollbar();
|
4173 |
+
this.axis.x.track.rect = this.axis.x.track.el.getBoundingClientRect();
|
4174 |
+
this.axis.y.track.rect = this.axis.y.track.el.getBoundingClientRect();
|
4175 |
+
this.axis.x.scrollbar.size = this.getScrollbarSize('x');
|
4176 |
+
this.axis.y.scrollbar.size = this.getScrollbarSize('y');
|
4177 |
+
this.axis.x.scrollbar.el.style.width = this.axis.x.scrollbar.size + "px";
|
4178 |
+
this.axis.y.scrollbar.el.style.height = this.axis.y.scrollbar.size + "px";
|
4179 |
+
this.positionScrollbar('x');
|
4180 |
+
this.positionScrollbar('y');
|
4181 |
+
this.toggleTrackVisibility('x');
|
4182 |
+
this.toggleTrackVisibility('y');
|
4183 |
+
}
|
4184 |
+
/**
|
4185 |
+
* Calculate scrollbar size
|
4186 |
+
*/
|
4187 |
+
;
|
4188 |
+
|
4189 |
+
_proto.getScrollbarSize = function getScrollbarSize(axis) {
|
4190 |
+
if (axis === void 0) {
|
4191 |
+
axis = 'y';
|
4192 |
+
}
|
4193 |
+
|
4194 |
+
var contentSize = this.scrollbarWidth ? this.contentWrapperEl[this.axis[axis].scrollSizeAttr] : this.contentWrapperEl[this.axis[axis].scrollSizeAttr] - this.minScrollbarWidth;
|
4195 |
+
var trackSize = this.axis[axis].track.rect[this.axis[axis].sizeAttr];
|
4196 |
+
var scrollbarSize;
|
4197 |
+
|
4198 |
+
if (!this.axis[axis].isOverflowing) {
|
4199 |
+
return;
|
4200 |
+
}
|
4201 |
+
|
4202 |
+
var scrollbarRatio = trackSize / contentSize; // Calculate new height/position of drag handle.
|
4203 |
+
|
4204 |
+
scrollbarSize = Math.max(~~(scrollbarRatio * trackSize), this.options.scrollbarMinSize);
|
4205 |
+
|
4206 |
+
if (this.options.scrollbarMaxSize) {
|
4207 |
+
scrollbarSize = Math.min(scrollbarSize, this.options.scrollbarMaxSize);
|
4208 |
+
}
|
4209 |
+
|
4210 |
+
return scrollbarSize;
|
4211 |
+
};
|
4212 |
+
|
4213 |
+
_proto.positionScrollbar = function positionScrollbar(axis) {
|
4214 |
+
if (axis === void 0) {
|
4215 |
+
axis = 'y';
|
4216 |
+
}
|
4217 |
+
|
4218 |
+
var contentSize = this.contentWrapperEl[this.axis[axis].scrollSizeAttr];
|
4219 |
+
var trackSize = this.axis[axis].track.rect[this.axis[axis].sizeAttr];
|
4220 |
+
var hostSize = parseInt(this.elStyles[this.axis[axis].sizeAttr], 10);
|
4221 |
+
var scrollbar = this.axis[axis].scrollbar;
|
4222 |
+
var scrollOffset = this.contentWrapperEl[this.axis[axis].scrollOffsetAttr];
|
4223 |
+
scrollOffset = axis === 'x' && this.isRtl && SimpleBar.getRtlHelpers().isRtlScrollingInverted ? -scrollOffset : scrollOffset;
|
4224 |
+
var scrollPourcent = scrollOffset / (contentSize - hostSize);
|
4225 |
+
var handleOffset = ~~((trackSize - scrollbar.size) * scrollPourcent);
|
4226 |
+
handleOffset = axis === 'x' && this.isRtl && SimpleBar.getRtlHelpers().isRtlScrollbarInverted ? handleOffset + (trackSize - scrollbar.size) : handleOffset;
|
4227 |
+
scrollbar.el.style.transform = axis === 'x' ? "translate3d(" + handleOffset + "px, 0, 0)" : "translate3d(0, " + handleOffset + "px, 0)";
|
4228 |
+
};
|
4229 |
+
|
4230 |
+
_proto.toggleTrackVisibility = function toggleTrackVisibility(axis) {
|
4231 |
+
if (axis === void 0) {
|
4232 |
+
axis = 'y';
|
4233 |
+
}
|
4234 |
+
|
4235 |
+
var track = this.axis[axis].track.el;
|
4236 |
+
var scrollbar = this.axis[axis].scrollbar.el;
|
4237 |
+
|
4238 |
+
if (this.axis[axis].isOverflowing || this.axis[axis].forceVisible) {
|
4239 |
+
track.style.visibility = 'visible';
|
4240 |
+
this.contentWrapperEl.style[this.axis[axis].overflowAttr] = 'scroll';
|
4241 |
+
} else {
|
4242 |
+
track.style.visibility = 'hidden';
|
4243 |
+
this.contentWrapperEl.style[this.axis[axis].overflowAttr] = 'hidden';
|
4244 |
+
} // Even if forceVisible is enabled, scrollbar itself should be hidden
|
4245 |
+
|
4246 |
+
|
4247 |
+
if (this.axis[axis].isOverflowing) {
|
4248 |
+
scrollbar.style.display = 'block';
|
4249 |
+
} else {
|
4250 |
+
scrollbar.style.display = 'none';
|
4251 |
+
}
|
4252 |
+
};
|
4253 |
+
|
4254 |
+
_proto.hideNativeScrollbar = function hideNativeScrollbar() {
|
4255 |
+
this.offsetEl.style[this.isRtl ? 'left' : 'right'] = this.axis.y.isOverflowing || this.axis.y.forceVisible ? "-" + (this.scrollbarWidth || this.minScrollbarWidth) + "px" : 0;
|
4256 |
+
this.offsetEl.style.bottom = this.axis.x.isOverflowing || this.axis.x.forceVisible ? "-" + (this.scrollbarWidth || this.minScrollbarWidth) + "px" : 0; // If floating scrollbar
|
4257 |
+
|
4258 |
+
if (!this.scrollbarWidth) {
|
4259 |
+
var paddingDirection = [this.isRtl ? 'paddingLeft' : 'paddingRight'];
|
4260 |
+
this.contentWrapperEl.style[paddingDirection] = this.axis.y.isOverflowing || this.axis.y.forceVisible ? this.minScrollbarWidth + "px" : 0;
|
4261 |
+
this.contentWrapperEl.style.paddingBottom = this.axis.x.isOverflowing || this.axis.x.forceVisible ? this.minScrollbarWidth + "px" : 0;
|
4262 |
+
}
|
4263 |
+
}
|
4264 |
+
/**
|
4265 |
+
* On scroll event handling
|
4266 |
+
*/
|
4267 |
+
;
|
4268 |
+
|
4269 |
+
_proto.onMouseMoveForAxis = function onMouseMoveForAxis(axis) {
|
4270 |
+
if (axis === void 0) {
|
4271 |
+
axis = 'y';
|
4272 |
+
}
|
4273 |
+
|
4274 |
+
this.axis[axis].track.rect = this.axis[axis].track.el.getBoundingClientRect();
|
4275 |
+
this.axis[axis].scrollbar.rect = this.axis[axis].scrollbar.el.getBoundingClientRect();
|
4276 |
+
var isWithinScrollbarBoundsX = this.isWithinBounds(this.axis[axis].scrollbar.rect);
|
4277 |
+
|
4278 |
+
if (isWithinScrollbarBoundsX) {
|
4279 |
+
this.axis[axis].scrollbar.el.classList.add(this.classNames.hover);
|
4280 |
+
} else {
|
4281 |
+
this.axis[axis].scrollbar.el.classList.remove(this.classNames.hover);
|
4282 |
+
}
|
4283 |
+
|
4284 |
+
if (this.isWithinBounds(this.axis[axis].track.rect)) {
|
4285 |
+
this.showScrollbar(axis);
|
4286 |
+
this.axis[axis].track.el.classList.add(this.classNames.hover);
|
4287 |
+
} else {
|
4288 |
+
this.axis[axis].track.el.classList.remove(this.classNames.hover);
|
4289 |
+
}
|
4290 |
+
};
|
4291 |
+
|
4292 |
+
_proto.onMouseLeaveForAxis = function onMouseLeaveForAxis(axis) {
|
4293 |
+
if (axis === void 0) {
|
4294 |
+
axis = 'y';
|
4295 |
+
}
|
4296 |
+
|
4297 |
+
this.axis[axis].track.el.classList.remove(this.classNames.hover);
|
4298 |
+
this.axis[axis].scrollbar.el.classList.remove(this.classNames.hover);
|
4299 |
+
};
|
4300 |
+
|
4301 |
+
/**
|
4302 |
+
* Show scrollbar
|
4303 |
+
*/
|
4304 |
+
_proto.showScrollbar = function showScrollbar(axis) {
|
4305 |
+
if (axis === void 0) {
|
4306 |
+
axis = 'y';
|
4307 |
+
}
|
4308 |
+
|
4309 |
+
var scrollbar = this.axis[axis].scrollbar.el;
|
4310 |
+
|
4311 |
+
if (!this.axis[axis].isVisible) {
|
4312 |
+
scrollbar.classList.add(this.classNames.visible);
|
4313 |
+
this.axis[axis].isVisible = true;
|
4314 |
+
}
|
4315 |
+
|
4316 |
+
if (this.options.autoHide) {
|
4317 |
+
this.hideScrollbars();
|
4318 |
+
}
|
4319 |
+
}
|
4320 |
+
/**
|
4321 |
+
* Hide Scrollbar
|
4322 |
+
*/
|
4323 |
+
;
|
4324 |
+
|
4325 |
+
/**
|
4326 |
+
* on scrollbar handle drag movement starts
|
4327 |
+
*/
|
4328 |
+
_proto.onDragStart = function onDragStart(e, axis) {
|
4329 |
+
if (axis === void 0) {
|
4330 |
+
axis = 'y';
|
4331 |
+
}
|
4332 |
+
|
4333 |
+
var scrollbar = this.axis[axis].scrollbar.el; // Measure how far the user's mouse is from the top of the scrollbar drag handle.
|
4334 |
+
|
4335 |
+
var eventOffset = axis === 'y' ? e.pageY : e.pageX;
|
4336 |
+
this.axis[axis].dragOffset = eventOffset - scrollbar.getBoundingClientRect()[this.axis[axis].offsetAttr];
|
4337 |
+
this.draggedAxis = axis;
|
4338 |
+
this.el.classList.add(this.classNames.dragging);
|
4339 |
+
document.addEventListener('mousemove', this.drag);
|
4340 |
+
document.addEventListener('mouseup', this.onEndDrag);
|
4341 |
+
}
|
4342 |
+
/**
|
4343 |
+
* Drag scrollbar handle
|
4344 |
+
*/
|
4345 |
+
;
|
4346 |
+
|
4347 |
+
/**
|
4348 |
+
* Getter for content element
|
4349 |
+
*/
|
4350 |
+
_proto.getContentElement = function getContentElement() {
|
4351 |
+
return this.contentEl;
|
4352 |
+
}
|
4353 |
+
/**
|
4354 |
+
* Getter for original scrolling element
|
4355 |
+
*/
|
4356 |
+
;
|
4357 |
+
|
4358 |
+
_proto.getScrollElement = function getScrollElement() {
|
4359 |
+
return this.contentWrapperEl;
|
4360 |
+
};
|
4361 |
+
|
4362 |
+
_proto.removeListeners = function removeListeners() {
|
4363 |
+
var _this4 = this;
|
4364 |
+
|
4365 |
+
// Event listeners
|
4366 |
+
if (this.options.autoHide) {
|
4367 |
+
this.el.removeEventListener('mouseenter', this.onMouseEnter);
|
4368 |
+
}
|
4369 |
+
|
4370 |
+
['mousedown', 'click', 'dblclick', 'touchstart', 'touchend', 'touchmove'].forEach(function (e) {
|
4371 |
+
_this4.el.removeEventListener(e, _this4.onPointerEvent);
|
4372 |
+
});
|
4373 |
+
this.el.removeEventListener('mousemove', this.onMouseMove);
|
4374 |
+
this.el.removeEventListener('mouseleave', this.onMouseLeave);
|
4375 |
+
this.contentWrapperEl.removeEventListener('scroll', this.onScroll);
|
4376 |
+
window.removeEventListener('resize', this.onWindowResize);
|
4377 |
+
this.mutationObserver && this.mutationObserver.disconnect();
|
4378 |
+
this.resizeObserver.disconnect(); // Cancel all debounced functions
|
4379 |
+
|
4380 |
+
this.recalculate.cancel();
|
4381 |
+
this.onMouseMove.cancel();
|
4382 |
+
this.hideScrollbars.cancel();
|
4383 |
+
this.onWindowResize.cancel();
|
4384 |
+
}
|
4385 |
+
/**
|
4386 |
+
* UnMount mutation observer and delete SimpleBar instance from DOM element
|
4387 |
+
*/
|
4388 |
+
;
|
4389 |
+
|
4390 |
+
_proto.unMount = function unMount() {
|
4391 |
+
this.removeListeners();
|
4392 |
+
this.el.SimpleBar = null;
|
4393 |
+
}
|
4394 |
+
/**
|
4395 |
+
* Recursively walks up the parent nodes looking for this.el
|
4396 |
+
*/
|
4397 |
+
;
|
4398 |
+
|
4399 |
+
_proto.isChildNode = function isChildNode(el) {
|
4400 |
+
if (el === null) return false;
|
4401 |
+
if (el === this.el) return true;
|
4402 |
+
return this.isChildNode(el.parentNode);
|
4403 |
+
}
|
4404 |
+
/**
|
4405 |
+
* Check if mouse is within bounds
|
4406 |
+
*/
|
4407 |
+
;
|
4408 |
+
|
4409 |
+
_proto.isWithinBounds = function isWithinBounds(bbox) {
|
4410 |
+
return this.mouseX >= bbox.left && this.mouseX <= bbox.left + bbox.width && this.mouseY >= bbox.top && this.mouseY <= bbox.top + bbox.height;
|
4411 |
+
};
|
4412 |
+
|
4413 |
+
return SimpleBar;
|
4414 |
+
}();
|
4415 |
+
/**
|
4416 |
+
* HTML API
|
4417 |
+
* Called only in a browser env.
|
4418 |
+
*/
|
4419 |
+
|
4420 |
+
|
4421 |
+
SimpleBar.defaultOptions = {
|
4422 |
+
autoHide: true,
|
4423 |
+
forceVisible: false,
|
4424 |
+
classNames: {
|
4425 |
+
contentEl: 'simplebar-content',
|
4426 |
+
contentWrapper: 'simplebar-content-wrapper',
|
4427 |
+
offset: 'simplebar-offset',
|
4428 |
+
mask: 'simplebar-mask',
|
4429 |
+
wrapper: 'simplebar-wrapper',
|
4430 |
+
placeholder: 'simplebar-placeholder',
|
4431 |
+
scrollbar: 'simplebar-scrollbar',
|
4432 |
+
track: 'simplebar-track',
|
4433 |
+
heightAutoObserverWrapperEl: 'simplebar-height-auto-observer-wrapper',
|
4434 |
+
heightAutoObserverEl: 'simplebar-height-auto-observer',
|
4435 |
+
visible: 'simplebar-visible',
|
4436 |
+
horizontal: 'simplebar-horizontal',
|
4437 |
+
vertical: 'simplebar-vertical',
|
4438 |
+
hover: 'simplebar-hover',
|
4439 |
+
dragging: 'simplebar-dragging'
|
4440 |
+
},
|
4441 |
+
scrollbarMinSize: 25,
|
4442 |
+
scrollbarMaxSize: 0,
|
4443 |
+
timeout: 1000
|
4444 |
+
};
|
4445 |
+
|
4446 |
+
if (canUseDom) {
|
4447 |
+
SimpleBar.initHtmlApi();
|
4448 |
+
}
|
4449 |
+
|
4450 |
+
return SimpleBar;
|
4451 |
+
|
4452 |
+
}));
|
assets/js/simplebar.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).SimpleBar=e()}(this,function(){"use strict";var y=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},h=function(t){try{return!!t()}catch(t){return!0}},e={}.toString,n=function(t){return e.call(t).slice(8,-1)},i="".split,x=h(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==n(t)?i.call(t,""):Object(t)}:Object,f=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},_=function(t){return Object(f(t))},r=Math.ceil,s=Math.floor,S=function(t){return isNaN(t=+t)?0:(0<t?s:r)(t)},o=Math.min,A=function(t){return 0<t?o(S(t),9007199254740991):0},a=function(t){return"object"==typeof t?null!==t:"function"==typeof t},l=Array.isArray||function(t){return"Array"==n(t)},t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(t,e){return t(e={exports:{}},e.exports),e.exports}var u,d,p,v,g="object"==typeof window&&window&&window.Math==Math?window:"object"==typeof self&&self&&self.Math==Math?self:Function("return this")(),b=!h(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),m=g.document,E=a(m)&&a(m.createElement),w=!b&&!h(function(){return 7!=Object.defineProperty((t="div",E?m.createElement(t):{}),"a",{get:function(){return 7}}).a;var t}),L=function(t){if(!a(t))throw TypeError(String(t)+" is not an object");return t},O=function(t,e){if(!a(t))return t;var i,r;if(e&&"function"==typeof(i=t.toString)&&!a(r=i.call(t)))return r;if("function"==typeof(i=t.valueOf)&&!a(r=i.call(t)))return r;if(!e&&"function"==typeof(i=t.toString)&&!a(r=i.call(t)))return r;throw TypeError("Can't convert object to primitive value")},M=Object.defineProperty,k={f:b?M:function(t,e,i){if(L(t),e=O(e,!0),L(i),w)try{return M(t,e,i)}catch(t){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(t[e]=i.value),t}},W=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},T=b?function(t,e,i){return k.f(t,e,W(1,i))}:function(t,e,i){return t[e]=i,t},R=function(e,i){try{T(g,e,i)}catch(t){g[e]=i}return i},j=c(function(t){var e="__core-js_shared__",i=g[e]||R(e,{});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.0.1",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),N=0,z=Math.random(),C=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++N+z).toString(36))},V=!h(function(){return!String(Symbol())}),D=j("wks"),B=g.Symbol,I=function(t){return D[t]||(D[t]=V&&B[t]||(V?B:C)("Symbol."+t))},P=I("species"),H=function(t,e){var i;return l(t)&&("function"!=typeof(i=t.constructor)||i!==Array&&!l(i.prototype)?a(i)&&null===(i=i[P])&&(i=void 0):i=void 0),new(void 0===i?Array:i)(0===e?0:e)},F=function(h,t){var f=1==h,d=2==h,p=3==h,v=4==h,g=6==h,b=5==h||g,m=t||H;return function(t,e,i){for(var r,n,s=_(t),o=x(s),a=function(r,n,t){if(y(r),void 0===n)return r;switch(t){case 0:return function(){return r.call(n)};case 1:return function(t){return r.call(n,t)};case 2:return function(t,e){return r.call(n,t,e)};case 3:return function(t,e,i){return r.call(n,t,e,i)}}return function(){return r.apply(n,arguments)}}(e,i,3),l=A(o.length),c=0,u=f?m(t,l):d?m(t,0):void 0;c<l;c++)if((b||c in o)&&(n=a(r=o[c],c,s),h))if(f)u[c]=n;else if(n)switch(h){case 3:return!0;case 5:return r;case 6:return c;case 2:u.push(r)}else if(v)return!1;return g?-1:p||v?v:u}},q=I("species"),$={}.propertyIsEnumerable,X=Object.getOwnPropertyDescriptor,Y={f:X&&!$.call({1:2},1)?function(t){var e=X(this,t);return!!e&&e.enumerable}:$},G=function(t){return x(f(t))},K={}.hasOwnProperty,U=function(t,e){return K.call(t,e)},J=Object.getOwnPropertyDescriptor,Q={f:b?J:function(t,e){if(t=G(t),e=O(e,!0),w)try{return J(t,e)}catch(t){}if(U(t,e))return W(!Y.f.call(t,e),t[e])}},Z=j("native-function-to-string",Function.toString),tt=g.WeakMap,et="function"==typeof tt&&/native code/.test(Z.call(tt)),it=j("keys"),rt={},nt=g.WeakMap;if(et){var st=new nt,ot=st.get,at=st.has,lt=st.set;u=function(t,e){return lt.call(st,t,e),e},d=function(t){return ot.call(st,t)||{}},p=function(t){return at.call(st,t)}}else{var ct=it[v="state"]||(it[v]=C(v));rt[ct]=!0,u=function(t,e){return T(t,ct,e),e},d=function(t){return U(t,ct)?t[ct]:{}},p=function(t){return U(t,ct)}}var ut,ht,ft={set:u,get:d,has:p,enforce:function(t){return p(t)?d(t):u(t,{})},getterFor:function(i){return function(t){var e;if(!a(t)||(e=d(t)).type!==i)throw TypeError("Incompatible receiver, "+i+" required");return e}}},dt=c(function(t){var e=ft.get,a=ft.enforce,l=String(Z).split("toString");j("inspectSource",function(t){return Z.call(t)}),(t.exports=function(t,e,i,r){var n=!!r&&!!r.unsafe,s=!!r&&!!r.enumerable,o=!!r&&!!r.noTargetGet;"function"==typeof i&&("string"!=typeof e||U(i,"name")||T(i,"name",e),a(i).source=l.join("string"==typeof e?e:"")),t!==g?(n?!o&&t[e]&&(s=!0):delete t[e],s?t[e]=i:T(t,e,i)):s?t[e]=i:R(e,i)})(Function.prototype,"toString",function(){return"function"==typeof this&&e(this).source||Z.call(this)})}),pt=Math.max,vt=Math.min,gt=(ut=!1,function(t,e,i){var r,n,s,o=G(t),a=A(o.length),l=(r=a,(n=S(i))<0?pt(n+r,0):vt(n,r));if(ut&&e!=e){for(;l<a;)if((s=o[l++])!=s)return!0}else for(;l<a;l++)if((ut||l in o)&&o[l]===e)return ut||l||0;return!ut&&-1}),bt=function(t,e){var i,r=G(t),n=0,s=[];for(i in r)!U(rt,i)&&U(r,i)&&s.push(i);for(;e.length>n;)U(r,i=e[n++])&&(~gt(s,i)||s.push(i));return s},mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],yt=mt.concat("length","prototype"),xt={f:Object.getOwnPropertyNames||function(t){return bt(t,yt)}},Et={f:Object.getOwnPropertySymbols},wt=g.Reflect,Ot=wt&&wt.ownKeys||function(t){var e=xt.f(L(t)),i=Et.f;return i?e.concat(i(t)):e},_t=function(t,e){for(var i=Ot(e),r=k.f,n=Q.f,s=0;s<i.length;s++){var o=i[s];U(t,o)||r(t,o,n(e,o))}},St=/#|\.prototype\./,At=function(t,e){var i=Mt[Lt(t)];return i==Wt||i!=kt&&("function"==typeof e?h(e):!!e)},Lt=At.normalize=function(t){return String(t).replace(St,".").toLowerCase()},Mt=At.data={},kt=At.NATIVE="N",Wt=At.POLYFILL="P",Tt=At,Rt=Q.f,jt=function(t,e){var i,r,n,s,o,a=t.target,l=t.global,c=t.stat;if(i=l?g:c?g[a]||R(a,{}):(g[a]||{}).prototype)for(r in e){if(s=e[r],n=t.noTargetGet?(o=Rt(i,r))&&o.value:i[r],!Tt(l?r:a+(c?".":"#")+r,t.forced)&&void 0!==n){if(typeof s==typeof n)continue;_t(s,n)}(t.sham||n&&n.sham)&&T(s,"sham",!0),dt(i,r,s,t)}},Nt=F(2);jt({target:"Array",proto:!0,forced:!(ht="filter",!h(function(){var t=[];return(t.constructor={})[q]=function(){return{foo:1}},1!==t[ht](Boolean).foo}))},{filter:function(t){return Nt(this,t,arguments[1])}});var zt=function(t,e){var i=[][t];return!i||!h(function(){i.call(null,e||function(){throw 1},1)})},Ct=[].forEach,Vt=F(0),Dt=zt("forEach")?function(t){return Vt(this,t,arguments[1])}:Ct;jt({target:"Array",proto:!0,forced:[].forEach!=Dt},{forEach:Dt});jt({target:"Array",proto:!0,forced:zt("reduce")},{reduce:function(t){return function(t,e,i,r,n){y(e);var s=_(t),o=x(s),a=A(s.length),l=n?a-1:0,c=n?-1:1;if(i<2)for(;;){if(l in o){r=o[l],l+=c;break}if(l+=c,n?l<0:a<=l)throw TypeError("Reduce of empty array with no initial value")}for(;n?0<=l:l<a;l+=c)l in o&&(r=e(r,o[l],l,s));return r}(this,t,arguments.length,arguments[1],!1)}});var Bt=k.f,It=Function.prototype,Pt=It.toString,Ht=/^\s*function ([^ (]*)/;!b||"name"in It||Bt(It,"name",{configurable:!0,get:function(){try{return Pt.call(this).match(Ht)[1]}catch(t){return""}}});var Ft=Object.keys||function(t){return bt(t,mt)},qt=Object.assign,$t=!qt||h(function(){var t={},e={},i=Symbol(),r="abcdefghijklmnopqrst";return t[i]=7,r.split("").forEach(function(t){e[t]=t}),7!=qt({},t)[i]||Ft(qt({},e)).join("")!=r})?function(t,e){for(var i=_(t),r=arguments.length,n=1,s=Et.f,o=Y.f;n<r;)for(var a,l=x(arguments[n++]),c=s?Ft(l).concat(s(l)):Ft(l),u=c.length,h=0;h<u;)o.call(l,a=c[h++])&&(i[a]=l[a]);return i}:qt;jt({target:"Object",stat:!0,forced:Object.assign!==$t},{assign:$t});var Xt="\t\n\v\f\r \u2028\u2029\ufeff",Yt="["+Xt+"]",Gt=RegExp("^"+Yt+Yt+"*"),Kt=RegExp(Yt+Yt+"*$"),Ut=g.parseInt,Jt=/^[-+]?0[xX]/,Qt=8!==Ut(Xt+"08")||22!==Ut(Xt+"0x16")?function(t,e){var i,r,n=(i=String(t),r=3,i=String(f(i)),1&r&&(i=i.replace(Gt,"")),2&r&&(i=i.replace(Kt,"")),i);return Ut(n,e>>>0||(Jt.test(n)?16:10))}:Ut;jt({global:!0,forced:parseInt!=Qt},{parseInt:Qt});var Zt,te,ee=RegExp.prototype.exec,ie=String.prototype.replace,re=ee,ne=(Zt=/a/,te=/b*/g,ee.call(Zt,"a"),ee.call(te,"a"),0!==Zt.lastIndex||0!==te.lastIndex),se=void 0!==/()??/.exec("")[1];(ne||se)&&(re=function(t){var e,i,r,n,s=this;return se&&(i=new RegExp("^"+s.source+"$(?!\\s)",function(){var t=L(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}.call(s))),ne&&(e=s.lastIndex),r=ee.call(s,t),ne&&r&&(s.lastIndex=s.global?r.index+r[0].length:e),se&&r&&1<r.length&&ie.call(r[0],i,function(){for(n=1;n<arguments.length-2;n++)void 0===arguments[n]&&(r[n]=void 0)}),r});var oe=re;jt({target:"RegExp",proto:!0,forced:/./.exec!==oe},{exec:oe});var ae=function(t,e,i){return e+(i?(r=t,n=e,s=!0,l=String(f(r)),c=S(n),u=l.length,c<0||u<=c?s?"":void 0:(o=l.charCodeAt(c))<55296||56319<o||c+1===u||(a=l.charCodeAt(c+1))<56320||57343<a?s?l.charAt(c):o:s?l.slice(c,c+2):a-56320+(o-55296<<10)+65536).length:1);var r,n,s,o,a,l,c,u},le=function(t,e){var i=t.exec;if("function"==typeof i){var r=i.call(t,e);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==n(t))throw TypeError("RegExp#exec called on incompatible receiver");return oe.call(t,e)},ce=I("species"),ue=!h(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),he=!h(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var i="ab".split(t);return 2!==i.length||"a"!==i[0]||"b"!==i[1]}),fe=function(i,t,e,r){var n=I(i),s=!h(function(){var t={};return t[n]=function(){return 7},7!=""[i](t)}),o=s&&!h(function(){var t=!1,e=/a/;return e.exec=function(){return t=!0,null},"split"===i&&(e.constructor={},e.constructor[ce]=function(){return e}),e[n](""),!t});if(!s||!o||"replace"===i&&!ue||"split"===i&&!he){var a=/./[n],l=e(n,""[i],function(t,e,i,r,n){return e.exec===oe?s&&!n?{done:!0,value:a.call(e,i,r)}:{done:!0,value:t.call(i,e,r)}:{done:!1}}),c=l[0],u=l[1];dt(String.prototype,i,c),dt(RegExp.prototype,n,2==t?function(t,e){return u.call(t,this,e)}:function(t){return u.call(t,this)}),r&&T(RegExp.prototype[n],"sham",!0)}};fe("match",1,function(r,c,u){return[function(t){var e=f(this),i=null==t?void 0:t[r];return void 0!==i?i.call(t,e):new RegExp(t)[r](String(e))},function(t){var e=u(c,t,this);if(e.done)return e.value;var i=L(t),r=String(this);if(!i.global)return le(i,r);for(var n,s=i.unicode,o=[],a=i.lastIndex=0;null!==(n=le(i,r));){var l=String(n[0]);""===(o[a]=l)&&(i.lastIndex=ae(r,A(i.lastIndex),s)),a++}return 0===a?null:o}]});var de=Math.max,pe=Math.min,ve=Math.floor,ge=/\$([$&`']|\d\d?|<[^>]*>)/g,be=/\$([$&`']|\d\d?)/g;fe("replace",2,function(n,E,w){return[function(t,e){var i=f(this),r=null==t?void 0:t[n];return void 0!==r?r.call(t,i,e):E.call(String(i),t,e)},function(t,e){var i=w(E,t,this,e);if(i.done)return i.value;var r=L(t),n=String(this),s="function"==typeof e;s||(e=String(e));var o=r.global;if(o){var a=r.unicode;r.lastIndex=0}for(var l=[];;){var c=le(r,n);if(null===c)break;if(l.push(c),!o)break;""===String(c[0])&&(r.lastIndex=ae(n,A(r.lastIndex),a))}for(var u,h="",f=0,d=0;d<l.length;d++){c=l[d];for(var p=String(c[0]),v=de(pe(S(c.index),n.length),0),g=[],b=1;b<c.length;b++)g.push(void 0===(u=c[b])?u:String(u));var m=c.groups;if(s){var y=[p].concat(g,v,n);void 0!==m&&y.push(m);var x=String(e.apply(void 0,y))}else x=O(p,n,v,g,m,e);f<=v&&(h+=n.slice(f,v)+x,f=v+p.length)}return h+n.slice(f)}];function O(s,o,a,l,c,t){var u=a+s.length,h=l.length,e=be;return void 0!==c&&(c=_(c),e=ge),E.call(t,e,function(t,e){var i;switch(e.charAt(0)){case"$":return"$";case"&":return s;case"`":return o.slice(0,a);case"'":return o.slice(u);case"<":i=c[e.slice(1,-1)];break;default:var r=+e;if(0===r)return t;if(h<r){var n=ve(r/10);return 0===n?t:n<=h?void 0===l[n-1]?e.charAt(1):l[n-1]+e.charAt(1):t}i=l[r-1]}return void 0===i?"":i})}});for(var me in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var ye=g[me],xe=ye&&ye.prototype;if(xe&&xe.forEach!==Dt)try{T(xe,"forEach",Dt)}catch(t){xe.forEach=Dt}}var Ee=c(function(t,e){t.exports=function(){if("undefined"==typeof document)return 0;var t,e=document.body,i=document.createElement("div"),r=i.style;return r.position="absolute",r.top=r.left="-9999px",r.width=r.height="100px",r.overflow="scroll",e.appendChild(i),t=i.offsetWidth-i.clientWidth,e.removeChild(i),t}}),we="Expected a function",Oe=NaN,_e="[object Symbol]",Se=/^\s+|\s+$/g,Ae=/^[-+]0x[0-9a-f]+$/i,Le=/^0b[01]+$/i,Me=/^0o[0-7]+$/i,ke=parseInt,We="object"==typeof t&&t&&t.Object===Object&&t,Te="object"==typeof self&&self&&self.Object===Object&&self,Re=We||Te||Function("return this")(),je=Object.prototype.toString,Ne=Math.max,ze=Math.min,Ce=function(){return Re.Date.now()};function Ve(r,n,t){var s,o,a,l,c,u,h=0,f=!1,d=!1,e=!0;if("function"!=typeof r)throw new TypeError(we);function p(t){var e=s,i=o;return s=o=void 0,h=t,l=r.apply(i,e)}function v(t){var e=t-u;return void 0===u||n<=e||e<0||d&&a<=t-h}function g(){var t,e,i=Ce();if(v(i))return b(i);c=setTimeout(g,(e=n-((t=i)-u),d?ze(e,a-(t-h)):e))}function b(t){return c=void 0,e&&s?p(t):(s=o=void 0,l)}function i(){var t,e=Ce(),i=v(e);if(s=arguments,o=this,u=e,i){if(void 0===c)return h=t=u,c=setTimeout(g,n),f?p(t):l;if(d)return c=setTimeout(g,n),p(u)}return void 0===c&&(c=setTimeout(g,n)),l}return n=Be(n)||0,De(t)&&(f=!!t.leading,a=(d="maxWait"in t)?Ne(Be(t.maxWait)||0,n):a,e="trailing"in t?!!t.trailing:e),i.cancel=function(){void 0!==c&&clearTimeout(c),s=u=o=c=void(h=0)},i.flush=function(){return void 0===c?l:b(Ce())},i}function De(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Be(t){if("number"==typeof t)return t;if("symbol"==typeof(e=t)||(i=e)&&"object"==typeof i&&je.call(e)==_e)return Oe;var e,i;if(De(t)){var r="function"==typeof t.valueOf?t.valueOf():t;t=De(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Se,"");var n=Le.test(t);return n||Me.test(t)?ke(t.slice(2),n?2:8):Ae.test(t)?Oe:+t}var Ie=function(t,e,i){var r=!0,n=!0;if("function"!=typeof t)throw new TypeError(we);return De(i)&&(r="leading"in i?!!i.leading:r,n="trailing"in i?!!i.trailing:n),Ve(t,e,{leading:r,maxWait:e,trailing:n})},Pe=NaN,He="[object Symbol]",Fe=/^\s+|\s+$/g,qe=/^[-+]0x[0-9a-f]+$/i,$e=/^0b[01]+$/i,Xe=/^0o[0-7]+$/i,Ye=parseInt,Ge="object"==typeof t&&t&&t.Object===Object&&t,Ke="object"==typeof self&&self&&self.Object===Object&&self,Ue=Ge||Ke||Function("return this")(),Je=Object.prototype.toString,Qe=Math.max,Ze=Math.min,ti=function(){return Ue.Date.now()};function ei(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function ii(t){if("number"==typeof t)return t;if("symbol"==typeof(e=t)||(i=e)&&"object"==typeof i&&Je.call(e)==He)return Pe;var e,i;if(ei(t)){var r="function"==typeof t.valueOf?t.valueOf():t;t=ei(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Fe,"");var n=$e.test(t);return n||Xe.test(t)?Ye(t.slice(2),n?2:8):qe.test(t)?Pe:+t}var ri=function(r,n,t){var s,o,a,l,c,u,h=0,f=!1,d=!1,e=!0;if("function"!=typeof r)throw new TypeError("Expected a function");function p(t){var e=s,i=o;return s=o=void 0,h=t,l=r.apply(i,e)}function v(t){var e=t-u;return void 0===u||n<=e||e<0||d&&a<=t-h}function g(){var t,e,i=ti();if(v(i))return b(i);c=setTimeout(g,(e=n-((t=i)-u),d?Ze(e,a-(t-h)):e))}function b(t){return c=void 0,e&&s?p(t):(s=o=void 0,l)}function i(){var t,e=ti(),i=v(e);if(s=arguments,o=this,u=e,i){if(void 0===c)return h=t=u,c=setTimeout(g,n),f?p(t):l;if(d)return c=setTimeout(g,n),p(u)}return void 0===c&&(c=setTimeout(g,n)),l}return n=ii(n)||0,ei(t)&&(f=!!t.leading,a=(d="maxWait"in t)?Qe(ii(t.maxWait)||0,n):a,e="trailing"in t?!!t.trailing:e),i.cancel=function(){void 0!==c&&clearTimeout(c),s=u=o=c=void(h=0)},i.flush=function(){return void 0===c?l:b(ti())},i},ni="Expected a function",si="__lodash_hash_undefined__",oi="[object Function]",ai="[object GeneratorFunction]",li=/^\[object .+?Constructor\]$/,ci="object"==typeof t&&t&&t.Object===Object&&t,ui="object"==typeof self&&self&&self.Object===Object&&self,hi=ci||ui||Function("return this")();var fi,di=Array.prototype,pi=Function.prototype,vi=Object.prototype,gi=hi["__core-js_shared__"],bi=(fi=/[^.]+$/.exec(gi&&gi.keys&&gi.keys.IE_PROTO||""))?"Symbol(src)_1."+fi:"",mi=pi.toString,yi=vi.hasOwnProperty,xi=vi.toString,Ei=RegExp("^"+mi.call(yi).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wi=di.splice,Oi=Ti(hi,"Map"),_i=Ti(Object,"create");function Si(t){var e=-1,i=t?t.length:0;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}function Ai(t){var e=-1,i=t?t.length:0;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}function Li(t){var e=-1,i=t?t.length:0;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}function Mi(t,e){for(var i,r,n=t.length;n--;)if((i=t[n][0])===(r=e)||i!=i&&r!=r)return n;return-1}function ki(t){return!(!ji(t)||(e=t,bi&&bi in e))&&((r=ji(i=t)?xi.call(i):"")==oi||r==ai||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?Ei:li).test(function(t){if(null!=t){try{return mi.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e,i,r}function Wi(t,e){var i,r,n=t.__data__;return("string"==(r=typeof(i=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?n["string"==typeof e?"string":"hash"]:n.map}function Ti(t,e){var i,r,n=(r=e,null==(i=t)?void 0:i[r]);return ki(n)?n:void 0}function Ri(n,s){if("function"!=typeof n||s&&"function"!=typeof s)throw new TypeError(ni);var o=function(){var t=arguments,e=s?s.apply(this,t):t[0],i=o.cache;if(i.has(e))return i.get(e);var r=n.apply(this,t);return o.cache=i.set(e,r),r};return o.cache=new(Ri.Cache||Li),o}function ji(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}Si.prototype.clear=function(){this.__data__=_i?_i(null):{}},Si.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},Si.prototype.get=function(t){var e=this.__data__;if(_i){var i=e[t];return i===si?void 0:i}return yi.call(e,t)?e[t]:void 0},Si.prototype.has=function(t){var e=this.__data__;return _i?void 0!==e[t]:yi.call(e,t)},Si.prototype.set=function(t,e){return this.__data__[t]=_i&&void 0===e?si:e,this},Ai.prototype.clear=function(){this.__data__=[]},Ai.prototype.delete=function(t){var e=this.__data__,i=Mi(e,t);return!(i<0||(i==e.length-1?e.pop():wi.call(e,i,1),0))},Ai.prototype.get=function(t){var e=this.__data__,i=Mi(e,t);return i<0?void 0:e[i][1]},Ai.prototype.has=function(t){return-1<Mi(this.__data__,t)},Ai.prototype.set=function(t,e){var i=this.__data__,r=Mi(i,t);return r<0?i.push([t,e]):i[r][1]=e,this},Li.prototype.clear=function(){this.__data__={hash:new Si,map:new(Oi||Ai),string:new Si}},Li.prototype.delete=function(t){return Wi(this,t).delete(t)},Li.prototype.get=function(t){return Wi(this,t).get(t)},Li.prototype.has=function(t){return Wi(this,t).has(t)},Li.prototype.set=function(t,e){return Wi(this,t).set(t,e),this},Ri.Cache=Li;var Ni=Ri,zi=function(){if("undefined"!=typeof Map)return Map;function r(t,i){var r=-1;return t.some(function(t,e){return t[0]===i&&(r=e,!0)}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var e=r(this.__entries__,t),i=this.__entries__[e];return i&&i[1]},t.prototype.set=function(t,e){var i=r(this.__entries__,t);~i?this.__entries__[i][1]=e:this.__entries__.push([t,e])},t.prototype.delete=function(t){var e=this.__entries__,i=r(e,t);~i&&e.splice(i,1)},t.prototype.has=function(t){return!!~r(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var i=0,r=this.__entries__;i<r.length;i++){var n=r[i];t.call(e,n[1],n[0])}},t}()}(),Ci="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Vi="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Di="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Vi):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)},Bi=2;var Ii=["top","right","bottom","left","width","height","size","weight"],Pi="undefined"!=typeof MutationObserver,Hi=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var i=!1,r=!1,n=0;function s(){i&&(i=!1,t()),r&&a()}function o(){Di(s)}function a(){var t=Date.now();if(i){if(t-n<Bi)return;r=!0}else r=!(i=!0),setTimeout(o,e);n=t}return a}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,i=e.indexOf(t);~i&&e.splice(i,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return t.forEach(function(t){return t.broadcastActive()}),0<t.length},t.prototype.connect_=function(){Ci&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Pi?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){Ci&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,i=void 0===e?"":e;Ii.some(function(t){return!!~i.indexOf(t)})&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Fi=function(t,e){for(var i=0,r=Object.keys(e);i<r.length;i++){var n=r[i];Object.defineProperty(t,n,{value:e[n],enumerable:!1,writable:!1,configurable:!0})}return t},qi=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Vi},$i=Ji(0,0,0,0);function Xi(t){return parseFloat(t)||0}function Yi(i){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return t.reduce(function(t,e){return t+Xi(i["border-"+e+"-width"])},0)}function Gi(t){var e=t.clientWidth,i=t.clientHeight;if(!e&&!i)return $i;var r,n=qi(t).getComputedStyle(t),s=function(t){for(var e={},i=0,r=["top","right","bottom","left"];i<r.length;i++){var n=r[i],s=t["padding-"+n];e[n]=Xi(s)}return e}(n),o=s.left+s.right,a=s.top+s.bottom,l=Xi(n.width),c=Xi(n.height);if("border-box"===n.boxSizing&&(Math.round(l+o)!==e&&(l-=Yi(n,"left","right")+o),Math.round(c+a)!==i&&(c-=Yi(n,"top","bottom")+a)),(r=t)!==qi(r).document.documentElement){var u=Math.round(l+o)-e,h=Math.round(c+a)-i;1!==Math.abs(u)&&(l-=u),1!==Math.abs(h)&&(c-=h)}return Ji(s.left,s.top,l,c)}var Ki="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof qi(t).SVGGraphicsElement}:function(t){return t instanceof qi(t).SVGElement&&"function"==typeof t.getBBox};function Ui(t){return Ci?Ki(t)?Ji(0,0,(e=t.getBBox()).width,e.height):Gi(t):$i;var e}function Ji(t,e,i,r){return{x:t,y:e,width:i,height:r}}var Qi=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Ji(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=Ui(this.target);return(this.contentRect_=t).width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),Zi=function(t,e){var i,r,n,s,o,a,l,c=(r=(i=e).x,n=i.y,s=i.width,o=i.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(a.prototype),Fi(l,{x:r,y:n,width:s,height:o,top:n,right:r+s,bottom:o+n,left:r}),l);Fi(this,{target:t,contentRect:c})},tr=function(){function t(t,e,i){if(this.activeObservations_=[],this.observations_=new zi,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=i}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof qi(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Qi(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof qi(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(t){return new Zi(t.target,t.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return 0<this.activeObservations_.length},t}(),er="undefined"!=typeof WeakMap?new WeakMap:new zi,ir=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var i=Hi.getInstance(),r=new tr(e,i,this);er.set(this,r)};["observe","unobserve","disconnect"].forEach(function(e){ir.prototype[e]=function(){var t;return(t=er.get(this))[e].apply(t,arguments)}});var rr=void 0!==Vi.ResizeObserver?Vi.ResizeObserver:ir,nr=!("undefined"==typeof window||!window.document||!window.document.createElement),sr=function(){function l(t,e){var s=this;this.onScroll=function(){s.scrollXTicking||(window.requestAnimationFrame(s.scrollX),s.scrollXTicking=!0),s.scrollYTicking||(window.requestAnimationFrame(s.scrollY),s.scrollYTicking=!0)},this.scrollX=function(){s.axis.x.isOverflowing&&(s.showScrollbar("x"),s.positionScrollbar("x")),s.scrollXTicking=!1},this.scrollY=function(){s.axis.y.isOverflowing&&(s.showScrollbar("y"),s.positionScrollbar("y")),s.scrollYTicking=!1},this.onMouseEnter=function(){s.showScrollbar("x"),s.showScrollbar("y")},this.onMouseMove=function(t){s.mouseX=t.clientX,s.mouseY=t.clientY,(s.axis.x.isOverflowing||s.axis.x.forceVisible)&&s.onMouseMoveForAxis("x"),(s.axis.y.isOverflowing||s.axis.y.forceVisible)&&s.onMouseMoveForAxis("y")},this.onMouseLeave=function(){s.onMouseMove.cancel(),(s.axis.x.isOverflowing||s.axis.x.forceVisible)&&s.onMouseLeaveForAxis("x"),(s.axis.y.isOverflowing||s.axis.y.forceVisible)&&s.onMouseLeaveForAxis("y"),s.mouseX=-1,s.mouseY=-1},this.onWindowResize=function(){s.scrollbarWidth=Ee(),s.hideNativeScrollbar()},this.hideScrollbars=function(){s.axis.x.track.rect=s.axis.x.track.el.getBoundingClientRect(),s.axis.y.track.rect=s.axis.y.track.el.getBoundingClientRect(),s.isWithinBounds(s.axis.y.track.rect)||(s.axis.y.scrollbar.el.classList.remove(s.classNames.visible),s.axis.y.isVisible=!1),s.isWithinBounds(s.axis.x.track.rect)||(s.axis.x.scrollbar.el.classList.remove(s.classNames.visible),s.axis.x.isVisible=!1)},this.onPointerEvent=function(t){var e,i;s.axis.x.scrollbar.rect=s.axis.x.scrollbar.el.getBoundingClientRect(),s.axis.y.scrollbar.rect=s.axis.y.scrollbar.el.getBoundingClientRect(),(s.axis.x.isOverflowing||s.axis.x.forceVisible)&&(i=s.isWithinBounds(s.axis.x.scrollbar.rect)),(s.axis.y.isOverflowing||s.axis.y.forceVisible)&&(e=s.isWithinBounds(s.axis.y.scrollbar.rect)),(e||i)&&(t.preventDefault(),t.stopPropagation(),"mousedown"===t.type&&(e&&s.onDragStart(t,"y"),i&&s.onDragStart(t,"x")))},this.drag=function(t){var e=s.axis[s.draggedAxis].track,i=e.rect[s.axis[s.draggedAxis].sizeAttr],r=s.axis[s.draggedAxis].scrollbar;t.preventDefault(),t.stopPropagation();var n=(("y"===s.draggedAxis?t.pageY:t.pageX)-e.rect[s.axis[s.draggedAxis].offsetAttr]-s.axis[s.draggedAxis].dragOffset)/e.rect[s.axis[s.draggedAxis].sizeAttr]*s.contentWrapperEl[s.axis[s.draggedAxis].scrollSizeAttr];"x"===s.draggedAxis&&(n=s.isRtl&&l.getRtlHelpers().isRtlScrollbarInverted?n-(i+r.size):n,n=s.isRtl&&l.getRtlHelpers().isRtlScrollingInverted?-n:n),s.contentWrapperEl[s.axis[s.draggedAxis].scrollOffsetAttr]=n},this.onEndDrag=function(t){t.preventDefault(),t.stopPropagation(),s.el.classList.remove(s.classNames.dragging),document.removeEventListener("mousemove",s.drag),document.removeEventListener("mouseup",s.onEndDrag)},this.el=t,this.flashTimeout,this.contentEl,this.contentWrapperEl,this.offsetEl,this.maskEl,this.globalObserver,this.mutationObserver,this.resizeObserver,this.scrollbarWidth,this.minScrollbarWidth=20,this.options=Object.assign({},l.defaultOptions,e),this.classNames=Object.assign({},l.defaultOptions.classNames,this.options.classNames),this.isRtl,this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.el.SimpleBar||(this.recalculate=Ie(this.recalculate.bind(this),64),this.onMouseMove=Ie(this.onMouseMove.bind(this),64),this.hideScrollbars=ri(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=ri(this.onWindowResize.bind(this),64,{leading:!0}),l.getRtlHelpers=Ni(l.getRtlHelpers),this.init())}l.getRtlHelpers=function(){var t=document.createElement("div");t.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var e=t.firstElementChild;document.body.appendChild(e);var i=e.firstElementChild;e.scrollLeft=0;var r=l.getOffset(e),n=l.getOffset(i);e.scrollLeft=999;var s=l.getOffset(i);return{isRtlScrollingInverted:r.left!==n.left&&n.left-s.left!=0,isRtlScrollbarInverted:r.left!==n.left}},l.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(function(t){t.forEach(function(t){Array.prototype.forEach.call(t.addedNodes,function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?!t.SimpleBar&&new l(t,l.getElOptions(t)):Array.prototype.forEach.call(t.querySelectorAll("[data-simplebar]"),function(t){!t.SimpleBar&&new l(t,l.getElOptions(t))}))}),Array.prototype.forEach.call(t.removedNodes,function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?t.SimpleBar&&t.SimpleBar.unMount():Array.prototype.forEach.call(t.querySelectorAll("[data-simplebar]"),function(t){t.SimpleBar&&t.SimpleBar.unMount()}))})})}),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},l.getElOptions=function(t){return Array.prototype.reduce.call(t.attributes,function(t,e){var i=e.name.match(/data-simplebar-(.+)/);if(i){var r=i[1].replace(/\W+(.)/g,function(t,e){return e.toUpperCase()});switch(e.value){case"true":t[r]=!0;break;case"false":t[r]=!1;break;case void 0:t[r]=!0;break;default:t[r]=e.value}}return t},{})},l.removeObserver=function(){this.globalObserver.disconnect()},l.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),function(t){t.SimpleBar||new l(t,l.getElOptions(t))})},l.getOffset=function(t){var e=t.getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft)}};var t=l.prototype;return t.init=function(){this.el.SimpleBar=this,nr&&(this.initDOM(),this.scrollbarWidth=Ee(),this.recalculate(),this.initListeners())},t.initDOM=function(){var e=this;if(Array.prototype.filter.call(this.el.children,function(t){return t.classList.contains(e.classNames.wrapper)}).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.el.querySelector("."+this.classNames.contentWrapper),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.contentEl=this.el.querySelector("."+this.classNames.contentEl),this.placeholderEl=this.el.querySelector("."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.el.querySelector("."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.el.querySelector("."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var t=document.createElement("div"),i=document.createElement("div");t.classList.add(this.classNames.track),i.classList.add(this.classNames.scrollbar),t.appendChild(i),this.axis.x.track.el=t.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=t.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.initListeners=function(){var e=this;this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick","touchstart","touchend","touchmove"].forEach(function(t){e.el.addEventListener(t,e.onPointerEvent,!0)}),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),window.addEventListener("resize",this.onWindowResize),this.resizeObserver=new rr(this.recalculate),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl)},t.recalculate=function(){var t=this.heightAutoObserverEl.offsetHeight<=1,e=this.heightAutoObserverEl.offsetWidth<=1;this.elStyles=window.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction,this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft,this.contentWrapperEl.style.height=t?"auto":"100%",this.placeholderEl.style.width=e?this.contentEl.offsetWidth+"px":"auto",this.placeholderEl.style.height=this.contentEl.scrollHeight+"px",this.axis.x.isOverflowing=this.contentWrapperEl.scrollWidth>this.contentWrapperEl.offsetWidth,this.axis.y.isOverflowing=this.contentWrapperEl.scrollHeight>this.contentWrapperEl.offsetHeight,this.axis.x.isOverflowing="hidden"!==this.elStyles.overflowX&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==this.elStyles.overflowY&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar(),this.axis.x.track.rect=this.axis.x.track.el.getBoundingClientRect(),this.axis.y.track.rect=this.axis.y.track.el.getBoundingClientRect(),this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},t.getScrollbarSize=function(t){void 0===t&&(t="y");var e,i=this.scrollbarWidth?this.contentWrapperEl[this.axis[t].scrollSizeAttr]:this.contentWrapperEl[this.axis[t].scrollSizeAttr]-this.minScrollbarWidth,r=this.axis[t].track.rect[this.axis[t].sizeAttr];if(this.axis[t].isOverflowing){var n=r/i;return e=Math.max(~~(n*r),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(e=Math.min(e,this.options.scrollbarMaxSize)),e}},t.positionScrollbar=function(t){void 0===t&&(t="y");var e=this.contentWrapperEl[this.axis[t].scrollSizeAttr],i=this.axis[t].track.rect[this.axis[t].sizeAttr],r=parseInt(this.elStyles[this.axis[t].sizeAttr],10),n=this.axis[t].scrollbar,s=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],o=(s="x"===t&&this.isRtl&&l.getRtlHelpers().isRtlScrollingInverted?-s:s)/(e-r),a=~~((i-n.size)*o);a="x"===t&&this.isRtl&&l.getRtlHelpers().isRtlScrollbarInverted?a+(i-n.size):a,n.el.style.transform="x"===t?"translate3d("+a+"px, 0, 0)":"translate3d(0, "+a+"px, 0)"},t.toggleTrackVisibility=function(t){void 0===t&&(t="y");var e=this.axis[t].track.el,i=this.axis[t].scrollbar.el;this.axis[t].isOverflowing||this.axis[t].forceVisible?(e.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll"):(e.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden"),this.axis[t].isOverflowing?i.style.display="block":i.style.display="none"},t.hideNativeScrollbar=function(){if(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+(this.scrollbarWidth||this.minScrollbarWidth)+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+(this.scrollbarWidth||this.minScrollbarWidth)+"px":0,!this.scrollbarWidth){var t=[this.isRtl?"paddingLeft":"paddingRight"];this.contentWrapperEl.style[t]=this.axis.y.isOverflowing||this.axis.y.forceVisible?this.minScrollbarWidth+"px":0,this.contentWrapperEl.style.paddingBottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?this.minScrollbarWidth+"px":0}},t.onMouseMoveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.rect=this.axis[t].track.el.getBoundingClientRect(),this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[t].scrollbar.rect)?this.axis[t].scrollbar.el.classList.add(this.classNames.hover):this.axis[t].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[t].track.rect)?(this.showScrollbar(t),this.axis[t].track.el.classList.add(this.classNames.hover)):this.axis[t].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.el.classList.remove(this.classNames.hover),this.axis[t].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(t){void 0===t&&(t="y");var e=this.axis[t].scrollbar.el;this.axis[t].isVisible||(e.classList.add(this.classNames.visible),this.axis[t].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(t,e){void 0===e&&(e="y");var i=this.axis[e].scrollbar.el,r="y"===e?t.pageY:t.pageX;this.axis[e].dragOffset=r-i.getBoundingClientRect()[this.axis[e].offsetAttr],this.draggedAxis=e,this.el.classList.add(this.classNames.dragging),document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.onEndDrag)},t.getContentElement=function(){return this.contentEl},t.getScrollElement=function(){return this.contentWrapperEl},t.removeListeners=function(){var e=this;this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick","touchstart","touchend","touchmove"].forEach(function(t){e.el.removeEventListener(t,e.onPointerEvent)}),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.removeEventListener("scroll",this.onScroll),window.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},t.unMount=function(){this.removeListeners(),this.el.SimpleBar=null},t.isChildNode=function(t){return null!==t&&(t===this.el||this.isChildNode(t.parentNode))},t.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},l}();return sr.defaultOptions={autoHide:!0,forceVisible:!1,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},nr&&sr.initHtmlApi(),sr});
|
assets/js/um-functions.js
CHANGED
@@ -707,12 +707,6 @@ function remove_Modal() {
|
|
707 |
if ( jQuery('.um-popup-overlay').length ) {
|
708 |
jQuery( document ).trigger( 'um_before_modal_removed' );
|
709 |
|
710 |
-
if ( jQuery('.um-popup-autogrow:visible').length ) {
|
711 |
-
jQuery('.um-popup-autogrow:visible').mCustomScrollbar("destroy");
|
712 |
-
} else if ( jQuery('.um-popup-autogrow2:visible').length ) {
|
713 |
-
jQuery('.um-popup-autogrow2:visible').mCustomScrollbar("destroy");
|
714 |
-
}
|
715 |
-
|
716 |
jQuery('.tipsy').remove();
|
717 |
jQuery('.um-popup').empty().remove();
|
718 |
jQuery('.um-popup-overlay').empty().remove();
|
@@ -733,7 +727,7 @@ function show_Modal( contents ) {
|
|
733 |
function responsive_Modal() {
|
734 |
if ( jQuery('.um-popup-overlay').length ) {
|
735 |
|
736 |
-
ag_height = jQuery(window).height() - jQuery('.um-popup um-popup-header').outerHeight() - jQuery('.um-popup .um-popup-footer').outerHeight() - 80;
|
737 |
if ( ag_height > 350 ) {
|
738 |
ag_height = 350;
|
739 |
}
|
@@ -741,12 +735,10 @@ function responsive_Modal() {
|
|
741 |
if ( jQuery('.um-popup-autogrow:visible').length ) {
|
742 |
|
743 |
jQuery('.um-popup-autogrow:visible').css({'height': ag_height + 'px'});
|
744 |
-
jQuery('.um-popup-autogrow:visible').mCustomScrollbar({ theme:"dark-3", mouseWheelPixels:500 }).mCustomScrollbar("scrollTo", "bottom",{ scrollInertia:0} );
|
745 |
|
746 |
} else if ( jQuery('.um-popup-autogrow2:visible').length ) {
|
747 |
|
748 |
jQuery('.um-popup-autogrow2:visible').css({'max-height': ag_height + 'px'});
|
749 |
-
jQuery('.um-popup-autogrow2:visible').mCustomScrollbar({ theme:"dark-3", mouseWheelPixels:500 });
|
750 |
|
751 |
}
|
752 |
}
|
707 |
if ( jQuery('.um-popup-overlay').length ) {
|
708 |
jQuery( document ).trigger( 'um_before_modal_removed' );
|
709 |
|
|
|
|
|
|
|
|
|
|
|
|
|
710 |
jQuery('.tipsy').remove();
|
711 |
jQuery('.um-popup').empty().remove();
|
712 |
jQuery('.um-popup-overlay').empty().remove();
|
727 |
function responsive_Modal() {
|
728 |
if ( jQuery('.um-popup-overlay').length ) {
|
729 |
|
730 |
+
ag_height = jQuery(window).height() - jQuery('.um-popup .um-popup-header').outerHeight() - jQuery('.um-popup .um-popup-footer').outerHeight() - 80;
|
731 |
if ( ag_height > 350 ) {
|
732 |
ag_height = 350;
|
733 |
}
|
735 |
if ( jQuery('.um-popup-autogrow:visible').length ) {
|
736 |
|
737 |
jQuery('.um-popup-autogrow:visible').css({'height': ag_height + 'px'});
|
|
|
738 |
|
739 |
} else if ( jQuery('.um-popup-autogrow2:visible').length ) {
|
740 |
|
741 |
jQuery('.um-popup-autogrow2:visible').css({'max-height': ag_height + 'px'});
|
|
|
742 |
|
743 |
}
|
744 |
}
|
assets/js/um-functions.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function UM_check_password_matched(){jQuery(document).on("keyup","input[data-key=user_password],input[data-key=confirm_user_password]",function(e){var t=jQuery("input[data-key=user_password]").val(),a=jQuery("input[data-key=confirm_user_password]").val(),o=jQuery("input[data-key=user_password],input[data-key=confirm_user_password]");t||a?t!==a?o.removeClass("um-validate-matched").addClass("um-validate-not-matched"):o.removeClass("um-validate-not-matched").addClass("um-validate-matched"):o.removeClass("um-validate-matched").removeClass("um-validate-not-matched")})}function UM_hide_menus(){menu=jQuery(".um-dropdown"),menu.parents("div").find("a").removeClass("active"),menu.hide()}function UM_domenus(){jQuery(".um-dropdown").each(function(){var e=jQuery(this),t=jQuery(this).attr("data-element"),a=jQuery(this).attr("data-position");jQuery(t).addClass("um-trigger-menu-on-"+e.attr("data-trigger")),jQuery(window).width()<=1200&&"div.um-profile-edit"==t&&(a="lc"),"lc"==a&&(jQuery(t).find("img").width()<200?left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2+(jQuery(t).find("img").width()-200)/2:left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2,top_=parseInt(jQuery(t).find("a").css("top")),top_?(top_p=jQuery(t).find("img").height()+4+top_,left_gap=4):(top_p=jQuery(t).find("img").height()+4,left_gap=0),4==top_p&&"div.um-cover"==t?top_p=jQuery(t).height()/2+e.height()/2:4==top_p&&(top_p=jQuery(t).height()+20),gap_right=jQuery(t).width()+17,e.css({top:0,width:200,left:"auto",right:gap_right+"px","text-align":"center"}),e.find(".um-dropdown-arr").find("i").removeClass().addClass("um-icon-arrow-right-b"),e.find(".um-dropdown-arr").css({top:"4px",left:"auto",right:"-17px"})),"bc"==a&&(jQuery(t).find("img").width()<200?left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2+(jQuery(t).find("img").width()-200)/2:left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2,top_=parseInt(jQuery(t).find("a").css("top")),top_?(top_p=jQuery(t).find("img").height()+4+top_,left_gap=4):(top_p=jQuery(t).find("img").height()+4,left_gap=0),4==top_p&&"div.um-cover"==t?top_p=jQuery(t).height()/2+e.height()/2:4==top_p&&(top_p=jQuery(t).height()+20),e.css({top:top_p,width:200,left:left_p+left_gap,right:"auto","text-align":"center"}),e.find(".um-dropdown-arr").find("i").removeClass().addClass("um-icon-arrow-up-b"),e.find(".um-dropdown-arr").css({top:"-17px",left:e.width()/2-12,right:"auto"}))})}function um_responsive(){jQuery(".um").each(function(){element_width=jQuery(this).width(),element_width<=340?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob340")):element_width<=500?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob500")):element_width<=800?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob800")):element_width<=960?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob960")):960<element_width&&(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960")),0<jQuery(".um-account-nav").length&&jQuery(".um-account-side").is(":visible")&&0==jQuery(".um-account-tab:visible").length&&jQuery(".um-account-side li a.current").trigger("click"),jQuery(this).css("opacity",1)}),jQuery(".um-cover, .um-member-cover, .um-cover-e").each(function(){var e=jQuery(this),t=e.data("ratio"),a=e.width(),o=t.split(":");calcHeight=Math.round(a/o[0])+"px",e.height(calcHeight),e.find(".um-cover-add").height(calcHeight)}),jQuery(".um-members").each(function(){UM_Member_Grid(jQuery(this))}),UM_domenus()}function UM_Member_Grid(e){e.masonry({itemSelector:".um-member",columnWidth:".um-member",gutter:".um-gutter-sizer"})}function initImageUpload_UM(r){r.data("upload_help_text")?upload_help_text='<span class="help">'+r.data("upload_help_text")+"</span>":upload_help_text="",r.data("icon")?icon='<span class="icon"><i class="'+r.data("icon")+'"></i></span>':icon="",r.data("upload_text")?upload_text='<span class="str">'+r.data("upload_text")+"</span>":upload_text="";var e=0;jQuery("#um_upload_single:visible").data("user_id")&&(e=jQuery("#um_upload_single:visible").data("user_id")),r.uploadFile({url:wp.ajax.settings.url,method:"POST",multiple:!1,formData:{action:"um_imageupload",key:r.data("key"),set_id:r.data("set_id"),set_mode:r.data("set_mode"),_wpnonce:r.data("nonce"),timestamp:r.data("timestamp"),user_id:e},fileName:r.data("key"),allowedTypes:r.data("allowed_types"),maxFileSize:r.data("max_size"),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:r.data("max_size_error"),extErrorStr:r.data("extension_error"),maxFileCountErrorStr:r.data("max_files_error"),maxFileCount:1,showDelete:!1,showAbort:!1,showDone:!1,showFileCounter:!1,showStatusAfterSuccess:!0,returnType:"json",onSubmit:function(e){r.parents(".um-modal-body").find(".um-error-block").remove()},onSuccess:function(e,t,a){r.selectedFiles=0,t.success&&0==t.success||void 0!==t.data.error?(r.parents(".um-modal-body").append('<div class="um-error-block">'+t.data.error+"</div>"),r.parents(".um-modal-body").find(".upload-statusbar").hide(0),um_modal_responsive()):jQuery.each(t.data,function(e,t){var a=r.parents(".um-modal-body").find(".um-single-image-preview img"),o=r.parents(".um-modal-body").find(".um-single-image-preview"),i=new Date;a.attr("src",t.url+"?"+i.getTime()),a.data("file",t.file),a.load(function(){r.parents(".um-modal-body").find(".um-modal-btn.um-finish-upload.disabled").removeClass("disabled"),r.parents(".um-modal-body").find(".ajax-upload-dragdrop,.upload-statusbar").hide(0),o.show(0),um_modal_responsive()})})},onError:function(e){console.log(e)}})}function initFileUpload_UM(o){o.data("upload_help_text")?upload_help_text='<span class="help">'+o.data("upload_help_text")+"</span>":upload_help_text="",o.data("icon")?icon='<span class="icon"><i class="'+o.data("icon")+'"></i></span>':icon="",o.data("upload_text")?upload_text='<span class="str">'+o.data("upload_text")+"</span>":upload_text="",jQuery("#um_upload_single:visible").data("user_id")&&(user_id=jQuery("#um_upload_single:visible").data("user_id")),o.uploadFile({url:wp.ajax.settings.url,method:"POST",multiple:!1,formData:{action:"um_fileupload",key:o.data("key"),set_id:o.data("set_id"),user_id:o.data("user_id"),set_mode:o.data("set_mode"),_wpnonce:o.data("nonce"),timestamp:o.data("timestamp")},fileName:o.data("key"),allowedTypes:o.data("allowed_types"),maxFileSize:o.data("max_size"),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:o.data("max_size_error"),extErrorStr:o.data("extension_error"),maxFileCountErrorStr:o.data("max_files_error"),maxFileCount:1,showDelete:!1,showAbort:!1,showDone:!1,showFileCounter:!1,showStatusAfterSuccess:!0,onSubmit:function(e){o.parents(".um-modal-body").find(".um-error-block").remove()},onSuccess:function(e,t,a){o.selectedFiles=0,t.success&&0==t.success||void 0!==t.data.error?(o.parents(".um-modal-body").append('<div class="um-error-block">'+t.data.error+"</div>"),o.parents(".um-modal-body").find(".upload-statusbar").hide(0)):jQuery.each(t.data,function(e,t){o.parents(".um-modal-body").find(".um-modal-btn.um-finish-upload.disabled").removeClass("disabled"),o.parents(".um-modal-body").find(".ajax-upload-dragdrop,.upload-statusbar").hide(0),o.parents(".um-modal-body").find(".um-single-file-preview").show(0),"icon"==e?o.parents(".um-modal-body").find(".um-single-fileinfo i").removeClass().addClass(t):"icon_bg"==e?o.parents(".um-modal-body").find(".um-single-fileinfo span.icon").css({"background-color":t}):"filename"==e?o.parents(".um-modal-body").find(".um-single-fileinfo a").attr("data-file",t):"original_name"==e?(o.parents(".um-modal-body").find(".um-single-fileinfo a").attr("data-orignal-name",t),o.parents(".um-modal-body").find(".um-single-fileinfo span.filename").html(t)):"url"==e&&o.parents(".um-modal-body").find(".um-single-fileinfo a").attr("href",t)}),setTimeout(function(){um_modal_responsive()},1e3)},onError:function(e){console.log(e)}})}function initCrop_UM(){var t=jQuery(".um-modal .um-single-image-preview img").first(),e=jQuery(".um-modal .um-single-image-preview"),a=t.parent().attr("data-crop"),o=t.parent().attr("data-min_width"),i=t.parent().attr("data-min_height"),r=t.parent().attr("data-ratio");if(jQuery(".um-modal").find("#um_upload_single").attr("data-ratio"))r=(r=jQuery(".um-modal").find("#um_upload_single").attr("data-ratio")).split(":")[0];if(t.length&&""!=t.attr("src")){var u=jQuery(window).height()-(jQuery(".um-modal-footer a").height()+20)-50-jQuery(".um-modal-header:visible").height();if(t.css({height:"auto"}),e.css({height:"auto"}),jQuery(window).height()<=400?(e.css({height:u+"px","max-height":u+"px"}),t.css({height:"auto"})):(t.css({height:"auto","max-height":u+"px"}),e.css({height:t.height(),"max-height":u+"px"})),"square"==a)var d={minWidth:o,minHeight:i,dragCrop:!1,aspectRatio:1,zoomable:!1,rotatable:!1,dashed:!1,done:function(e){t.parent().attr("data-coord",Math.round(e.x)+","+Math.round(e.y)+","+Math.round(e.width)+","+Math.round(e.height))}};else if("cover"==a){0<Math.round(o/r)&&(i=Math.round(o/r));d={minWidth:o,minHeight:i,dragCrop:!1,aspectRatio:r,zoomable:!1,rotatable:!1,dashed:!1,done:function(e){t.parent().attr("data-coord",Math.round(e.x)+","+Math.round(e.y)+","+Math.round(e.width)+","+Math.round(e.height))}}}else if("user"==a)d={minWidth:o,minHeight:i,dragCrop:!0,aspectRatio:"auto",zoomable:!1,rotatable:!1,dashed:!1,done:function(e){t.parent().attr("data-coord",Math.round(e.x)+","+Math.round(e.y)+","+Math.round(e.width)+","+Math.round(e.height))}};0!=a&&(t.cropper(d),jQuery(".um-single-image-preview img.cropper-hidden").cropper("destroy"),jQuery(".um-single-image-preview img.lazyloaded").addClass("cropper-hidden"),jQuery(".um-single-image-preview img.lazyloaded").removeClass("lazyloaded"),jQuery(".um-single-image-preview .cropper-container").append('<div class="um-clear"></div>'))}}function um_new_modal(e,t,a,o){if(0==jQuery("body").find(".um-modal-overlay").length)if(jQuery(".tipsy").hide(),UM_hide_menus(),jQuery("body,html,textarea").css("overflow","hidden"),jQuery(document).bind("touchmove",function(e){e.preventDefault()}),jQuery(".um-modal").on("touchmove",function(e){e.stopPropagation()}),a?jQuery("body").append('<div class="um-modal-overlay"></div><div class="um-modal is-photo"></div>'):jQuery("body").append('<div class="um-modal-overlay"></div><div class="um-modal no-photo"></div>'),jQuery("#"+e).prependTo(".um-modal"),a){jQuery(".um-modal").find(".um-modal-photo").html("<img />");var i=jQuery(".um-modal-photo img"),r=jQuery(window).width()-60,u=jQuery(window).height()-.25*jQuery(window).height();i.attr("src",o),i.load(function(){jQuery("#"+e).show(),jQuery(".um-modal").show(),i.css({opacity:0}),i.css({"max-width":r}),i.css({"max-height":u}),jQuery(".um-modal").css({width:i.width(),"margin-left":"-"+i.width()/2+"px"}),i.animate({opacity:1},1e3),um_modal_responsive()})}else jQuery("#"+e).show(),jQuery(".um-modal").show(),um_modal_size(t),initImageUpload_UM(jQuery(".um-modal:visible").find(".um-single-image-upload")),initFileUpload_UM(jQuery(".um-modal:visible").find(".um-single-file-upload")),um_modal_responsive()}function um_modal_responsive(){var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,a=jQuery(".um-modal:visible");if(jQuery(".um-modal-body.photo:visible").length){a.removeClass("uimob340"),a.removeClass("uimob500");var o=jQuery(".um-modal-photo img"),i=e-60,r=t-.25*t;o.css({opacity:0}),o.css({"max-width":i}),o.css({"max-height":r}),jQuery(".um-modal").css({width:o.width(),"margin-left":"-"+o.width()/2+"px"}),o.animate({opacity:1},1e3);var u=(t-a.innerHeight())/2+"px";a.animate({bottom:u},300)}else if(a.length)if(a.removeClass("uimob340"),a.removeClass("uimob500"),e<=340)a.addClass("uimob340"),initCrop_UM(),a.animate({bottom:0},300);else if(e<=500)a.addClass("uimob500"),initCrop_UM(),a.animate({bottom:0},300);else if(e<=800){initCrop_UM();u=(t-a.innerHeight())/2+"px";a.animate({bottom:u},300)}else if(e<=960){initCrop_UM();u=(t-a.innerHeight())/2+"px";a.animate({bottom:u},300)}else if(960<e){initCrop_UM();u=(t-a.innerHeight())/2+"px";a.animate({bottom:u},300)}}function um_remove_modal(){jQuery("img.cropper-hidden").cropper("destroy"),jQuery("body,html,textarea").css("overflow","auto"),jQuery(document).unbind("touchmove"),jQuery('.um-modal div[id^="um_"]').hide().appendTo("body"),jQuery(".um-modal,.um-modal-overlay").remove()}function um_modal_size(e){jQuery(".um-modal:visible").addClass(e)}function um_modal_add_attr(e,t){jQuery(".um-modal:visible").data(e,t)}function prepare_Modal(){0==jQuery(".um-popup-overlay").length&&(jQuery("body").append('<div class="um-popup-overlay"></div>'),jQuery("body").append('<div class="um-popup"></div>'),jQuery(".um-popup").addClass("loading"),jQuery("body,html").css({overflow:"hidden"}))}function remove_Modal(){jQuery(".um-popup-overlay").length&&(jQuery(document).trigger("um_before_modal_removed"),jQuery(".um-popup-autogrow:visible").length?jQuery(".um-popup-autogrow:visible").mCustomScrollbar("destroy"):jQuery(".um-popup-autogrow2:visible").length&&jQuery(".um-popup-autogrow2:visible").mCustomScrollbar("destroy"),jQuery(".tipsy").remove(),jQuery(".um-popup").empty().remove(),jQuery(".um-popup-overlay").empty().remove(),jQuery("body,html").css({overflow:"auto"}))}function show_Modal(e){jQuery(".um-popup-overlay").length&&(jQuery(".um-popup").removeClass("loading").html(e),jQuery(".um-tip-n").tipsy({gravity:"n",opacity:1,offset:3}),jQuery(".um-tip-w").tipsy({gravity:"w",opacity:1,offset:3}),jQuery(".um-tip-e").tipsy({gravity:"e",opacity:1,offset:3}),jQuery(".um-tip-s").tipsy({gravity:"s",opacity:1,offset:3}))}function responsive_Modal(){jQuery(".um-popup-overlay").length&&(ag_height=jQuery(window).height()-jQuery(".um-popup um-popup-header").outerHeight()-jQuery(".um-popup .um-popup-footer").outerHeight()-80,350<ag_height&&(ag_height=350),jQuery(".um-popup-autogrow:visible").length?(jQuery(".um-popup-autogrow:visible").css({height:ag_height+"px"}),jQuery(".um-popup-autogrow:visible").mCustomScrollbar({theme:"dark-3",mouseWheelPixels:500}).mCustomScrollbar("scrollTo","bottom",{scrollInertia:0})):jQuery(".um-popup-autogrow2:visible").length&&(jQuery(".um-popup-autogrow2:visible").css({"max-height":ag_height+"px"}),jQuery(".um-popup-autogrow2:visible").mCustomScrollbar({theme:"dark-3",mouseWheelPixels:500})))}function um_reset_field(e){jQuery(e).find("div.um-field-area").find("input,textarea,select").not(":button, :submit, :reset, :hidden").val("").removeAttr("checked").removeAttr("selected")}function um_selected(e,t){if(e==t)return"selected='selected'"}jQuery(function(){jQuery(".um-search form *").keypress(function(e){if(13==e.which)return jQuery(".um-search form").submit(),!1}),2==jQuery("input[data-key=user_password],input[data-key=confirm_user_password]").length&&UM_check_password_matched()});
|
1 |
+
function UM_check_password_matched(){jQuery(document).on("keyup","input[data-key=user_password],input[data-key=confirm_user_password]",function(e){var t=jQuery("input[data-key=user_password]").val(),a=jQuery("input[data-key=confirm_user_password]").val(),i=jQuery("input[data-key=user_password],input[data-key=confirm_user_password]");t||a?t!==a?i.removeClass("um-validate-matched").addClass("um-validate-not-matched"):i.removeClass("um-validate-not-matched").addClass("um-validate-matched"):i.removeClass("um-validate-matched").removeClass("um-validate-not-matched")})}function UM_hide_menus(){menu=jQuery(".um-dropdown"),menu.parents("div").find("a").removeClass("active"),menu.hide()}function UM_domenus(){jQuery(".um-dropdown").each(function(){var e=jQuery(this),t=jQuery(this).attr("data-element"),a=jQuery(this).attr("data-position");jQuery(t).addClass("um-trigger-menu-on-"+e.attr("data-trigger")),jQuery(window).width()<=1200&&"div.um-profile-edit"==t&&(a="lc"),"lc"==a&&(jQuery(t).find("img").width()<200?left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2+(jQuery(t).find("img").width()-200)/2:left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2,top_=parseInt(jQuery(t).find("a").css("top")),top_?(top_p=jQuery(t).find("img").height()+4+top_,left_gap=4):(top_p=jQuery(t).find("img").height()+4,left_gap=0),4==top_p&&"div.um-cover"==t?top_p=jQuery(t).height()/2+e.height()/2:4==top_p&&(top_p=jQuery(t).height()+20),gap_right=jQuery(t).width()+17,e.css({top:0,width:200,left:"auto",right:gap_right+"px","text-align":"center"}),e.find(".um-dropdown-arr").find("i").removeClass().addClass("um-icon-arrow-right-b"),e.find(".um-dropdown-arr").css({top:"4px",left:"auto",right:"-17px"})),"bc"==a&&(jQuery(t).find("img").width()<200?left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2+(jQuery(t).find("img").width()-200)/2:left_p=(jQuery(t).width()-jQuery(t).find("img").width())/2,top_=parseInt(jQuery(t).find("a").css("top")),top_?(top_p=jQuery(t).find("img").height()+4+top_,left_gap=4):(top_p=jQuery(t).find("img").height()+4,left_gap=0),4==top_p&&"div.um-cover"==t?top_p=jQuery(t).height()/2+e.height()/2:4==top_p&&(top_p=jQuery(t).height()+20),e.css({top:top_p,width:200,left:left_p+left_gap,right:"auto","text-align":"center"}),e.find(".um-dropdown-arr").find("i").removeClass().addClass("um-icon-arrow-up-b"),e.find(".um-dropdown-arr").css({top:"-17px",left:e.width()/2-12,right:"auto"}))})}function um_responsive(){jQuery(".um").each(function(){element_width=jQuery(this).width(),element_width<=340?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob340")):element_width<=500?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob500")):element_width<=800?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob800")):element_width<=960?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob960")):960<element_width&&(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960")),0<jQuery(".um-account-nav").length&&jQuery(".um-account-side").is(":visible")&&0==jQuery(".um-account-tab:visible").length&&jQuery(".um-account-side li a.current").trigger("click"),jQuery(this).css("opacity",1)}),jQuery(".um-cover, .um-member-cover, .um-cover-e").each(function(){var e=jQuery(this),t=e.data("ratio"),a=e.width(),i=t.split(":");calcHeight=Math.round(a/i[0])+"px",e.height(calcHeight),e.find(".um-cover-add").height(calcHeight)}),jQuery(".um-members").each(function(){UM_Member_Grid(jQuery(this))}),UM_domenus()}function UM_Member_Grid(e){e.masonry({itemSelector:".um-member",columnWidth:".um-member",gutter:".um-gutter-sizer"})}function initImageUpload_UM(r){r.data("upload_help_text")?upload_help_text='<span class="help">'+r.data("upload_help_text")+"</span>":upload_help_text="",r.data("icon")?icon='<span class="icon"><i class="'+r.data("icon")+'"></i></span>':icon="",r.data("upload_text")?upload_text='<span class="str">'+r.data("upload_text")+"</span>":upload_text="";var e=0;jQuery("#um_upload_single:visible").data("user_id")&&(e=jQuery("#um_upload_single:visible").data("user_id")),r.uploadFile({url:wp.ajax.settings.url,method:"POST",multiple:!1,formData:{action:"um_imageupload",key:r.data("key"),set_id:r.data("set_id"),set_mode:r.data("set_mode"),_wpnonce:r.data("nonce"),timestamp:r.data("timestamp"),user_id:e},fileName:r.data("key"),allowedTypes:r.data("allowed_types"),maxFileSize:r.data("max_size"),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:r.data("max_size_error"),extErrorStr:r.data("extension_error"),maxFileCountErrorStr:r.data("max_files_error"),maxFileCount:1,showDelete:!1,showAbort:!1,showDone:!1,showFileCounter:!1,showStatusAfterSuccess:!0,returnType:"json",onSubmit:function(e){r.parents(".um-modal-body").find(".um-error-block").remove()},onSuccess:function(e,t,a){r.selectedFiles=0,t.success&&0==t.success||void 0!==t.data.error?(r.parents(".um-modal-body").append('<div class="um-error-block">'+t.data.error+"</div>"),r.parents(".um-modal-body").find(".upload-statusbar").hide(0),um_modal_responsive()):jQuery.each(t.data,function(e,t){var a=r.parents(".um-modal-body").find(".um-single-image-preview img"),i=r.parents(".um-modal-body").find(".um-single-image-preview"),o=new Date;a.attr("src",t.url+"?"+o.getTime()),a.data("file",t.file),a.load(function(){r.parents(".um-modal-body").find(".um-modal-btn.um-finish-upload.disabled").removeClass("disabled"),r.parents(".um-modal-body").find(".ajax-upload-dragdrop,.upload-statusbar").hide(0),i.show(0),um_modal_responsive()})})},onError:function(e){console.log(e)}})}function initFileUpload_UM(i){i.data("upload_help_text")?upload_help_text='<span class="help">'+i.data("upload_help_text")+"</span>":upload_help_text="",i.data("icon")?icon='<span class="icon"><i class="'+i.data("icon")+'"></i></span>':icon="",i.data("upload_text")?upload_text='<span class="str">'+i.data("upload_text")+"</span>":upload_text="",jQuery("#um_upload_single:visible").data("user_id")&&(user_id=jQuery("#um_upload_single:visible").data("user_id")),i.uploadFile({url:wp.ajax.settings.url,method:"POST",multiple:!1,formData:{action:"um_fileupload",key:i.data("key"),set_id:i.data("set_id"),user_id:i.data("user_id"),set_mode:i.data("set_mode"),_wpnonce:i.data("nonce"),timestamp:i.data("timestamp")},fileName:i.data("key"),allowedTypes:i.data("allowed_types"),maxFileSize:i.data("max_size"),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:i.data("max_size_error"),extErrorStr:i.data("extension_error"),maxFileCountErrorStr:i.data("max_files_error"),maxFileCount:1,showDelete:!1,showAbort:!1,showDone:!1,showFileCounter:!1,showStatusAfterSuccess:!0,onSubmit:function(e){i.parents(".um-modal-body").find(".um-error-block").remove()},onSuccess:function(e,t,a){i.selectedFiles=0,t.success&&0==t.success||void 0!==t.data.error?(i.parents(".um-modal-body").append('<div class="um-error-block">'+t.data.error+"</div>"),i.parents(".um-modal-body").find(".upload-statusbar").hide(0)):jQuery.each(t.data,function(e,t){i.parents(".um-modal-body").find(".um-modal-btn.um-finish-upload.disabled").removeClass("disabled"),i.parents(".um-modal-body").find(".ajax-upload-dragdrop,.upload-statusbar").hide(0),i.parents(".um-modal-body").find(".um-single-file-preview").show(0),"icon"==e?i.parents(".um-modal-body").find(".um-single-fileinfo i").removeClass().addClass(t):"icon_bg"==e?i.parents(".um-modal-body").find(".um-single-fileinfo span.icon").css({"background-color":t}):"filename"==e?i.parents(".um-modal-body").find(".um-single-fileinfo a").attr("data-file",t):"original_name"==e?(i.parents(".um-modal-body").find(".um-single-fileinfo a").attr("data-orignal-name",t),i.parents(".um-modal-body").find(".um-single-fileinfo span.filename").html(t)):"url"==e&&i.parents(".um-modal-body").find(".um-single-fileinfo a").attr("href",t)}),setTimeout(function(){um_modal_responsive()},1e3)},onError:function(e){console.log(e)}})}function initCrop_UM(){var t=jQuery(".um-modal .um-single-image-preview img").first(),e=jQuery(".um-modal .um-single-image-preview"),a=t.parent().attr("data-crop"),i=t.parent().attr("data-min_width"),o=t.parent().attr("data-min_height"),r=t.parent().attr("data-ratio");if(jQuery(".um-modal").find("#um_upload_single").attr("data-ratio"))r=(r=jQuery(".um-modal").find("#um_upload_single").attr("data-ratio")).split(":")[0];if(t.length&&""!=t.attr("src")){var u=jQuery(window).height()-(jQuery(".um-modal-footer a").height()+20)-50-jQuery(".um-modal-header:visible").height();if(t.css({height:"auto"}),e.css({height:"auto"}),jQuery(window).height()<=400?(e.css({height:u+"px","max-height":u+"px"}),t.css({height:"auto"})):(t.css({height:"auto","max-height":u+"px"}),e.css({height:t.height(),"max-height":u+"px"})),"square"==a)var d={minWidth:i,minHeight:o,dragCrop:!1,aspectRatio:1,zoomable:!1,rotatable:!1,dashed:!1,done:function(e){t.parent().attr("data-coord",Math.round(e.x)+","+Math.round(e.y)+","+Math.round(e.width)+","+Math.round(e.height))}};else if("cover"==a){0<Math.round(i/r)&&(o=Math.round(i/r));d={minWidth:i,minHeight:o,dragCrop:!1,aspectRatio:r,zoomable:!1,rotatable:!1,dashed:!1,done:function(e){t.parent().attr("data-coord",Math.round(e.x)+","+Math.round(e.y)+","+Math.round(e.width)+","+Math.round(e.height))}}}else if("user"==a)d={minWidth:i,minHeight:o,dragCrop:!0,aspectRatio:"auto",zoomable:!1,rotatable:!1,dashed:!1,done:function(e){t.parent().attr("data-coord",Math.round(e.x)+","+Math.round(e.y)+","+Math.round(e.width)+","+Math.round(e.height))}};0!=a&&(t.cropper(d),jQuery(".um-single-image-preview img.cropper-hidden").cropper("destroy"),jQuery(".um-single-image-preview img.lazyloaded").addClass("cropper-hidden"),jQuery(".um-single-image-preview img.lazyloaded").removeClass("lazyloaded"),jQuery(".um-single-image-preview .cropper-container").append('<div class="um-clear"></div>'))}}function um_new_modal(e,t,a,i){if(0==jQuery("body").find(".um-modal-overlay").length)if(jQuery(".tipsy").hide(),UM_hide_menus(),jQuery("body,html,textarea").css("overflow","hidden"),jQuery(document).bind("touchmove",function(e){e.preventDefault()}),jQuery(".um-modal").on("touchmove",function(e){e.stopPropagation()}),a?jQuery("body").append('<div class="um-modal-overlay"></div><div class="um-modal is-photo"></div>'):jQuery("body").append('<div class="um-modal-overlay"></div><div class="um-modal no-photo"></div>'),jQuery("#"+e).prependTo(".um-modal"),a){jQuery(".um-modal").find(".um-modal-photo").html("<img />");var o=jQuery(".um-modal-photo img"),r=jQuery(window).width()-60,u=jQuery(window).height()-.25*jQuery(window).height();o.attr("src",i),o.load(function(){jQuery("#"+e).show(),jQuery(".um-modal").show(),o.css({opacity:0}),o.css({"max-width":r}),o.css({"max-height":u}),jQuery(".um-modal").css({width:o.width(),"margin-left":"-"+o.width()/2+"px"}),o.animate({opacity:1},1e3),um_modal_responsive()})}else jQuery("#"+e).show(),jQuery(".um-modal").show(),um_modal_size(t),initImageUpload_UM(jQuery(".um-modal:visible").find(".um-single-image-upload")),initFileUpload_UM(jQuery(".um-modal:visible").find(".um-single-file-upload")),um_modal_responsive()}function um_modal_responsive(){var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,a=jQuery(".um-modal:visible");if(jQuery(".um-modal-body.photo:visible").length){a.removeClass("uimob340"),a.removeClass("uimob500");var i=jQuery(".um-modal-photo img"),o=e-60,r=t-.25*t;i.css({opacity:0}),i.css({"max-width":o}),i.css({"max-height":r}),jQuery(".um-modal").css({width:i.width(),"margin-left":"-"+i.width()/2+"px"}),i.animate({opacity:1},1e3);var u=(t-a.innerHeight())/2+"px";a.animate({bottom:u},300)}else if(a.length)if(a.removeClass("uimob340"),a.removeClass("uimob500"),e<=340)a.addClass("uimob340"),initCrop_UM(),a.animate({bottom:0},300);else if(e<=500)a.addClass("uimob500"),initCrop_UM(),a.animate({bottom:0},300);else if(e<=800){initCrop_UM();u=(t-a.innerHeight())/2+"px";a.animate({bottom:u},300)}else if(e<=960){initCrop_UM();u=(t-a.innerHeight())/2+"px";a.animate({bottom:u},300)}else if(960<e){initCrop_UM();u=(t-a.innerHeight())/2+"px";a.animate({bottom:u},300)}}function um_remove_modal(){jQuery("img.cropper-hidden").cropper("destroy"),jQuery("body,html,textarea").css("overflow","auto"),jQuery(document).unbind("touchmove"),jQuery('.um-modal div[id^="um_"]').hide().appendTo("body"),jQuery(".um-modal,.um-modal-overlay").remove()}function um_modal_size(e){jQuery(".um-modal:visible").addClass(e)}function um_modal_add_attr(e,t){jQuery(".um-modal:visible").data(e,t)}function prepare_Modal(){0==jQuery(".um-popup-overlay").length&&(jQuery("body").append('<div class="um-popup-overlay"></div>'),jQuery("body").append('<div class="um-popup"></div>'),jQuery(".um-popup").addClass("loading"),jQuery("body,html").css({overflow:"hidden"}))}function remove_Modal(){jQuery(".um-popup-overlay").length&&(jQuery(document).trigger("um_before_modal_removed"),jQuery(".tipsy").remove(),jQuery(".um-popup").empty().remove(),jQuery(".um-popup-overlay").empty().remove(),jQuery("body,html").css({overflow:"auto"}))}function show_Modal(e){jQuery(".um-popup-overlay").length&&(jQuery(".um-popup").removeClass("loading").html(e),jQuery(".um-tip-n").tipsy({gravity:"n",opacity:1,offset:3}),jQuery(".um-tip-w").tipsy({gravity:"w",opacity:1,offset:3}),jQuery(".um-tip-e").tipsy({gravity:"e",opacity:1,offset:3}),jQuery(".um-tip-s").tipsy({gravity:"s",opacity:1,offset:3}))}function responsive_Modal(){jQuery(".um-popup-overlay").length&&(ag_height=jQuery(window).height()-jQuery(".um-popup .um-popup-header").outerHeight()-jQuery(".um-popup .um-popup-footer").outerHeight()-80,350<ag_height&&(ag_height=350),jQuery(".um-popup-autogrow:visible").length?jQuery(".um-popup-autogrow:visible").css({height:ag_height+"px"}):jQuery(".um-popup-autogrow2:visible").length&&jQuery(".um-popup-autogrow2:visible").css({"max-height":ag_height+"px"}))}function um_reset_field(e){jQuery(e).find("div.um-field-area").find("input,textarea,select").not(":button, :submit, :reset, :hidden").val("").removeAttr("checked").removeAttr("selected")}function um_selected(e,t){if(e==t)return"selected='selected'"}jQuery(function(){jQuery(".um-search form *").keypress(function(e){if(13==e.which)return jQuery(".um-search form").submit(),!1}),2==jQuery("input[data-key=user_password],input[data-key=confirm_user_password]").length&&UM_check_password_matched()});
|
assets/js/um-scripts.js
CHANGED
@@ -2,254 +2,279 @@
|
|
2 |
if( jQuery(this).data('load-error') != undefined ) return;
|
3 |
jQuery(this).data('load-error', '1').attr('src', jQuery(this).data('default'));
|
4 |
});*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
jQuery(document).ready(function() {
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
allowClear: true,
|
200 |
-
});
|
201 |
-
|
202 |
-
jQuery(".um-s2").select2({
|
203 |
-
allowClear: false,
|
204 |
-
minimumResultsForSearch: 10
|
205 |
-
});
|
206 |
-
|
207 |
-
jQuery(document).on('click', '.um-field-group-head:not(.disabled)', function(){
|
208 |
-
var field = jQuery(this).parents('.um-field-group');
|
209 |
-
var limit = field.data('max_entries');
|
210 |
-
|
211 |
-
if ( field.find('.um-field-group-body').is(':hidden')){
|
212 |
-
field.find('.um-field-group-body').show();
|
213 |
-
} else {
|
214 |
-
field.find('.um-field-group-body:first').clone().appendTo( field );
|
215 |
-
}
|
216 |
-
|
217 |
-
increase_id = 0;
|
218 |
-
field.find('.um-field-group-body').each(function(){
|
219 |
-
increase_id++;
|
220 |
-
jQuery(this).find('input').each(function(){
|
221 |
-
var input = jQuery(this);
|
222 |
-
input.attr('id', input.data('key') + '-' + increase_id );
|
223 |
-
input.attr('name', input.data('key') + '-' + increase_id );
|
224 |
-
input.parent().parent().find('label').attr('for', input.data('key') + '-' + increase_id );
|
225 |
-
});
|
226 |
-
});
|
227 |
-
|
228 |
-
if ( limit > 0 && field.find('.um-field-group-body').length == limit ) {
|
229 |
-
|
230 |
-
jQuery(this).addClass('disabled');
|
231 |
-
|
232 |
-
}
|
233 |
-
});
|
234 |
-
|
235 |
-
jQuery(document).on('click', '.um-field-group-cancel', function(e){
|
236 |
-
e.preventDefault();
|
237 |
-
var field = jQuery(this).parents('.um-field-group');
|
238 |
-
|
239 |
-
var limit = field.data('max_entries');
|
240 |
-
|
241 |
-
if ( field.find('.um-field-group-body').length > 1 ) {
|
242 |
-
jQuery(this).parents('.um-field-group-body').remove();
|
243 |
-
} else {
|
244 |
-
jQuery(this).parents('.um-field-group-body').hide();
|
245 |
-
}
|
246 |
-
|
247 |
-
if ( limit > 0 && field.find('.um-field-group-body').length < limit ) {
|
248 |
-
field.find('.um-field-group-head').removeClass('disabled');
|
249 |
-
}
|
250 |
-
|
251 |
-
return false;
|
252 |
-
});
|
253 |
|
254 |
|
255 |
jQuery( document.body ).on( 'click', '.um-ajax-paginate', function(e) {
|
@@ -310,166 +335,166 @@ jQuery(document).ready(function() {
|
|
310 |
});
|
311 |
|
312 |
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
|
475 |
});
|
2 |
if( jQuery(this).data('load-error') != undefined ) return;
|
3 |
jQuery(this).data('load-error', '1').attr('src', jQuery(this).data('default'));
|
4 |
});*/
|
5 |
+
|
6 |
+
function um_init_datetimepicker() {
|
7 |
+
jQuery('.um-datepicker:not(.picker__input)').each(function(){
|
8 |
+
elem = jQuery(this);
|
9 |
+
|
10 |
+
if ( typeof elem.attr('data-disabled_weekdays') != 'undefined' && elem.attr('data-disabled_weekdays') != '' ) {
|
11 |
+
var disable = JSON.parse( elem.attr('data-disabled_weekdays') );
|
12 |
+
} else {
|
13 |
+
var disable = false;
|
14 |
+
}
|
15 |
+
|
16 |
+
var years_n = null;
|
17 |
+
if ( typeof elem.attr('data-years') != 'undefined' ) {
|
18 |
+
years_n = elem.attr('data-years');
|
19 |
+
}
|
20 |
+
|
21 |
+
var minRange = elem.attr('data-date_min');
|
22 |
+
var maxRange = elem.attr('data-date_max');
|
23 |
+
|
24 |
+
var minSplit = [], maxSplit = [];
|
25 |
+
if ( typeof minRange != 'undefined' ) {
|
26 |
+
minSplit = minRange.split(",");
|
27 |
+
}
|
28 |
+
if ( typeof maxRange != 'undefined' ) {
|
29 |
+
maxSplit = maxRange.split(",");
|
30 |
+
}
|
31 |
+
|
32 |
+
var min = minSplit.length ? new Date(minSplit) : null;
|
33 |
+
var max = minSplit.length ? new Date(maxSplit) : null;
|
34 |
+
|
35 |
+
// fix min date for safari
|
36 |
+
if ( min && min.toString() == 'Invalid Date' && minSplit.length == 3 ) {
|
37 |
+
var minDateString = minSplit[1] + '/' + minSplit[2] + '/' + minSplit[0];
|
38 |
+
min = new Date(Date.parse(minDateString));
|
39 |
+
}
|
40 |
+
|
41 |
+
// fix max date for safari
|
42 |
+
if ( max && max.toString() == 'Invalid Date' && maxSplit.length == 3 ) {
|
43 |
+
var maxDateString = maxSplit[1] + '/' + maxSplit[2] + '/' + maxSplit[0];
|
44 |
+
max = new Date(Date.parse(maxDateString));
|
45 |
+
}
|
46 |
+
|
47 |
+
var data = {
|
48 |
+
disable: disable,
|
49 |
+
format: elem.attr( 'data-format' ),
|
50 |
+
formatSubmit: 'yyyy/mm/dd',
|
51 |
+
hiddenName: true,
|
52 |
+
onOpen: function() { elem.blur(); },
|
53 |
+
onClose: function() { elem.blur(); }
|
54 |
+
};
|
55 |
+
|
56 |
+
if ( years_n !== null ) {
|
57 |
+
data.selectYears = years_n;
|
58 |
+
}
|
59 |
+
|
60 |
+
if ( min !== null ) {
|
61 |
+
data.min = min;
|
62 |
+
}
|
63 |
+
|
64 |
+
if ( max !== null ) {
|
65 |
+
data.max = max;
|
66 |
+
}
|
67 |
+
|
68 |
+
elem.pickadate( data );
|
69 |
+
});
|
70 |
+
|
71 |
+
jQuery('.um-timepicker:not(.picker__input)').each(function(){
|
72 |
+
elem = jQuery(this);
|
73 |
+
|
74 |
+
elem.pickatime({
|
75 |
+
format: elem.attr('data-format'),
|
76 |
+
interval: parseInt( elem.attr('data-intervals') ),
|
77 |
+
formatSubmit: 'HH:i',
|
78 |
+
hiddenName: true,
|
79 |
+
onOpen: function() { elem.blur(); },
|
80 |
+
onClose: function() { elem.blur(); }
|
81 |
+
});
|
82 |
+
});
|
83 |
+
}
|
84 |
+
|
85 |
jQuery(document).ready(function() {
|
86 |
|
87 |
+
jQuery(document).on('click', '.um-dropdown a', function(e){
|
88 |
+
|
89 |
+
return false;
|
90 |
+
});
|
91 |
+
|
92 |
+
jQuery(document).on('click', '.um-dropdown a.real_url', function(e){
|
93 |
+
|
94 |
+
window.location = jQuery(this).attr('href');
|
95 |
+
});
|
96 |
+
|
97 |
+
jQuery(document).on('click', '.um-trigger-menu-on-click', function(e){
|
98 |
+
jQuery('.um-dropdown').hide();
|
99 |
+
menu = jQuery(this).find('.um-dropdown');
|
100 |
+
menu.show();
|
101 |
+
return false;
|
102 |
+
});
|
103 |
+
|
104 |
+
jQuery(document).on('click', '.um-dropdown-hide', function(e){
|
105 |
+
UM_hide_menus();
|
106 |
+
});
|
107 |
+
|
108 |
+
jQuery(document).on('click', 'a.um-manual-trigger', function(){
|
109 |
+
var child = jQuery(this).attr('data-child');
|
110 |
+
var parent = jQuery(this).attr('data-parent');
|
111 |
+
jQuery(this).parents( parent ).find( child ).trigger('click');
|
112 |
+
});
|
113 |
+
|
114 |
+
jQuery('.um-tip-n').tipsy({gravity: 'n', opacity: 1, live: 'a.live', offset: 3 });
|
115 |
+
jQuery('.um-tip-w').tipsy({gravity: 'w', opacity: 1, live: 'a.live', offset: 3 });
|
116 |
+
jQuery('.um-tip-e').tipsy({gravity: 'e', opacity: 1, live: 'a.live', offset: 3 });
|
117 |
+
jQuery('.um-tip-s').tipsy({gravity: 's', opacity: 1, live: 'a.live', offset: 3 });
|
118 |
+
|
119 |
+
jQuery(document).on('change', '.um-field-area input[type=radio]', function(){
|
120 |
+
var field = jQuery(this).parents('.um-field-area');
|
121 |
+
var this_field = jQuery(this).parents('label');
|
122 |
+
field.find('.um-field-radio').removeClass('active');
|
123 |
+
field.find('.um-field-radio').find('i').removeAttr('class').addClass('um-icon-android-radio-button-off');
|
124 |
+
this_field.addClass('active');
|
125 |
+
this_field.find('i').removeAttr('class').addClass('um-icon-android-radio-button-on');
|
126 |
+
});
|
127 |
+
|
128 |
+
jQuery(document).on('change', '.um-field-area input[type=checkbox]', function(){
|
129 |
+
|
130 |
+
var field = jQuery(this).parents('.um-field-area');
|
131 |
+
var this_field = jQuery(this).parents('label');
|
132 |
+
if ( this_field.hasClass('active') ) {
|
133 |
+
this_field.removeClass('active');
|
134 |
+
this_field.find('i').removeAttr('class').addClass('um-icon-android-checkbox-outline-blank');
|
135 |
+
} else {
|
136 |
+
this_field.addClass('active');
|
137 |
+
this_field.find('i').removeAttr('class').addClass('um-icon-android-checkbox-outline');
|
138 |
+
}
|
139 |
+
});
|
140 |
+
|
141 |
+
|
142 |
+
um_init_datetimepicker();
|
143 |
+
|
144 |
+
jQuery('.um-rating').um_raty({
|
145 |
+
half: false,
|
146 |
+
starType: 'i',
|
147 |
+
number: function() {return jQuery(this).attr('data-number');},
|
148 |
+
score: function() {return jQuery(this).attr('data-score');},
|
149 |
+
scoreName: function(){return jQuery(this).attr('data-key');},
|
150 |
+
hints: false,
|
151 |
+
click: function( score, evt ) {
|
152 |
+
live_field = this.id;
|
153 |
+
live_value = score;
|
154 |
+
um_apply_conditions( jQuery(this), false );
|
155 |
+
}
|
156 |
+
});
|
157 |
+
|
158 |
+
jQuery('.um-rating-readonly').um_raty({
|
159 |
+
half: false,
|
160 |
+
starType: 'i',
|
161 |
+
number: function() {return jQuery(this).attr('data-number');},
|
162 |
+
score: function() {return jQuery(this).attr('data-score');},
|
163 |
+
scoreName: function(){return jQuery(this).attr('data-key');},
|
164 |
+
hints: false,
|
165 |
+
readOnly: true
|
166 |
+
});
|
167 |
+
|
168 |
+
jQuery(document).on('click', '.um .um-single-image-preview a.cancel', function(e){
|
169 |
+
e.preventDefault();
|
170 |
+
var parent = jQuery(this).parents('.um-field');
|
171 |
+
var src = jQuery(this).parents('.um-field').find('.um-single-image-preview img').attr('src');
|
172 |
+
parent.find('.um-single-image-preview img').attr('src','');
|
173 |
+
parent.find('.um-single-image-preview').hide();
|
174 |
+
parent.find('.um-btn-auto-width').html('Upload');
|
175 |
+
parent.find('input[type=hidden]').val('empty_file');
|
176 |
+
|
177 |
+
jQuery.ajax({
|
178 |
+
url: wp.ajax.settings.url,
|
179 |
+
type: 'post',
|
180 |
+
data: {
|
181 |
+
action: 'um_remove_file',
|
182 |
+
src: src,
|
183 |
+
nonce: um_scripts.nonce
|
184 |
+
}
|
185 |
+
});
|
186 |
+
|
187 |
+
return false;
|
188 |
+
});
|
189 |
+
|
190 |
+
jQuery(document).on('click', '.um .um-single-file-preview a.cancel', function(e){
|
191 |
+
e.preventDefault();
|
192 |
+
var parent = jQuery(this).parents('.um-field');
|
193 |
+
var src = jQuery(this).parents('.um-field').find('.um-single-fileinfo a').attr('href');
|
194 |
+
parent.find('.um-single-file-preview').hide();
|
195 |
+
parent.find('.um-btn-auto-width').html('Upload');
|
196 |
+
parent.find('input[type=hidden]').val('empty_file');
|
197 |
+
|
198 |
+
jQuery.ajax({
|
199 |
+
url: wp.ajax.settings.url,
|
200 |
+
type: 'post',
|
201 |
+
data: {
|
202 |
+
action: 'um_remove_file',
|
203 |
+
src: src,
|
204 |
+
nonce: um_scripts.nonce
|
205 |
+
}
|
206 |
+
});
|
207 |
+
|
208 |
+
return false;
|
209 |
+
});
|
210 |
+
|
211 |
+
jQuery('.um-s1,.um-s2').css({'display':'block'});
|
212 |
+
|
213 |
+
if( jQuery(".um-s1").length > 0 ){
|
214 |
+
jQuery(".um-s1").each(function () {
|
215 |
+
var select = jQuery(this);
|
216 |
+
if( select.val() === '' && select.attr('data-default') ) {
|
217 |
+
select.val(select.attr('data-default'));
|
218 |
+
}
|
219 |
+
});
|
220 |
+
}
|
221 |
+
|
222 |
+
jQuery(".um-s1").select2({
|
223 |
+
|
224 |
+
allowClear: true,
|
225 |
+
});
|
226 |
+
|
227 |
+
jQuery(".um-s2").select2({
|
228 |
+
allowClear: false,
|
229 |
+
minimumResultsForSearch: 10
|
230 |
+
});
|
231 |
+
|
232 |
+
jQuery(document).on('click', '.um-field-group-head:not(.disabled)', function(){
|
233 |
+
var field = jQuery(this).parents('.um-field-group');
|
234 |
+
var limit = field.data('max_entries');
|
235 |
+
|
236 |
+
if ( field.find('.um-field-group-body').is(':hidden')){
|
237 |
+
field.find('.um-field-group-body').show();
|
238 |
+
} else {
|
239 |
+
field.find('.um-field-group-body:first').clone().appendTo( field );
|
240 |
+
}
|
241 |
+
|
242 |
+
increase_id = 0;
|
243 |
+
field.find('.um-field-group-body').each(function(){
|
244 |
+
increase_id++;
|
245 |
+
jQuery(this).find('input').each(function(){
|
246 |
+
var input = jQuery(this);
|
247 |
+
input.attr('id', input.data('key') + '-' + increase_id );
|
248 |
+
input.attr('name', input.data('key') + '-' + increase_id );
|
249 |
+
input.parent().parent().find('label').attr('for', input.data('key') + '-' + increase_id );
|
250 |
+
});
|
251 |
+
});
|
252 |
+
|
253 |
+
if ( limit > 0 && field.find('.um-field-group-body').length == limit ) {
|
254 |
+
|
255 |
+
jQuery(this).addClass('disabled');
|
256 |
+
|
257 |
+
}
|
258 |
+
});
|
259 |
+
|
260 |
+
jQuery(document).on('click', '.um-field-group-cancel', function(e){
|
261 |
+
e.preventDefault();
|
262 |
+
var field = jQuery(this).parents('.um-field-group');
|
263 |
+
|
264 |
+
var limit = field.data('max_entries');
|
265 |
+
|
266 |
+
if ( field.find('.um-field-group-body').length > 1 ) {
|
267 |
+
jQuery(this).parents('.um-field-group-body').remove();
|
268 |
+
} else {
|
269 |
+
jQuery(this).parents('.um-field-group-body').hide();
|
270 |
+
}
|
271 |
+
|
272 |
+
if ( limit > 0 && field.find('.um-field-group-body').length < limit ) {
|
273 |
+
field.find('.um-field-group-head').removeClass('disabled');
|
274 |
+
}
|
275 |
+
|
276 |
+
return false;
|
277 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
|
279 |
|
280 |
jQuery( document.body ).on( 'click', '.um-ajax-paginate', function(e) {
|
335 |
});
|
336 |
|
337 |
|
338 |
+
jQuery(document).on('click', '.um-ajax-action', function(e){
|
339 |
+
e.preventDefault();
|
340 |
+
var hook = jQuery(this).data('hook');
|
341 |
+
var user_id = jQuery(this).data('user_id');
|
342 |
+
var arguments = jQuery(this).data('arguments');
|
343 |
+
|
344 |
+
if ( jQuery(this).data('js-remove') ){
|
345 |
+
jQuery(this).parents('.'+jQuery(this).data('js-remove')).fadeOut('fast');
|
346 |
+
}
|
347 |
+
|
348 |
+
jQuery.ajax({
|
349 |
+
url: wp.ajax.settings.url,
|
350 |
+
type: 'post',
|
351 |
+
data: {
|
352 |
+
action: 'um_muted_action',
|
353 |
+
hook: hook,
|
354 |
+
user_id: user_id,
|
355 |
+
arguments: arguments,
|
356 |
+
nonce: um_scripts.nonce
|
357 |
+
},
|
358 |
+
success: function(data){
|
359 |
+
|
360 |
+
}
|
361 |
+
});
|
362 |
+
return false;
|
363 |
+
});
|
364 |
+
|
365 |
+
jQuery(document).on('click', '#um-search-button', function() {
|
366 |
+
|
367 |
+
jQuery(this).parents('form').submit();
|
368 |
+
});
|
369 |
+
|
370 |
+
jQuery('.um-form input[class=um-button][type=submit]').removeAttr('disabled');
|
371 |
+
|
372 |
+
jQuery(document).one('click', '.um:not(.um-account) .um-form input[class=um-button][type=submit]:not(.um-has-recaptcha)', function() {
|
373 |
+
jQuery(this).attr('disabled','disabled');
|
374 |
+
jQuery(this).parents('form').submit();
|
375 |
+
|
376 |
+
});
|
377 |
+
|
378 |
+
|
379 |
+
var um_select_options_cache = {};
|
380 |
+
|
381 |
+
/**
|
382 |
+
* Find all select fields with parent select fields
|
383 |
+
*/
|
384 |
+
jQuery('select[data-um-parent]').each(function(){
|
385 |
+
|
386 |
+
var me = jQuery(this);
|
387 |
+
var parent_option = me.data('um-parent');
|
388 |
+
var um_ajax_url = me.data('um-ajax-url');
|
389 |
+
var um_ajax_source = me.data('um-ajax-source');
|
390 |
+
var original_value = me.val();
|
391 |
+
|
392 |
+
me.attr('data-um-init-field', true );
|
393 |
+
|
394 |
+
jQuery(document).on('change','select[name="'+parent_option+'"]',function(){
|
395 |
+
var parent = jQuery(this);
|
396 |
+
var form_id = parent.closest('form').find('input[type=hidden][name=form_id]').val();
|
397 |
+
var arr_key = parent.val();
|
398 |
+
|
399 |
+
if( parent.val() != '' && typeof um_select_options_cache[ arr_key ] != 'object' ){
|
400 |
+
|
401 |
+
jQuery.ajax({
|
402 |
+
url: wp.ajax.settings.url,
|
403 |
+
type: 'post',
|
404 |
+
data: {
|
405 |
+
action: 'um_select_options',
|
406 |
+
parent_option_name: parent_option,
|
407 |
+
parent_option: parent.val(),
|
408 |
+
child_callback: um_ajax_source,
|
409 |
+
child_name: me.attr('name'),
|
410 |
+
members_directory: me.attr('data-mebers-directory'),
|
411 |
+
form_id: form_id,
|
412 |
+
nonce: um_scripts.nonce
|
413 |
+
},
|
414 |
+
success: function( data ){
|
415 |
+
if( data.status == 'success' && parent.val() != '' ){
|
416 |
+
um_field_populate_child_options( me, data, arr_key);
|
417 |
+
}
|
418 |
+
|
419 |
+
if( typeof data.debug !== 'undefined' ){
|
420 |
+
console.log( data );
|
421 |
+
}
|
422 |
+
},
|
423 |
+
error: function( e ){
|
424 |
+
console.log( e );
|
425 |
+
}
|
426 |
+
});
|
427 |
+
|
428 |
+
|
429 |
+
}
|
430 |
+
|
431 |
+
if( parent.val() != '' && typeof um_select_options_cache[ arr_key ] == 'object' ) {
|
432 |
+
var data = um_select_options_cache[ arr_key ];
|
433 |
+
um_field_populate_child_options( me, data, arr_key );
|
434 |
+
}
|
435 |
+
|
436 |
+
if( parent.val() == '' ){
|
437 |
+
me.find('option[value!=""]').remove();
|
438 |
+
me.val('').trigger('change');
|
439 |
+
}
|
440 |
+
|
441 |
+
});
|
442 |
+
|
443 |
+
jQuery('select[name="'+parent_option+'"]').trigger('change');
|
444 |
+
|
445 |
+
});
|
446 |
+
|
447 |
+
/**
|
448 |
+
* Populates child options and cache ajax response
|
449 |
+
* @param DOM me child option elem
|
450 |
+
* @param array data
|
451 |
+
* @param string key
|
452 |
+
*/
|
453 |
+
function um_field_populate_child_options( me, data, arr_key, arr_items ){
|
454 |
+
|
455 |
+
|
456 |
+
var parent_option = me.data('um-parent');
|
457 |
+
var child_name = me.attr('name');
|
458 |
+
var parent_dom = jQuery('select[name="'+parent_option+'"]');
|
459 |
+
me.find('option[value!=""]').remove();
|
460 |
+
|
461 |
+
if( ! me.hasClass('um-child-option-disabled') ){
|
462 |
+
me.removeAttr('disabled');
|
463 |
+
}
|
464 |
+
|
465 |
+
var arr_items = [],
|
466 |
+
search_get = '';
|
467 |
+
|
468 |
+
if ( data.post.members_directory === 'yes' ) {
|
469 |
+
var urlParams = new URLSearchParams(window.location.search);
|
470 |
+
search_get = urlParams.get(data.post.child_name);
|
471 |
+
}
|
472 |
+
jQuery.each( data.items, function(k,v){
|
473 |
+
arr_items.push({id: k, text: v, selected: (v === search_get) });
|
474 |
+
});
|
475 |
+
|
476 |
+
me.select2('destroy');
|
477 |
+
me.select2({
|
478 |
+
data: arr_items,
|
479 |
+
allowClear: true,
|
480 |
+
minimumResultsForSearch: 10
|
481 |
+
});
|
482 |
+
|
483 |
+
if ( data.post.members_directory !== 'yes' ) {
|
484 |
+
if( typeof data.field.default !== 'undefined' && ! me.data('um-original-value') ){
|
485 |
+
me.val( data.field.default ).trigger('change');
|
486 |
+
}else if( me.data('um-original-value') != '' ){
|
487 |
+
me.val( me.data('um-original-value') ).trigger('change');
|
488 |
+
}
|
489 |
+
|
490 |
+
if( data.field.editable == 0 ){
|
491 |
+
me.addClass('um-child-option-disabled');
|
492 |
+
me.attr('disabled','disabled');
|
493 |
+
}
|
494 |
+
}
|
495 |
+
um_select_options_cache[ arr_key ] = data;
|
496 |
+
|
497 |
+
|
498 |
+
}
|
499 |
|
500 |
});
|
assets/js/um-scripts.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(){jQuery(document).on("click",".um-dropdown a",function(e){return!1}),jQuery(document).on("click",".um-dropdown a.real_url",function(e){window.location=jQuery(this).attr("href")}),jQuery(document).on("click",".um-trigger-menu-on-click",function(e){return jQuery(".um-dropdown").hide(),menu=jQuery(this).find(".um-dropdown"),menu.show(),!1}),jQuery(document).on("click",".um-dropdown-hide",function(e){UM_hide_menus()}),jQuery(document).on("click","a.um-manual-trigger",function(){var e=jQuery(this).attr("data-child"),t=jQuery(this).attr("data-parent");jQuery(this).parents(t).find(e).trigger("click")}),jQuery(".um-tip-n").tipsy({gravity:"n",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-w").tipsy({gravity:"w",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-e").tipsy({gravity:"e",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-s").tipsy({gravity:"s",opacity:1,live:"a.live",offset:3}),jQuery(document).on("change",".um-field-area input[type=radio]",function(){var e=jQuery(this).parents(".um-field-area"),t=jQuery(this).parents("label");e.find(".um-field-radio").removeClass("active"),e.find(".um-field-radio").find("i").removeAttr("class").addClass("um-icon-android-radio-button-off"),t.addClass("active"),t.find("i").removeAttr("class").addClass("um-icon-android-radio-button-on")}),jQuery(document).on("change",".um-field-area input[type=checkbox]",function(){jQuery(this).parents(".um-field-area");var e=jQuery(this).parents("label");e.hasClass("active")?(e.removeClass("active"),e.find("i").removeAttr("class").addClass("um-icon-android-checkbox-outline-blank")):(e.addClass("active"),e.find("i").removeAttr("class").addClass("um-icon-android-checkbox-outline"))}),
|
1 |
+
function um_init_datetimepicker(){jQuery(".um-datepicker:not(.picker__input)").each(function(){if(elem=jQuery(this),void 0!==elem.attr("data-disabled_weekdays")&&""!=elem.attr("data-disabled_weekdays"))var e=JSON.parse(elem.attr("data-disabled_weekdays"));else e=!1;var t=null;void 0!==elem.attr("data-years")&&(t=elem.attr("data-years"));var a=elem.attr("data-date_min"),i=elem.attr("data-date_max"),r=[],n=[];void 0!==a&&(r=a.split(",")),void 0!==i&&(n=i.split(","));var u=r.length?new Date(r):null,o=r.length?new Date(n):null;if(u&&"Invalid Date"==u.toString()&&3==r.length){var s=r[1]+"/"+r[2]+"/"+r[0];u=new Date(Date.parse(s))}if(o&&"Invalid Date"==o.toString()&&3==n.length){var d=n[1]+"/"+n[2]+"/"+n[0];o=new Date(Date.parse(d))}var l={disable:e,format:elem.attr("data-format"),formatSubmit:"yyyy/mm/dd",hiddenName:!0,onOpen:function(){elem.blur()},onClose:function(){elem.blur()}};null!==t&&(l.selectYears=t),null!==u&&(l.min=u),null!==o&&(l.max=o),elem.pickadate(l)}),jQuery(".um-timepicker:not(.picker__input)").each(function(){elem=jQuery(this),elem.pickatime({format:elem.attr("data-format"),interval:parseInt(elem.attr("data-intervals")),formatSubmit:"HH:i",hiddenName:!0,onOpen:function(){elem.blur()},onClose:function(){elem.blur()}})})}jQuery(document).ready(function(){jQuery(document).on("click",".um-dropdown a",function(e){return!1}),jQuery(document).on("click",".um-dropdown a.real_url",function(e){window.location=jQuery(this).attr("href")}),jQuery(document).on("click",".um-trigger-menu-on-click",function(e){return jQuery(".um-dropdown").hide(),menu=jQuery(this).find(".um-dropdown"),menu.show(),!1}),jQuery(document).on("click",".um-dropdown-hide",function(e){UM_hide_menus()}),jQuery(document).on("click","a.um-manual-trigger",function(){var e=jQuery(this).attr("data-child"),t=jQuery(this).attr("data-parent");jQuery(this).parents(t).find(e).trigger("click")}),jQuery(".um-tip-n").tipsy({gravity:"n",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-w").tipsy({gravity:"w",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-e").tipsy({gravity:"e",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-s").tipsy({gravity:"s",opacity:1,live:"a.live",offset:3}),jQuery(document).on("change",".um-field-area input[type=radio]",function(){var e=jQuery(this).parents(".um-field-area"),t=jQuery(this).parents("label");e.find(".um-field-radio").removeClass("active"),e.find(".um-field-radio").find("i").removeAttr("class").addClass("um-icon-android-radio-button-off"),t.addClass("active"),t.find("i").removeAttr("class").addClass("um-icon-android-radio-button-on")}),jQuery(document).on("change",".um-field-area input[type=checkbox]",function(){jQuery(this).parents(".um-field-area");var e=jQuery(this).parents("label");e.hasClass("active")?(e.removeClass("active"),e.find("i").removeAttr("class").addClass("um-icon-android-checkbox-outline-blank")):(e.addClass("active"),e.find("i").removeAttr("class").addClass("um-icon-android-checkbox-outline"))}),um_init_datetimepicker(),jQuery(".um-rating").um_raty({half:!1,starType:"i",number:function(){return jQuery(this).attr("data-number")},score:function(){return jQuery(this).attr("data-score")},scoreName:function(){return jQuery(this).attr("data-key")},hints:!1,click:function(e,t){live_field=this.id,live_value=e,um_apply_conditions(jQuery(this),!1)}}),jQuery(".um-rating-readonly").um_raty({half:!1,starType:"i",number:function(){return jQuery(this).attr("data-number")},score:function(){return jQuery(this).attr("data-score")},scoreName:function(){return jQuery(this).attr("data-key")},hints:!1,readOnly:!0}),jQuery(document).on("click",".um .um-single-image-preview a.cancel",function(e){e.preventDefault();var t=jQuery(this).parents(".um-field"),a=jQuery(this).parents(".um-field").find(".um-single-image-preview img").attr("src");return t.find(".um-single-image-preview img").attr("src",""),t.find(".um-single-image-preview").hide(),t.find(".um-btn-auto-width").html("Upload"),t.find("input[type=hidden]").val("empty_file"),jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_remove_file",src:a,nonce:um_scripts.nonce}}),!1}),jQuery(document).on("click",".um .um-single-file-preview a.cancel",function(e){e.preventDefault();var t=jQuery(this).parents(".um-field"),a=jQuery(this).parents(".um-field").find(".um-single-fileinfo a").attr("href");return t.find(".um-single-file-preview").hide(),t.find(".um-btn-auto-width").html("Upload"),t.find("input[type=hidden]").val("empty_file"),jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_remove_file",src:a,nonce:um_scripts.nonce}}),!1}),jQuery(".um-s1,.um-s2").css({display:"block"}),0<jQuery(".um-s1").length&&jQuery(".um-s1").each(function(){var e=jQuery(this);""===e.val()&&e.attr("data-default")&&e.val(e.attr("data-default"))}),jQuery(".um-s1").select2({allowClear:!0}),jQuery(".um-s2").select2({allowClear:!1,minimumResultsForSearch:10}),jQuery(document).on("click",".um-field-group-head:not(.disabled)",function(){var e=jQuery(this).parents(".um-field-group"),t=e.data("max_entries");e.find(".um-field-group-body").is(":hidden")?e.find(".um-field-group-body").show():e.find(".um-field-group-body:first").clone().appendTo(e),increase_id=0,e.find(".um-field-group-body").each(function(){increase_id++,jQuery(this).find("input").each(function(){var e=jQuery(this);e.attr("id",e.data("key")+"-"+increase_id),e.attr("name",e.data("key")+"-"+increase_id),e.parent().parent().find("label").attr("for",e.data("key")+"-"+increase_id)})}),0<t&&e.find(".um-field-group-body").length==t&&jQuery(this).addClass("disabled")}),jQuery(document).on("click",".um-field-group-cancel",function(e){e.preventDefault();var t=jQuery(this).parents(".um-field-group"),a=t.data("max_entries");return 1<t.find(".um-field-group-body").length?jQuery(this).parents(".um-field-group-body").remove():jQuery(this).parents(".um-field-group-body").hide(),0<a&&t.find(".um-field-group-body").length<a&&t.find(".um-field-group-head").removeClass("disabled"),!1}),jQuery(document.body).on("click",".um-ajax-paginate",function(e){e.preventDefault();var t=jQuery(this),a=jQuery(this).parent();a.addClass("loading");var i=jQuery(this).data("hook");if("um_load_posts"===i){var r=1*jQuery(this).data("pages"),n=1*jQuery(this).data("page")+1;jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_ajax_paginate_posts",author:jQuery(this).data("author"),page:n,nonce:um_scripts.nonce},complete:function(){a.removeClass("loading")},success:function(e){a.before(e),n===r?a.remove():t.data("page",n)}})}else{var u=jQuery(this).data("args"),o=jQuery(this).parents(".um").find(".um-ajax-items");jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_ajax_paginate",hook:i,args:u,nonce:um_scripts.nonce},complete:function(){a.removeClass("loading")},success:function(e){a.remove(),o.append(e)}})}}),jQuery(document).on("click",".um-ajax-action",function(e){e.preventDefault();var t=jQuery(this).data("hook"),a=jQuery(this).data("user_id"),arguments=jQuery(this).data("arguments");return jQuery(this).data("js-remove")&&jQuery(this).parents("."+jQuery(this).data("js-remove")).fadeOut("fast"),jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_muted_action",hook:t,user_id:a,arguments:arguments,nonce:um_scripts.nonce},success:function(e){}}),!1}),jQuery(document).on("click","#um-search-button",function(){jQuery(this).parents("form").submit()}),jQuery(".um-form input[class=um-button][type=submit]").removeAttr("disabled"),jQuery(document).one("click",".um:not(.um-account) .um-form input[class=um-button][type=submit]:not(.um-has-recaptcha)",function(){jQuery(this).attr("disabled","disabled"),jQuery(this).parents("form").submit()});var o={};function s(e,t,a,i){var r=e.data("um-parent");e.attr("name"),jQuery('select[name="'+r+'"]');e.find('option[value!=""]').remove(),e.hasClass("um-child-option-disabled")||e.removeAttr("disabled");i=[];var n="";if("yes"===t.post.members_directory){var u=new URLSearchParams(window.location.search);n=u.get(t.post.child_name)}jQuery.each(t.items,function(e,t){i.push({id:e,text:t,selected:t===n})}),e.select2("destroy"),e.select2({data:i,allowClear:!0,minimumResultsForSearch:10}),"yes"!==t.post.members_directory&&(void 0===t.field.default||e.data("um-original-value")?""!=e.data("um-original-value")&&e.val(e.data("um-original-value")).trigger("change"):e.val(t.field.default).trigger("change"),0==t.field.editable&&(e.addClass("um-child-option-disabled"),e.attr("disabled","disabled"))),o[a]=t}jQuery("select[data-um-parent]").each(function(){var r=jQuery(this),n=r.data("um-parent"),u=(r.data("um-ajax-url"),r.data("um-ajax-source"));r.val();r.attr("data-um-init-field",!0),jQuery(document).on("change",'select[name="'+n+'"]',function(){var t=jQuery(this),e=t.closest("form").find("input[type=hidden][name=form_id]").val(),a=t.val();if(""!=t.val()&&"object"!=typeof o[a]&&jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_select_options",parent_option_name:n,parent_option:t.val(),child_callback:u,child_name:r.attr("name"),members_directory:r.attr("data-mebers-directory"),form_id:e,nonce:um_scripts.nonce},success:function(e){"success"==e.status&&""!=t.val()&&s(r,e,a),void 0!==e.debug&&console.log(e)},error:function(e){console.log(e)}}),""!=t.val()&&"object"==typeof o[a]){var i=o[a];s(r,i,a)}""==t.val()&&(r.find('option[value!=""]').remove(),r.val("").trigger("change"))}),jQuery('select[name="'+n+'"]').trigger("change")})});
|
assets/js/um-scrollbar.js
DELETED
@@ -1,2683 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
* jQuery Mousewheel 3.1.13
|
3 |
-
*
|
4 |
-
* Copyright jQuery Foundation and other contributors
|
5 |
-
* Released under the MIT license
|
6 |
-
* http://jquery.org/license
|
7 |
-
*
|
8 |
-
* https://github.com/jquery/jquery-mousewheel/blob/master/jquery.mousewheel.js
|
9 |
-
*/
|
10 |
-
|
11 |
-
(function (factory) {
|
12 |
-
if ( typeof define === 'function' && define.amd ) {
|
13 |
-
// AMD. Register as an anonymous module.
|
14 |
-
define(['jquery'], factory);
|
15 |
-
} else if (typeof exports === 'object') {
|
16 |
-
// Node/CommonJS style for Browserify
|
17 |
-
module.exports = factory;
|
18 |
-
} else {
|
19 |
-
// Browser globals
|
20 |
-
factory(jQuery);
|
21 |
-
}
|
22 |
-
}(function ($) {
|
23 |
-
|
24 |
-
var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],
|
25 |
-
toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?
|
26 |
-
['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
|
27 |
-
slice = Array.prototype.slice,
|
28 |
-
nullLowestDeltaTimeout, lowestDelta;
|
29 |
-
|
30 |
-
if ( $.event.fixHooks ) {
|
31 |
-
for ( var i = toFix.length; i; ) {
|
32 |
-
$.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;
|
33 |
-
}
|
34 |
-
}
|
35 |
-
|
36 |
-
var special = $.event.special.mousewheel = {
|
37 |
-
version: '3.1.12',
|
38 |
-
|
39 |
-
setup: function() {
|
40 |
-
if ( this.addEventListener ) {
|
41 |
-
for ( var i = toBind.length; i; ) {
|
42 |
-
this.addEventListener( toBind[--i], handler, false );
|
43 |
-
}
|
44 |
-
} else {
|
45 |
-
this.onmousewheel = handler;
|
46 |
-
}
|
47 |
-
// Store the line height and page height for this particular element
|
48 |
-
$.data(this, 'mousewheel-line-height', special.getLineHeight(this));
|
49 |
-
$.data(this, 'mousewheel-page-height', special.getPageHeight(this));
|
50 |
-
},
|
51 |
-
|
52 |
-
teardown: function() {
|
53 |
-
if ( this.removeEventListener ) {
|
54 |
-
for ( var i = toBind.length; i; ) {
|
55 |
-
this.removeEventListener( toBind[--i], handler, false );
|
56 |
-
}
|
57 |
-
} else {
|
58 |
-
this.onmousewheel = null;
|
59 |
-
}
|
60 |
-
// Clean up the data we added to the element
|
61 |
-
$.removeData(this, 'mousewheel-line-height');
|
62 |
-
$.removeData(this, 'mousewheel-page-height');
|
63 |
-
},
|
64 |
-
|
65 |
-
getLineHeight: function(elem) {
|
66 |
-
var $elem = $(elem),
|
67 |
-
$parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();
|
68 |
-
if (!$parent.length) {
|
69 |
-
$parent = $('body');
|
70 |
-
}
|
71 |
-
return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;
|
72 |
-
},
|
73 |
-
|
74 |
-
getPageHeight: function(elem) {
|
75 |
-
return $(elem).height();
|
76 |
-
},
|
77 |
-
|
78 |
-
settings: {
|
79 |
-
adjustOldDeltas: true, // see shouldAdjustOldDeltas() below
|
80 |
-
normalizeOffset: true // calls getBoundingClientRect for each event
|
81 |
-
}
|
82 |
-
};
|
83 |
-
|
84 |
-
$.fn.extend({
|
85 |
-
mousewheel: function(fn) {
|
86 |
-
return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
|
87 |
-
},
|
88 |
-
|
89 |
-
unmousewheel: function(fn) {
|
90 |
-
return this.unbind('mousewheel', fn);
|
91 |
-
}
|
92 |
-
});
|
93 |
-
|
94 |
-
|
95 |
-
function handler(event) {
|
96 |
-
var orgEvent = event || window.event,
|
97 |
-
args = slice.call(arguments, 1),
|
98 |
-
delta = 0,
|
99 |
-
deltaX = 0,
|
100 |
-
deltaY = 0,
|
101 |
-
absDelta = 0,
|
102 |
-
offsetX = 0,
|
103 |
-
offsetY = 0;
|
104 |
-
event = $.event.fix(orgEvent);
|
105 |
-
event.type = 'mousewheel';
|
106 |
-
|
107 |
-
// Old school scrollwheel delta
|
108 |
-
if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; }
|
109 |
-
if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; }
|
110 |
-
if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }
|
111 |
-
if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }
|
112 |
-
|
113 |
-
// Firefox < 17 horizontal scrolling related to DOMMouseScroll event
|
114 |
-
if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
|
115 |
-
deltaX = deltaY * -1;
|
116 |
-
deltaY = 0;
|
117 |
-
}
|
118 |
-
|
119 |
-
// Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
|
120 |
-
delta = deltaY === 0 ? deltaX : deltaY;
|
121 |
-
|
122 |
-
// New school wheel delta (wheel event)
|
123 |
-
if ( 'deltaY' in orgEvent ) {
|
124 |
-
deltaY = orgEvent.deltaY * -1;
|
125 |
-
delta = deltaY;
|
126 |
-
}
|
127 |
-
if ( 'deltaX' in orgEvent ) {
|
128 |
-
deltaX = orgEvent.deltaX;
|
129 |
-
if ( deltaY === 0 ) { delta = deltaX * -1; }
|
130 |
-
}
|
131 |
-
|
132 |
-
// No change actually happened, no reason to go any further
|
133 |
-
if ( deltaY === 0 && deltaX === 0 ) { return; }
|
134 |
-
|
135 |
-
// Need to convert lines and pages to pixels if we aren't already in pixels
|
136 |
-
// There are three delta modes:
|
137 |
-
// * deltaMode 0 is by pixels, nothing to do
|
138 |
-
// * deltaMode 1 is by lines
|
139 |
-
// * deltaMode 2 is by pages
|
140 |
-
if ( orgEvent.deltaMode === 1 ) {
|
141 |
-
var lineHeight = $.data(this, 'mousewheel-line-height');
|
142 |
-
delta *= lineHeight;
|
143 |
-
deltaY *= lineHeight;
|
144 |
-
deltaX *= lineHeight;
|
145 |
-
} else if ( orgEvent.deltaMode === 2 ) {
|
146 |
-
var pageHeight = $.data(this, 'mousewheel-page-height');
|
147 |
-
delta *= pageHeight;
|
148 |
-
deltaY *= pageHeight;
|
149 |
-
deltaX *= pageHeight;
|
150 |
-
}
|
151 |
-
|
152 |
-
// Store lowest absolute delta to normalize the delta values
|
153 |
-
absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
|
154 |
-
|
155 |
-
if ( !lowestDelta || absDelta < lowestDelta ) {
|
156 |
-
lowestDelta = absDelta;
|
157 |
-
|
158 |
-
// Adjust older deltas if necessary
|
159 |
-
if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
|
160 |
-
lowestDelta /= 40;
|
161 |
-
}
|
162 |
-
}
|
163 |
-
|
164 |
-
// Adjust older deltas if necessary
|
165 |
-
if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
|
166 |
-
// Divide all the things by 40!
|
167 |
-
delta /= 40;
|
168 |
-
deltaX /= 40;
|
169 |
-
deltaY /= 40;
|
170 |
-
}
|
171 |
-
|
172 |
-
// Get a whole, normalized value for the deltas
|
173 |
-
delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta);
|
174 |
-
deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
|
175 |
-
deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
|
176 |
-
|
177 |
-
// Normalise offsetX and offsetY properties
|
178 |
-
if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {
|
179 |
-
var boundingRect = this.getBoundingClientRect();
|
180 |
-
offsetX = event.clientX - boundingRect.left;
|
181 |
-
offsetY = event.clientY - boundingRect.top;
|
182 |
-
}
|
183 |
-
|
184 |
-
// Add information to the event object
|
185 |
-
event.deltaX = deltaX;
|
186 |
-
event.deltaY = deltaY;
|
187 |
-
event.deltaFactor = lowestDelta;
|
188 |
-
event.offsetX = offsetX;
|
189 |
-
event.offsetY = offsetY;
|
190 |
-
// Go ahead and set deltaMode to 0 since we converted to pixels
|
191 |
-
// Although this is a little odd since we overwrite the deltaX/Y
|
192 |
-
// properties with normalized deltas.
|
193 |
-
event.deltaMode = 0;
|
194 |
-
|
195 |
-
// Add event and delta to the front of the arguments
|
196 |
-
args.unshift(event, delta, deltaX, deltaY);
|
197 |
-
|
198 |
-
// Clearout lowestDelta after sometime to better
|
199 |
-
// handle multiple device types that give different
|
200 |
-
// a different lowestDelta
|
201 |
-
// Ex: trackpad = 3 and mouse wheel = 120
|
202 |
-
if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
|
203 |
-
nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
|
204 |
-
|
205 |
-
return ($.event.dispatch || $.event.handle).apply(this, args);
|
206 |
-
}
|
207 |
-
|
208 |
-
function nullLowestDelta() {
|
209 |
-
lowestDelta = null;
|
210 |
-
}
|
211 |
-
|
212 |
-
function shouldAdjustOldDeltas(orgEvent, absDelta) {
|
213 |
-
// If this is an older event and the delta is divisable by 120,
|
214 |
-
// then we are assuming that the browser is treating this as an
|
215 |
-
// older mouse wheel event and that we should divide the deltas
|
216 |
-
// by 40 to try and get a more usable deltaFactor.
|
217 |
-
// Side note, this actually impacts the reported scroll distance
|
218 |
-
// in older browsers and can cause scrolling to be slower than native.
|
219 |
-
// Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
|
220 |
-
return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
|
221 |
-
}
|
222 |
-
|
223 |
-
}));
|
224 |
-
|
225 |
-
/*
|
226 |
-
== malihu jquery custom scrollbar plugin ==
|
227 |
-
Version: 3.1.5
|
228 |
-
Plugin URI: http://manos.malihu.gr/jquery-custom-content-scroller
|
229 |
-
Author: malihu
|
230 |
-
Author URI: http://manos.malihu.gr
|
231 |
-
License: MIT License (MIT)
|
232 |
-
*/
|
233 |
-
|
234 |
-
/*
|
235 |
-
Copyright Manos Malihutsakis (email: manos@malihu.gr)
|
236 |
-
|
237 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
238 |
-
of this software and associated documentation files (the "Software"), to deal
|
239 |
-
in the Software without restriction, including without limitation the rights
|
240 |
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
241 |
-
copies of the Software, and to permit persons to whom the Software is
|
242 |
-
furnished to do so, subject to the following conditions:
|
243 |
-
|
244 |
-
The above copyright notice and this permission notice shall be included in
|
245 |
-
all copies or substantial portions of the Software.
|
246 |
-
|
247 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
248 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
249 |
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
250 |
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
251 |
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
252 |
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
253 |
-
THE SOFTWARE.
|
254 |
-
*/
|
255 |
-
|
256 |
-
/*
|
257 |
-
The code below is fairly long, fully commented and should be normally used in development.
|
258 |
-
For production, use either the minified jquery.mCustomScrollbar.min.js script or
|
259 |
-
the production-ready jquery.mCustomScrollbar.concat.min.js which contains the plugin
|
260 |
-
and dependencies (minified).
|
261 |
-
*/
|
262 |
-
|
263 |
-
(function(factory){
|
264 |
-
if(typeof define==="function" && define.amd){
|
265 |
-
define(["jquery"],factory);
|
266 |
-
}else if(typeof module!=="undefined" && module.exports){
|
267 |
-
module.exports=factory;
|
268 |
-
}else{
|
269 |
-
factory(jQuery,window,document);
|
270 |
-
}
|
271 |
-
}(function($){
|
272 |
-
(function(init){
|
273 |
-
var _rjs=typeof define==="function" && define.amd, /* RequireJS */
|
274 |
-
_njs=typeof module !== "undefined" && module.exports, /* NodeJS */
|
275 |
-
_dlp=("https:"==document.location.protocol) ? "https:" : "http:", /* location protocol */
|
276 |
-
_url="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";
|
277 |
-
if(!_rjs){
|
278 |
-
if(_njs){
|
279 |
-
require("jquery-mousewheel")($);
|
280 |
-
}else{
|
281 |
-
/* load jquery-mousewheel plugin (via CDN) if it's not present or not loaded via RequireJS
|
282 |
-
(works when mCustomScrollbar fn is called on window load) */
|
283 |
-
$.event.special.mousewheel || $("head").append(decodeURI("%3Cscript src="+_dlp+"//"+_url+"%3E%3C/script%3E"));
|
284 |
-
}
|
285 |
-
}
|
286 |
-
init();
|
287 |
-
}(function(){
|
288 |
-
|
289 |
-
/*
|
290 |
-
----------------------------------------
|
291 |
-
PLUGIN NAMESPACE, PREFIX, DEFAULT SELECTOR(S)
|
292 |
-
----------------------------------------
|
293 |
-
*/
|
294 |
-
|
295 |
-
var pluginNS="mCustomScrollbar",
|
296 |
-
pluginPfx="mCS",
|
297 |
-
defaultSelector=".mCustomScrollbar",
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
/*
|
304 |
-
----------------------------------------
|
305 |
-
DEFAULT OPTIONS
|
306 |
-
----------------------------------------
|
307 |
-
*/
|
308 |
-
|
309 |
-
defaults={
|
310 |
-
/*
|
311 |
-
set element/content width/height programmatically
|
312 |
-
values: boolean, pixels, percentage
|
313 |
-
option default
|
314 |
-
-------------------------------------
|
315 |
-
setWidth false
|
316 |
-
setHeight false
|
317 |
-
*/
|
318 |
-
/*
|
319 |
-
set the initial css top property of content
|
320 |
-
values: string (e.g. "-100px", "10%" etc.)
|
321 |
-
*/
|
322 |
-
setTop:0,
|
323 |
-
/*
|
324 |
-
set the initial css left property of content
|
325 |
-
values: string (e.g. "-100px", "10%" etc.)
|
326 |
-
*/
|
327 |
-
setLeft:0,
|
328 |
-
/*
|
329 |
-
scrollbar axis (vertical and/or horizontal scrollbars)
|
330 |
-
values (string): "y", "x", "yx"
|
331 |
-
*/
|
332 |
-
axis:"y",
|
333 |
-
/*
|
334 |
-
position of scrollbar relative to content
|
335 |
-
values (string): "inside", "outside" ("outside" requires elements with position:relative)
|
336 |
-
*/
|
337 |
-
scrollbarPosition:"inside",
|
338 |
-
/*
|
339 |
-
scrolling inertia
|
340 |
-
values: integer (milliseconds)
|
341 |
-
*/
|
342 |
-
scrollInertia:950,
|
343 |
-
/*
|
344 |
-
auto-adjust scrollbar dragger length
|
345 |
-
values: boolean
|
346 |
-
*/
|
347 |
-
autoDraggerLength:true,
|
348 |
-
/*
|
349 |
-
auto-hide scrollbar when idle
|
350 |
-
values: boolean
|
351 |
-
option default
|
352 |
-
-------------------------------------
|
353 |
-
autoHideScrollbar false
|
354 |
-
*/
|
355 |
-
/*
|
356 |
-
auto-expands scrollbar on mouse-over and dragging
|
357 |
-
values: boolean
|
358 |
-
option default
|
359 |
-
-------------------------------------
|
360 |
-
autoExpandScrollbar false
|
361 |
-
*/
|
362 |
-
/*
|
363 |
-
always show scrollbar, even when there's nothing to scroll
|
364 |
-
values: integer (0=disable, 1=always show dragger rail and buttons, 2=always show dragger rail, dragger and buttons), boolean
|
365 |
-
*/
|
366 |
-
alwaysShowScrollbar:0,
|
367 |
-
/*
|
368 |
-
scrolling always snaps to a multiple of this number in pixels
|
369 |
-
values: integer, array ([y,x])
|
370 |
-
option default
|
371 |
-
-------------------------------------
|
372 |
-
snapAmount null
|
373 |
-
*/
|
374 |
-
/*
|
375 |
-
when snapping, snap with this number in pixels as an offset
|
376 |
-
values: integer
|
377 |
-
*/
|
378 |
-
snapOffset:0,
|
379 |
-
/*
|
380 |
-
mouse-wheel scrolling
|
381 |
-
*/
|
382 |
-
mouseWheel:{
|
383 |
-
/*
|
384 |
-
enable mouse-wheel scrolling
|
385 |
-
values: boolean
|
386 |
-
*/
|
387 |
-
enable:true,
|
388 |
-
/*
|
389 |
-
scrolling amount in pixels
|
390 |
-
values: "auto", integer
|
391 |
-
*/
|
392 |
-
scrollAmount:"auto",
|
393 |
-
/*
|
394 |
-
mouse-wheel scrolling axis
|
395 |
-
the default scrolling direction when both vertical and horizontal scrollbars are present
|
396 |
-
values (string): "y", "x"
|
397 |
-
*/
|
398 |
-
axis:"y",
|
399 |
-
/*
|
400 |
-
prevent the default behaviour which automatically scrolls the parent element(s) when end of scrolling is reached
|
401 |
-
values: boolean
|
402 |
-
option default
|
403 |
-
-------------------------------------
|
404 |
-
preventDefault null
|
405 |
-
*/
|
406 |
-
/*
|
407 |
-
the reported mouse-wheel delta value. The number of lines (translated to pixels) one wheel notch scrolls.
|
408 |
-
values: "auto", integer
|
409 |
-
"auto" uses the default OS/browser value
|
410 |
-
*/
|
411 |
-
deltaFactor:"auto",
|
412 |
-
/*
|
413 |
-
normalize mouse-wheel delta to -1 or 1 (disables mouse-wheel acceleration)
|
414 |
-
values: boolean
|
415 |
-
option default
|
416 |
-
-------------------------------------
|
417 |
-
normalizeDelta null
|
418 |
-
*/
|
419 |
-
/*
|
420 |
-
invert mouse-wheel scrolling direction
|
421 |
-
values: boolean
|
422 |
-
option default
|
423 |
-
-------------------------------------
|
424 |
-
invert null
|
425 |
-
*/
|
426 |
-
/*
|
427 |
-
the tags that disable mouse-wheel when cursor is over them
|
428 |
-
*/
|
429 |
-
disableOver:["select","option","keygen","datalist","textarea"]
|
430 |
-
},
|
431 |
-
/*
|
432 |
-
scrollbar buttons
|
433 |
-
*/
|
434 |
-
scrollButtons:{
|
435 |
-
/*
|
436 |
-
enable scrollbar buttons
|
437 |
-
values: boolean
|
438 |
-
option default
|
439 |
-
-------------------------------------
|
440 |
-
enable null
|
441 |
-
*/
|
442 |
-
/*
|
443 |
-
scrollbar buttons scrolling type
|
444 |
-
values (string): "stepless", "stepped"
|
445 |
-
*/
|
446 |
-
scrollType:"stepless",
|
447 |
-
/*
|
448 |
-
scrolling amount in pixels
|
449 |
-
values: "auto", integer
|
450 |
-
*/
|
451 |
-
scrollAmount:"auto"
|
452 |
-
/*
|
453 |
-
tabindex of the scrollbar buttons
|
454 |
-
values: false, integer
|
455 |
-
option default
|
456 |
-
-------------------------------------
|
457 |
-
tabindex null
|
458 |
-
*/
|
459 |
-
},
|
460 |
-
/*
|
461 |
-
keyboard scrolling
|
462 |
-
*/
|
463 |
-
keyboard:{
|
464 |
-
/*
|
465 |
-
enable scrolling via keyboard
|
466 |
-
values: boolean
|
467 |
-
*/
|
468 |
-
enable:true,
|
469 |
-
/*
|
470 |
-
keyboard scrolling type
|
471 |
-
values (string): "stepless", "stepped"
|
472 |
-
*/
|
473 |
-
scrollType:"stepless",
|
474 |
-
/*
|
475 |
-
scrolling amount in pixels
|
476 |
-
values: "auto", integer
|
477 |
-
*/
|
478 |
-
scrollAmount:"auto"
|
479 |
-
},
|
480 |
-
/*
|
481 |
-
enable content touch-swipe scrolling
|
482 |
-
values: boolean, integer, string (number)
|
483 |
-
integer values define the axis-specific minimum amount required for scrolling momentum
|
484 |
-
*/
|
485 |
-
contentTouchScroll:25,
|
486 |
-
/*
|
487 |
-
enable/disable document (default) touch-swipe scrolling
|
488 |
-
*/
|
489 |
-
documentTouchScroll:true,
|
490 |
-
/*
|
491 |
-
advanced option parameters
|
492 |
-
*/
|
493 |
-
advanced:{
|
494 |
-
/*
|
495 |
-
auto-expand content horizontally (for "x" or "yx" axis)
|
496 |
-
values: boolean, integer (the value 2 forces the non scrollHeight/scrollWidth method, the value 3 forces the scrollHeight/scrollWidth method)
|
497 |
-
option default
|
498 |
-
-------------------------------------
|
499 |
-
autoExpandHorizontalScroll null
|
500 |
-
*/
|
501 |
-
/*
|
502 |
-
auto-scroll to elements with focus
|
503 |
-
*/
|
504 |
-
autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",
|
505 |
-
/*
|
506 |
-
auto-update scrollbars on content, element or viewport resize
|
507 |
-
should be true for fluid layouts/elements, adding/removing content dynamically, hiding/showing elements, content with images etc.
|
508 |
-
values: boolean
|
509 |
-
*/
|
510 |
-
updateOnContentResize:true,
|
511 |
-
/*
|
512 |
-
auto-update scrollbars each time each image inside the element is fully loaded
|
513 |
-
values: "auto", boolean
|
514 |
-
*/
|
515 |
-
updateOnImageLoad:"auto",
|
516 |
-
/*
|
517 |
-
auto-update scrollbars based on the amount and size changes of specific selectors
|
518 |
-
useful when you need to update the scrollbar(s) automatically, each time a type of element is added, removed or changes its size
|
519 |
-
values: boolean, string (e.g. "ul li" will auto-update scrollbars each time list-items inside the element are changed)
|
520 |
-
a value of true (boolean) will auto-update scrollbars each time any element is changed
|
521 |
-
option default
|
522 |
-
-------------------------------------
|
523 |
-
updateOnSelectorChange null
|
524 |
-
*/
|
525 |
-
/*
|
526 |
-
extra selectors that'll allow scrollbar dragging upon mousemove/up, pointermove/up, touchend etc. (e.g. "selector-1, selector-2")
|
527 |
-
option default
|
528 |
-
-------------------------------------
|
529 |
-
extraDraggableSelectors null
|
530 |
-
*/
|
531 |
-
/*
|
532 |
-
extra selectors that'll release scrollbar dragging upon mouseup, pointerup, touchend etc. (e.g. "selector-1, selector-2")
|
533 |
-
option default
|
534 |
-
-------------------------------------
|
535 |
-
releaseDraggableSelectors null
|
536 |
-
*/
|
537 |
-
/*
|
538 |
-
auto-update timeout
|
539 |
-
values: integer (milliseconds)
|
540 |
-
*/
|
541 |
-
autoUpdateTimeout:60
|
542 |
-
},
|
543 |
-
/*
|
544 |
-
scrollbar theme
|
545 |
-
values: string (see CSS/plugin URI for a list of ready-to-use themes)
|
546 |
-
*/
|
547 |
-
theme:"light",
|
548 |
-
/*
|
549 |
-
user defined callback functions
|
550 |
-
*/
|
551 |
-
callbacks:{
|
552 |
-
/*
|
553 |
-
Available callbacks:
|
554 |
-
callback default
|
555 |
-
-------------------------------------
|
556 |
-
onCreate null
|
557 |
-
onInit null
|
558 |
-
onScrollStart null
|
559 |
-
onScroll null
|
560 |
-
onTotalScroll null
|
561 |
-
onTotalScrollBack null
|
562 |
-
whileScrolling null
|
563 |
-
onOverflowY null
|
564 |
-
onOverflowX null
|
565 |
-
onOverflowYNone null
|
566 |
-
onOverflowXNone null
|
567 |
-
onImageLoad null
|
568 |
-
onSelectorChange null
|
569 |
-
onBeforeUpdate null
|
570 |
-
onUpdate null
|
571 |
-
*/
|
572 |
-
onTotalScrollOffset:0,
|
573 |
-
onTotalScrollBackOffset:0,
|
574 |
-
alwaysTriggerOffsets:true
|
575 |
-
}
|
576 |
-
/*
|
577 |
-
add scrollbar(s) on all elements matching the current selector, now and in the future
|
578 |
-
values: boolean, string
|
579 |
-
string values: "on" (enable), "once" (disable after first invocation), "off" (disable)
|
580 |
-
liveSelector values: string (selector)
|
581 |
-
option default
|
582 |
-
-------------------------------------
|
583 |
-
live false
|
584 |
-
liveSelector null
|
585 |
-
*/
|
586 |
-
},
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
/*
|
593 |
-
----------------------------------------
|
594 |
-
VARS, CONSTANTS
|
595 |
-
----------------------------------------
|
596 |
-
*/
|
597 |
-
|
598 |
-
totalInstances=0, /* plugin instances amount */
|
599 |
-
liveTimers={}, /* live option timers */
|
600 |
-
oldIE=(window.attachEvent && !window.addEventListener) ? 1 : 0, /* detect IE < 9 */
|
601 |
-
touchActive=false,touchable, /* global touch vars (for touch and pointer events) */
|
602 |
-
/* general plugin classes */
|
603 |
-
classes=[
|
604 |
-
"mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar",
|
605 |
-
"mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer",
|
606 |
-
"mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"
|
607 |
-
],
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
/*
|
614 |
-
----------------------------------------
|
615 |
-
METHODS
|
616 |
-
----------------------------------------
|
617 |
-
*/
|
618 |
-
|
619 |
-
methods={
|
620 |
-
|
621 |
-
/*
|
622 |
-
plugin initialization method
|
623 |
-
creates the scrollbar(s), plugin data object and options
|
624 |
-
----------------------------------------
|
625 |
-
*/
|
626 |
-
|
627 |
-
init:function(options){
|
628 |
-
|
629 |
-
var options=$.extend(true,{},defaults,options),
|
630 |
-
selector=_selector.call(this); /* validate selector */
|
631 |
-
|
632 |
-
/*
|
633 |
-
if live option is enabled, monitor for elements matching the current selector and
|
634 |
-
apply scrollbar(s) when found (now and in the future)
|
635 |
-
*/
|
636 |
-
if(options.live){
|
637 |
-
var liveSelector=options.liveSelector || this.selector || defaultSelector, /* live selector(s) */
|
638 |
-
$liveSelector=$(liveSelector); /* live selector(s) as jquery object */
|
639 |
-
if(options.live==="off"){
|
640 |
-
/*
|
641 |
-
disable live if requested
|
642 |
-
usage: $(selector).mCustomScrollbar({live:"off"});
|
643 |
-
*/
|
644 |
-
removeLiveTimers(liveSelector);
|
645 |
-
return;
|
646 |
-
}
|
647 |
-
liveTimers[liveSelector]=setTimeout(function(){
|
648 |
-
/* call mCustomScrollbar fn on live selector(s) every half-second */
|
649 |
-
$liveSelector.mCustomScrollbar(options);
|
650 |
-
if(options.live==="once" && $liveSelector.length){
|
651 |
-
/* disable live after first invocation */
|
652 |
-
removeLiveTimers(liveSelector);
|
653 |
-
}
|
654 |
-
},500);
|
655 |
-
}else{
|
656 |
-
removeLiveTimers(liveSelector);
|
657 |
-
}
|
658 |
-
|
659 |
-
/* options backward compatibility (for versions < 3.0.0) and normalization */
|
660 |
-
options.setWidth=(options.set_width) ? options.set_width : options.setWidth;
|
661 |
-
options.setHeight=(options.set_height) ? options.set_height : options.setHeight;
|
662 |
-
options.axis=(options.horizontalScroll) ? "x" : _findAxis(options.axis);
|
663 |
-
options.scrollInertia=options.scrollInertia>0 && options.scrollInertia<17 ? 17 : options.scrollInertia;
|
664 |
-
if(typeof options.mouseWheel!=="object" && options.mouseWheel==true){ /* old school mouseWheel option (non-object) */
|
665 |
-
options.mouseWheel={enable:true,scrollAmount:"auto",axis:"y",preventDefault:false,deltaFactor:"auto",normalizeDelta:false,invert:false}
|
666 |
-
}
|
667 |
-
options.mouseWheel.scrollAmount=!options.mouseWheelPixels ? options.mouseWheel.scrollAmount : options.mouseWheelPixels;
|
668 |
-
options.mouseWheel.normalizeDelta=!options.advanced.normalizeMouseWheelDelta ? options.mouseWheel.normalizeDelta : options.advanced.normalizeMouseWheelDelta;
|
669 |
-
options.scrollButtons.scrollType=_findScrollButtonsType(options.scrollButtons.scrollType);
|
670 |
-
|
671 |
-
_theme(options); /* theme-specific options */
|
672 |
-
|
673 |
-
/* plugin constructor */
|
674 |
-
return $(selector).each(function(){
|
675 |
-
|
676 |
-
var $this=$(this);
|
677 |
-
|
678 |
-
if(!$this.data(pluginPfx)){ /* prevent multiple instantiations */
|
679 |
-
|
680 |
-
/* store options and create objects in jquery data */
|
681 |
-
$this.data(pluginPfx,{
|
682 |
-
idx:++totalInstances, /* instance index */
|
683 |
-
opt:options, /* options */
|
684 |
-
scrollRatio:{y:null,x:null}, /* scrollbar to content ratio */
|
685 |
-
overflowed:null, /* overflowed axis */
|
686 |
-
contentReset:{y:null,x:null}, /* object to check when content resets */
|
687 |
-
bindEvents:false, /* object to check if events are bound */
|
688 |
-
tweenRunning:false, /* object to check if tween is running */
|
689 |
-
sequential:{}, /* sequential scrolling object */
|
690 |
-
langDir:$this.css("direction"), /* detect/store direction (ltr or rtl) */
|
691 |
-
cbOffsets:null, /* object to check whether callback offsets always trigger */
|
692 |
-
/*
|
693 |
-
object to check how scrolling events where last triggered
|
694 |
-
"internal" (default - triggered by this script), "external" (triggered by other scripts, e.g. via scrollTo method)
|
695 |
-
usage: object.data("mCS").trigger
|
696 |
-
*/
|
697 |
-
trigger:null,
|
698 |
-
/*
|
699 |
-
object to check for changes in elements in order to call the update method automatically
|
700 |
-
*/
|
701 |
-
poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}
|
702 |
-
});
|
703 |
-
|
704 |
-
var d=$this.data(pluginPfx),o=d.opt,
|
705 |
-
/* HTML data attributes */
|
706 |
-
htmlDataAxis=$this.data("mcs-axis"),htmlDataSbPos=$this.data("mcs-scrollbar-position"),htmlDataTheme=$this.data("mcs-theme");
|
707 |
-
|
708 |
-
if(htmlDataAxis){o.axis=htmlDataAxis;} /* usage example: data-mcs-axis="y" */
|
709 |
-
if(htmlDataSbPos){o.scrollbarPosition=htmlDataSbPos;} /* usage example: data-mcs-scrollbar-position="outside" */
|
710 |
-
if(htmlDataTheme){ /* usage example: data-mcs-theme="minimal" */
|
711 |
-
o.theme=htmlDataTheme;
|
712 |
-
_theme(o); /* theme-specific options */
|
713 |
-
}
|
714 |
-
|
715 |
-
_pluginMarkup.call(this); /* add plugin markup */
|
716 |
-
|
717 |
-
if(d && o.callbacks.onCreate && typeof o.callbacks.onCreate==="function"){o.callbacks.onCreate.call(this);} /* callbacks: onCreate */
|
718 |
-
|
719 |
-
$("#mCSB_"+d.idx+"_container img:not(."+classes[2]+")").addClass(classes[2]); /* flag loaded images */
|
720 |
-
|
721 |
-
methods.update.call(null,$this); /* call the update method */
|
722 |
-
|
723 |
-
}
|
724 |
-
|
725 |
-
});
|
726 |
-
|
727 |
-
},
|
728 |
-
/* ---------------------------------------- */
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
/*
|
733 |
-
plugin update method
|
734 |
-
updates content and scrollbar(s) values, events and status
|
735 |
-
----------------------------------------
|
736 |
-
usage: $(selector).mCustomScrollbar("update");
|
737 |
-
*/
|
738 |
-
|
739 |
-
update:function(el,cb){
|
740 |
-
|
741 |
-
var selector=el || _selector.call(this); /* validate selector */
|
742 |
-
|
743 |
-
return $(selector).each(function(){
|
744 |
-
|
745 |
-
var $this=$(this);
|
746 |
-
|
747 |
-
if($this.data(pluginPfx)){ /* check if plugin has initialized */
|
748 |
-
|
749 |
-
var d=$this.data(pluginPfx),o=d.opt,
|
750 |
-
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
751 |
-
mCustomScrollBox=$("#mCSB_"+d.idx),
|
752 |
-
mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")];
|
753 |
-
|
754 |
-
if(!mCSB_container.length){return;}
|
755 |
-
|
756 |
-
if(d.tweenRunning){_stop($this);} /* stop any running tweens while updating */
|
757 |
-
|
758 |
-
if(cb && d && o.callbacks.onBeforeUpdate && typeof o.callbacks.onBeforeUpdate==="function"){o.callbacks.onBeforeUpdate.call(this);} /* callbacks: onBeforeUpdate */
|
759 |
-
|
760 |
-
/* if element was disabled or destroyed, remove class(es) */
|
761 |
-
if($this.hasClass(classes[3])){$this.removeClass(classes[3]);}
|
762 |
-
if($this.hasClass(classes[4])){$this.removeClass(classes[4]);}
|
763 |
-
|
764 |
-
/* css flexbox fix, detect/set max-height */
|
765 |
-
mCustomScrollBox.css("max-height","none");
|
766 |
-
if(mCustomScrollBox.height()!==$this.height()){mCustomScrollBox.css("max-height",$this.height());}
|
767 |
-
|
768 |
-
_expandContentHorizontally.call(this); /* expand content horizontally */
|
769 |
-
|
770 |
-
if(o.axis!=="y" && !o.advanced.autoExpandHorizontalScroll){
|
771 |
-
mCSB_container.css("width",_contentWidth(mCSB_container));
|
772 |
-
}
|
773 |
-
|
774 |
-
d.overflowed=_overflowed.call(this); /* determine if scrolling is required */
|
775 |
-
|
776 |
-
_scrollbarVisibility.call(this); /* show/hide scrollbar(s) */
|
777 |
-
|
778 |
-
/* auto-adjust scrollbar dragger length analogous to content */
|
779 |
-
if(o.autoDraggerLength){_setDraggerLength.call(this);}
|
780 |
-
|
781 |
-
_scrollRatio.call(this); /* calculate and store scrollbar to content ratio */
|
782 |
-
|
783 |
-
_bindEvents.call(this); /* bind scrollbar events */
|
784 |
-
|
785 |
-
/* reset scrolling position and/or events */
|
786 |
-
var to=[Math.abs(mCSB_container[0].offsetTop),Math.abs(mCSB_container[0].offsetLeft)];
|
787 |
-
if(o.axis!=="x"){ /* y/yx axis */
|
788 |
-
if(!d.overflowed[0]){ /* y scrolling is not required */
|
789 |
-
_resetContentPosition.call(this); /* reset content position */
|
790 |
-
if(o.axis==="y"){
|
791 |
-
_unbindEvents.call(this);
|
792 |
-
}else if(o.axis==="yx" && d.overflowed[1]){
|
793 |
-
_scrollTo($this,to[1].toString(),{dir:"x",dur:0,overwrite:"none"});
|
794 |
-
}
|
795 |
-
}else if(mCSB_dragger[0].height()>mCSB_dragger[0].parent().height()){
|
796 |
-
_resetContentPosition.call(this); /* reset content position */
|
797 |
-
}else{ /* y scrolling is required */
|
798 |
-
_scrollTo($this,to[0].toString(),{dir:"y",dur:0,overwrite:"none"});
|
799 |
-
d.contentReset.y=null;
|
800 |
-
}
|
801 |
-
}
|
802 |
-
if(o.axis!=="y"){ /* x/yx axis */
|
803 |
-
if(!d.overflowed[1]){ /* x scrolling is not required */
|
804 |
-
_resetContentPosition.call(this); /* reset content position */
|
805 |
-
if(o.axis==="x"){
|
806 |
-
_unbindEvents.call(this);
|
807 |
-
}else if(o.axis==="yx" && d.overflowed[0]){
|
808 |
-
_scrollTo($this,to[0].toString(),{dir:"y",dur:0,overwrite:"none"});
|
809 |
-
}
|
810 |
-
}else if(mCSB_dragger[1].width()>mCSB_dragger[1].parent().width()){
|
811 |
-
_resetContentPosition.call(this); /* reset content position */
|
812 |
-
}else{ /* x scrolling is required */
|
813 |
-
_scrollTo($this,to[1].toString(),{dir:"x",dur:0,overwrite:"none"});
|
814 |
-
d.contentReset.x=null;
|
815 |
-
}
|
816 |
-
}
|
817 |
-
|
818 |
-
/* callbacks: onImageLoad, onSelectorChange, onUpdate */
|
819 |
-
if(cb && d){
|
820 |
-
if(cb===2 && o.callbacks.onImageLoad && typeof o.callbacks.onImageLoad==="function"){
|
821 |
-
o.callbacks.onImageLoad.call(this);
|
822 |
-
}else if(cb===3 && o.callbacks.onSelectorChange && typeof o.callbacks.onSelectorChange==="function"){
|
823 |
-
o.callbacks.onSelectorChange.call(this);
|
824 |
-
}else if(o.callbacks.onUpdate && typeof o.callbacks.onUpdate==="function"){
|
825 |
-
o.callbacks.onUpdate.call(this);
|
826 |
-
}
|
827 |
-
}
|
828 |
-
|
829 |
-
_autoUpdate.call(this); /* initialize automatic updating (for dynamic content, fluid layouts etc.) */
|
830 |
-
|
831 |
-
}
|
832 |
-
|
833 |
-
});
|
834 |
-
|
835 |
-
},
|
836 |
-
/* ---------------------------------------- */
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
/*
|
841 |
-
plugin scrollTo method
|
842 |
-
triggers a scrolling event to a specific value
|
843 |
-
----------------------------------------
|
844 |
-
usage: $(selector).mCustomScrollbar("scrollTo",value,options);
|
845 |
-
*/
|
846 |
-
|
847 |
-
scrollTo:function(val,options){
|
848 |
-
|
849 |
-
/* prevent silly things like $(selector).mCustomScrollbar("scrollTo",undefined); */
|
850 |
-
if(typeof val=="undefined" || val==null){return;}
|
851 |
-
|
852 |
-
var selector=_selector.call(this); /* validate selector */
|
853 |
-
|
854 |
-
return $(selector).each(function(){
|
855 |
-
|
856 |
-
var $this=$(this);
|
857 |
-
|
858 |
-
if($this.data(pluginPfx)){ /* check if plugin has initialized */
|
859 |
-
|
860 |
-
var d=$this.data(pluginPfx),o=d.opt,
|
861 |
-
/* method default options */
|
862 |
-
methodDefaults={
|
863 |
-
trigger:"external", /* method is by default triggered externally (e.g. from other scripts) */
|
864 |
-
scrollInertia:o.scrollInertia, /* scrolling inertia (animation duration) */
|
865 |
-
scrollEasing:"mcsEaseInOut", /* animation easing */
|
866 |
-
moveDragger:false, /* move dragger instead of content */
|
867 |
-
timeout:60, /* scroll-to delay */
|
868 |
-
callbacks:true, /* enable/disable callbacks */
|
869 |
-
onStart:true,
|
870 |
-
onUpdate:true,
|
871 |
-
onComplete:true
|
872 |
-
},
|
873 |
-
methodOptions=$.extend(true,{},methodDefaults,options),
|
874 |
-
to=_arr.call(this,val),dur=methodOptions.scrollInertia>0 && methodOptions.scrollInertia<17 ? 17 : methodOptions.scrollInertia;
|
875 |
-
|
876 |
-
/* translate yx values to actual scroll-to positions */
|
877 |
-
to[0]=_to.call(this,to[0],"y");
|
878 |
-
to[1]=_to.call(this,to[1],"x");
|
879 |
-
|
880 |
-
/*
|
881 |
-
check if scroll-to value moves the dragger instead of content.
|
882 |
-
Only pixel values apply on dragger (e.g. 100, "100px", "-=100" etc.)
|
883 |
-
*/
|
884 |
-
if(methodOptions.moveDragger){
|
885 |
-
to[0]*=d.scrollRatio.y;
|
886 |
-
to[1]*=d.scrollRatio.x;
|
887 |
-
}
|
888 |
-
|
889 |
-
methodOptions.dur=_isTabHidden() ? 0 : dur; //skip animations if browser tab is hidden
|
890 |
-
|
891 |
-
setTimeout(function(){
|
892 |
-
/* do the scrolling */
|
893 |
-
if(to[0]!==null && typeof to[0]!=="undefined" && o.axis!=="x" && d.overflowed[0]){ /* scroll y */
|
894 |
-
methodOptions.dir="y";
|
895 |
-
methodOptions.overwrite="all";
|
896 |
-
_scrollTo($this,to[0].toString(),methodOptions);
|
897 |
-
}
|
898 |
-
if(to[1]!==null && typeof to[1]!=="undefined" && o.axis!=="y" && d.overflowed[1]){ /* scroll x */
|
899 |
-
methodOptions.dir="x";
|
900 |
-
methodOptions.overwrite="none";
|
901 |
-
_scrollTo($this,to[1].toString(),methodOptions);
|
902 |
-
}
|
903 |
-
},methodOptions.timeout);
|
904 |
-
|
905 |
-
}
|
906 |
-
|
907 |
-
});
|
908 |
-
|
909 |
-
},
|
910 |
-
/* ---------------------------------------- */
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
/*
|
915 |
-
plugin stop method
|
916 |
-
stops scrolling animation
|
917 |
-
----------------------------------------
|
918 |
-
usage: $(selector).mCustomScrollbar("stop");
|
919 |
-
*/
|
920 |
-
stop:function(){
|
921 |
-
|
922 |
-
var selector=_selector.call(this); /* validate selector */
|
923 |
-
|
924 |
-
return $(selector).each(function(){
|
925 |
-
|
926 |
-
var $this=$(this);
|
927 |
-
|
928 |
-
if($this.data(pluginPfx)){ /* check if plugin has initialized */
|
929 |
-
|
930 |
-
_stop($this);
|
931 |
-
|
932 |
-
}
|
933 |
-
|
934 |
-
});
|
935 |
-
|
936 |
-
},
|
937 |
-
/* ---------------------------------------- */
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
/*
|
942 |
-
plugin disable method
|
943 |
-
temporarily disables the scrollbar(s)
|
944 |
-
----------------------------------------
|
945 |
-
usage: $(selector).mCustomScrollbar("disable",reset);
|
946 |
-
reset (boolean): resets content position to 0
|
947 |
-
*/
|
948 |
-
disable:function(r){
|
949 |
-
|
950 |
-
var selector=_selector.call(this); /* validate selector */
|
951 |
-
|
952 |
-
return $(selector).each(function(){
|
953 |
-
|
954 |
-
var $this=$(this);
|
955 |
-
|
956 |
-
if($this.data(pluginPfx)){ /* check if plugin has initialized */
|
957 |
-
|
958 |
-
var d=$this.data(pluginPfx);
|
959 |
-
|
960 |
-
_autoUpdate.call(this,"remove"); /* remove automatic updating */
|
961 |
-
|
962 |
-
_unbindEvents.call(this); /* unbind events */
|
963 |
-
|
964 |
-
if(r){_resetContentPosition.call(this);} /* reset content position */
|
965 |
-
|
966 |
-
_scrollbarVisibility.call(this,true); /* show/hide scrollbar(s) */
|
967 |
-
|
968 |
-
$this.addClass(classes[3]); /* add disable class */
|
969 |
-
|
970 |
-
}
|
971 |
-
|
972 |
-
});
|
973 |
-
|
974 |
-
},
|
975 |
-
/* ---------------------------------------- */
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
/*
|
980 |
-
plugin destroy method
|
981 |
-
completely removes the scrollbar(s) and returns the element to its original state
|
982 |
-
----------------------------------------
|
983 |
-
usage: $(selector).mCustomScrollbar("destroy");
|
984 |
-
*/
|
985 |
-
destroy:function(){
|
986 |
-
|
987 |
-
var selector=_selector.call(this); /* validate selector */
|
988 |
-
|
989 |
-
return $(selector).each(function(){
|
990 |
-
|
991 |
-
var $this=$(this);
|
992 |
-
|
993 |
-
if($this.data(pluginPfx)){ /* check if plugin has initialized */
|
994 |
-
|
995 |
-
var d=$this.data(pluginPfx),o=d.opt,
|
996 |
-
mCustomScrollBox=$("#mCSB_"+d.idx),
|
997 |
-
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
998 |
-
scrollbar=$(".mCSB_"+d.idx+"_scrollbar");
|
999 |
-
|
1000 |
-
if(o.live){removeLiveTimers(o.liveSelector || $(selector).selector);} /* remove live timers */
|
1001 |
-
|
1002 |
-
_autoUpdate.call(this,"remove"); /* remove automatic updating */
|
1003 |
-
|
1004 |
-
_unbindEvents.call(this); /* unbind events */
|
1005 |
-
|
1006 |
-
_resetContentPosition.call(this); /* reset content position */
|
1007 |
-
|
1008 |
-
$this.removeData(pluginPfx); /* remove plugin data object */
|
1009 |
-
|
1010 |
-
_delete(this,"mcs"); /* delete callbacks object */
|
1011 |
-
|
1012 |
-
/* remove plugin markup */
|
1013 |
-
scrollbar.remove(); /* remove scrollbar(s) first (those can be either inside or outside plugin's inner wrapper) */
|
1014 |
-
mCSB_container.find("img."+classes[2]).removeClass(classes[2]); /* remove loaded images flag */
|
1015 |
-
mCustomScrollBox.replaceWith(mCSB_container.contents()); /* replace plugin's inner wrapper with the original content */
|
1016 |
-
/* remove plugin classes from the element and add destroy class */
|
1017 |
-
$this.removeClass(pluginNS+" _"+pluginPfx+"_"+d.idx+" "+classes[6]+" "+classes[7]+" "+classes[5]+" "+classes[3]).addClass(classes[4]);
|
1018 |
-
|
1019 |
-
}
|
1020 |
-
|
1021 |
-
});
|
1022 |
-
|
1023 |
-
}
|
1024 |
-
/* ---------------------------------------- */
|
1025 |
-
|
1026 |
-
},
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
/*
|
1033 |
-
----------------------------------------
|
1034 |
-
FUNCTIONS
|
1035 |
-
----------------------------------------
|
1036 |
-
*/
|
1037 |
-
|
1038 |
-
/* validates selector (if selector is invalid or undefined uses the default one) */
|
1039 |
-
_selector=function(){
|
1040 |
-
return (typeof $(this)!=="object" || $(this).length<1) ? defaultSelector : this;
|
1041 |
-
},
|
1042 |
-
/* -------------------- */
|
1043 |
-
|
1044 |
-
|
1045 |
-
/* changes options according to theme */
|
1046 |
-
_theme=function(obj){
|
1047 |
-
var fixedSizeScrollbarThemes=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],
|
1048 |
-
nonExpandedScrollbarThemes=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],
|
1049 |
-
disabledScrollButtonsThemes=["minimal","minimal-dark"],
|
1050 |
-
enabledAutoHideScrollbarThemes=["minimal","minimal-dark"],
|
1051 |
-
scrollbarPositionOutsideThemes=["minimal","minimal-dark"];
|
1052 |
-
obj.autoDraggerLength=$.inArray(obj.theme,fixedSizeScrollbarThemes) > -1 ? false : obj.autoDraggerLength;
|
1053 |
-
obj.autoExpandScrollbar=$.inArray(obj.theme,nonExpandedScrollbarThemes) > -1 ? false : obj.autoExpandScrollbar;
|
1054 |
-
obj.scrollButtons.enable=$.inArray(obj.theme,disabledScrollButtonsThemes) > -1 ? false : obj.scrollButtons.enable;
|
1055 |
-
obj.autoHideScrollbar=$.inArray(obj.theme,enabledAutoHideScrollbarThemes) > -1 ? true : obj.autoHideScrollbar;
|
1056 |
-
obj.scrollbarPosition=$.inArray(obj.theme,scrollbarPositionOutsideThemes) > -1 ? "outside" : obj.scrollbarPosition;
|
1057 |
-
},
|
1058 |
-
/* -------------------- */
|
1059 |
-
|
1060 |
-
|
1061 |
-
/* live option timers removal */
|
1062 |
-
removeLiveTimers=function(selector){
|
1063 |
-
if(liveTimers[selector]){
|
1064 |
-
clearTimeout(liveTimers[selector]);
|
1065 |
-
_delete(liveTimers,selector);
|
1066 |
-
}
|
1067 |
-
},
|
1068 |
-
/* -------------------- */
|
1069 |
-
|
1070 |
-
|
1071 |
-
/* normalizes axis option to valid values: "y", "x", "yx" */
|
1072 |
-
_findAxis=function(val){
|
1073 |
-
return (val==="yx" || val==="xy" || val==="auto") ? "yx" : (val==="x" || val==="horizontal") ? "x" : "y";
|
1074 |
-
},
|
1075 |
-
/* -------------------- */
|
1076 |
-
|
1077 |
-
|
1078 |
-
/* normalizes scrollButtons.scrollType option to valid values: "stepless", "stepped" */
|
1079 |
-
_findScrollButtonsType=function(val){
|
1080 |
-
return (val==="stepped" || val==="pixels" || val==="step" || val==="click") ? "stepped" : "stepless";
|
1081 |
-
},
|
1082 |
-
/* -------------------- */
|
1083 |
-
|
1084 |
-
|
1085 |
-
/* generates plugin markup */
|
1086 |
-
_pluginMarkup=function(){
|
1087 |
-
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
1088 |
-
expandClass=o.autoExpandScrollbar ? " "+classes[1]+"_expand" : "",
|
1089 |
-
scrollbar=["<div id='mCSB_"+d.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+d.idx+"_scrollbar mCS-"+o.theme+" mCSB_scrollTools_vertical"+expandClass+"'><div class='"+classes[12]+"'><div id='mCSB_"+d.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+d.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+d.idx+"_scrollbar mCS-"+o.theme+" mCSB_scrollTools_horizontal"+expandClass+"'><div class='"+classes[12]+"'><div id='mCSB_"+d.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],
|
1090 |
-
wrapperClass=o.axis==="yx" ? "mCSB_vertical_horizontal" : o.axis==="x" ? "mCSB_horizontal" : "mCSB_vertical",
|
1091 |
-
scrollbars=o.axis==="yx" ? scrollbar[0]+scrollbar[1] : o.axis==="x" ? scrollbar[1] : scrollbar[0],
|
1092 |
-
contentWrapper=o.axis==="yx" ? "<div id='mCSB_"+d.idx+"_container_wrapper' class='mCSB_container_wrapper' />" : "",
|
1093 |
-
autoHideClass=o.autoHideScrollbar ? " "+classes[6] : "",
|
1094 |
-
scrollbarDirClass=(o.axis!=="x" && d.langDir==="rtl") ? " "+classes[7] : "";
|
1095 |
-
if(o.setWidth){$this.css("width",o.setWidth);} /* set element width */
|
1096 |
-
if(o.setHeight){$this.css("height",o.setHeight);} /* set element height */
|
1097 |
-
o.setLeft=(o.axis!=="y" && d.langDir==="rtl") ? "989999px" : o.setLeft; /* adjust left position for rtl direction */
|
1098 |
-
$this.addClass(pluginNS+" _"+pluginPfx+"_"+d.idx+autoHideClass+scrollbarDirClass).wrapInner("<div id='mCSB_"+d.idx+"' class='mCustomScrollBox mCS-"+o.theme+" "+wrapperClass+"'><div id='mCSB_"+d.idx+"_container' class='mCSB_container' style='position:relative; top:"+o.setTop+"; left:"+o.setLeft+";' dir='"+d.langDir+"' /></div>");
|
1099 |
-
var mCustomScrollBox=$("#mCSB_"+d.idx),
|
1100 |
-
mCSB_container=$("#mCSB_"+d.idx+"_container");
|
1101 |
-
if(o.axis!=="y" && !o.advanced.autoExpandHorizontalScroll){
|
1102 |
-
mCSB_container.css("width",_contentWidth(mCSB_container));
|
1103 |
-
}
|
1104 |
-
if(o.scrollbarPosition==="outside"){
|
1105 |
-
if($this.css("position")==="static"){ /* requires elements with non-static position */
|
1106 |
-
$this.css("position","relative");
|
1107 |
-
}
|
1108 |
-
$this.css("overflow","visible");
|
1109 |
-
mCustomScrollBox.addClass("mCSB_outside").after(scrollbars);
|
1110 |
-
}else{
|
1111 |
-
mCustomScrollBox.addClass("mCSB_inside").append(scrollbars);
|
1112 |
-
mCSB_container.wrap(contentWrapper);
|
1113 |
-
}
|
1114 |
-
_scrollButtons.call(this); /* add scrollbar buttons */
|
1115 |
-
/* minimum dragger length */
|
1116 |
-
var mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")];
|
1117 |
-
mCSB_dragger[0].css("min-height",mCSB_dragger[0].height());
|
1118 |
-
mCSB_dragger[1].css("min-width",mCSB_dragger[1].width());
|
1119 |
-
},
|
1120 |
-
/* -------------------- */
|
1121 |
-
|
1122 |
-
|
1123 |
-
/* calculates content width */
|
1124 |
-
_contentWidth=function(el){
|
1125 |
-
var val=[el[0].scrollWidth,Math.max.apply(Math,el.children().map(function(){return $(this).outerWidth(true);}).get())],w=el.parent().width();
|
1126 |
-
return val[0]>w ? val[0] : val[1]>w ? val[1] : "100%";
|
1127 |
-
},
|
1128 |
-
/* -------------------- */
|
1129 |
-
|
1130 |
-
|
1131 |
-
/* expands content horizontally */
|
1132 |
-
_expandContentHorizontally=function(){
|
1133 |
-
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
1134 |
-
mCSB_container=$("#mCSB_"+d.idx+"_container");
|
1135 |
-
if(o.advanced.autoExpandHorizontalScroll && o.axis!=="y"){
|
1136 |
-
/* calculate scrollWidth */
|
1137 |
-
mCSB_container.css({"width":"auto","min-width":0,"overflow-x":"scroll"});
|
1138 |
-
var w=Math.ceil(mCSB_container[0].scrollWidth);
|
1139 |
-
if(o.advanced.autoExpandHorizontalScroll===3 || (o.advanced.autoExpandHorizontalScroll!==2 && w>mCSB_container.parent().width())){
|
1140 |
-
mCSB_container.css({"width":w,"min-width":"100%","overflow-x":"inherit"});
|
1141 |
-
}else{
|
1142 |
-
/*
|
1143 |
-
wrap content with an infinite width div and set its position to absolute and width to auto.
|
1144 |
-
Setting width to auto before calculating the actual width is important!
|
1145 |
-
We must let the browser set the width as browser zoom values are impossible to calculate.
|
1146 |
-
*/
|
1147 |
-
mCSB_container.css({"overflow-x":"inherit","position":"absolute"})
|
1148 |
-
.wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />")
|
1149 |
-
.css({ /* set actual width, original position and un-wrap */
|
1150 |
-
/*
|
1151 |
-
get the exact width (with decimals) and then round-up.
|
1152 |
-
Using jquery outerWidth() will round the width value which will mess up with inner elements that have non-integer width
|
1153 |
-
*/
|
1154 |
-
"width":(Math.ceil(mCSB_container[0].getBoundingClientRect().right+0.4)-Math.floor(mCSB_container[0].getBoundingClientRect().left)),
|
1155 |
-
"min-width":"100%",
|
1156 |
-
"position":"relative"
|
1157 |
-
}).unwrap();
|
1158 |
-
}
|
1159 |
-
}
|
1160 |
-
},
|
1161 |
-
/* -------------------- */
|
1162 |
-
|
1163 |
-
|
1164 |
-
/* adds scrollbar buttons */
|
1165 |
-
_scrollButtons=function(){
|
1166 |
-
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
1167 |
-
mCSB_scrollTools=$(".mCSB_"+d.idx+"_scrollbar:first"),
|
1168 |
-
tabindex=!_isNumeric(o.scrollButtons.tabindex) ? "" : "tabindex='"+o.scrollButtons.tabindex+"'",
|
1169 |
-
btnHTML=[
|
1170 |
-
"<a href='#' class='"+classes[13]+"' "+tabindex+" />",
|
1171 |
-
"<a href='#' class='"+classes[14]+"' "+tabindex+" />",
|
1172 |
-
"<a href='#' class='"+classes[15]+"' "+tabindex+" />",
|
1173 |
-
"<a href='#' class='"+classes[16]+"' "+tabindex+" />"
|
1174 |
-
],
|
1175 |
-
btn=[(o.axis==="x" ? btnHTML[2] : btnHTML[0]),(o.axis==="x" ? btnHTML[3] : btnHTML[1]),btnHTML[2],btnHTML[3]];
|
1176 |
-
if(o.scrollButtons.enable){
|
1177 |
-
mCSB_scrollTools.prepend(btn[0]).append(btn[1]).next(".mCSB_scrollTools").prepend(btn[2]).append(btn[3]);
|
1178 |
-
}
|
1179 |
-
},
|
1180 |
-
/* -------------------- */
|
1181 |
-
|
1182 |
-
|
1183 |
-
/* auto-adjusts scrollbar dragger length */
|
1184 |
-
_setDraggerLength=function(){
|
1185 |
-
var $this=$(this),d=$this.data(pluginPfx),
|
1186 |
-
mCustomScrollBox=$("#mCSB_"+d.idx),
|
1187 |
-
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
1188 |
-
mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")],
|
1189 |
-
ratio=[mCustomScrollBox.height()/mCSB_container.outerHeight(false),mCustomScrollBox.width()/mCSB_container.outerWidth(false)],
|
1190 |
-
l=[
|
1191 |
-
parseInt(mCSB_dragger[0].css("min-height")),Math.round(ratio[0]*mCSB_dragger[0].parent().height()),
|
1192 |
-
parseInt(mCSB_dragger[1].css("min-width")),Math.round(ratio[1]*mCSB_dragger[1].parent().width())
|
1193 |
-
],
|
1194 |
-
h=oldIE && (l[1]<l[0]) ? l[0] : l[1],w=oldIE && (l[3]<l[2]) ? l[2] : l[3];
|
1195 |
-
mCSB_dragger[0].css({
|
1196 |
-
"height":h,"max-height":(mCSB_dragger[0].parent().height()-10)
|
1197 |
-
}).find(".mCSB_dragger_bar").css({"line-height":l[0]+"px"});
|
1198 |
-
mCSB_dragger[1].css({
|
1199 |
-
"width":w,"max-width":(mCSB_dragger[1].parent().width()-10)
|
1200 |
-
});
|
1201 |
-
},
|
1202 |
-
/* -------------------- */
|
1203 |
-
|
1204 |
-
|
1205 |
-
/* calculates scrollbar to content ratio */
|
1206 |
-
_scrollRatio=function(){
|
1207 |
-
var $this=$(this),d=$this.data(pluginPfx),
|
1208 |
-
mCustomScrollBox=$("#mCSB_"+d.idx),
|
1209 |
-
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
1210 |
-
mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")],
|
1211 |
-
scrollAmount=[mCSB_container.outerHeight(false)-mCustomScrollBox.height(),mCSB_container.outerWidth(false)-mCustomScrollBox.width()],
|
1212 |
-
ratio=[
|
1213 |
-
scrollAmount[0]/(mCSB_dragger[0].parent().height()-mCSB_dragger[0].height()),
|
1214 |
-
scrollAmount[1]/(mCSB_dragger[1].parent().width()-mCSB_dragger[1].width())
|
1215 |
-
];
|
1216 |
-
d.scrollRatio={y:ratio[0],x:ratio[1]};
|
1217 |
-
},
|
1218 |
-
/* -------------------- */
|
1219 |
-
|
1220 |
-
|
1221 |
-
/* toggles scrolling classes */
|
1222 |
-
_onDragClasses=function(el,action,xpnd){
|
1223 |
-
var expandClass=xpnd ? classes[0]+"_expanded" : "",
|
1224 |
-
scrollbar=el.closest(".mCSB_scrollTools");
|
1225 |
-
if(action==="active"){
|
1226 |
-
el.toggleClass(classes[0]+" "+expandClass); scrollbar.toggleClass(classes[1]);
|
1227 |
-
el[0]._draggable=el[0]._draggable ? 0 : 1;
|
1228 |
-
}else{
|
1229 |
-
if(!el[0]._draggable){
|
1230 |
-
if(action==="hide"){
|
1231 |
-
el.removeClass(classes[0]); scrollbar.removeClass(classes[1]);
|
1232 |
-
}else{
|
1233 |
-
el.addClass(classes[0]); scrollbar.addClass(classes[1]);
|
1234 |
-
}
|
1235 |
-
}
|
1236 |
-
}
|
1237 |
-
},
|
1238 |
-
/* -------------------- */
|
1239 |
-
|
1240 |
-
|
1241 |
-
/* checks if content overflows its container to determine if scrolling is required */
|
1242 |
-
_overflowed=function(){
|
1243 |
-
var $this=$(this),d=$this.data(pluginPfx),
|
1244 |
-
mCustomScrollBox=$("#mCSB_"+d.idx),
|
1245 |
-
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
1246 |
-
contentHeight=d.overflowed==null ? mCSB_container.height() : mCSB_container.outerHeight(false),
|
1247 |
-
contentWidth=d.overflowed==null ? mCSB_container.width() : mCSB_container.outerWidth(false),
|
1248 |
-
h=mCSB_container[0].scrollHeight,w=mCSB_container[0].scrollWidth;
|
1249 |
-
if(h>contentHeight){contentHeight=h;}
|
1250 |
-
if(w>contentWidth){contentWidth=w;}
|
1251 |
-
return [contentHeight>mCustomScrollBox.height(),contentWidth>mCustomScrollBox.width()];
|
1252 |
-
},
|
1253 |
-
/* -------------------- */
|
1254 |
-
|
1255 |
-
|
1256 |
-
/* resets content position to 0 */
|
1257 |
-
_resetContentPosition=function(){
|
1258 |
-
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
1259 |
-
mCustomScrollBox=$("#mCSB_"+d.idx),
|
1260 |
-
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
1261 |
-
mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")];
|
1262 |
-
_stop($this); /* stop any current scrolling before resetting */
|
1263 |
-
if((o.axis!=="x" && !d.overflowed[0]) || (o.axis==="y" && d.overflowed[0])){ /* reset y */
|
1264 |
-
mCSB_dragger[0].add(mCSB_container).css("top",0);
|
1265 |
-
_scrollTo($this,"_resetY");
|
1266 |
-
}
|
1267 |
-
if((o.axis!=="y" && !d.overflowed[1]) || (o.axis==="x" && d.overflowed[1])){ /* reset x */
|
1268 |
-
var cx=dx=0;
|
1269 |
-
if(d.langDir==="rtl"){ /* adjust left position for rtl direction */
|
1270 |
-
cx=mCustomScrollBox.width()-mCSB_container.outerWidth(false);
|
1271 |
-
dx=Math.abs(cx/d.scrollRatio.x);
|
1272 |
-
}
|
1273 |
-
mCSB_container.css("left",cx);
|
1274 |
-
mCSB_dragger[1].css("left",dx);
|
1275 |
-
_scrollTo($this,"_resetX");
|
1276 |
-
}
|
1277 |
-
},
|
1278 |
-
/* -------------------- */
|
1279 |
-
|
1280 |
-
|
1281 |
-
/* binds scrollbar events */
|
1282 |
-
_bindEvents=function(){
|
1283 |
-
var $this=$(this),d=$this.data(pluginPfx),o=d.opt;
|
1284 |
-
if(!d.bindEvents){ /* check if events are already bound */
|
1285 |
-
_draggable.call(this);
|
1286 |
-
if(o.contentTouchScroll){_contentDraggable.call(this);}
|
1287 |
-
_selectable.call(this);
|
1288 |
-
if(o.mouseWheel.enable){ /* bind mousewheel fn when plugin is available */
|
1289 |
-
function _mwt(){
|
1290 |
-
mousewheelTimeout=setTimeout(function(){
|
1291 |
-
if(!$.event.special.mousewheel){
|
1292 |
-
_mwt();
|
1293 |
-
}else{
|
1294 |
-
clearTimeout(mousewheelTimeout);
|
1295 |
-
_mousewheel.call($this[0]);
|
1296 |
-
}
|
1297 |
-
},100);
|
1298 |
-
}
|
1299 |
-
var mousewheelTimeout;
|
1300 |
-
_mwt();
|
1301 |
-
}
|
1302 |
-
_draggerRail.call(this);
|
1303 |
-
_wrapperScroll.call(this);
|
1304 |
-
if(o.advanced.autoScrollOnFocus){_focus.call(this);}
|
1305 |
-
if(o.scrollButtons.enable){_buttons.call(this);}
|
1306 |
-
if(o.keyboard.enable){_keyboard.call(this);}
|
1307 |
-
d.bindEvents=true;
|
1308 |
-
}
|
1309 |
-
},
|
1310 |
-
/* -------------------- */
|
1311 |
-
|
1312 |
-
|
1313 |
-
/* unbinds scrollbar events */
|
1314 |
-
_unbindEvents=function(){
|
1315 |
-
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
1316 |
-
namespace=pluginPfx+"_"+d.idx,
|
1317 |
-
sb=".mCSB_"+d.idx+"_scrollbar",
|
1318 |
-
sel=$("#mCSB_"+d.idx+",#mCSB_"+d.idx+"_container,#mCSB_"+d.idx+"_container_wrapper,"+sb+" ."+classes[12]+",#mCSB_"+d.idx+"_dragger_vertical,#mCSB_"+d.idx+"_dragger_horizontal,"+sb+">a"),
|
1319 |
-
mCSB_container=$("#mCSB_"+d.idx+"_container");
|
1320 |
-
if(o.advanced.releaseDraggableSelectors){sel.add($(o.advanced.releaseDraggableSelectors));}
|
1321 |
-
if(o.advanced.extraDraggableSelectors){sel.add($(o.advanced.extraDraggableSelectors));}
|
1322 |
-
if(d.bindEvents){ /* check if events are bound */
|
1323 |
-
/* unbind namespaced events from document/selectors */
|
1324 |
-
$(document).add($(!_canAccessIFrame() || top.document)).unbind("."+namespace);
|
1325 |
-
sel.each(function(){
|
1326 |
-
$(this).unbind("."+namespace);
|
1327 |
-
});
|
1328 |
-
/* clear and delete timeouts/objects */
|
1329 |
-
clearTimeout($this[0]._focusTimeout); _delete($this[0],"_focusTimeout");
|
1330 |
-
clearTimeout(d.sequential.step); _delete(d.sequential,"step");
|
1331 |
-
clearTimeout(mCSB_container[0].onCompleteTimeout); _delete(mCSB_container[0],"onCompleteTimeout");
|
1332 |
-
d.bindEvents=false;
|
1333 |
-
}
|
1334 |
-
},
|
1335 |
-
/* -------------------- */
|
1336 |
-
|
1337 |
-
|
1338 |
-
/* toggles scrollbar visibility */
|
1339 |
-
_scrollbarVisibility=function(disabled){
|
1340 |
-
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
1341 |
-
contentWrapper=$("#mCSB_"+d.idx+"_container_wrapper"),
|
1342 |
-
content=contentWrapper.length ? contentWrapper : $("#mCSB_"+d.idx+"_container"),
|
1343 |
-
scrollbar=[$("#mCSB_"+d.idx+"_scrollbar_vertical"),$("#mCSB_"+d.idx+"_scrollbar_horizontal")],
|
1344 |
-
mCSB_dragger=[scrollbar[0].find(".mCSB_dragger"),scrollbar[1].find(".mCSB_dragger")];
|
1345 |
-
if(o.axis!=="x"){
|
1346 |
-
if(d.overflowed[0] && !disabled){
|
1347 |
-
scrollbar[0].add(mCSB_dragger[0]).add(scrollbar[0].children("a")).css("display","block");
|
1348 |
-
content.removeClass(classes[8]+" "+classes[10]);
|
1349 |
-
}else{
|
1350 |
-
if(o.alwaysShowScrollbar){
|
1351 |
-
if(o.alwaysShowScrollbar!==2){mCSB_dragger[0].css("display","none");}
|
1352 |
-
content.removeClass(classes[10]);
|
1353 |
-
}else{
|
1354 |
-
scrollbar[0].css("display","none");
|
1355 |
-
content.addClass(classes[10]);
|
1356 |
-
}
|
1357 |
-
content.addClass(classes[8]);
|
1358 |
-
}
|
1359 |
-
}
|
1360 |
-
if(o.axis!=="y"){
|
1361 |
-
if(d.overflowed[1] && !disabled){
|
1362 |
-
scrollbar[1].add(mCSB_dragger[1]).add(scrollbar[1].children("a")).css("display","block");
|
1363 |
-
content.removeClass(classes[9]+" "+classes[11]);
|
1364 |
-
}else{
|
1365 |
-
if(o.alwaysShowScrollbar){
|
1366 |
-
if(o.alwaysShowScrollbar!==2){mCSB_dragger[1].css("display","none");}
|
1367 |
-
content.removeClass(classes[11]);
|
1368 |
-
}else{
|
1369 |
-
scrollbar[1].css("display","none");
|
1370 |
-
content.addClass(classes[11]);
|
1371 |
-
}
|
1372 |
-
content.addClass(classes[9]);
|
1373 |
-
}
|
1374 |
-
}
|
1375 |
-
if(!d.overflowed[0] && !d.overflowed[1]){
|
1376 |
-
$this.addClass(classes[5]);
|
1377 |
-
}else{
|
1378 |
-
$this.removeClass(classes[5]);
|
1379 |
-
}
|
1380 |
-
},
|
1381 |
-
/* -------------------- */
|
1382 |
-
|
1383 |
-
|
1384 |
-
/* returns input coordinates of pointer, touch and mouse events (relative to document) */
|
1385 |
-
_coordinates=function(e){
|
1386 |
-
var t=e.type,o=e.target.ownerDocument!==document && frameElement!==null ? [$(frameElement).offset().top,$(frameElement).offset().left] : null,
|
1387 |
-
io=_canAccessIFrame() && e.target.ownerDocument!==top.document && frameElement!==null ? [$(e.view.frameElement).offset().top,$(e.view.frameElement).offset().left] : [0,0];
|
1388 |
-
switch(t){
|
1389 |
-
case "pointerdown": case "MSPointerDown": case "pointermove": case "MSPointerMove": case "pointerup": case "MSPointerUp":
|
1390 |
-
return o ? [e.originalEvent.pageY-o[0]+io[0],e.originalEvent.pageX-o[1]+io[1],false] : [e.originalEvent.pageY,e.originalEvent.pageX,false];
|
1391 |
-
break;
|
1392 |
-
case "touchstart": case "touchmove": case "touchend":
|
1393 |
-
var touch=e.originalEvent.touches[0] || e.originalEvent.changedTouches[0],
|
1394 |
-
touches=e.originalEvent.touches.length || e.originalEvent.changedTouches.length;
|
1395 |
-
return e.target.ownerDocument!==document ? [touch.screenY,touch.screenX,touches>1] : [touch.pageY,touch.pageX,touches>1];
|
1396 |
-
break;
|
1397 |
-
default:
|
1398 |
-
return o ? [e.pageY-o[0]+io[0],e.pageX-o[1]+io[1],false] : [e.pageY,e.pageX,false];
|
1399 |
-
}
|
1400 |
-
},
|
1401 |
-
/* -------------------- */
|
1402 |
-
|
1403 |
-
|
1404 |
-
/*
|
1405 |
-
SCROLLBAR DRAG EVENTS
|
1406 |
-
scrolls content via scrollbar dragging
|
1407 |
-
*/
|
1408 |
-
_draggable=function(){
|
1409 |
-
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
1410 |
-
namespace=pluginPfx+"_"+d.idx,
|
1411 |
-
draggerId=["mCSB_"+d.idx+"_dragger_vertical","mCSB_"+d.idx+"_dragger_horizontal"],
|
1412 |
-
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
1413 |
-
mCSB_dragger=$("#"+draggerId[0]+",#"+draggerId[1]),
|
1414 |
-
draggable,dragY,dragX,
|
1415 |
-
rds=o.advanced.releaseDraggableSelectors ? mCSB_dragger.add($(o.advanced.releaseDraggableSelectors)) : mCSB_dragger,
|
1416 |
-
eds=o.advanced.extraDraggableSelectors ? $(!_canAccessIFrame() || top.document).add($(o.advanced.extraDraggableSelectors)) : $(!_canAccessIFrame() || top.document);
|
1417 |
-
mCSB_dragger.bind("contextmenu."+namespace,function(e){
|
1418 |
-
e.preventDefault(); //prevent right click
|
1419 |
-
}).bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace,function(e){
|
1420 |
-
e.stopImmediatePropagation();
|
1421 |
-
e.preventDefault();
|
1422 |
-
if(!_mouseBtnLeft(e)){return;} /* left mouse button only */
|
1423 |
-
touchActive=true;
|
1424 |
-
if(oldIE){document.onselectstart=function(){return false;}} /* disable text selection for IE < 9 */
|
1425 |
-
_iframe.call(mCSB_container,false); /* enable scrollbar dragging over iframes by disabling their events */
|
1426 |
-
_stop($this);
|
1427 |
-
draggable=$(this);
|
1428 |
-
var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left,
|
1429 |
-
h=draggable.height()+offset.top,w=draggable.width()+offset.left;
|
1430 |
-
if(y<h && y>0 && x<w && x>0){
|
1431 |
-
dragY=y;
|
1432 |
-
dragX=x;
|
1433 |
-
}
|
1434 |
-
_onDragClasses(draggable,"active",o.autoExpandScrollbar);
|
1435 |
-
}).bind("touchmove."+namespace,function(e){
|
1436 |
-
e.stopImmediatePropagation();
|
1437 |
-
e.preventDefault();
|
1438 |
-
var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left;
|
1439 |
-
_drag(dragY,dragX,y,x);
|
1440 |
-
});
|
1441 |
-
$(document).add(eds).bind("mousemove."+namespace+" pointermove."+namespace+" MSPointerMove."+namespace,function(e){
|
1442 |
-
if(draggable){
|
1443 |
-
var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left;
|
1444 |
-
if(dragY===y && dragX===x){return;} /* has it really moved? */
|
1445 |
-
_drag(dragY,dragX,y,x);
|
1446 |
-
}
|
1447 |
-
}).add(rds).bind("mouseup."+namespace+" touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace,function(e){
|
1448 |
-
if(draggable){
|
1449 |
-
_onDragClasses(draggable,"active",o.autoExpandScrollbar);
|
1450 |
-
draggable=null;
|
1451 |
-
}
|
1452 |
-
touchActive=false;
|
1453 |
-
if(oldIE){document.onselectstart=null;} /* enable text selection for IE < 9 */
|
1454 |
-
_iframe.call(mCSB_container,true); /* enable iframes events */
|
1455 |
-
});
|
1456 |
-
function _drag(dragY,dragX,y,x){
|
1457 |
-
mCSB_container[0].idleTimer=o.scrollInertia<233 ? 250 : 0;
|
1458 |
-
if(draggable.attr("id")===draggerId[1]){
|
1459 |
-
var dir="x",to=((draggable[0].offsetLeft-dragX)+x)*d.scrollRatio.x;
|
1460 |
-
}else{
|
1461 |
-
var dir="y",to=((draggable[0].offsetTop-dragY)+y)*d.scrollRatio.y;
|
1462 |
-
}
|
1463 |
-
_scrollTo($this,to.toString(),{dir:dir,drag:true});
|
1464 |
-
}
|
1465 |
-
},
|
1466 |
-
/* -------------------- */
|
1467 |
-
|
1468 |
-
|
1469 |
-
/*
|
1470 |
-
TOUCH SWIPE EVENTS
|
1471 |
-
scrolls content via touch swipe
|
1472 |
-
Emulates the native touch-swipe scrolling with momentum found in iOS, Android and WP devices
|
1473 |
-
*/
|
1474 |
-
_contentDraggable=function(){
|
1475 |
-
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
1476 |
-
namespace=pluginPfx+"_"+d.idx,
|
1477 |
-
mCustomScrollBox=$("#mCSB_"+d.idx),
|
1478 |
-
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
1479 |
-
mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")],
|
1480 |
-
draggable,dragY,dragX,touchStartY,touchStartX,touchMoveY=[],touchMoveX=[],startTime,runningTime,endTime,distance,speed,amount,
|
1481 |
-
durA=0,durB,overwrite=o.axis==="yx" ? "none" : "all",touchIntent=[],touchDrag,docDrag,
|
1482 |
-
iframe=mCSB_container.find("iframe"),
|
1483 |
-
events=[
|
1484 |
-
"touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace, //start
|
1485 |
-
"touchmove."+namespace+" pointermove."+namespace+" MSPointerMove."+namespace, //move
|
1486 |
-
"touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace //end
|
1487 |
-
],
|
1488 |
-
touchAction=document.body.style.touchAction!==undefined && document.body.style.touchAction!=="";
|
1489 |
-
mCSB_container.bind(events[0],function(e){
|
1490 |
-
_onTouchstart(e);
|
1491 |
-
}).bind(events[1],function(e){
|
1492 |
-
_onTouchmove(e);
|
1493 |
-
});
|
1494 |
-
mCustomScrollBox.bind(events[0],function(e){
|
1495 |
-
_onTouchstart2(e);
|
1496 |
-
}).bind(events[2],function(e){
|
1497 |
-
_onTouchend(e);
|
1498 |
-
});
|
1499 |
-
if(iframe.length){
|
1500 |
-
iframe.each(function(){
|
1501 |
-
$(this).bind("load",function(){
|
1502 |
-
/* bind events on accessible iframes */
|
1503 |
-
if(_canAccessIFrame(this)){
|
1504 |
-
$(this.contentDocument || this.contentWindow.document).bind(events[0],function(e){
|
1505 |
-
_onTouchstart(e);
|
1506 |
-
_onTouchstart2(e);
|
1507 |
-
}).bind(events[1],function(e){
|
1508 |
-
_onTouchmove(e);
|
1509 |
-
}).bind(events[2],function(e){
|
1510 |
-
_onTouchend(e);
|
1511 |
-
});
|
1512 |
-
}
|
1513 |
-
});
|
1514 |
-
});
|
1515 |
-
}
|
1516 |
-
function _onTouchstart(e){
|
1517 |
-
if(!_pointerTouch(e) || touchActive || _coordinates(e)[2]){touchable=0; return;}
|
1518 |
-
touchable=1; touchDrag=0; docDrag=0; draggable=1;
|
1519 |
-
$this.removeClass("mCS_touch_action");
|
1520 |
-
var offset=mCSB_container.offset();
|
1521 |
-
dragY=_coordinates(e)[0]-offset.top;
|
1522 |
-
dragX=_coordinates(e)[1]-offset.left;
|
1523 |
-
touchIntent=[_coordinates(e)[0],_coordinates(e)[1]];
|
1524 |
-
}
|
1525 |
-
function _onTouchmove(e){
|
1526 |
-
if(!_pointerTouch(e) || touchActive || _coordinates(e)[2]){return;}
|
1527 |
-
if(!o.documentTouchScroll){e.preventDefault();}
|
1528 |
-
e.stopImmediatePropagation();
|
1529 |
-
if(docDrag && !touchDrag){return;}
|
1530 |
-
if(draggable){
|
1531 |
-
runningTime=_getTime();
|
1532 |
-
var offset=mCustomScrollBox.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left,
|
1533 |
-
easing="mcsLinearOut";
|
1534 |
-
touchMoveY.push(y);
|
1535 |
-
touchMoveX.push(x);
|
1536 |
-
touchIntent[2]=Math.abs(_coordinates(e)[0]-touchIntent[0]); touchIntent[3]=Math.abs(_coordinates(e)[1]-touchIntent[1]);
|
1537 |
-
if(d.overflowed[0]){
|
1538 |
-
var limit=mCSB_dragger[0].parent().height()-mCSB_dragger[0].height(),
|
1539 |
-
prevent=((dragY-y)>0 && (y-dragY)>-(limit*d.scrollRatio.y) && (touchIntent[3]*2<touchIntent[2] || o.axis==="yx"));
|
1540 |
-
}
|
1541 |
-
if(d.overflowed[1]){
|
1542 |
-
var limitX=mCSB_dragger[1].parent().width()-mCSB_dragger[1].width(),
|
1543 |
-
preventX=((dragX-x)>0 && (x-dragX)>-(limitX*d.scrollRatio.x) && (touchIntent[2]*2<touchIntent[3] || o.axis==="yx"));
|
1544 |
-
}
|
1545 |
-
if(prevent || preventX){ /* prevent native document scrolling */
|
1546 |
-
if(!touchAction){e.preventDefault();}
|
1547 |
-
touchDrag=1;
|
1548 |
-
}else{
|
1549 |
-
docDrag=1;
|
1550 |
-
$this.addClass("mCS_touch_action");
|
1551 |
-
}
|
1552 |
-
if(touchAction){e.preventDefault();}
|
1553 |
-
amount=o.axis==="yx" ? [(dragY-y),(dragX-x)] : o.axis==="x" ? [null,(dragX-x)] : [(dragY-y),null];
|
1554 |
-
mCSB_container[0].idleTimer=250;
|
1555 |
-
if(d.overflowed[0]){_drag(amount[0],durA,easing,"y","all",true);}
|
1556 |
-
if(d.overflowed[1]){_drag(amount[1],durA,easing,"x",overwrite,true);}
|
1557 |
-
}
|
1558 |
-
}
|
1559 |
-
function _onTouchstart2(e){
|
1560 |
-
if(!_pointerTouch(e) || touchActive || _coordinates(e)[2]){touchable=0; return;}
|
1561 |
-
touchable=1;
|
1562 |
-
e.stopImmediatePropagation();
|
1563 |
-
_stop($this);
|
1564 |
-
startTime=_getTime();
|
1565 |
-
var offset=mCustomScrollBox.offset();
|
1566 |
-
touchStartY=_coordinates(e)[0]-offset.top;
|
1567 |
-
touchStartX=_coordinates(e)[1]-offset.left;
|
1568 |
-
touchMoveY=[]; touchMoveX=[];
|
1569 |
-
}
|
1570 |
-
function _onTouchend(e){
|
1571 |
-
if(!_pointerTouch(e) || touchActive || _coordinates(e)[2]){return;}
|
1572 |
-
draggable=0;
|
1573 |
-
e.stopImmediatePropagation();
|
1574 |
-
touchDrag=0; docDrag=0;
|
1575 |
-
endTime=_getTime();
|
1576 |
-
var offset=mCustomScrollBox.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left;
|
1577 |
-
if((endTime-runningTime)>30){return;}
|
1578 |
-
speed=1000/(endTime-startTime);
|
1579 |
-
var easing="mcsEaseOut",slow=speed<2.5,
|
1580 |
-
diff=slow ? [touchMoveY[touchMoveY.length-2],touchMoveX[touchMoveX.length-2]] : [0,0];
|
1581 |
-
distance=slow ? [(y-diff[0]),(x-diff[1])] : [y-touchStartY,x-touchStartX];
|
1582 |
-
var absDistance=[Math.abs(distance[0]),Math.abs(distance[1])];
|
1583 |
-
speed=slow ? [Math.abs(distance[0]/4),Math.abs(distance[1]/4)] : [speed,speed];
|
1584 |
-
var a=[
|
1585 |
-
Math.abs(mCSB_container[0].offsetTop)-(distance[0]*_m((absDistance[0]/speed[0]),speed[0])),
|
1586 |
-
Math.abs(mCSB_container[0].offsetLeft)-(distance[1]*_m((absDistance[1]/speed[1]),speed[1]))
|
1587 |
-
];
|
1588 |
-
amount=o.axis==="yx" ? [a[0],a[1]] : o.axis==="x" ? [null,a[1]] : [a[0],null];
|
1589 |
-
durB=[(absDistance[0]*4)+o.scrollInertia,(absDistance[1]*4)+o.scrollInertia];
|
1590 |
-
var md=parseInt(o.contentTouchScroll) || 0; /* absolute minimum distance required */
|
1591 |
-
amount[0]=absDistance[0]>md ? amount[0] : 0;
|
1592 |
-
amount[1]=absDistance[1]>md ? amount[1] : 0;
|
1593 |
-
if(d.overflowed[0]){_drag(amount[0],durB[0],easing,"y",overwrite,false);}
|
1594 |
-
if(d.overflowed[1]){_drag(amount[1],durB[1],easing,"x",overwrite,false);}
|
1595 |
-
}
|
1596 |
-
function _m(ds,s){
|
1597 |
-
var r=[s*1.5,s*2,s/1.5,s/2];
|
1598 |
-
if(ds>90){
|
1599 |
-
return s>4 ? r[0] : r[3];
|
1600 |
-
}else if(ds>60){
|
1601 |
-
return s>3 ? r[3] : r[2];
|
1602 |
-
}else if(ds>30){
|
1603 |
-
return s>8 ? r[1] : s>6 ? r[0] : s>4 ? s : r[2];
|
1604 |
-
}else{
|
1605 |
-
return s>8 ? s : r[3];
|
1606 |
-
}
|
1607 |
-
}
|
1608 |
-
function _drag(amount,dur,easing,dir,overwrite,drag){
|
1609 |
-
if(!amount){return;}
|
1610 |
-
_scrollTo($this,amount.toString(),{dur:dur,scrollEasing:easing,dir:dir,overwrite:overwrite,drag:drag});
|
1611 |
-
}
|
1612 |
-
},
|
1613 |
-
/* -------------------- */
|
1614 |
-
|
1615 |
-
|
1616 |
-
/*
|
1617 |
-
SELECT TEXT EVENTS
|
1618 |
-
scrolls content when text is selected
|
1619 |
-
*/
|
1620 |
-
_selectable=function(){
|
1621 |
-
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential,
|
1622 |
-
namespace=pluginPfx+"_"+d.idx,
|
1623 |
-
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
1624 |
-
wrapper=mCSB_container.parent(),
|
1625 |
-
action;
|
1626 |
-
mCSB_container.bind("mousedown."+namespace,function(e){
|
1627 |
-
if(touchable){return;}
|
1628 |
-
if(!action){action=1; touchActive=true;}
|
1629 |
-
}).add(document).bind("mousemove."+namespace,function(e){
|
1630 |
-
if(!touchable && action && _sel()){
|
1631 |
-
var offset=mCSB_container.offset(),
|
1632 |
-
y=_coordinates(e)[0]-offset.top+mCSB_container[0].offsetTop,x=_coordinates(e)[1]-offset.left+mCSB_container[0].offsetLeft;
|
1633 |
-
if(y>0 && y<wrapper.height() && x>0 && x<wrapper.width()){
|
1634 |
-
if(seq.step){_seq("off",null,"stepped");}
|
1635 |
-
}else{
|
1636 |
-
if(o.axis!=="x" && d.overflowed[0]){
|
1637 |
-
if(y<0){
|
1638 |
-
_seq("on",38);
|
1639 |
-
}else if(y>wrapper.height()){
|
1640 |
-
_seq("on",40);
|
1641 |
-
}
|
1642 |
-
}
|
1643 |
-
if(o.axis!=="y" && d.overflowed[1]){
|
1644 |
-
if(x<0){
|
1645 |
-
_seq("on",37);
|
1646 |
-
}else if(x>wrapper.width()){
|
1647 |
-
_seq("on",39);
|
1648 |
-
}
|
1649 |
-
}
|
1650 |
-
}
|
1651 |
-
}
|
1652 |
-
}).bind("mouseup."+namespace+" dragend."+namespace,function(e){
|
1653 |
-
if(touchable){return;}
|
1654 |
-
if(action){action=0; _seq("off",null);}
|
1655 |
-
touchActive=false;
|
1656 |
-
});
|
1657 |
-
function _sel(){
|
1658 |
-
return window.getSelection ? window.getSelection().toString() :
|
1659 |
-
document.selection && document.selection.type!="Control" ? document.selection.createRange().text : 0;
|
1660 |
-
}
|
1661 |
-
function _seq(a,c,s){
|
1662 |
-
seq.type=s && action ? "stepped" : "stepless";
|
1663 |
-
seq.scrollAmount=10;
|
1664 |
-
_sequentialScroll($this,a,c,"mcsLinearOut",s ? 60 : null);
|
1665 |
-
}
|
1666 |
-
},
|
1667 |
-
/* -------------------- */
|
1668 |
-
|
1669 |
-
|
1670 |
-
/*
|
1671 |
-
MOUSE WHEEL EVENT
|
1672 |
-
scrolls content via mouse-wheel
|
1673 |
-
via mouse-wheel plugin (https://github.com/brandonaaron/jquery-mousewheel)
|
1674 |
-
*/
|
1675 |
-
_mousewheel=function(){
|
1676 |
-
if(!$(this).data(pluginPfx)){return;} /* Check if the scrollbar is ready to use mousewheel events (issue: #185) */
|
1677 |
-
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
1678 |
-
namespace=pluginPfx+"_"+d.idx,
|
1679 |
-
mCustomScrollBox=$("#mCSB_"+d.idx),
|
1680 |
-
mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")],
|
1681 |
-
iframe=$("#mCSB_"+d.idx+"_container").find("iframe");
|
1682 |
-
if(iframe.length){
|
1683 |
-
iframe.each(function(){
|
1684 |
-
$(this).bind("load",function(){
|
1685 |
-
/* bind events on accessible iframes */
|
1686 |
-
if(_canAccessIFrame(this)){
|
1687 |
-
$(this.contentDocument || this.contentWindow.document).bind("mousewheel."+namespace,function(e,delta){
|
1688 |
-
_onMousewheel(e,delta);
|
1689 |
-
});
|
1690 |
-
}
|
1691 |
-
});
|
1692 |
-
});
|
1693 |
-
}
|
1694 |
-
mCustomScrollBox.bind("mousewheel."+namespace,function(e,delta){
|
1695 |
-
_onMousewheel(e,delta);
|
1696 |
-
});
|
1697 |
-
function _onMousewheel(e,delta){
|
1698 |
-
_stop($this);
|
1699 |
-
if(_disableMousewheel($this,e.target)){return;} /* disables mouse-wheel when hovering specific elements */
|
1700 |
-
var deltaFactor=o.mouseWheel.deltaFactor!=="auto" ? parseInt(o.mouseWheel.deltaFactor) : (oldIE && e.deltaFactor<100) ? 100 : e.deltaFactor || 100,
|
1701 |
-
dur=o.scrollInertia;
|
1702 |
-
if(o.axis==="x" || o.mouseWheel.axis==="x"){
|
1703 |
-
var dir="x",
|
1704 |
-
px=[Math.round(deltaFactor*d.scrollRatio.x),parseInt(o.mouseWheel.scrollAmount)],
|
1705 |
-
amount=o.mouseWheel.scrollAmount!=="auto" ? px[1] : px[0]>=mCustomScrollBox.width() ? mCustomScrollBox.width()*0.9 : px[0],
|
1706 |
-
contentPos=Math.abs($("#mCSB_"+d.idx+"_container")[0].offsetLeft),
|
1707 |
-
draggerPos=mCSB_dragger[1][0].offsetLeft,
|
1708 |
-
limit=mCSB_dragger[1].parent().width()-mCSB_dragger[1].width(),
|
1709 |
-
dlt=o.mouseWheel.axis==="y" ? (e.deltaY || delta) : e.deltaX;
|
1710 |
-
}else{
|
1711 |
-
var dir="y",
|
1712 |
-
px=[Math.round(deltaFactor*d.scrollRatio.y),parseInt(o.mouseWheel.scrollAmount)],
|
1713 |
-
amount=o.mouseWheel.scrollAmount!=="auto" ? px[1] : px[0]>=mCustomScrollBox.height() ? mCustomScrollBox.height()*0.9 : px[0],
|
1714 |
-
contentPos=Math.abs($("#mCSB_"+d.idx+"_container")[0].offsetTop),
|
1715 |
-
draggerPos=mCSB_dragger[0][0].offsetTop,
|
1716 |
-
limit=mCSB_dragger[0].parent().height()-mCSB_dragger[0].height(),
|
1717 |
-
dlt=e.deltaY || delta;
|
1718 |
-
}
|
1719 |
-
if((dir==="y" && !d.overflowed[0]) || (dir==="x" && !d.overflowed[1])){return;}
|
1720 |
-
if(o.mouseWheel.invert || e.webkitDirectionInvertedFromDevice){dlt=-dlt;}
|
1721 |
-
if(o.mouseWheel.normalizeDelta){dlt=dlt<0 ? -1 : 1;}
|
1722 |
-
if((dlt>0 && draggerPos!==0) || (dlt<0 && draggerPos!==limit) || o.mouseWheel.preventDefault){
|
1723 |
-
e.stopImmediatePropagation();
|
1724 |
-
e.preventDefault();
|
1725 |
-
}
|
1726 |
-
if(e.deltaFactor<5 && !o.mouseWheel.normalizeDelta){
|
1727 |
-
//very low deltaFactor values mean some kind of delta acceleration (e.g. osx trackpad), so adjusting scrolling accordingly
|
1728 |
-
amount=e.deltaFactor; dur=17;
|
1729 |
-
}
|
1730 |
-
_scrollTo($this,(contentPos-(dlt*amount)).toString(),{dir:dir,dur:dur});
|
1731 |
-
}
|
1732 |
-
},
|
1733 |
-
/* -------------------- */
|
1734 |
-
|
1735 |
-
|
1736 |
-
/* checks if iframe can be accessed */
|
1737 |
-
_canAccessIFrameCache=new Object(),
|
1738 |
-
_canAccessIFrame=function(iframe){
|
1739 |
-
var result=false,cacheKey=false,html=null;
|
1740 |
-
if(iframe===undefined){
|
1741 |
-
cacheKey="#empty";
|
1742 |
-
}else if($(iframe).attr("id")!==undefined){
|
1743 |
-
cacheKey=$(iframe).attr("id");
|
1744 |
-
}
|
1745 |
-
if(cacheKey!==false && _canAccessIFrameCache[cacheKey]!==undefined){
|
1746 |
-
return _canAccessIFrameCache[cacheKey];
|
1747 |
-
}
|
1748 |
-
if(!iframe){
|
1749 |
-
try{
|
1750 |
-
var doc=top.document;
|
1751 |
-
html=doc.body.innerHTML;
|
1752 |
-
}catch(err){/* do nothing */}
|
1753 |
-
result=(html!==null);
|
1754 |
-
}else{
|
1755 |
-
try{
|
1756 |
-
var doc=iframe.contentDocument || iframe.contentWindow.document;
|
1757 |
-
html=doc.body.innerHTML;
|
1758 |
-
}catch(err){/* do nothing */}
|
1759 |
-
result=(html!==null);
|
1760 |
-
}
|
1761 |
-
if(cacheKey!==false){_canAccessIFrameCache[cacheKey]=result;}
|
1762 |
-
return result;
|
1763 |
-
},
|
1764 |
-
/* -------------------- */
|
1765 |
-
|
1766 |
-
|
1767 |
-
/* switches iframe's pointer-events property (drag, mousewheel etc. over cross-domain iframes) */
|
1768 |
-
_iframe=function(evt){
|
1769 |
-
var el=this.find("iframe");
|
1770 |
-
if(!el.length){return;} /* check if content contains iframes */
|
1771 |
-
var val=!evt ? "none" : "auto";
|
1772 |
-
el.css("pointer-events",val); /* for IE11, iframe's display property should not be "block" */
|
1773 |
-
},
|
1774 |
-
/* -------------------- */
|
1775 |
-
|
1776 |
-
|
1777 |
-
/* disables mouse-wheel when hovering specific elements like select, datalist etc. */
|
1778 |
-
_disableMousewheel=function(el,target){
|
1779 |
-
var tag=target.nodeName.toLowerCase(),
|
1780 |
-
tags=el.data(pluginPfx).opt.mouseWheel.disableOver,
|
1781 |
-
/* elements that require focus */
|
1782 |
-
focusTags=["select","textarea"];
|
1783 |
-
return $.inArray(tag,tags) > -1 && !($.inArray(tag,focusTags) > -1 && !$(target).is(":focus"));
|
1784 |
-
},
|
1785 |
-
/* -------------------- */
|
1786 |
-
|
1787 |
-
|
1788 |
-
/*
|
1789 |
-
DRAGGER RAIL CLICK EVENT
|
1790 |
-
scrolls content via dragger rail
|
1791 |
-
*/
|
1792 |
-
_draggerRail=function(){
|
1793 |
-
var $this=$(this),d=$this.data(pluginPfx),
|
1794 |
-
namespace=pluginPfx+"_"+d.idx,
|
1795 |
-
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
1796 |
-
wrapper=mCSB_container.parent(),
|
1797 |
-
mCSB_draggerContainer=$(".mCSB_"+d.idx+"_scrollbar ."+classes[12]),
|
1798 |
-
clickable;
|
1799 |
-
mCSB_draggerContainer.bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace,function(e){
|
1800 |
-
touchActive=true;
|
1801 |
-
if(!$(e.target).hasClass("mCSB_dragger")){clickable=1;}
|
1802 |
-
}).bind("touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace,function(e){
|
1803 |
-
touchActive=false;
|
1804 |
-
}).bind("click."+namespace,function(e){
|
1805 |
-
if(!clickable){return;}
|
1806 |
-
clickable=0;
|
1807 |
-
if($(e.target).hasClass(classes[12]) || $(e.target).hasClass("mCSB_draggerRail")){
|
1808 |
-
_stop($this);
|
1809 |
-
var el=$(this),mCSB_dragger=el.find(".mCSB_dragger");
|
1810 |
-
if(el.parent(".mCSB_scrollTools_horizontal").length>0){
|
1811 |
-
if(!d.overflowed[1]){return;}
|
1812 |
-
var dir="x",
|
1813 |
-
clickDir=e.pageX>mCSB_dragger.offset().left ? -1 : 1,
|
1814 |
-
to=Math.abs(mCSB_container[0].offsetLeft)-(clickDir*(wrapper.width()*0.9));
|
1815 |
-
}else{
|
1816 |
-
if(!d.overflowed[0]){return;}
|
1817 |
-
var dir="y",
|
1818 |
-
clickDir=e.pageY>mCSB_dragger.offset().top ? -1 : 1,
|
1819 |
-
to=Math.abs(mCSB_container[0].offsetTop)-(clickDir*(wrapper.height()*0.9));
|
1820 |
-
}
|
1821 |
-
_scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"});
|
1822 |
-
}
|
1823 |
-
});
|
1824 |
-
},
|
1825 |
-
/* -------------------- */
|
1826 |
-
|
1827 |
-
|
1828 |
-
/*
|
1829 |
-
FOCUS EVENT
|
1830 |
-
scrolls content via element focus (e.g. clicking an input, pressing TAB key etc.)
|
1831 |
-
*/
|
1832 |
-
_focus=function(){
|
1833 |
-
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
1834 |
-
namespace=pluginPfx+"_"+d.idx,
|
1835 |
-
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
1836 |
-
wrapper=mCSB_container.parent();
|
1837 |
-
mCSB_container.bind("focusin."+namespace,function(e){
|
1838 |
-
var el=$(document.activeElement),
|
1839 |
-
nested=mCSB_container.find(".mCustomScrollBox").length,
|
1840 |
-
dur=0;
|
1841 |
-
if(!el.is(o.advanced.autoScrollOnFocus)){return;}
|
1842 |
-
_stop($this);
|
1843 |
-
clearTimeout($this[0]._focusTimeout);
|
1844 |
-
$this[0]._focusTimer=nested ? (dur+17)*nested : 0;
|
1845 |
-
$this[0]._focusTimeout=setTimeout(function(){
|
1846 |
-
var to=[_childPos(el)[0],_childPos(el)[1]],
|
1847 |
-
contentPos=[mCSB_container[0].offsetTop,mCSB_container[0].offsetLeft],
|
1848 |
-
isVisible=[
|
1849 |
-
(contentPos[0]+to[0]>=0 && contentPos[0]+to[0]<wrapper.height()-el.outerHeight(false)),
|
1850 |
-
(contentPos[1]+to[1]>=0 && contentPos[0]+to[1]<wrapper.width()-el.outerWidth(false))
|
1851 |
-
],
|
1852 |
-
overwrite=(o.axis==="yx" && !isVisible[0] && !isVisible[1]) ? "none" : "all";
|
1853 |
-
if(o.axis!=="x" && !isVisible[0]){
|
1854 |
-
_scrollTo($this,to[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:overwrite,dur:dur});
|
1855 |
-
}
|
1856 |
-
if(o.axis!=="y" && !isVisible[1]){
|
1857 |
-
_scrollTo($this,to[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:overwrite,dur:dur});
|
1858 |
-
}
|
1859 |
-
},$this[0]._focusTimer);
|
1860 |
-
});
|
1861 |
-
},
|
1862 |
-
/* -------------------- */
|
1863 |
-
|
1864 |
-
|
1865 |
-
/* sets content wrapper scrollTop/scrollLeft always to 0 */
|
1866 |
-
_wrapperScroll=function(){
|
1867 |
-
var $this=$(this),d=$this.data(pluginPfx),
|
1868 |
-
namespace=pluginPfx+"_"+d.idx,
|
1869 |
-
wrapper=$("#mCSB_"+d.idx+"_container").parent();
|
1870 |
-
wrapper.bind("scroll."+namespace,function(e){
|
1871 |
-
if(wrapper.scrollTop()!==0 || wrapper.scrollLeft()!==0){
|
1872 |
-
$(".mCSB_"+d.idx+"_scrollbar").css("visibility","hidden"); /* hide scrollbar(s) */
|
1873 |
-
}
|
1874 |
-
});
|
1875 |
-
},
|
1876 |
-
/* -------------------- */
|
1877 |
-
|
1878 |
-
|
1879 |
-
/*
|
1880 |
-
BUTTONS EVENTS
|
1881 |
-
scrolls content via up, down, left and right buttons
|
1882 |
-
*/
|
1883 |
-
_buttons=function(){
|
1884 |
-
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential,
|
1885 |
-
namespace=pluginPfx+"_"+d.idx,
|
1886 |
-
sel=".mCSB_"+d.idx+"_scrollbar",
|
1887 |
-
btn=$(sel+">a");
|
1888 |
-
btn.bind("contextmenu."+namespace,function(e){
|
1889 |
-
e.preventDefault(); //prevent right click
|
1890 |
-
}).bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace+" mouseup."+namespace+" touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace+" mouseout."+namespace+" pointerout."+namespace+" MSPointerOut."+namespace+" click."+namespace,function(e){
|
1891 |
-
e.preventDefault();
|
1892 |
-
if(!_mouseBtnLeft(e)){return;} /* left mouse button only */
|
1893 |
-
var btnClass=$(this).attr("class");
|
1894 |
-
seq.type=o.scrollButtons.scrollType;
|
1895 |
-
switch(e.type){
|
1896 |
-
case "mousedown": case "touchstart": case "pointerdown": case "MSPointerDown":
|
1897 |
-
if(seq.type==="stepped"){return;}
|
1898 |
-
touchActive=true;
|
1899 |
-
d.tweenRunning=false;
|
1900 |
-
_seq("on",btnClass);
|
1901 |
-
break;
|
1902 |
-
case "mouseup": case "touchend": case "pointerup": case "MSPointerUp":
|
1903 |
-
case "mouseout": case "pointerout": case "MSPointerOut":
|
1904 |
-
if(seq.type==="stepped"){return;}
|
1905 |
-
touchActive=false;
|
1906 |
-
if(seq.dir){_seq("off",btnClass);}
|
1907 |
-
break;
|
1908 |
-
case "click":
|
1909 |
-
if(seq.type!=="stepped" || d.tweenRunning){return;}
|
1910 |
-
_seq("on",btnClass);
|
1911 |
-
break;
|
1912 |
-
}
|
1913 |
-
function _seq(a,c){
|
1914 |
-
seq.scrollAmount=o.scrollButtons.scrollAmount;
|
1915 |
-
_sequentialScroll($this,a,c);
|
1916 |
-
}
|
1917 |
-
});
|
1918 |
-
},
|
1919 |
-
/* -------------------- */
|
1920 |
-
|
1921 |
-
|
1922 |
-
/*
|
1923 |
-
KEYBOARD EVENTS
|
1924 |
-
scrolls content via keyboard
|
1925 |
-
Keys: up arrow, down arrow, left arrow, right arrow, PgUp, PgDn, Home, End
|
1926 |
-
*/
|
1927 |
-
_keyboard=function(){
|
1928 |
-
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential,
|
1929 |
-
namespace=pluginPfx+"_"+d.idx,
|
1930 |
-
mCustomScrollBox=$("#mCSB_"+d.idx),
|
1931 |
-
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
1932 |
-
wrapper=mCSB_container.parent(),
|
1933 |
-
editables="input,textarea,select,datalist,keygen,[contenteditable='true']",
|
1934 |
-
iframe=mCSB_container.find("iframe"),
|
1935 |
-
events=["blur."+namespace+" keydown."+namespace+" keyup."+namespace];
|
1936 |
-
if(iframe.length){
|
1937 |
-
iframe.each(function(){
|
1938 |
-
$(this).bind("load",function(){
|
1939 |
-
/* bind events on accessible iframes */
|
1940 |
-
if(_canAccessIFrame(this)){
|
1941 |
-
$(this.contentDocument || this.contentWindow.document).bind(events[0],function(e){
|
1942 |
-
_onKeyboard(e);
|
1943 |
-
});
|
1944 |
-
}
|
1945 |
-
});
|
1946 |
-
});
|
1947 |
-
}
|
1948 |
-
mCustomScrollBox.attr("tabindex","0").bind(events[0],function(e){
|
1949 |
-
_onKeyboard(e);
|
1950 |
-
});
|
1951 |
-
function _onKeyboard(e){
|
1952 |
-
switch(e.type){
|
1953 |
-
case "blur":
|
1954 |
-
if(d.tweenRunning && seq.dir){_seq("off",null);}
|
1955 |
-
break;
|
1956 |
-
case "keydown": case "keyup":
|
1957 |
-
var code=e.keyCode ? e.keyCode : e.which,action="on";
|
1958 |
-
if((o.axis!=="x" && (code===38 || code===40)) || (o.axis!=="y" && (code===37 || code===39))){
|
1959 |
-
/* up (38), down (40), left (37), right (39) arrows */
|
1960 |
-
if(((code===38 || code===40) && !d.overflowed[0]) || ((code===37 || code===39) && !d.overflowed[1])){return;}
|
1961 |
-
if(e.type==="keyup"){action="off";}
|
1962 |
-
if(!$(document.activeElement).is(editables)){
|
1963 |
-
e.preventDefault();
|
1964 |
-
e.stopImmediatePropagation();
|
1965 |
-
_seq(action,code);
|
1966 |
-
}
|
1967 |
-
}else if(code===33 || code===34){
|
1968 |
-
/* PgUp (33), PgDn (34) */
|
1969 |
-
if(d.overflowed[0] || d.overflowed[1]){
|
1970 |
-
e.preventDefault();
|
1971 |
-
e.stopImmediatePropagation();
|
1972 |
-
}
|
1973 |
-
if(e.type==="keyup"){
|
1974 |
-
_stop($this);
|
1975 |
-
var keyboardDir=code===34 ? -1 : 1;
|
1976 |
-
if(o.axis==="x" || (o.axis==="yx" && d.overflowed[1] && !d.overflowed[0])){
|
1977 |
-
var dir="x",to=Math.abs(mCSB_container[0].offsetLeft)-(keyboardDir*(wrapper.width()*0.9));
|
1978 |
-
}else{
|
1979 |
-
var dir="y",to=Math.abs(mCSB_container[0].offsetTop)-(keyboardDir*(wrapper.height()*0.9));
|
1980 |
-
}
|
1981 |
-
_scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"});
|
1982 |
-
}
|
1983 |
-
}else if(code===35 || code===36){
|
1984 |
-
/* End (35), Home (36) */
|
1985 |
-
if(!$(document.activeElement).is(editables)){
|
1986 |
-
if(d.overflowed[0] || d.overflowed[1]){
|
1987 |
-
e.preventDefault();
|
1988 |
-
e.stopImmediatePropagation();
|
1989 |
-
}
|
1990 |
-
if(e.type==="keyup"){
|
1991 |
-
if(o.axis==="x" || (o.axis==="yx" && d.overflowed[1] && !d.overflowed[0])){
|
1992 |
-
var dir="x",to=code===35 ? Math.abs(wrapper.width()-mCSB_container.outerWidth(false)) : 0;
|
1993 |
-
}else{
|
1994 |
-
var dir="y",to=code===35 ? Math.abs(wrapper.height()-mCSB_container.outerHeight(false)) : 0;
|
1995 |
-
}
|
1996 |
-
_scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"});
|
1997 |
-
}
|
1998 |
-
}
|
1999 |
-
}
|
2000 |
-
break;
|
2001 |
-
}
|
2002 |
-
function _seq(a,c){
|
2003 |
-
seq.type=o.keyboard.scrollType;
|
2004 |
-
seq.scrollAmount=o.keyboard.scrollAmount;
|
2005 |
-
if(seq.type==="stepped" && d.tweenRunning){return;}
|
2006 |
-
_sequentialScroll($this,a,c);
|
2007 |
-
}
|
2008 |
-
}
|
2009 |
-
},
|
2010 |
-
/* -------------------- */
|
2011 |
-
|
2012 |
-
|
2013 |
-
/* scrolls content sequentially (used when scrolling via buttons, keyboard arrows etc.) */
|
2014 |
-
_sequentialScroll=function(el,action,trigger,e,s){
|
2015 |
-
var d=el.data(pluginPfx),o=d.opt,seq=d.sequential,
|
2016 |
-
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
2017 |
-
once=seq.type==="stepped" ? true : false,
|
2018 |
-
steplessSpeed=o.scrollInertia < 26 ? 26 : o.scrollInertia, /* 26/1.5=17 */
|
2019 |
-
steppedSpeed=o.scrollInertia < 1 ? 17 : o.scrollInertia;
|
2020 |
-
switch(action){
|
2021 |
-
case "on":
|
2022 |
-
seq.dir=[
|
2023 |
-
(trigger===classes[16] || trigger===classes[15] || trigger===39 || trigger===37 ? "x" : "y"),
|
2024 |
-
(trigger===classes[13] || trigger===classes[15] || trigger===38 || trigger===37 ? -1 : 1)
|
2025 |
-
];
|
2026 |
-
_stop(el);
|
2027 |
-
if(_isNumeric(trigger) && seq.type==="stepped"){return;}
|
2028 |
-
_on(once);
|
2029 |
-
break;
|
2030 |
-
case "off":
|
2031 |
-
_off();
|
2032 |
-
if(once || (d.tweenRunning && seq.dir)){
|
2033 |
-
_on(true);
|
2034 |
-
}
|
2035 |
-
break;
|
2036 |
-
}
|
2037 |
-
|
2038 |
-
/* starts sequence */
|
2039 |
-
function _on(once){
|
2040 |
-
if(o.snapAmount){seq.scrollAmount=!(o.snapAmount instanceof Array) ? o.snapAmount : seq.dir[0]==="x" ? o.snapAmount[1] : o.snapAmount[0];} /* scrolling snapping */
|
2041 |
-
var c=seq.type!=="stepped", /* continuous scrolling */
|
2042 |
-
t=s ? s : !once ? 1000/60 : c ? steplessSpeed/1.5 : steppedSpeed, /* timer */
|
2043 |
-
m=!once ? 2.5 : c ? 7.5 : 40, /* multiplier */
|
2044 |
-
contentPos=[Math.abs(mCSB_container[0].offsetTop),Math.abs(mCSB_container[0].offsetLeft)],
|
2045 |
-
ratio=[d.scrollRatio.y>10 ? 10 : d.scrollRatio.y,d.scrollRatio.x>10 ? 10 : d.scrollRatio.x],
|
2046 |
-
amount=seq.dir[0]==="x" ? contentPos[1]+(seq.dir[1]*(ratio[1]*m)) : contentPos[0]+(seq.dir[1]*(ratio[0]*m)),
|
2047 |
-
px=seq.dir[0]==="x" ? contentPos[1]+(seq.dir[1]*parseInt(seq.scrollAmount)) : contentPos[0]+(seq.dir[1]*parseInt(seq.scrollAmount)),
|
2048 |
-
to=seq.scrollAmount!=="auto" ? px : amount,
|
2049 |
-
easing=e ? e : !once ? "mcsLinear" : c ? "mcsLinearOut" : "mcsEaseInOut",
|
2050 |
-
onComplete=!once ? false : true;
|
2051 |
-
if(once && t<17){
|
2052 |
-
to=seq.dir[0]==="x" ? contentPos[1] : contentPos[0];
|
2053 |
-
}
|
2054 |
-
_scrollTo(el,to.toString(),{dir:seq.dir[0],scrollEasing:easing,dur:t,onComplete:onComplete});
|
2055 |
-
if(once){
|
2056 |
-
seq.dir=false;
|
2057 |
-
return;
|
2058 |
-
}
|
2059 |
-
clearTimeout(seq.step);
|
2060 |
-
seq.step=setTimeout(function(){
|
2061 |
-
_on();
|
2062 |
-
},t);
|
2063 |
-
}
|
2064 |
-
/* stops sequence */
|
2065 |
-
function _off(){
|
2066 |
-
clearTimeout(seq.step);
|
2067 |
-
_delete(seq,"step");
|
2068 |
-
_stop(el);
|
2069 |
-
}
|
2070 |
-
},
|
2071 |
-
/* -------------------- */
|
2072 |
-
|
2073 |
-
|
2074 |
-
/* returns a yx array from value */
|
2075 |
-
_arr=function(val){
|
2076 |
-
var o=$(this).data(pluginPfx).opt,vals=[];
|
2077 |
-
if(typeof val==="function"){val=val();} /* check if the value is a single anonymous function */
|
2078 |
-
/* check if value is object or array, its length and create an array with yx values */
|
2079 |
-
if(!(val instanceof Array)){ /* object value (e.g. {y:"100",x:"100"}, 100 etc.) */
|
2080 |
-
vals[0]=val.y ? val.y : val.x || o.axis==="x" ? null : val;
|
2081 |
-
vals[1]=val.x ? val.x : val.y || o.axis==="y" ? null : val;
|
2082 |
-
}else{ /* array value (e.g. [100,100]) */
|
2083 |
-
vals=val.length>1 ? [val[0],val[1]] : o.axis==="x" ? [null,val[0]] : [val[0],null];
|
2084 |
-
}
|
2085 |
-
/* check if array values are anonymous functions */
|
2086 |
-
if(typeof vals[0]==="function"){vals[0]=vals[0]();}
|
2087 |
-
if(typeof vals[1]==="function"){vals[1]=vals[1]();}
|
2088 |
-
return vals;
|
2089 |
-
},
|
2090 |
-
/* -------------------- */
|
2091 |
-
|
2092 |
-
|
2093 |
-
/* translates values (e.g. "top", 100, "100px", "#id") to actual scroll-to positions */
|
2094 |
-
_to=function(val,dir){
|
2095 |
-
if(val==null || typeof val=="undefined"){return;}
|
2096 |
-
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
2097 |
-
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
2098 |
-
wrapper=mCSB_container.parent(),
|
2099 |
-
t=typeof val;
|
2100 |
-
if(!dir){dir=o.axis==="x" ? "x" : "y";}
|
2101 |
-
var contentLength=dir==="x" ? mCSB_container.outerWidth(false)-wrapper.width() : mCSB_container.outerHeight(false)-wrapper.height(),
|
2102 |
-
contentPos=dir==="x" ? mCSB_container[0].offsetLeft : mCSB_container[0].offsetTop,
|
2103 |
-
cssProp=dir==="x" ? "left" : "top";
|
2104 |
-
switch(t){
|
2105 |
-
case "function": /* this currently is not used. Consider removing it */
|
2106 |
-
return val();
|
2107 |
-
break;
|
2108 |
-
case "object": /* js/jquery object */
|
2109 |
-
var obj=val.jquery ? val : $(val);
|
2110 |
-
if(!obj.length){return;}
|
2111 |
-
return dir==="x" ? _childPos(obj)[1] : _childPos(obj)[0];
|
2112 |
-
break;
|
2113 |
-
case "string": case "number":
|
2114 |
-
if(_isNumeric(val)){ /* numeric value */
|
2115 |
-
return Math.abs(val);
|
2116 |
-
}else if(val.indexOf("%")!==-1){ /* percentage value */
|
2117 |
-
return Math.abs(contentLength*parseInt(val)/100);
|
2118 |
-
}else if(val.indexOf("-=")!==-1){ /* decrease value */
|
2119 |
-
return Math.abs(contentPos-parseInt(val.split("-=")[1]));
|
2120 |
-
}else if(val.indexOf("+=")!==-1){ /* inrease value */
|
2121 |
-
var p=(contentPos+parseInt(val.split("+=")[1]));
|
2122 |
-
return p>=0 ? 0 : Math.abs(p);
|
2123 |
-
}else if(val.indexOf("px")!==-1 && _isNumeric(val.split("px")[0])){ /* pixels string value (e.g. "100px") */
|
2124 |
-
return Math.abs(val.split("px")[0]);
|
2125 |
-
}else{
|
2126 |
-
if(val==="top" || val==="left"){ /* special strings */
|
2127 |
-
return 0;
|
2128 |
-
}else if(val==="bottom"){
|
2129 |
-
return Math.abs(wrapper.height()-mCSB_container.outerHeight(false));
|
2130 |
-
}else if(val==="right"){
|
2131 |
-
return Math.abs(wrapper.width()-mCSB_container.outerWidth(false));
|
2132 |
-
}else if(val==="first" || val==="last"){
|
2133 |
-
var obj=mCSB_container.find(":"+val);
|
2134 |
-
return dir==="x" ? _childPos(obj)[1] : _childPos(obj)[0];
|
2135 |
-
}else{
|
2136 |
-
if($(val).length){ /* jquery selector */
|
2137 |
-
return dir==="x" ? _childPos($(val))[1] : _childPos($(val))[0];
|
2138 |
-
}else{ /* other values (e.g. "100em") */
|
2139 |
-
mCSB_container.css(cssProp,val);
|
2140 |
-
methods.update.call(null,$this[0]);
|
2141 |
-
return;
|
2142 |
-
}
|
2143 |
-
}
|
2144 |
-
}
|
2145 |
-
break;
|
2146 |
-
}
|
2147 |
-
},
|
2148 |
-
/* -------------------- */
|
2149 |
-
|
2150 |
-
|
2151 |
-
/* calls the update method automatically */
|
2152 |
-
_autoUpdate=function(rem){
|
2153 |
-
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,
|
2154 |
-
mCSB_container=$("#mCSB_"+d.idx+"_container");
|
2155 |
-
if(rem){
|
2156 |
-
/*
|
2157 |
-
removes autoUpdate timer
|
2158 |
-
usage: _autoUpdate.call(this,"remove");
|
2159 |
-
*/
|
2160 |
-
clearTimeout(mCSB_container[0].autoUpdate);
|
2161 |
-
_delete(mCSB_container[0],"autoUpdate");
|
2162 |
-
return;
|
2163 |
-
}
|
2164 |
-
upd();
|
2165 |
-
function upd(){
|
2166 |
-
clearTimeout(mCSB_container[0].autoUpdate);
|
2167 |
-
if($this.parents("html").length===0){
|
2168 |
-
/* check element in dom tree */
|
2169 |
-
$this=null;
|
2170 |
-
return;
|
2171 |
-
}
|
2172 |
-
mCSB_container[0].autoUpdate=setTimeout(function(){
|
2173 |
-
/* update on specific selector(s) length and size change */
|
2174 |
-
if(o.advanced.updateOnSelectorChange){
|
2175 |
-
d.poll.change.n=sizesSum();
|
2176 |
-
if(d.poll.change.n!==d.poll.change.o){
|
2177 |
-
d.poll.change.o=d.poll.change.n;
|
2178 |
-
doUpd(3);
|
2179 |
-
return;
|
2180 |
-
}
|
2181 |
-
}
|
2182 |
-
/* update on main element and scrollbar size changes */
|
2183 |
-
if(o.advanced.updateOnContentResize){
|
2184 |
-
d.poll.size.n=$this[0].scrollHeight+$this[0].scrollWidth+mCSB_container[0].offsetHeight+$this[0].offsetHeight+$this[0].offsetWidth;
|
2185 |
-
if(d.poll.size.n!==d.poll.size.o){
|
2186 |
-
d.poll.size.o=d.poll.size.n;
|
2187 |
-
doUpd(1);
|
2188 |
-
return;
|
2189 |
-
}
|
2190 |
-
}
|
2191 |
-
/* update on image load */
|
2192 |
-
if(o.advanced.updateOnImageLoad){
|
2193 |
-
if(!(o.advanced.updateOnImageLoad==="auto" && o.axis==="y")){ //by default, it doesn't run on vertical content
|
2194 |
-
d.poll.img.n=mCSB_container.find("img").length;
|
2195 |
-
if(d.poll.img.n!==d.poll.img.o){
|
2196 |
-
d.poll.img.o=d.poll.img.n;
|
2197 |
-
mCSB_container.find("img").each(function(){
|
2198 |
-
imgLoader(this);
|
2199 |
-
});
|
2200 |
-
return;
|
2201 |
-
}
|
2202 |
-
}
|
2203 |
-
}
|
2204 |
-
if(o.advanced.updateOnSelectorChange || o.advanced.updateOnContentResize || o.advanced.updateOnImageLoad){upd();}
|
2205 |
-
},o.advanced.autoUpdateTimeout);
|
2206 |
-
}
|
2207 |
-
/* a tiny image loader */
|
2208 |
-
function imgLoader(el){
|
2209 |
-
if($(el).hasClass(classes[2])){doUpd(); return;}
|
2210 |
-
var img=new Image();
|
2211 |
-
function createDelegate(contextObject,delegateMethod){
|
2212 |
-
return function(){return delegateMethod.apply(contextObject,arguments);}
|
2213 |
-
}
|
2214 |
-
function imgOnLoad(){
|
2215 |
-
this.onload=null;
|
2216 |
-
$(el).addClass(classes[2]);
|
2217 |
-
doUpd(2);
|
2218 |
-
}
|
2219 |
-
img.onload=createDelegate(img,imgOnLoad);
|
2220 |
-
img.src=el.src;
|
2221 |
-
}
|
2222 |
-
/* returns the total height and width sum of all elements matching the selector */
|
2223 |
-
function sizesSum(){
|
2224 |
-
if(o.advanced.updateOnSelectorChange===true){o.advanced.updateOnSelectorChange="*";}
|
2225 |
-
var total=0,sel=mCSB_container.find(o.advanced.updateOnSelectorChange);
|
2226 |
-
if(o.advanced.updateOnSelectorChange && sel.length>0){sel.each(function(){total+=this.offsetHeight+this.offsetWidth;});}
|
2227 |
-
return total;
|
2228 |
-
}
|
2229 |
-
/* calls the update method */
|
2230 |
-
function doUpd(cb){
|
2231 |
-
clearTimeout(mCSB_container[0].autoUpdate);
|
2232 |
-
methods.update.call(null,$this[0],cb);
|
2233 |
-
}
|
2234 |
-
},
|
2235 |
-
/* -------------------- */
|
2236 |
-
|
2237 |
-
|
2238 |
-
/* snaps scrolling to a multiple of a pixels number */
|
2239 |
-
_snapAmount=function(to,amount,offset){
|
2240 |
-
return (Math.round(to/amount)*amount-offset);
|
2241 |
-
},
|
2242 |
-
/* -------------------- */
|
2243 |
-
|
2244 |
-
|
2245 |
-
/* stops content and scrollbar animations */
|
2246 |
-
_stop=function(el){
|
2247 |
-
var d=el.data(pluginPfx),
|
2248 |
-
sel=$("#mCSB_"+d.idx+"_container,#mCSB_"+d.idx+"_container_wrapper,#mCSB_"+d.idx+"_dragger_vertical,#mCSB_"+d.idx+"_dragger_horizontal");
|
2249 |
-
sel.each(function(){
|
2250 |
-
_stopTween.call(this);
|
2251 |
-
});
|
2252 |
-
},
|
2253 |
-
/* -------------------- */
|
2254 |
-
|
2255 |
-
|
2256 |
-
/*
|
2257 |
-
ANIMATES CONTENT
|
2258 |
-
This is where the actual scrolling happens
|
2259 |
-
*/
|
2260 |
-
_scrollTo=function(el,to,options){
|
2261 |
-
var d=el.data(pluginPfx),o=d.opt,
|
2262 |
-
defaults={
|
2263 |
-
trigger:"internal",
|
2264 |
-
dir:"y",
|
2265 |
-
scrollEasing:"mcsEaseOut",
|
2266 |
-
drag:false,
|
2267 |
-
dur:o.scrollInertia,
|
2268 |
-
overwrite:"all",
|
2269 |
-
callbacks:true,
|
2270 |
-
onStart:true,
|
2271 |
-
onUpdate:true,
|
2272 |
-
onComplete:true
|
2273 |
-
},
|
2274 |
-
options=$.extend(defaults,options),
|
2275 |
-
dur=[options.dur,(options.drag ? 0 : options.dur)],
|
2276 |
-
mCustomScrollBox=$("#mCSB_"+d.idx),
|
2277 |
-
mCSB_container=$("#mCSB_"+d.idx+"_container"),
|
2278 |
-
wrapper=mCSB_container.parent(),
|
2279 |
-
totalScrollOffsets=o.callbacks.onTotalScrollOffset ? _arr.call(el,o.callbacks.onTotalScrollOffset) : [0,0],
|
2280 |
-
totalScrollBackOffsets=o.callbacks.onTotalScrollBackOffset ? _arr.call(el,o.callbacks.onTotalScrollBackOffset) : [0,0];
|
2281 |
-
d.trigger=options.trigger;
|
2282 |
-
if(wrapper.scrollTop()!==0 || wrapper.scrollLeft()!==0){ /* always reset scrollTop/Left */
|
2283 |
-
$(".mCSB_"+d.idx+"_scrollbar").css("visibility","visible");
|
2284 |
-
wrapper.scrollTop(0).scrollLeft(0);
|
2285 |
-
}
|
2286 |
-
if(to==="_resetY" && !d.contentReset.y){
|
2287 |
-
/* callbacks: onOverflowYNone */
|
2288 |
-
if(_cb("onOverflowYNone")){o.callbacks.onOverflowYNone.call(el[0]);}
|
2289 |
-
d.contentReset.y=1;
|
2290 |
-
}
|
2291 |
-
if(to==="_resetX" && !d.contentReset.x){
|
2292 |
-
/* callbacks: onOverflowXNone */
|
2293 |
-
if(_cb("onOverflowXNone")){o.callbacks.onOverflowXNone.call(el[0]);}
|
2294 |
-
d.contentReset.x=1;
|
2295 |
-
}
|
2296 |
-
if(to==="_resetY" || to==="_resetX"){return;}
|
2297 |
-
if((d.contentReset.y || !el[0].mcs) && d.overflowed[0]){
|
2298 |
-
/* callbacks: onOverflowY */
|
2299 |
-
if(_cb("onOverflowY")){o.callbacks.onOverflowY.call(el[0]);}
|
2300 |
-
d.contentReset.x=null;
|
2301 |
-
}
|
2302 |
-
if((d.contentReset.x || !el[0].mcs) && d.overflowed[1]){
|
2303 |
-
/* callbacks: onOverflowX */
|
2304 |
-
if(_cb("onOverflowX")){o.callbacks.onOverflowX.call(el[0]);}
|
2305 |
-
d.contentReset.x=null;
|
2306 |
-
}
|
2307 |
-
if(o.snapAmount){ /* scrolling snapping */
|
2308 |
-
var snapAmount=!(o.snapAmount instanceof Array) ? o.snapAmount : options.dir==="x" ? o.snapAmount[1] : o.snapAmount[0];
|
2309 |
-
to=_snapAmount(to,snapAmount,o.snapOffset);
|
2310 |
-
}
|
2311 |
-
switch(options.dir){
|
2312 |
-
case "x":
|
2313 |
-
var mCSB_dragger=$("#mCSB_"+d.idx+"_dragger_horizontal"),
|
2314 |
-
property="left",
|
2315 |
-
contentPos=mCSB_container[0].offsetLeft,
|
2316 |
-
limit=[
|
2317 |
-
mCustomScrollBox.width()-mCSB_container.outerWidth(false),
|
2318 |
-
mCSB_dragger.parent().width()-mCSB_dragger.width()
|
2319 |
-
],
|
2320 |
-
scrollTo=[to,to===0 ? 0 : (to/d.scrollRatio.x)],
|
2321 |
-
tso=totalScrollOffsets[1],
|
2322 |
-
tsbo=totalScrollBackOffsets[1],
|
2323 |
-
totalScrollOffset=tso>0 ? tso/d.scrollRatio.x : 0,
|
2324 |
-
totalScrollBackOffset=tsbo>0 ? tsbo/d.scrollRatio.x : 0;
|
2325 |
-
break;
|
2326 |
-
case "y":
|
2327 |
-
var mCSB_dragger=$("#mCSB_"+d.idx+"_dragger_vertical"),
|
2328 |
-
property="top",
|
2329 |
-
contentPos=mCSB_container[0].offsetTop,
|
2330 |
-
limit=[
|
2331 |
-
mCustomScrollBox.height()-mCSB_container.outerHeight(false),
|
2332 |
-
mCSB_dragger.parent().height()-mCSB_dragger.height()
|
2333 |
-
],
|
2334 |
-
scrollTo=[to,to===0 ? 0 : (to/d.scrollRatio.y)],
|
2335 |
-
tso=totalScrollOffsets[0],
|
2336 |
-
tsbo=totalScrollBackOffsets[0],
|
2337 |
-
totalScrollOffset=tso>0 ? tso/d.scrollRatio.y : 0,
|
2338 |
-
totalScrollBackOffset=tsbo>0 ? tsbo/d.scrollRatio.y : 0;
|
2339 |
-
break;
|
2340 |
-
}
|
2341 |
-
if(scrollTo[1]<0 || (scrollTo[0]===0 && scrollTo[1]===0)){
|
2342 |
-
scrollTo=[0,0];
|
2343 |
-
}else if(scrollTo[1]>=limit[1]){
|
2344 |
-
scrollTo=[limit[0],limit[1]];
|
2345 |
-
}else{
|
2346 |
-
scrollTo[0]=-scrollTo[0];
|
2347 |
-
}
|
2348 |
-
if(!el[0].mcs){
|
2349 |
-
_mcs(); /* init mcs object (once) to make it available before callbacks */
|
2350 |
-
if(_cb("onInit")){o.callbacks.onInit.call(el[0]);} /* callbacks: onInit */
|
2351 |
-
}
|
2352 |
-
clearTimeout(mCSB_container[0].onCompleteTimeout);
|
2353 |
-
_tweenTo(mCSB_dragger[0],property,Math.round(scrollTo[1]),dur[1],options.scrollEasing);
|
2354 |
-
if(!d.tweenRunning && ((contentPos===0 && scrollTo[0]>=0) || (contentPos===limit[0] && scrollTo[0]<=limit[0]))){return;}
|
2355 |
-
_tweenTo(mCSB_container[0],property,Math.round(scrollTo[0]),dur[0],options.scrollEasing,options.overwrite,{
|
2356 |
-
onStart:function(){
|
2357 |
-
if(options.callbacks && options.onStart && !d.tweenRunning){
|
2358 |
-
/* callbacks: onScrollStart */
|
2359 |
-
if(_cb("onScrollStart")){_mcs(); o.callbacks.onScrollStart.call(el[0]);}
|
2360 |
-
d.tweenRunning=true;
|
2361 |
-
_onDragClasses(mCSB_dragger);
|
2362 |
-
d.cbOffsets=_cbOffsets();
|
2363 |
-
}
|
2364 |
-
},onUpdate:function(){
|
2365 |
-
if(options.callbacks && options.onUpdate){
|
2366 |
-
/* callbacks: whileScrolling */
|
2367 |
-
if(_cb("whileScrolling")){_mcs(); o.callbacks.whileScrolling.call(el[0]);}
|
2368 |
-
}
|
2369 |
-
},onComplete:function(){
|
2370 |
-
if(options.callbacks && options.onComplete){
|
2371 |
-
if(o.axis==="yx"){clearTimeout(mCSB_container[0].onCompleteTimeout);}
|
2372 |
-
var t=mCSB_container[0].idleTimer || 0;
|
2373 |
-
mCSB_container[0].onCompleteTimeout=setTimeout(function(){
|
2374 |
-
/* callbacks: onScroll, onTotalScroll, onTotalScrollBack */
|
2375 |
-
if(_cb("onScroll")){_mcs(); o.callbacks.onScroll.call(el[0]);}
|
2376 |
-
if(_cb("onTotalScroll") && scrollTo[1]>=limit[1]-totalScrollOffset && d.cbOffsets[0]){_mcs(); o.callbacks.onTotalScroll.call(el[0]);}
|
2377 |
-
if(_cb("onTotalScrollBack") && scrollTo[1]<=totalScrollBackOffset && d.cbOffsets[1]){_mcs(); o.callbacks.onTotalScrollBack.call(el[0]);}
|
2378 |
-
d.tweenRunning=false;
|
2379 |
-
mCSB_container[0].idleTimer=0;
|
2380 |
-
_onDragClasses(mCSB_dragger,"hide");
|
2381 |
-
},t);
|
2382 |
-
}
|
2383 |
-
}
|
2384 |
-
});
|
2385 |
-
/* checks if callback function exists */
|
2386 |
-
function _cb(cb){
|
2387 |
-
return d && o.callbacks[cb] && typeof o.callbacks[cb]==="function";
|
2388 |
-
}
|
2389 |
-
/* checks whether callback offsets always trigger */
|
2390 |
-
function _cbOffsets(){
|
2391 |
-
return [o.callbacks.alwaysTriggerOffsets || contentPos>=limit[0]+tso,o.callbacks.alwaysTriggerOffsets || contentPos<=-tsbo];
|
2392 |
-
}
|
2393 |
-
/*
|
2394 |
-
populates object with useful values for the user
|
2395 |
-
values:
|
2396 |
-
content: this.mcs.content
|
2397 |
-
content top position: this.mcs.top
|
2398 |
-
content left position: this.mcs.left
|
2399 |
-
dragger top position: this.mcs.draggerTop
|
2400 |
-
dragger left position: this.mcs.draggerLeft
|
2401 |
-
scrolling y percentage: this.mcs.topPct
|
2402 |
-
scrolling x percentage: this.mcs.leftPct
|
2403 |
-
scrolling direction: this.mcs.direction
|
2404 |
-
*/
|
2405 |
-
function _mcs(){
|
2406 |
-
var cp=[mCSB_container[0].offsetTop,mCSB_container[0].offsetLeft], /* content position */
|
2407 |
-
dp=[mCSB_dragger[0].offsetTop,mCSB_dragger[0].offsetLeft], /* dragger position */
|
2408 |
-
cl=[mCSB_container.outerHeight(false),mCSB_container.outerWidth(false)], /* content length */
|
2409 |
-
pl=[mCustomScrollBox.height(),mCustomScrollBox.width()]; /* content parent length */
|
2410 |
-
el[0].mcs={
|
2411 |
-
content:mCSB_container, /* original content wrapper as jquery object */
|
2412 |
-
top:cp[0],left:cp[1],draggerTop:dp[0],draggerLeft:dp[1],
|
2413 |
-
topPct:Math.round((100*Math.abs(cp[0]))/(Math.abs(cl[0])-pl[0])),leftPct:Math.round((100*Math.abs(cp[1]))/(Math.abs(cl[1])-pl[1])),
|
2414 |
-
direction:options.dir
|
2415 |
-
};
|
2416 |
-
/*
|
2417 |
-
this refers to the original element containing the scrollbar(s)
|
2418 |
-
usage: this.mcs.top, this.mcs.leftPct etc.
|
2419 |
-
*/
|
2420 |
-
}
|
2421 |
-
},
|
2422 |
-
/* -------------------- */
|
2423 |
-
|
2424 |
-
|
2425 |
-
/*
|
2426 |
-
CUSTOM JAVASCRIPT ANIMATION TWEEN
|
2427 |
-
Lighter and faster than jquery animate() and css transitions
|
2428 |
-
Animates top/left properties and includes easings
|
2429 |
-
*/
|
2430 |
-
_tweenTo=function(el,prop,to,duration,easing,overwrite,callbacks){
|
2431 |
-
if(!el._mTween){el._mTween={top:{},left:{}};}
|
2432 |
-
var callbacks=callbacks || {},
|
2433 |
-
onStart=callbacks.onStart || function(){},onUpdate=callbacks.onUpdate || function(){},onComplete=callbacks.onComplete || function(){},
|
2434 |
-
startTime=_getTime(),_delay,progress=0,from=el.offsetTop,elStyle=el.style,_request,tobj=el._mTween[prop];
|
2435 |
-
if(prop==="left"){from=el.offsetLeft;}
|
2436 |
-
var diff=to-from;
|
2437 |
-
tobj.stop=0;
|
2438 |
-
if(overwrite!=="none"){_cancelTween();}
|
2439 |
-
_startTween();
|
2440 |
-
function _step(){
|
2441 |
-
if(tobj.stop){return;}
|
2442 |
-
if(!progress){onStart.call();}
|
2443 |
-
progress=_getTime()-startTime;
|
2444 |
-
_tween();
|
2445 |
-
if(progress>=tobj.time){
|
2446 |
-
tobj.time=(progress>tobj.time) ? progress+_delay-(progress-tobj.time) : progress+_delay-1;
|
2447 |
-
if(tobj.time<progress+1){tobj.time=progress+1;}
|
2448 |
-
}
|
2449 |
-
if(tobj.time<duration){tobj.id=_request(_step);}else{onComplete.call();}
|
2450 |
-
}
|
2451 |
-
function _tween(){
|
2452 |
-
if(duration>0){
|
2453 |
-
tobj.currVal=_ease(tobj.time,from,diff,duration,easing);
|
2454 |
-
elStyle[prop]=Math.round(tobj.currVal)+"px";
|
2455 |
-
}else{
|
2456 |
-
elStyle[prop]=to+"px";
|
2457 |
-
}
|
2458 |
-
onUpdate.call();
|
2459 |
-
}
|
2460 |
-
function _startTween(){
|
2461 |
-
_delay=1000/60;
|
2462 |
-
tobj.time=progress+_delay;
|
2463 |
-
_request=(!window.requestAnimationFrame) ? function(f){_tween(); return setTimeout(f,0.01);} : window.requestAnimationFrame;
|
2464 |
-
tobj.id=_request(_step);
|
2465 |
-
}
|
2466 |
-
function _cancelTween(){
|
2467 |
-
if(tobj.id==null){return;}
|
2468 |
-
if(!window.requestAnimationFrame){clearTimeout(tobj.id);
|
2469 |
-
}else{window.cancelAnimationFrame(tobj.id);}
|
2470 |
-
tobj.id=null;
|
2471 |
-
}
|
2472 |
-
function _ease(t,b,c,d,type){
|
2473 |
-
switch(type){
|
2474 |
-
case "linear": case "mcsLinear":
|
2475 |
-
return c*t/d + b;
|
2476 |
-
break;
|
2477 |
-
case "mcsLinearOut":
|
2478 |
-
t/=d; t--; return c * Math.sqrt(1 - t*t) + b;
|
2479 |
-
break;
|
2480 |
-
case "easeInOutSmooth":
|
2481 |
-
t/=d/2;
|
2482 |
-
if(t<1) return c/2*t*t + b;
|
2483 |
-
t--;
|
2484 |
-
return -c/2 * (t*(t-2) - 1) + b;
|
2485 |
-
break;
|
2486 |
-
case "easeInOutStrong":
|
2487 |
-
t/=d/2;
|
2488 |
-
if(t<1) return c/2 * Math.pow( 2, 10 * (t - 1) ) + b;
|
2489 |
-
t--;
|
2490 |
-
return c/2 * ( -Math.pow( 2, -10 * t) + 2 ) + b;
|
2491 |
-
break;
|
2492 |
-
case "easeInOut": case "mcsEaseInOut":
|
2493 |
-
t/=d/2;
|
2494 |
-
if(t<1) return c/2*t*t*t + b;
|
2495 |
-
t-=2;
|
2496 |
-
return c/2*(t*t*t + 2) + b;
|
2497 |
-
break;
|
2498 |
-
case "easeOutSmooth":
|
2499 |
-
t/=d; t--;
|
2500 |
-
return -c * (t*t*t*t - 1) + b;
|
2501 |
-
break;
|
2502 |
-
case "easeOutStrong":
|
2503 |
-
return c * ( -Math.pow( 2, -10 * t/d ) + 1 ) + b;
|
2504 |
-
break;
|
2505 |
-
case "easeOut": case "mcsEaseOut": default:
|
2506 |
-
var ts=(t/=d)*t,tc=ts*t;
|
2507 |
-
return b+c*(0.499999999999997*tc*ts + -2.5*ts*ts + 5.5*tc + -6.5*ts + 4*t);
|
2508 |
-
}
|
2509 |
-
}
|
2510 |
-
},
|
2511 |
-
/* -------------------- */
|
2512 |
-
|
2513 |
-
|
2514 |
-
/* returns current time */
|
2515 |
-
_getTime=function(){
|
2516 |
-
if(window.performance && window.performance.now){
|
2517 |
-
return window.performance.now();
|
2518 |
-
}else{
|
2519 |
-
if(window.performance && window.performance.webkitNow){
|
2520 |
-
return window.performance.webkitNow();
|
2521 |
-
}else{
|
2522 |
-
if(Date.now){return Date.now();}else{return new Date().getTime();}
|
2523 |
-
}
|
2524 |
-
}
|
2525 |
-
},
|
2526 |
-
/* -------------------- */
|
2527 |
-
|
2528 |
-
|
2529 |
-
/* stops a tween */
|
2530 |
-
_stopTween=function(){
|
2531 |
-
var el=this;
|
2532 |
-
if(!el._mTween){el._mTween={top:{},left:{}};}
|
2533 |
-
var props=["top","left"];
|
2534 |
-
for(var i=0; i<props.length; i++){
|
2535 |
-
var prop=props[i];
|
2536 |
-
if(el._mTween[prop].id){
|
2537 |
-
if(!window.requestAnimationFrame){clearTimeout(el._mTween[prop].id);
|
2538 |
-
}else{window.cancelAnimationFrame(el._mTween[prop].id);}
|
2539 |
-
el._mTween[prop].id=null;
|
2540 |
-
el._mTween[prop].stop=1;
|
2541 |
-
}
|
2542 |
-
}
|
2543 |
-
},
|
2544 |
-
/* -------------------- */
|
2545 |
-
|
2546 |
-
|
2547 |
-
/* deletes a property (avoiding the exception thrown by IE) */
|
2548 |
-
_delete=function(c,m){
|
2549 |
-
try{delete c[m];}catch(e){c[m]=null;}
|
2550 |
-
},
|
2551 |
-
/* -------------------- */
|
2552 |
-
|
2553 |
-
|
2554 |
-
/* detects left mouse button */
|
2555 |
-
_mouseBtnLeft=function(e){
|
2556 |
-
return !(e.which && e.which!==1);
|
2557 |
-
},
|
2558 |
-
/* -------------------- */
|
2559 |
-
|
2560 |
-
|
2561 |
-
/* detects if pointer type event is touch */
|
2562 |
-
_pointerTouch=function(e){
|
2563 |
-
var t=e.originalEvent.pointerType;
|
2564 |
-
return !(t && t!=="touch" && t!==2);
|
2565 |
-
},
|
2566 |
-
/* -------------------- */
|
2567 |
-
|
2568 |
-
|
2569 |
-
/* checks if value is numeric */
|
2570 |
-
_isNumeric=function(val){
|
2571 |
-
return !isNaN(parseFloat(val)) && isFinite(val);
|
2572 |
-
},
|
2573 |
-
/* -------------------- */
|
2574 |
-
|
2575 |
-
|
2576 |
-
/* returns element position according to content */
|
2577 |
-
_childPos=function(el){
|
2578 |
-
var p=el.parents(".mCSB_container");
|
2579 |
-
return [el.offset().top-p.offset().top,el.offset().left-p.offset().left];
|
2580 |
-
},
|
2581 |
-
/* -------------------- */
|
2582 |
-
|
2583 |
-
|
2584 |
-
/* checks if browser tab is hidden/inactive via Page Visibility API */
|
2585 |
-
_isTabHidden=function(){
|
2586 |
-
var prop=_getHiddenProp();
|
2587 |
-
if(!prop) return false;
|
2588 |
-
return document[prop];
|
2589 |
-
function _getHiddenProp(){
|
2590 |
-
var pfx=["webkit","moz","ms","o"];
|
2591 |
-
if("hidden" in document) return "hidden"; //natively supported
|
2592 |
-
for(var i=0; i<pfx.length; i++){ //prefixed
|
2593 |
-
if((pfx[i]+"Hidden") in document)
|
2594 |
-
return pfx[i]+"Hidden";
|
2595 |
-
}
|
2596 |
-
return null; //not supported
|
2597 |
-
}
|
2598 |
-
};
|
2599 |
-
/* -------------------- */
|
2600 |
-
|
2601 |
-
|
2602 |
-
|
2603 |
-
|
2604 |
-
|
2605 |
-
/*
|
2606 |
-
----------------------------------------
|
2607 |
-
PLUGIN SETUP
|
2608 |
-
----------------------------------------
|
2609 |
-
*/
|
2610 |
-
|
2611 |
-
/* plugin constructor functions */
|
2612 |
-
$.fn[pluginNS]=function(method){ /* usage: $(selector).mCustomScrollbar(); */
|
2613 |
-
if(methods[method]){
|
2614 |
-
return methods[method].apply(this,Array.prototype.slice.call(arguments,1));
|
2615 |
-
}else if(typeof method==="object" || !method){
|
2616 |
-
return methods.init.apply(this,arguments);
|
2617 |
-
}else{
|
2618 |
-
$.error("Method "+method+" does not exist");
|
2619 |
-
}
|
2620 |
-
};
|
2621 |
-
$[pluginNS]=function(method){ /* usage: $.mCustomScrollbar(); */
|
2622 |
-
if(methods[method]){
|
2623 |
-
return methods[method].apply(this,Array.prototype.slice.call(arguments,1));
|
2624 |
-
}else if(typeof method==="object" || !method){
|
2625 |
-
return methods.init.apply(this,arguments);
|
2626 |
-
}else{
|
2627 |
-
$.error("Method "+method+" does not exist");
|
2628 |
-
}
|
2629 |
-
};
|
2630 |
-
|
2631 |
-
/*
|
2632 |
-
allow setting plugin default options.
|
2633 |
-
usage: $.mCustomScrollbar.defaults.scrollInertia=500;
|
2634 |
-
to apply any changed default options on default selectors (below), use inside document ready fn
|
2635 |
-
e.g.: $(document).ready(function(){ $.mCustomScrollbar.defaults.scrollInertia=500; });
|
2636 |
-
*/
|
2637 |
-
$[pluginNS].defaults=defaults;
|
2638 |
-
|
2639 |
-
/*
|
2640 |
-
add window object (window.mCustomScrollbar)
|
2641 |
-
usage: if(window.mCustomScrollbar){console.log("custom scrollbar plugin loaded");}
|
2642 |
-
*/
|
2643 |
-
window[pluginNS]=true;
|
2644 |
-
|
2645 |
-
$(window).bind("load",function(){
|
2646 |
-
|
2647 |
-
$(defaultSelector)[pluginNS](); /* add scrollbars automatically on default selector */
|
2648 |
-
|
2649 |
-
/* extend jQuery expressions */
|
2650 |
-
$.extend($.expr[":"],{
|
2651 |
-
/* checks if element is within scrollable viewport */
|
2652 |
-
mcsInView:$.expr[":"].mcsInView || function(el){
|
2653 |
-
var $el=$(el),content=$el.parents(".mCSB_container"),wrapper,cPos;
|
2654 |
-
if(!content.length){return;}
|
2655 |
-
wrapper=content.parent();
|
2656 |
-
cPos=[content[0].offsetTop,content[0].offsetLeft];
|
2657 |
-
return cPos[0]+_childPos($el)[0]>=0 && cPos[0]+_childPos($el)[0]<wrapper.height()-$el.outerHeight(false) &&
|
2658 |
-
cPos[1]+_childPos($el)[1]>=0 && cPos[1]+_childPos($el)[1]<wrapper.width()-$el.outerWidth(false);
|
2659 |
-
},
|
2660 |
-
/* checks if element or part of element is in view of scrollable viewport */
|
2661 |
-
mcsInSight:$.expr[":"].mcsInSight || function(el,i,m){
|
2662 |
-
var $el=$(el),elD,content=$el.parents(".mCSB_container"),wrapperView,pos,wrapperViewPct,
|
2663 |
-
pctVals=m[3]==="exact" ? [[1,0],[1,0]] : [[0.9,0.1],[0.6,0.4]];
|
2664 |
-
if(!content.length){return;}
|
2665 |
-
elD=[$el.outerHeight(false),$el.outerWidth(false)];
|
2666 |
-
pos=[content[0].offsetTop+_childPos($el)[0],content[0].offsetLeft+_childPos($el)[1]];
|
2667 |
-
wrapperView=[content.parent()[0].offsetHeight,content.parent()[0].offsetWidth];
|
2668 |
-
wrapperViewPct=[elD[0]<wrapperView[0] ? pctVals[0] : pctVals[1],elD[1]<wrapperView[1] ? pctVals[0] : pctVals[1]];
|
2669 |
-
return pos[0]-(wrapperView[0]*wrapperViewPct[0][0])<0 && pos[0]+elD[0]-(wrapperView[0]*wrapperViewPct[0][1])>=0 &&
|
2670 |
-
pos[1]-(wrapperView[1]*wrapperViewPct[1][0])<0 && pos[1]+elD[1]-(wrapperView[1]*wrapperViewPct[1][1])>=0;
|
2671 |
-
},
|
2672 |
-
/* checks if element is overflowed having visible scrollbar(s) */
|
2673 |
-
mcsOverflow:$.expr[":"].mcsOverflow || function(el){
|
2674 |
-
var d=$(el).data(pluginPfx);
|
2675 |
-
if(!d){return;}
|
2676 |
-
return d.overflowed[0] || d.overflowed[1];
|
2677 |
-
}
|
2678 |
-
});
|
2679 |
-
|
2680 |
-
});
|
2681 |
-
|
2682 |
-
}))
|
2683 |
-
}));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/um-scrollbar.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(f){var h,m,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],t="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],p=Array.prototype.slice;if(f.event.fixHooks)for(var o=e.length;o;)f.event.fixHooks[e[--o]]=f.event.mouseHooks;var g=f.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=t.length;e;)this.addEventListener(t[--e],a,!1);else this.onmousewheel=a;f.data(this,"mousewheel-line-height",g.getLineHeight(this)),f.data(this,"mousewheel-page-height",g.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],a,!1);else this.onmousewheel=null;f.removeData(this,"mousewheel-line-height"),f.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var t=f(e),o=t["offsetParent"in f.fn?"offsetParent":"parent"]();return o.length||(o=f("body")),parseInt(o.css("fontSize"),10)||parseInt(t.css("fontSize"),10)||16},getPageHeight:function(e){return f(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function a(e){var t,o=e||window.event,a=p.call(arguments,1),n=0,i=0,r=0,l=0,s=0;if((e=f.event.fix(o)).type="mousewheel","detail"in o&&(r=-1*o.detail),"wheelDelta"in o&&(r=o.wheelDelta),"wheelDeltaY"in o&&(r=o.wheelDeltaY),"wheelDeltaX"in o&&(i=-1*o.wheelDeltaX),"axis"in o&&o.axis===o.HORIZONTAL_AXIS&&(i=-1*r,r=0),n=0===r?i:r,"deltaY"in o&&(n=r=-1*o.deltaY),"deltaX"in o&&(i=o.deltaX,0===r&&(n=-1*i)),0!==r||0!==i){if(1===o.deltaMode){var c=f.data(this,"mousewheel-line-height");n*=c,r*=c,i*=c}else if(2===o.deltaMode){var d=f.data(this,"mousewheel-page-height");n*=d,r*=d,i*=d}if(t=Math.max(Math.abs(r),Math.abs(i)),(!m||t<m)&&x(o,m=t)&&(m/=40),x(o,t)&&(n/=40,i/=40,r/=40),n=Math[1<=n?"floor":"ceil"](n/m),i=Math[1<=i?"floor":"ceil"](i/m),r=Math[1<=r?"floor":"ceil"](r/m),g.settings.normalizeOffset&&this.getBoundingClientRect){var u=this.getBoundingClientRect();l=e.clientX-u.left,s=e.clientY-u.top}return e.deltaX=i,e.deltaY=r,e.deltaFactor=m,e.offsetX=l,e.offsetY=s,e.deltaMode=0,a.unshift(e,n,i,r),h&&clearTimeout(h),h=setTimeout(v,200),(f.event.dispatch||f.event.handle).apply(this,a)}}function v(){m=null}function x(e,t){return g.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}f.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e:e(jQuery,window,document)}(function(A){var z,h,H,a,n,l,i,g,P,S,m,c,s,d,u,f,p,v,x,w,_,b,M,C,y,B,T,k,U,r,O,D,I,E,X,R,W,L,Y,j,F,q,N,V,Q,Z,G,J,K,$,ee,te,oe,ae,ne,ie,re,e,t,o;e="function"==typeof define&&define.amd,t="undefined"!=typeof module&&module.exports,o="https:"==document.location.protocol?"https:":"http:",e||(t?require("jquery-mousewheel")(A):A.event.special.mousewheel||A("head").append(decodeURI("%3Cscript src="+o+"//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js%3E%3C/script%3E"))),h="mCustomScrollbar",H="mCS",a=".mCustomScrollbar",n={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},l=0,i={},g=window.attachEvent&&!window.addEventListener?1:0,P=!1,S=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],m={init:function(r){var r=A.extend(!0,{},n,r),e=c.call(this);if(r.live){var t=r.liveSelector||this.selector||a,o=A(t);if("off"===r.live)return void d(t);i[t]=setTimeout(function(){o.mCustomScrollbar(r),"once"===r.live&&o.length&&d(t)},500)}else d(t);return r.setWidth=r.set_width?r.set_width:r.setWidth,r.setHeight=r.set_height?r.set_height:r.setHeight,r.axis=r.horizontalScroll?"x":u(r.axis),r.scrollInertia=0<r.scrollInertia&&r.scrollInertia<17?17:r.scrollInertia,"object"!=typeof r.mouseWheel&&1==r.mouseWheel&&(r.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),r.mouseWheel.scrollAmount=r.mouseWheelPixels?r.mouseWheelPixels:r.mouseWheel.scrollAmount,r.mouseWheel.normalizeDelta=r.advanced.normalizeMouseWheelDelta?r.advanced.normalizeMouseWheelDelta:r.mouseWheel.normalizeDelta,r.scrollButtons.scrollType=f(r.scrollButtons.scrollType),s(r),A(e).each(function(){var e=A(this);if(!e.data(H)){e.data(H,{idx:++l,opt:r,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:e.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var t=e.data(H),o=t.opt,a=e.data("mcs-axis"),n=e.data("mcs-scrollbar-position"),i=e.data("mcs-theme");a&&(o.axis=a),n&&(o.scrollbarPosition=n),i&&(o.theme=i,s(o)),p.call(this),t&&o.callbacks.onCreate&&"function"==typeof o.callbacks.onCreate&&o.callbacks.onCreate.call(this),A("#mCSB_"+t.idx+"_container img:not(."+S[2]+")").addClass(S[2]),m.update.call(null,e)}})},update:function(e,l){var t=e||c.call(this);return A(t).each(function(){var e=A(this);if(e.data(H)){var t=e.data(H),o=t.opt,a=A("#mCSB_"+t.idx+"_container"),n=A("#mCSB_"+t.idx),i=[A("#mCSB_"+t.idx+"_dragger_vertical"),A("#mCSB_"+t.idx+"_dragger_horizontal")];if(!a.length)return;t.tweenRunning&&G(e),l&&t&&o.callbacks.onBeforeUpdate&&"function"==typeof o.callbacks.onBeforeUpdate&&o.callbacks.onBeforeUpdate.call(this),e.hasClass(S[3])&&e.removeClass(S[3]),e.hasClass(S[4])&&e.removeClass(S[4]),n.css("max-height","none"),n.height()!==e.height()&&n.css("max-height",e.height()),x.call(this),"y"===o.axis||o.advanced.autoExpandHorizontalScroll||a.css("width",v(a)),t.overflowed=C.call(this),k.call(this),o.autoDraggerLength&&_.call(this),b.call(this),B.call(this);var r=[Math.abs(a[0].offsetTop),Math.abs(a[0].offsetLeft)];"x"!==o.axis&&(t.overflowed[0]?i[0].height()>i[0].parent().height()?y.call(this):(J(e,r[0].toString(),{dir:"y",dur:0,overwrite:"none"}),t.contentReset.y=null):(y.call(this),"y"===o.axis?T.call(this):"yx"===o.axis&&t.overflowed[1]&&J(e,r[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==o.axis&&(t.overflowed[1]?i[1].width()>i[1].parent().width()?y.call(this):(J(e,r[1].toString(),{dir:"x",dur:0,overwrite:"none"}),t.contentReset.x=null):(y.call(this),"x"===o.axis?T.call(this):"yx"===o.axis&&t.overflowed[0]&&J(e,r[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),l&&t&&(2===l&&o.callbacks.onImageLoad&&"function"==typeof o.callbacks.onImageLoad?o.callbacks.onImageLoad.call(this):3===l&&o.callbacks.onSelectorChange&&"function"==typeof o.callbacks.onSelectorChange?o.callbacks.onSelectorChange.call(this):o.callbacks.onUpdate&&"function"==typeof o.callbacks.onUpdate&&o.callbacks.onUpdate.call(this)),Z.call(this)}})},scrollTo:function(l,s){if(void 0!==l&&null!=l){var e=c.call(this);return A(e).each(function(){var e=A(this);if(e.data(H)){var t=e.data(H),o=t.opt,a={trigger:"external",scrollInertia:o.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},n=A.extend(!0,{},a,s),i=V.call(this,l),r=0<n.scrollInertia&&n.scrollInertia<17?17:n.scrollInertia;i[0]=Q.call(this,i[0],"y"),i[1]=Q.call(this,i[1],"x"),n.moveDragger&&(i[0]*=t.scrollRatio.y,i[1]*=t.scrollRatio.x),n.dur=re()?0:r,setTimeout(function(){null!==i[0]&&void 0!==i[0]&&"x"!==o.axis&&t.overflowed[0]&&(n.dir="y",n.overwrite="all",J(e,i[0].toString(),n)),null!==i[1]&&void 0!==i[1]&&"y"!==o.axis&&t.overflowed[1]&&(n.dir="x",n.overwrite="none",J(e,i[1].toString(),n))},n.timeout)}})}},stop:function(){var e=c.call(this);return A(e).each(function(){var e=A(this);e.data(H)&&G(e)})},disable:function(t){var e=c.call(this);return A(e).each(function(){var e=A(this);e.data(H)&&(e.data(H),Z.call(this,"remove"),T.call(this),t&&y.call(this),k.call(this,!0),e.addClass(S[3]))})},destroy:function(){var r=c.call(this);return A(r).each(function(){var e=A(this);if(e.data(H)){var t=e.data(H),o=t.opt,a=A("#mCSB_"+t.idx),n=A("#mCSB_"+t.idx+"_container"),i=A(".mCSB_"+t.idx+"_scrollbar");o.live&&d(o.liveSelector||A(r).selector),Z.call(this,"remove"),T.call(this),y.call(this),e.removeData(H),te(this,"mcs"),i.remove(),n.find("img."+S[2]).removeClass(S[2]),a.replaceWith(n.contents()),e.removeClass(h+" _"+H+"_"+t.idx+" "+S[6]+" "+S[7]+" "+S[5]+" "+S[3]).addClass(S[4])}})}},c=function(){return"object"!=typeof A(this)||A(this).length<1?a:this},s=function(e){e.autoDraggerLength=!(-1<A.inArray(e.theme,["rounded","rounded-dark","rounded-dots","rounded-dots-dark"]))&&e.autoDraggerLength,e.autoExpandScrollbar=!(-1<A.inArray(e.theme,["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"]))&&e.autoExpandScrollbar,e.scrollButtons.enable=!(-1<A.inArray(e.theme,["minimal","minimal-dark"]))&&e.scrollButtons.enable,e.autoHideScrollbar=-1<A.inArray(e.theme,["minimal","minimal-dark"])||e.autoHideScrollbar,e.scrollbarPosition=-1<A.inArray(e.theme,["minimal","minimal-dark"])?"outside":e.scrollbarPosition},d=function(e){i[e]&&(clearTimeout(i[e]),te(i,e))},u=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},f=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},p=function(){var e=A(this),t=e.data(H),o=t.opt,a=o.autoExpandScrollbar?" "+S[1]+"_expand":"",n=["<div id='mCSB_"+t.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+t.idx+"_scrollbar mCS-"+o.theme+" mCSB_scrollTools_vertical"+a+"'><div class='"+S[12]+"'><div id='mCSB_"+t.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+t.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+t.idx+"_scrollbar mCS-"+o.theme+" mCSB_scrollTools_horizontal"+a+"'><div class='"+S[12]+"'><div id='mCSB_"+t.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],i="yx"===o.axis?"mCSB_vertical_horizontal":"x"===o.axis?"mCSB_horizontal":"mCSB_vertical",r="yx"===o.axis?n[0]+n[1]:"x"===o.axis?n[1]:n[0],l="yx"===o.axis?"<div id='mCSB_"+t.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",s=o.autoHideScrollbar?" "+S[6]:"",c="x"!==o.axis&&"rtl"===t.langDir?" "+S[7]:"";o.setWidth&&e.css("width",o.setWidth),o.setHeight&&e.css("height",o.setHeight),o.setLeft="y"!==o.axis&&"rtl"===t.langDir?"989999px":o.setLeft,e.addClass(h+" _"+H+"_"+t.idx+s+c).wrapInner("<div id='mCSB_"+t.idx+"' class='mCustomScrollBox mCS-"+o.theme+" "+i+"'><div id='mCSB_"+t.idx+"_container' class='mCSB_container' style='position:relative; top:"+o.setTop+"; left:"+o.setLeft+";' dir='"+t.langDir+"' /></div>");var d=A("#mCSB_"+t.idx),u=A("#mCSB_"+t.idx+"_container");"y"===o.axis||o.advanced.autoExpandHorizontalScroll||u.css("width",v(u)),"outside"===o.scrollbarPosition?("static"===e.css("position")&&e.css("position","relative"),e.css("overflow","visible"),d.addClass("mCSB_outside").after(r)):(d.addClass("mCSB_inside").append(r),u.wrap(l)),w.call(this);var f=[A("#mCSB_"+t.idx+"_dragger_vertical"),A("#mCSB_"+t.idx+"_dragger_horizontal")];f[0].css("min-height",f[0].height()),f[1].css("min-width",f[1].width())},v=function(e){var t=[e[0].scrollWidth,Math.max.apply(Math,e.children().map(function(){return A(this).outerWidth(!0)}).get())],o=e.parent().width();return o<t[0]?t[0]:o<t[1]?t[1]:"100%"},x=function(){var e=A(this),t=e.data(H),o=t.opt,a=A("#mCSB_"+t.idx+"_container");if(o.advanced.autoExpandHorizontalScroll&&"y"!==o.axis){a.css({width:"auto","min-width":0,"overflow-x":"scroll"});var n=Math.ceil(a[0].scrollWidth);3===o.advanced.autoExpandHorizontalScroll||2!==o.advanced.autoExpandHorizontalScroll&&n>a.parent().width()?a.css({width:n,"min-width":"100%","overflow-x":"inherit"}):a.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(a[0].getBoundingClientRect().right+.4)-Math.floor(a[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},w=function(){var e=A(this),t=e.data(H),o=t.opt,a=A(".mCSB_"+t.idx+"_scrollbar:first"),n=ne(o.scrollButtons.tabindex)?"tabindex='"+o.scrollButtons.tabindex+"'":"",i=["<a href='#' class='"+S[13]+"' "+n+" />","<a href='#' class='"+S[14]+"' "+n+" />","<a href='#' class='"+S[15]+"' "+n+" />","<a href='#' class='"+S[16]+"' "+n+" />"],r=["x"===o.axis?i[2]:i[0],"x"===o.axis?i[3]:i[1],i[2],i[3]];o.scrollButtons.enable&&a.prepend(r[0]).append(r[1]).next(".mCSB_scrollTools").prepend(r[2]).append(r[3])},_=function(){var e=A(this),t=e.data(H),o=A("#mCSB_"+t.idx),a=A("#mCSB_"+t.idx+"_container"),n=[A("#mCSB_"+t.idx+"_dragger_vertical"),A("#mCSB_"+t.idx+"_dragger_horizontal")],i=[o.height()/a.outerHeight(!1),o.width()/a.outerWidth(!1)],r=[parseInt(n[0].css("min-height")),Math.round(i[0]*n[0].parent().height()),parseInt(n[1].css("min-width")),Math.round(i[1]*n[1].parent().width())],l=g&&r[1]<r[0]?r[0]:r[1],s=g&&r[3]<r[2]?r[2]:r[3];n[0].css({height:l,"max-height":n[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":r[0]+"px"}),n[1].css({width:s,"max-width":n[1].parent().width()-10})},b=function(){var e=A(this),t=e.data(H),o=A("#mCSB_"+t.idx),a=A("#mCSB_"+t.idx+"_container"),n=[A("#mCSB_"+t.idx+"_dragger_vertical"),A("#mCSB_"+t.idx+"_dragger_horizontal")],i=[a.outerHeight(!1)-o.height(),a.outerWidth(!1)-o.width()],r=[i[0]/(n[0].parent().height()-n[0].height()),i[1]/(n[1].parent().width()-n[1].width())];t.scrollRatio={y:r[0],x:r[1]}},M=function(e,t,o){var a=o?S[0]+"_expanded":"",n=e.closest(".mCSB_scrollTools");"active"===t?(e.toggleClass(S[0]+" "+a),n.toggleClass(S[1]),e[0]._draggable=e[0]._draggable?0:1):e[0]._draggable||("hide"===t?(e.removeClass(S[0]),n.removeClass(S[1])):(e.addClass(S[0]),n.addClass(S[1])))},C=function(){var e=A(this),t=e.data(H),o=A("#mCSB_"+t.idx),a=A("#mCSB_"+t.idx+"_container"),n=null==t.overflowed?a.height():a.outerHeight(!1),i=null==t.overflowed?a.width():a.outerWidth(!1),r=a[0].scrollHeight,l=a[0].scrollWidth;return n<r&&(n=r),i<l&&(i=l),[n>o.height(),i>o.width()]},y=function(){var e=A(this),t=e.data(H),o=t.opt,a=A("#mCSB_"+t.idx),n=A("#mCSB_"+t.idx+"_container"),i=[A("#mCSB_"+t.idx+"_dragger_vertical"),A("#mCSB_"+t.idx+"_dragger_horizontal")];if(G(e),("x"!==o.axis&&!t.overflowed[0]||"y"===o.axis&&t.overflowed[0])&&(i[0].add(n).css("top",0),J(e,"_resetY")),"y"!==o.axis&&!t.overflowed[1]||"x"===o.axis&&t.overflowed[1]){var r=dx=0;"rtl"===t.langDir&&(r=a.width()-n.outerWidth(!1),dx=Math.abs(r/t.scrollRatio.x)),n.css("left",r),i[1].css("left",dx),J(e,"_resetX")}},B=function(){var t=A(this),e=t.data(H),o=e.opt;if(!e.bindEvents){var a;if(r.call(this),o.contentTouchScroll&&O.call(this),D.call(this),o.mouseWheel.enable)!function e(){a=setTimeout(function(){A.event.special.mousewheel?(clearTimeout(a),I.call(t[0])):e()},100)}();L.call(this),j.call(this),o.advanced.autoScrollOnFocus&&Y.call(this),o.scrollButtons.enable&&F.call(this),o.keyboard.enable&&q.call(this),e.bindEvents=!0}},T=function(){var e=A(this),t=e.data(H),o=t.opt,a=H+"_"+t.idx,n=".mCSB_"+t.idx+"_scrollbar",i=A("#mCSB_"+t.idx+",#mCSB_"+t.idx+"_container,#mCSB_"+t.idx+"_container_wrapper,"+n+" ."+S[12]+",#mCSB_"+t.idx+"_dragger_vertical,#mCSB_"+t.idx+"_dragger_horizontal,"+n+">a"),r=A("#mCSB_"+t.idx+"_container");o.advanced.releaseDraggableSelectors&&i.add(A(o.advanced.releaseDraggableSelectors)),o.advanced.extraDraggableSelectors&&i.add(A(o.advanced.extraDraggableSelectors)),t.bindEvents&&(A(document).add(A(!X()||top.document)).unbind("."+a),i.each(function(){A(this).unbind("."+a)}),clearTimeout(e[0]._focusTimeout),te(e[0],"_focusTimeout"),clearTimeout(t.sequential.step),te(t.sequential,"step"),clearTimeout(r[0].onCompleteTimeout),te(r[0],"onCompleteTimeout"),t.bindEvents=!1)},k=function(e){var t=A(this),o=t.data(H),a=o.opt,n=A("#mCSB_"+o.idx+"_container_wrapper"),i=n.length?n:A("#mCSB_"+o.idx+"_container"),r=[A("#mCSB_"+o.idx+"_scrollbar_vertical"),A("#mCSB_"+o.idx+"_scrollbar_horizontal")],l=[r[0].find(".mCSB_dragger"),r[1].find(".mCSB_dragger")];"x"!==a.axis&&(o.overflowed[0]&&!e?(r[0].add(l[0]).add(r[0].children("a")).css("display","block"),i.removeClass(S[8]+" "+S[10])):(a.alwaysShowScrollbar?(2!==a.alwaysShowScrollbar&&l[0].css("display","none"),i.removeClass(S[10])):(r[0].css("display","none"),i.addClass(S[10])),i.addClass(S[8]))),"y"!==a.axis&&(o.overflowed[1]&&!e?(r[1].add(l[1]).add(r[1].children("a")).css("display","block"),i.removeClass(S[9]+" "+S[11])):(a.alwaysShowScrollbar?(2!==a.alwaysShowScrollbar&&l[1].css("display","none"),i.removeClass(S[11])):(r[1].css("display","none"),i.addClass(S[11])),i.addClass(S[9]))),o.overflowed[0]||o.overflowed[1]?t.removeClass(S[5]):t.addClass(S[5])},U=function(e){var t=e.type,o=e.target.ownerDocument!==document&&null!==frameElement?[A(frameElement).offset().top,A(frameElement).offset().left]:null,a=X()&&e.target.ownerDocument!==top.document&&null!==frameElement?[A(e.view.frameElement).offset().top,A(e.view.frameElement).offset().left]:[0,0];switch(t){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return o?[e.originalEvent.pageY-o[0]+a[0],e.originalEvent.pageX-o[1]+a[1],!1]:[e.originalEvent.pageY,e.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var n=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],i=e.originalEvent.touches.length||e.originalEvent.changedTouches.length;return e.target.ownerDocument!==document?[n.screenY,n.screenX,1<i]:[n.pageY,n.pageX,1<i];default:return o?[e.pageY-o[0]+a[0],e.pageX-o[1]+a[1],!1]:[e.pageY,e.pageX,!1]}},r=function(){var r,l,s,c=A(this),d=c.data(H),u=d.opt,e=H+"_"+d.idx,f=["mCSB_"+d.idx+"_dragger_vertical","mCSB_"+d.idx+"_dragger_horizontal"],h=A("#mCSB_"+d.idx+"_container"),t=A("#"+f[0]+",#"+f[1]),o=u.advanced.releaseDraggableSelectors?t.add(A(u.advanced.releaseDraggableSelectors)):t,a=u.advanced.extraDraggableSelectors?A(!X()||top.document).add(A(u.advanced.extraDraggableSelectors)):A(!X()||top.document);function n(e,t,o,a){if(h[0].idleTimer=u.scrollInertia<233?250:0,r.attr("id")===f[1])var n="x",i=(r[0].offsetLeft-t+a)*d.scrollRatio.x;else var n="y",i=(r[0].offsetTop-e+o)*d.scrollRatio.y;J(c,i.toString(),{dir:n,drag:!0})}t.bind("contextmenu."+e,function(e){e.preventDefault()}).bind("mousedown."+e+" touchstart."+e+" pointerdown."+e+" MSPointerDown."+e,function(e){if(e.stopImmediatePropagation(),e.preventDefault(),oe(e)){P=!0,g&&(document.onselectstart=function(){return!1}),R.call(h,!1),G(c);var t=(r=A(this)).offset(),o=U(e)[0]-t.top,a=U(e)[1]-t.left,n=r.height()+t.top,i=r.width()+t.left;o<n&&0<o&&a<i&&0<a&&(l=o,s=a),M(r,"active",u.autoExpandScrollbar)}}).bind("touchmove."+e,function(e){e.stopImmediatePropagation(),e.preventDefault();var t=r.offset(),o=U(e)[0]-t.top,a=U(e)[1]-t.left;n(l,s,o,a)}),A(document).add(a).bind("mousemove."+e+" pointermove."+e+" MSPointerMove."+e,function(e){if(r){var t=r.offset(),o=U(e)[0]-t.top,a=U(e)[1]-t.left;if(l===o&&s===a)return;n(l,s,o,a)}}).add(o).bind("mouseup."+e+" touchend."+e+" pointerup."+e+" MSPointerUp."+e,function(e){r&&(M(r,"active",u.autoExpandScrollbar),r=null),P=!1,g&&(document.onselectstart=null),R.call(h,!0)})},O=function(){var d,c,u,f,h,m,p,g,v,x,w,_,S,b,C=A(this),y=C.data(H),B=y.opt,e=H+"_"+y.idx,T=A("#mCSB_"+y.idx),M=A("#mCSB_"+y.idx+"_container"),k=[A("#mCSB_"+y.idx+"_dragger_vertical"),A("#mCSB_"+y.idx+"_dragger_horizontal")],O=[],D=[],I="yx"===B.axis?"none":"all",E=[],t=M.find("iframe"),o=["touchstart."+e+" pointerdown."+e+" MSPointerDown."+e,"touchmove."+e+" pointermove."+e+" MSPointerMove."+e,"touchend."+e+" pointerup."+e+" MSPointerUp."+e],R=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;function a(e){if(!ae(e)||P||U(e)[2])z=0;else{b=S=0,d=z=1,C.removeClass("mCS_touch_action");var t=M.offset();c=U(e)[0]-t.top,u=U(e)[1]-t.left,E=[U(e)[0],U(e)[1]]}}function n(e){if(ae(e)&&!P&&!U(e)[2]&&(B.documentTouchScroll||e.preventDefault(),e.stopImmediatePropagation(),(!b||S)&&d)){p=$();var t=T.offset(),o=U(e)[0]-t.top,a=U(e)[1]-t.left,n="mcsLinearOut";if(O.push(o),D.push(a),E[2]=Math.abs(U(e)[0]-E[0]),E[3]=Math.abs(U(e)[1]-E[1]),y.overflowed[0])var i=k[0].parent().height()-k[0].height(),r=0<c-o&&o-c>-i*y.scrollRatio.y&&(2*E[3]<E[2]||"yx"===B.axis);if(y.overflowed[1])var l=k[1].parent().width()-k[1].width(),s=0<u-a&&a-u>-l*y.scrollRatio.x&&(2*E[2]<E[3]||"yx"===B.axis);r||s?(R||e.preventDefault(),S=1):(b=1,C.addClass("mCS_touch_action")),R&&e.preventDefault(),w="yx"===B.axis?[c-o,u-a]:"x"===B.axis?[null,u-a]:[c-o,null],M[0].idleTimer=250,y.overflowed[0]&&L(w[0],0,n,"y","all",!0),y.overflowed[1]&&L(w[1],0,n,"x",I,!0)}}function i(e){if(!ae(e)||P||U(e)[2])z=0;else{z=1,e.stopImmediatePropagation(),G(C),m=$();var t=T.offset();f=U(e)[0]-t.top,h=U(e)[1]-t.left,O=[],D=[]}}function r(e){if(ae(e)&&!P&&!U(e)[2]){d=0,e.stopImmediatePropagation(),b=S=0,g=$();var t=T.offset(),o=U(e)[0]-t.top,a=U(e)[1]-t.left;if(!(30<g-p)){var n="mcsEaseOut",i=(x=1e3/(g-m))<2.5,r=i?[O[O.length-2],D[D.length-2]]:[0,0];v=i?[o-r[0],a-r[1]]:[o-f,a-h];var l=[Math.abs(v[0]),Math.abs(v[1])];x=i?[Math.abs(v[0]/4),Math.abs(v[1]/4)]:[x,x];var s=[Math.abs(M[0].offsetTop)-v[0]*W(l[0]/x[0],x[0]),Math.abs(M[0].offsetLeft)-v[1]*W(l[1]/x[1],x[1])];w="yx"===B.axis?[s[0],s[1]]:"x"===B.axis?[null,s[1]]:[s[0],null],_=[4*l[0]+B.scrollInertia,4*l[1]+B.scrollInertia];var c=parseInt(B.contentTouchScroll)||0;w[0]=c<l[0]?w[0]:0,w[1]=c<l[1]?w[1]:0,y.overflowed[0]&&L(w[0],_[0],n,"y",I,!1),y.overflowed[1]&&L(w[1],_[1],n,"x",I,!1)}}}function W(e,t){var o=[1.5*t,2*t,t/1.5,t/2];return 90<e?4<t?o[0]:o[3]:60<e?3<t?o[3]:o[2]:30<e?8<t?o[1]:6<t?o[0]:4<t?t:o[2]:8<t?t:o[3]}function L(e,t,o,a,n,i){e&&J(C,e.toString(),{dur:t,scrollEasing:o,dir:a,overwrite:n,drag:i})}M.bind(o[0],function(e){a(e)}).bind(o[1],function(e){n(e)}),T.bind(o[0],function(e){i(e)}).bind(o[2],function(e){r(e)}),t.length&&t.each(function(){A(this).bind("load",function(){X(this)&&A(this.contentDocument||this.contentWindow.document).bind(o[0],function(e){a(e),i(e)}).bind(o[1],function(e){n(e)}).bind(o[2],function(e){r(e)})})})},D=function(){var n,a=A(this),i=a.data(H),r=i.opt,l=i.sequential,e=H+"_"+i.idx,s=A("#mCSB_"+i.idx+"_container"),c=s.parent();function d(e,t,o){l.type=o&&n?"stepped":"stepless",l.scrollAmount=10,N(a,e,t,"mcsLinearOut",o?60:null)}s.bind("mousedown."+e,function(e){z||n||(n=1,P=!0)}).add(document).bind("mousemove."+e,function(e){if(!z&&n&&(window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type&&document.selection.createRange().text)){var t=s.offset(),o=U(e)[0]-t.top+s[0].offsetTop,a=U(e)[1]-t.left+s[0].offsetLeft;0<o&&o<c.height()&&0<a&&a<c.width()?l.step&&d("off",null,"stepped"):("x"!==r.axis&&i.overflowed[0]&&(o<0?d("on",38):o>c.height()&&d("on",40)),"y"!==r.axis&&i.overflowed[1]&&(a<0?d("on",37):a>c.width()&&d("on",39)))}}).bind("mouseup."+e+" dragend."+e,function(e){z||(n&&(n=0,d("off",null)),P=!1)})},I=function(){if(A(this).data(H)){var u=A(this),f=u.data(H),h=f.opt,e=H+"_"+f.idx,m=A("#mCSB_"+f.idx),p=[A("#mCSB_"+f.idx+"_dragger_vertical"),A("#mCSB_"+f.idx+"_dragger_horizontal")],t=A("#mCSB_"+f.idx+"_container").find("iframe");t.length&&t.each(function(){A(this).bind("load",function(){X(this)&&A(this.contentDocument||this.contentWindow.document).bind("mousewheel."+e,function(e,t){o(e,t)})})}),m.bind("mousewheel."+e,function(e,t){o(e,t)})}function o(e,t){if(G(u),!W(u,e.target)){var o="auto"!==h.mouseWheel.deltaFactor?parseInt(h.mouseWheel.deltaFactor):g&&e.deltaFactor<100?100:e.deltaFactor||100,a=h.scrollInertia;if("x"===h.axis||"x"===h.mouseWheel.axis)var n="x",i=[Math.round(o*f.scrollRatio.x),parseInt(h.mouseWheel.scrollAmount)],r="auto"!==h.mouseWheel.scrollAmount?i[1]:i[0]>=m.width()?.9*m.width():i[0],l=Math.abs(A("#mCSB_"+f.idx+"_container")[0].offsetLeft),s=p[1][0].offsetLeft,c=p[1].parent().width()-p[1].width(),d="y"===h.mouseWheel.axis?e.deltaY||t:e.deltaX;else var n="y",i=[Math.round(o*f.scrollRatio.y),parseInt(h.mouseWheel.scrollAmount)],r="auto"!==h.mouseWheel.scrollAmount?i[1]:i[0]>=m.height()?.9*m.height():i[0],l=Math.abs(A("#mCSB_"+f.idx+"_container")[0].offsetTop),s=p[0][0].offsetTop,c=p[0].parent().height()-p[0].height(),d=e.deltaY||t;"y"===n&&!f.overflowed[0]||"x"===n&&!f.overflowed[1]||((h.mouseWheel.invert||e.webkitDirectionInvertedFromDevice)&&(d=-d),h.mouseWheel.normalizeDelta&&(d=d<0?-1:1),(0<d&&0!==s||d<0&&s!==c||h.mouseWheel.preventDefault)&&(e.stopImmediatePropagation(),e.preventDefault()),e.deltaFactor<5&&!h.mouseWheel.normalizeDelta&&(r=e.deltaFactor,a=17),J(u,(l-d*r).toString(),{dir:n,dur:a}))}}},E=new Object,X=function(e){var t=!1,o=!1,a=null;if(void 0===e?o="#empty":void 0!==A(e).attr("id")&&(o=A(e).attr("id")),!1!==o&&void 0!==E[o])return E[o];if(e){try{var n=e.contentDocument||e.contentWindow.document;a=n.body.innerHTML}catch(e){}t=null!==a}else{try{var n=top.document;a=n.body.innerHTML}catch(e){}t=null!==a}return!1!==o&&(E[o]=t),t},R=function(e){var t=this.find("iframe");if(t.length){var o=e?"auto":"none";t.css("pointer-events",o)}},W=function(e,t){var o=t.nodeName.toLowerCase(),a=e.data(H).opt.mouseWheel.disableOver;return-1<A.inArray(o,a)&&!(-1<A.inArray(o,["select","textarea"])&&!A(t).is(":focus"))},L=function(){var r,l=A(this),s=l.data(H),e=H+"_"+s.idx,c=A("#mCSB_"+s.idx+"_container"),d=c.parent(),t=A(".mCSB_"+s.idx+"_scrollbar ."+S[12]);t.bind("mousedown."+e+" touchstart."+e+" pointerdown."+e+" MSPointerDown."+e,function(e){P=!0,A(e.target).hasClass("mCSB_dragger")||(r=1)}).bind("touchend."+e+" pointerup."+e+" MSPointerUp."+e,function(e){P=!1}).bind("click."+e,function(e){if(r&&(r=0,A(e.target).hasClass(S[12])||A(e.target).hasClass("mCSB_draggerRail"))){G(l);var t=A(this),o=t.find(".mCSB_dragger");if(0<t.parent(".mCSB_scrollTools_horizontal").length){if(!s.overflowed[1])return;var a="x",n=e.pageX>o.offset().left?-1:1,i=Math.abs(c[0].offsetLeft)-n*(.9*d.width())}else{if(!s.overflowed[0])return;var a="y",n=e.pageY>o.offset().top?-1:1,i=Math.abs(c[0].offsetTop)-n*(.9*d.height())}J(l,i.toString(),{dir:a,scrollEasing:"mcsEaseInOut"})}})},Y=function(){var i=A(this),e=i.data(H),r=e.opt,t=H+"_"+e.idx,l=A("#mCSB_"+e.idx+"_container"),s=l.parent();l.bind("focusin."+t,function(e){var n=A(document.activeElement),t=l.find(".mCustomScrollBox").length;n.is(r.advanced.autoScrollOnFocus)&&(G(i),clearTimeout(i[0]._focusTimeout),i[0]._focusTimer=t?17*t:0,i[0]._focusTimeout=setTimeout(function(){var e=[ie(n)[0],ie(n)[1]],t=[l[0].offsetTop,l[0].offsetLeft],o=[0<=t[0]+e[0]&&t[0]+e[0]<s.height()-n.outerHeight(!1),0<=t[1]+e[1]&&t[0]+e[1]<s.width()-n.outerWidth(!1)],a="yx"!==r.axis||o[0]||o[1]?"all":"none";"x"===r.axis||o[0]||J(i,e[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:a,dur:0}),"y"===r.axis||o[1]||J(i,e[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:a,dur:0})},i[0]._focusTimer))})},j=function(){var e=A(this),t=e.data(H),o=H+"_"+t.idx,a=A("#mCSB_"+t.idx+"_container").parent();a.bind("scroll."+o,function(e){0===a.scrollTop()&&0===a.scrollLeft()||A(".mCSB_"+t.idx+"_scrollbar").css("visibility","hidden")})},F=function(){var a=A(this),n=a.data(H),i=n.opt,r=n.sequential,e=H+"_"+n.idx,t=".mCSB_"+n.idx+"_scrollbar",o=A(t+">a");o.bind("contextmenu."+e,function(e){e.preventDefault()}).bind("mousedown."+e+" touchstart."+e+" pointerdown."+e+" MSPointerDown."+e+" mouseup."+e+" touchend."+e+" pointerup."+e+" MSPointerUp."+e+" mouseout."+e+" pointerout."+e+" MSPointerOut."+e+" click."+e,function(e){if(e.preventDefault(),oe(e)){var t=A(this).attr("class");switch(r.type=i.scrollButtons.scrollType,e.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===r.type)return;P=!0,n.tweenRunning=!1,o("on",t);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===r.type)return;P=!1,r.dir&&o("off",t);break;case"click":if("stepped"!==r.type||n.tweenRunning)return;o("on",t)}}function o(e,t){r.scrollAmount=i.scrollButtons.scrollAmount,N(a,e,t)}})},q=function(){var l=A(this),s=l.data(H),c=s.opt,d=s.sequential,e=H+"_"+s.idx,t=A("#mCSB_"+s.idx),u=A("#mCSB_"+s.idx+"_container"),f=u.parent(),h="input,textarea,select,datalist,keygen,[contenteditable='true']",o=u.find("iframe"),a=["blur."+e+" keydown."+e+" keyup."+e];function n(e){switch(e.type){case"blur":s.tweenRunning&&d.dir&&r("off",null);break;case"keydown":case"keyup":var t=e.keyCode?e.keyCode:e.which,o="on";if("x"!==c.axis&&(38===t||40===t)||"y"!==c.axis&&(37===t||39===t)){if((38===t||40===t)&&!s.overflowed[0]||(37===t||39===t)&&!s.overflowed[1])return;"keyup"===e.type&&(o="off"),A(document.activeElement).is(h)||(e.preventDefault(),e.stopImmediatePropagation(),r(o,t))}else if(33===t||34===t){if((s.overflowed[0]||s.overflowed[1])&&(e.preventDefault(),e.stopImmediatePropagation()),"keyup"===e.type){G(l);var a=34===t?-1:1;if("x"===c.axis||"yx"===c.axis&&s.overflowed[1]&&!s.overflowed[0])var n="x",i=Math.abs(u[0].offsetLeft)-a*(.9*f.width());else var n="y",i=Math.abs(u[0].offsetTop)-a*(.9*f.height());J(l,i.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}else if((35===t||36===t)&&!A(document.activeElement).is(h)&&((s.overflowed[0]||s.overflowed[1])&&(e.preventDefault(),e.stopImmediatePropagation()),"keyup"===e.type)){if("x"===c.axis||"yx"===c.axis&&s.overflowed[1]&&!s.overflowed[0])var n="x",i=35===t?Math.abs(f.width()-u.outerWidth(!1)):0;else var n="y",i=35===t?Math.abs(f.height()-u.outerHeight(!1)):0;J(l,i.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}function r(e,t){d.type=c.keyboard.scrollType,d.scrollAmount=c.keyboard.scrollAmount,"stepped"===d.type&&s.tweenRunning||N(l,e,t)}}o.length&&o.each(function(){A(this).bind("load",function(){X(this)&&A(this.contentDocument||this.contentWindow.document).bind(a[0],function(e){n(e)})})}),t.attr("tabindex","0").bind(a[0],function(e){n(e)})},N=function(u,e,t,f,h){var m=u.data(H),p=m.opt,g=m.sequential,v=A("#mCSB_"+m.idx+"_container"),o="stepped"===g.type,x=p.scrollInertia<26?26:p.scrollInertia,w=p.scrollInertia<1?17:p.scrollInertia;switch(e){case"on":if(g.dir=[t===S[16]||t===S[15]||39===t||37===t?"x":"y",t===S[13]||t===S[15]||38===t||37===t?-1:1],G(u),ne(t)&&"stepped"===g.type)return;_(o);break;case"off":clearTimeout(g.step),te(g,"step"),G(u),(o||m.tweenRunning&&g.dir)&&_(!0)}function _(e){p.snapAmount&&(g.scrollAmount=p.snapAmount instanceof Array?"x"===g.dir[0]?p.snapAmount[1]:p.snapAmount[0]:p.snapAmount);var t="stepped"!==g.type,o=h||(e?t?x/1.5:w:1e3/60),a=e?t?7.5:40:2.5,n=[Math.abs(v[0].offsetTop),Math.abs(v[0].offsetLeft)],i=[10<m.scrollRatio.y?10:m.scrollRatio.y,10<m.scrollRatio.x?10:m.scrollRatio.x],r="x"===g.dir[0]?n[1]+g.dir[1]*(i[1]*a):n[0]+g.dir[1]*(i[0]*a),l="x"===g.dir[0]?n[1]+g.dir[1]*parseInt(g.scrollAmount):n[0]+g.dir[1]*parseInt(g.scrollAmount),s="auto"!==g.scrollAmount?l:r,c=f||(e?t?"mcsLinearOut":"mcsEaseInOut":"mcsLinear"),d=!!e;e&&o<17&&(s="x"===g.dir[0]?n[1]:n[0]),J(u,s.toString(),{dir:g.dir[0],scrollEasing:c,dur:o,onComplete:d}),e?g.dir=!1:(clearTimeout(g.step),g.step=setTimeout(function(){_()},o))}},V=function(e){var t=A(this).data(H).opt,o=[];return"function"==typeof e&&(e=e()),e instanceof Array?o=1<e.length?[e[0],e[1]]:"x"===t.axis?[null,e[0]]:[e[0],null]:(o[0]=e.y?e.y:e.x||"x"===t.axis?null:e,o[1]=e.x?e.x:e.y||"y"===t.axis?null:e),"function"==typeof o[0]&&(o[0]=o[0]()),"function"==typeof o[1]&&(o[1]=o[1]()),o},Q=function(e,t){if(null!=e&&void 0!==e){var o=A(this),a=o.data(H),n=a.opt,i=A("#mCSB_"+a.idx+"_container"),r=i.parent(),l=typeof e;t||(t="x"===n.axis?"x":"y");var s="x"===t?i.outerWidth(!1)-r.width():i.outerHeight(!1)-r.height(),c="x"===t?i[0].offsetLeft:i[0].offsetTop,d="x"===t?"left":"top";switch(l){case"function":return e();case"object":var u=e.jquery?e:A(e);if(!u.length)return;return"x"===t?ie(u)[1]:ie(u)[0];case"string":case"number":if(ne(e))return Math.abs(e);if(-1!==e.indexOf("%"))return Math.abs(s*parseInt(e)/100);if(-1!==e.indexOf("-="))return Math.abs(c-parseInt(e.split("-=")[1]));if(-1!==e.indexOf("+=")){var f=c+parseInt(e.split("+=")[1]);return 0<=f?0:Math.abs(f)}if(-1!==e.indexOf("px")&&ne(e.split("px")[0]))return Math.abs(e.split("px")[0]);if("top"===e||"left"===e)return 0;if("bottom"===e)return Math.abs(r.height()-i.outerHeight(!1));if("right"===e)return Math.abs(r.width()-i.outerWidth(!1));if("first"===e||"last"===e){var u=i.find(":"+e);return"x"===t?ie(u)[1]:ie(u)[0]}return A(e).length?"x"===t?ie(A(e))[1]:ie(A(e))[0]:(i.css(d,e),void m.update.call(null,o[0]))}}},Z=function(e){var t=A(this),o=t.data(H),a=o.opt,n=A("#mCSB_"+o.idx+"_container");if(e)return clearTimeout(n[0].autoUpdate),void te(n[0],"autoUpdate");function i(e){clearTimeout(n[0].autoUpdate),m.update.call(null,t[0],e)}!function e(){clearTimeout(n[0].autoUpdate),0!==t.parents("html").length?n[0].autoUpdate=setTimeout(function(){return a.advanced.updateOnSelectorChange&&(o.poll.change.n=function(){!0===a.advanced.updateOnSelectorChange&&(a.advanced.updateOnSelectorChange="*");var e=0,t=n.find(a.advanced.updateOnSelectorChange);return a.advanced.updateOnSelectorChange&&0<t.length&&t.each(function(){e+=this.offsetHeight+this.offsetWidth}),e}(),o.poll.change.n!==o.poll.change.o)?(o.poll.change.o=o.poll.change.n,void i(3)):a.advanced.updateOnContentResize&&(o.poll.size.n=t[0].scrollHeight+t[0].scrollWidth+n[0].offsetHeight+t[0].offsetHeight+t[0].offsetWidth,o.poll.size.n!==o.poll.size.o)?(o.poll.size.o=o.poll.size.n,void i(1)):!a.advanced.updateOnImageLoad||"auto"===a.advanced.updateOnImageLoad&&"y"===a.axis||(o.poll.img.n=n.find("img").length,o.poll.img.n===o.poll.img.o)?void((a.advanced.updateOnSelectorChange||a.advanced.updateOnContentResize||a.advanced.updateOnImageLoad)&&e()):(o.poll.img.o=o.poll.img.n,void n.find("img").each(function(){!function(e){if(A(e).hasClass(S[2]))return i();var t,o,a=new Image;a.onload=(t=a,o=function(){this.onload=null,A(e).addClass(S[2]),i(2)},function(){return o.apply(t,arguments)}),a.src=e.src}(this)}))},a.advanced.autoUpdateTimeout):t=null}()},G=function(e){var t=e.data(H),o=A("#mCSB_"+t.idx+"_container,#mCSB_"+t.idx+"_container_wrapper,#mCSB_"+t.idx+"_dragger_vertical,#mCSB_"+t.idx+"_dragger_horizontal");o.each(function(){ee.call(this)})},J=function(n,e,i){var t=n.data(H),o=t.opt,a={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:o.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},i=A.extend(a,i),r=[i.dur,i.drag?0:i.dur],l=A("#mCSB_"+t.idx),s=A("#mCSB_"+t.idx+"_container"),c=s.parent(),d=o.callbacks.onTotalScrollOffset?V.call(n,o.callbacks.onTotalScrollOffset):[0,0],u=o.callbacks.onTotalScrollBackOffset?V.call(n,o.callbacks.onTotalScrollBackOffset):[0,0];if(t.trigger=i.trigger,0===c.scrollTop()&&0===c.scrollLeft()||(A(".mCSB_"+t.idx+"_scrollbar").css("visibility","visible"),c.scrollTop(0).scrollLeft(0)),"_resetY"!==e||t.contentReset.y||(B("onOverflowYNone")&&o.callbacks.onOverflowYNone.call(n[0]),t.contentReset.y=1),"_resetX"!==e||t.contentReset.x||(B("onOverflowXNone")&&o.callbacks.onOverflowXNone.call(n[0]),t.contentReset.x=1),"_resetY"!==e&&"_resetX"!==e){if(!t.contentReset.y&&n[0].mcs||!t.overflowed[0]||(B("onOverflowY")&&o.callbacks.onOverflowY.call(n[0]),t.contentReset.x=null),!t.contentReset.x&&n[0].mcs||!t.overflowed[1]||(B("onOverflowX")&&o.callbacks.onOverflowX.call(n[0]),t.contentReset.x=null),o.snapAmount){var f=o.snapAmount instanceof Array?"x"===i.dir?o.snapAmount[1]:o.snapAmount[0]:o.snapAmount;h=e,m=f,p=o.snapOffset,e=Math.round(h/m)*m-p}var h,m,p;switch(i.dir){case"x":var g=A("#mCSB_"+t.idx+"_dragger_horizontal"),v="left",x=s[0].offsetLeft,w=[l.width()-s.outerWidth(!1),g.parent().width()-g.width()],_=[e,0===e?0:e/t.scrollRatio.x],S=d[1],b=u[1],C=0<S?S/t.scrollRatio.x:0,y=0<b?b/t.scrollRatio.x:0;break;case"y":var g=A("#mCSB_"+t.idx+"_dragger_vertical"),v="top",x=s[0].offsetTop,w=[l.height()-s.outerHeight(!1),g.parent().height()-g.height()],_=[e,0===e?0:e/t.scrollRatio.y],S=d[0],b=u[0],C=0<S?S/t.scrollRatio.y:0,y=0<b?b/t.scrollRatio.y:0}_[1]<0||0===_[0]&&0===_[1]?_=[0,0]:_[1]>=w[1]?_=[w[0],w[1]]:_[0]=-_[0],n[0].mcs||(T(),B("onInit")&&o.callbacks.onInit.call(n[0])),clearTimeout(s[0].onCompleteTimeout),K(g[0],v,Math.round(_[1]),r[1],i.scrollEasing),!t.tweenRunning&&(0===x&&0<=_[0]||x===w[0]&&_[0]<=w[0])||K(s[0],v,Math.round(_[0]),r[0],i.scrollEasing,i.overwrite,{onStart:function(){i.callbacks&&i.onStart&&!t.tweenRunning&&(B("onScrollStart")&&(T(),o.callbacks.onScrollStart.call(n[0])),t.tweenRunning=!0,M(g),t.cbOffsets=[o.callbacks.alwaysTriggerOffsets||x>=w[0]+S,o.callbacks.alwaysTriggerOffsets||x<=-b])},onUpdate:function(){i.callbacks&&i.onUpdate&&B("whileScrolling")&&(T(),o.callbacks.whileScrolling.call(n[0]))},onComplete:function(){if(i.callbacks&&i.onComplete){"yx"===o.axis&&clearTimeout(s[0].onCompleteTimeout);var e=s[0].idleTimer||0;s[0].onCompleteTimeout=setTimeout(function(){B("onScroll")&&(T(),o.callbacks.onScroll.call(n[0])),B("onTotalScroll")&&_[1]>=w[1]-C&&t.cbOffsets[0]&&(T(),o.callbacks.onTotalScroll.call(n[0])),B("onTotalScrollBack")&&_[1]<=y&&t.cbOffsets[1]&&(T(),o.callbacks.onTotalScrollBack.call(n[0])),t.tweenRunning=!1,s[0].idleTimer=0,M(g,"hide")},e)}}})}function B(e){return t&&o.callbacks[e]&&"function"==typeof o.callbacks[e]}function T(){var e=[s[0].offsetTop,s[0].offsetLeft],t=[g[0].offsetTop,g[0].offsetLeft],o=[s.outerHeight(!1),s.outerWidth(!1)],a=[l.height(),l.width()];n[0].mcs={content:s,top:e[0],left:e[1],draggerTop:t[0],draggerLeft:t[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(o[0])-a[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(o[1])-a[1])),direction:i.dir}}},K=function(e,t,o,a,n,i,r){e._mTween||(e._mTween={top:{},left:{}});var l,s,r=r||{},c=r.onStart||function(){},d=r.onUpdate||function(){},u=r.onComplete||function(){},f=$(),h=0,m=e.offsetTop,p=e.style,g=e._mTween[t];"left"===t&&(m=e.offsetLeft);var v=o-m;function x(){g.stop||(h||c.call(),h=$()-f,w(),h>=g.time&&(g.time=h>g.time?h+l-(h-g.time):h+l-1,g.time<h+1&&(g.time=h+1)),g.time<a?g.id=s(x):u.call())}function w(){0<a?(g.currVal=function(e,t,o,a,n){switch(n){case"linear":case"mcsLinear":return o*e/a+t;case"mcsLinearOut":return e/=a,e--,o*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return(e/=a/2)<1?o/2*e*e+t:-o/2*(--e*(e-2)-1)+t;case"easeInOutStrong":return(e/=a/2)<1?o/2*Math.pow(2,10*(e-1))+t:(e--,o/2*(2-Math.pow(2,-10*e))+t);case"easeInOut":case"mcsEaseInOut":return(e/=a/2)<1?o/2*e*e*e+t:o/2*((e-=2)*e*e+2)+t;case"easeOutSmooth":return e/=a,-o*(--e*e*e*e-1)+t;case"easeOutStrong":return o*(1-Math.pow(2,-10*e/a))+t;case"easeOut":case"mcsEaseOut":default:var i=(e/=a)*e,r=i*e;return t+o*(.499999999999997*r*i+-2.5*i*i+5.5*r+-6.5*i+4*e)}}(g.time,m,v,a,n),p[t]=Math.round(g.currVal)+"px"):p[t]=o+"px",d.call()}g.stop=0,"none"!==i&&null!=g.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(g.id):clearTimeout(g.id),g.id=null),l=1e3/60,g.time=h+l,s=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return w(),setTimeout(e,.01)},g.id=s(x)},$=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},ee=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=["top","left"],o=0;o<t.length;o++){var a=t[o];e._mTween[a].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(e._mTween[a].id):clearTimeout(e._mTween[a].id),e._mTween[a].id=null,e._mTween[a].stop=1)}},te=function(t,o){try{delete t[o]}catch(e){t[o]=null}},oe=function(e){return!(e.which&&1!==e.which)},ae=function(e){var t=e.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},ne=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},ie=function(e){var t=e.parents(".mCSB_container");return[e.offset().top-t.offset().top,e.offset().left-t.offset().left]},re=function(){var e=function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}();return!!e&&document[e]},A.fn[h]=function(e){return m[e]?m[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void A.error("Method "+e+" does not exist"):m.init.apply(this,arguments)},A[h]=function(e){return m[e]?m[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void A.error("Method "+e+" does not exist"):m.init.apply(this,arguments)},A[h].defaults=n,window[h]=!0,A(window).bind("load",function(){A(a)[h](),A.extend(A.expr[":"],{mcsInView:A.expr[":"].mcsInView||function(e){var t,o,a=A(e),n=a.parents(".mCSB_container");if(n.length)return t=n.parent(),0<=(o=[n[0].offsetTop,n[0].offsetLeft])[0]+ie(a)[0]&&o[0]+ie(a)[0]<t.height()-a.outerHeight(!1)&&0<=o[1]+ie(a)[1]&&o[1]+ie(a)[1]<t.width()-a.outerWidth(!1)},mcsInSight:A.expr[":"].mcsInSight||function(e,t,o){var a,n,i,r,l=A(e),s=l.parents(".mCSB_container"),c="exact"===o[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(s.length)return a=[l.outerHeight(!1),l.outerWidth(!1)],i=[s[0].offsetTop+ie(l)[0],s[0].offsetLeft+ie(l)[1]],n=[s.parent()[0].offsetHeight,s.parent()[0].offsetWidth],i[0]-n[0]*(r=[a[0]<n[0]?c[0]:c[1],a[1]<n[1]?c[0]:c[1]])[0][0]<0&&0<=i[0]+a[0]-n[0]*r[0][1]&&i[1]-n[1]*r[1][0]<0&&0<=i[1]+a[1]-n[1]*r[1][1]},mcsOverflow:A.expr[":"].mcsOverflow||function(e){var t=A(e).data(H);if(t)return t.overflowed[0]||t.overflowed[1]}})})});
|
|
includes/admin/assets/js/um-admin-modal.js
CHANGED
@@ -138,6 +138,8 @@ function um_admin_modal_ajaxcall( act_id, arg1, arg2, arg3 ) {
|
|
138 |
}
|
139 |
|
140 |
um_init_tooltips();
|
|
|
|
|
141 |
},
|
142 |
error: function(data) {
|
143 |
|
138 |
}
|
139 |
|
140 |
um_init_tooltips();
|
141 |
+
|
142 |
+
um_admin_init_datetimepicker();
|
143 |
},
|
144 |
error: function(data) {
|
145 |
|
includes/admin/assets/js/um-admin-scripts.js
CHANGED
@@ -1,3 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
function um_init_tooltips() {
|
2 |
if ( jQuery( '.um_tooltip' ).length > 0 ) {
|
3 |
jQuery( '.um_tooltip' ).tooltip({
|
1 |
+
function um_admin_init_datetimepicker() {
|
2 |
+
jQuery('.um-datepicker:not(.picker__input)').each(function(){
|
3 |
+
elem = jQuery(this);
|
4 |
+
|
5 |
+
if ( typeof elem.attr('data-disabled_weekdays') != 'undefined' && elem.attr('data-disabled_weekdays') != '' ) {
|
6 |
+
var disable = JSON.parse( elem.attr('data-disabled_weekdays') );
|
7 |
+
} else {
|
8 |
+
var disable = false;
|
9 |
+
}
|
10 |
+
|
11 |
+
var years_n = null;
|
12 |
+
if ( typeof elem.attr('data-years') != 'undefined' ) {
|
13 |
+
years_n = elem.attr('data-years');
|
14 |
+
}
|
15 |
+
|
16 |
+
var minRange = elem.attr('data-date_min');
|
17 |
+
var maxRange = elem.attr('data-date_max');
|
18 |
+
|
19 |
+
var minSplit = [], maxSplit = [];
|
20 |
+
if ( typeof minRange != 'undefined' ) {
|
21 |
+
minSplit = minRange.split(",");
|
22 |
+
}
|
23 |
+
if ( typeof maxRange != 'undefined' ) {
|
24 |
+
maxSplit = maxRange.split(",");
|
25 |
+
}
|
26 |
+
|
27 |
+
var min = minSplit.length ? new Date(minSplit) : null;
|
28 |
+
var max = minSplit.length ? new Date(maxSplit) : null;
|
29 |
+
|
30 |
+
// fix min date for safari
|
31 |
+
if ( min && min.toString() == 'Invalid Date' && minSplit.length == 3 ) {
|
32 |
+
var minDateString = minSplit[1] + '/' + minSplit[2] + '/' + minSplit[0];
|
33 |
+
min = new Date(Date.parse(minDateString));
|
34 |
+
}
|
35 |
+
|
36 |
+
// fix max date for safari
|
37 |
+
if ( max && max.toString() == 'Invalid Date' && maxSplit.length == 3 ) {
|
38 |
+
var maxDateString = maxSplit[1] + '/' + maxSplit[2] + '/' + maxSplit[0];
|
39 |
+
max = new Date(Date.parse(maxDateString));
|
40 |
+
}
|
41 |
+
|
42 |
+
var data = {
|
43 |
+
disable: disable,
|
44 |
+
format: elem.attr( 'data-format' ),
|
45 |
+
formatSubmit: 'yyyy/mm/dd',
|
46 |
+
hiddenName: true,
|
47 |
+
onOpen: function() { elem.blur(); },
|
48 |
+
onClose: function() { elem.blur(); }
|
49 |
+
};
|
50 |
+
|
51 |
+
if ( years_n !== null ) {
|
52 |
+
data.selectYears = years_n;
|
53 |
+
}
|
54 |
+
|
55 |
+
if ( min !== null ) {
|
56 |
+
data.min = min;
|
57 |
+
}
|
58 |
+
|
59 |
+
if ( max !== null ) {
|
60 |
+
data.max = max;
|
61 |
+
}
|
62 |
+
|
63 |
+
elem.pickadate( data );
|
64 |
+
});
|
65 |
+
|
66 |
+
jQuery('.um-timepicker:not(.picker__input)').each(function(){
|
67 |
+
elem = jQuery(this);
|
68 |
+
|
69 |
+
elem.pickatime({
|
70 |
+
format: elem.attr('data-format'),
|
71 |
+
interval: parseInt( elem.attr('data-intervals') ),
|
72 |
+
formatSubmit: 'HH:i',
|
73 |
+
hiddenName: true,
|
74 |
+
onOpen: function() { elem.blur(); },
|
75 |
+
onClose: function() { elem.blur(); }
|
76 |
+
});
|
77 |
+
});
|
78 |
+
}
|
79 |
+
|
80 |
function um_init_tooltips() {
|
81 |
if ( jQuery( '.um_tooltip' ).length > 0 ) {
|
82 |
jQuery( '.um_tooltip' ).tooltip({
|
includes/admin/core/class-admin-enqueue.php
CHANGED
@@ -122,12 +122,28 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
|
|
122 |
wp_register_script( 'um_crop', $this->front_js_baseurl . 'um-crop' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
123 |
wp_register_script( 'um_tipsy', $this->front_js_baseurl . 'um-tipsy' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
124 |
wp_register_script( 'um_functions', $this->front_js_baseurl . 'um-functions' . $this->suffix . '.js', array( 'jquery', 'um_tipsy', 'um_scrollbar' ), ultimatemember_version, true );
|
125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
wp_register_script( 'um_responsive', $this->front_js_baseurl . 'um-responsive' . $this->suffix . '.js', array( 'um_scripts' ), ultimatemember_version, true );
|
127 |
wp_register_script( 'um_modal', $this->front_js_baseurl . 'um-modal' . $this->suffix . '.js', array( 'um_responsive' ), ultimatemember_version, true );
|
128 |
|
129 |
|
130 |
|
|
|
|
|
|
|
|
|
|
|
131 |
wp_register_style( 'um_crop', $this->front_css_baseurl . 'um-crop.css', array(), ultimatemember_version );
|
132 |
wp_register_style( 'um_tipsy', $this->front_css_baseurl . 'um-tipsy.css', array(), ultimatemember_version );
|
133 |
wp_register_style( 'um_responsive', $this->front_css_baseurl . 'um-responsive.css', array(), ultimatemember_version );
|
@@ -137,7 +153,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
|
|
137 |
wp_register_style( 'um_profile', $this->front_css_baseurl . 'um-profile.css', array(), ultimatemember_version );
|
138 |
wp_register_style( 'um_account', $this->front_css_baseurl . 'um-account.css', array(), ultimatemember_version );
|
139 |
wp_register_style( 'um_misc', $this->front_css_baseurl . 'um-misc.css', array(), ultimatemember_version );
|
140 |
-
wp_register_style( 'um_default_css', $this->front_css_baseurl . 'um-old-default.css', array( 'um_crop', 'um_tipsy', 'um_raty', 'um_responsive', 'um_modal', 'um_styles', 'um_members', 'um_profile', 'um_account', 'um_misc' ), ultimatemember_version );
|
141 |
|
142 |
wp_enqueue_script( 'um_modal' );
|
143 |
wp_enqueue_style( 'um_default_css' );
|
@@ -334,7 +350,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
|
|
334 |
* Load functions js
|
335 |
*/
|
336 |
function load_functions() {
|
337 |
-
wp_register_script( 'um_scrollbar', um_url . 'assets/js/
|
338 |
wp_register_script( 'um_functions', um_url . 'assets/js/um-functions.js', array( 'jquery', 'jquery-masonry', 'wp-util', 'um_scrollbar' ), ultimatemember_version, true );
|
339 |
wp_enqueue_script( 'um_functions' );
|
340 |
}
|
@@ -368,7 +384,23 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
|
|
368 |
* Load jQuery custom code
|
369 |
*/
|
370 |
function load_custom_scripts() {
|
371 |
-
wp_register_script( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
wp_enqueue_script( 'um_admin_scripts' );
|
373 |
}
|
374 |
|
@@ -445,7 +477,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
|
|
445 |
return;
|
446 |
}
|
447 |
|
448 |
-
wp_register_script( 'um-blocks-shortcode-js', $this->js_url . 'um-admin-blocks-shortcode.js', array( 'wp-i18n', 'wp-blocks', 'wp-components'
|
449 |
wp_set_script_translations( 'um-blocks-shortcode-js', 'ultimate-member' );
|
450 |
wp_enqueue_script( 'um-blocks-shortcode-js' );
|
451 |
|
@@ -573,6 +605,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
|
|
573 |
$this->load_global_scripts();
|
574 |
$this->load_form();
|
575 |
$this->load_forms();
|
|
|
576 |
$this->load_modal();
|
577 |
$this->load_dashboard();
|
578 |
$this->load_settings();
|
@@ -581,7 +614,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
|
|
581 |
$this->load_css();
|
582 |
$this->load_core_wp();
|
583 |
$this->load_ajax_js();
|
584 |
-
$this->load_custom_scripts();
|
585 |
$this->load_fonticons();
|
586 |
$this->load_localize_scripts();
|
587 |
|
122 |
wp_register_script( 'um_crop', $this->front_js_baseurl . 'um-crop' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
123 |
wp_register_script( 'um_tipsy', $this->front_js_baseurl . 'um-tipsy' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
124 |
wp_register_script( 'um_functions', $this->front_js_baseurl . 'um-functions' . $this->suffix . '.js', array( 'jquery', 'um_tipsy', 'um_scrollbar' ), ultimatemember_version, true );
|
125 |
+
|
126 |
+
wp_register_script( 'um_datetime', $this->front_js_baseurl . 'pickadate/picker.js', array( 'jquery' ), ultimatemember_version, true );
|
127 |
+
wp_register_script( 'um_datetime_date', $this->front_js_baseurl . 'pickadate/picker.date.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
|
128 |
+
wp_register_script( 'um_datetime_time', $this->front_js_baseurl . 'pickadate/picker.time.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
|
129 |
+
wp_register_script( 'um_datetime_legacy', $this->front_js_baseurl . 'pickadate/legacy.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
|
130 |
+
// load a localized version for date/time
|
131 |
+
$locale = get_locale();
|
132 |
+
if ( $locale && file_exists( um_path . 'assets/js/pickadate/translations/' . $locale . '.js' ) ) {
|
133 |
+
wp_register_script('um_datetime_locale', um_url . 'assets/js/pickadate/translations/' . $locale . '.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
|
134 |
+
}
|
135 |
+
|
136 |
+
wp_register_script( 'um_scripts', $this->front_js_baseurl . 'um-scripts' . $this->suffix . '.js', array( 'um_functions', 'um_crop', 'um_raty', 'select2', 'um_jquery_form', 'um_fileupload', 'um_datetime', 'um_datetime_date', 'um_datetime_time', 'um_datetime_legacy' ), ultimatemember_version, true );
|
137 |
wp_register_script( 'um_responsive', $this->front_js_baseurl . 'um-responsive' . $this->suffix . '.js', array( 'um_scripts' ), ultimatemember_version, true );
|
138 |
wp_register_script( 'um_modal', $this->front_js_baseurl . 'um-modal' . $this->suffix . '.js', array( 'um_responsive' ), ultimatemember_version, true );
|
139 |
|
140 |
|
141 |
|
142 |
+
wp_register_style( 'um_datetime', $this->front_css_baseurl . 'pickadate/default.css', array(), ultimatemember_version );
|
143 |
+
wp_register_style( 'um_datetime_date', $this->front_css_baseurl . 'pickadate/default.date.css', array( 'um_datetime' ), ultimatemember_version );
|
144 |
+
wp_register_style( 'um_datetime_time', $this->front_css_baseurl . 'pickadate/default.time.css', array( 'um_datetime' ), ultimatemember_version );
|
145 |
+
|
146 |
+
wp_register_style( 'um_scrollbar', $this->front_css_baseurl . 'simplebar.css', array(), ultimatemember_version );
|
147 |
wp_register_style( 'um_crop', $this->front_css_baseurl . 'um-crop.css', array(), ultimatemember_version );
|
148 |
wp_register_style( 'um_tipsy', $this->front_css_baseurl . 'um-tipsy.css', array(), ultimatemember_version );
|
149 |
wp_register_style( 'um_responsive', $this->front_css_baseurl . 'um-responsive.css', array(), ultimatemember_version );
|
153 |
wp_register_style( 'um_profile', $this->front_css_baseurl . 'um-profile.css', array(), ultimatemember_version );
|
154 |
wp_register_style( 'um_account', $this->front_css_baseurl . 'um-account.css', array(), ultimatemember_version );
|
155 |
wp_register_style( 'um_misc', $this->front_css_baseurl . 'um-misc.css', array(), ultimatemember_version );
|
156 |
+
wp_register_style( 'um_default_css', $this->front_css_baseurl . 'um-old-default.css', array( 'um_crop', 'um_tipsy', 'um_raty', 'um_responsive', 'um_modal', 'um_styles', 'um_members', 'um_profile', 'um_account', 'um_misc', 'um_datetime_date', 'um_datetime_time', 'um_scrollbar' ), ultimatemember_version );
|
157 |
|
158 |
wp_enqueue_script( 'um_modal' );
|
159 |
wp_enqueue_style( 'um_default_css' );
|
350 |
* Load functions js
|
351 |
*/
|
352 |
function load_functions() {
|
353 |
+
wp_register_script( 'um_scrollbar', um_url . 'assets/js/simplebar.js', array( 'jquery' ), ultimatemember_version, true );
|
354 |
wp_register_script( 'um_functions', um_url . 'assets/js/um-functions.js', array( 'jquery', 'jquery-masonry', 'wp-util', 'um_scrollbar' ), ultimatemember_version, true );
|
355 |
wp_enqueue_script( 'um_functions' );
|
356 |
}
|
384 |
* Load jQuery custom code
|
385 |
*/
|
386 |
function load_custom_scripts() {
|
387 |
+
wp_register_script( 'um_datetime', $this->front_js_baseurl . 'pickadate/picker.js', array( 'jquery' ), ultimatemember_version, true );
|
388 |
+
wp_register_script( 'um_datetime_date', $this->front_js_baseurl . 'pickadate/picker.date.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
|
389 |
+
wp_register_script( 'um_datetime_time', $this->front_js_baseurl . 'pickadate/picker.time.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
|
390 |
+
wp_register_script( 'um_datetime_legacy', $this->front_js_baseurl . 'pickadate/legacy.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
|
391 |
+
// load a localized version for date/time
|
392 |
+
$locale = get_locale();
|
393 |
+
if ( $locale && file_exists( um_path . 'assets/js/pickadate/translations/' . $locale . '.js' ) ) {
|
394 |
+
wp_register_script('um_datetime_locale', um_url . 'assets/js/pickadate/translations/' . $locale . '.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
|
395 |
+
}
|
396 |
+
|
397 |
+
wp_register_style( 'um_datetime', $this->front_css_baseurl . 'pickadate/default.css', array(), ultimatemember_version );
|
398 |
+
wp_register_style( 'um_datetime_date', $this->front_css_baseurl . 'pickadate/default.date.css', array( 'um_datetime' ), ultimatemember_version );
|
399 |
+
wp_register_style( 'um_datetime_time', $this->front_css_baseurl . 'pickadate/default.time.css', array( 'um_datetime' ), ultimatemember_version );
|
400 |
+
|
401 |
+
wp_enqueue_style( 'um_datetime_date', 'um_datetime_time' );
|
402 |
+
|
403 |
+
wp_register_script( 'um_admin_scripts', $this->js_url . 'um-admin-scripts.js', array('jquery','wp-util', 'wp-color-picker', 'um_datetime', 'um_datetime_date', 'um_datetime_time', 'um_datetime_legacy' ), ultimatemember_version, true );
|
404 |
wp_enqueue_script( 'um_admin_scripts' );
|
405 |
}
|
406 |
|
477 |
return;
|
478 |
}
|
479 |
|
480 |
+
wp_register_script( 'um-blocks-shortcode-js', $this->js_url . 'um-admin-blocks-shortcode.js', array( 'wp-i18n', 'wp-blocks', 'wp-components' ), ultimatemember_version, true );
|
481 |
wp_set_script_translations( 'um-blocks-shortcode-js', 'ultimate-member' );
|
482 |
wp_enqueue_script( 'um-blocks-shortcode-js' );
|
483 |
|
605 |
$this->load_global_scripts();
|
606 |
$this->load_form();
|
607 |
$this->load_forms();
|
608 |
+
$this->load_custom_scripts();
|
609 |
$this->load_modal();
|
610 |
$this->load_dashboard();
|
611 |
$this->load_settings();
|
614 |
$this->load_css();
|
615 |
$this->load_core_wp();
|
616 |
$this->load_ajax_js();
|
|
|
617 |
$this->load_fonticons();
|
618 |
$this->load_localize_scripts();
|
619 |
|
includes/admin/core/class-admin-metabox.php
CHANGED
@@ -40,7 +40,12 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
|
|
40 |
|
41 |
add_filter( 'um_builtin_validation_types_continue_loop', array( &$this, 'validation_types_continue_loop' ), 1, 4 );
|
42 |
add_filter( 'um_restrict_content_hide_metabox', array( &$this, 'hide_metabox_restrict_content_shop' ), 10, 1 );
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
44 |
}
|
45 |
|
46 |
|
@@ -52,7 +57,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
|
|
52 |
*
|
53 |
* @return array
|
54 |
*/
|
55 |
-
function wpml_post_options( $fields, $data ) {
|
56 |
global $post;
|
57 |
|
58 |
if ( ! function_exists( 'icl_get_current_language' ) ) {
|
@@ -78,7 +83,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
|
|
78 |
);
|
79 |
|
80 |
return $fields;
|
81 |
-
}
|
82 |
|
83 |
|
84 |
/**
|
@@ -2169,19 +2174,31 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
|
|
2169 |
|
2170 |
<?php if ( $this->set_field_type == 'textarea' ) { ?>
|
2171 |
|
2172 |
-
<p><label for="_default"
|
2173 |
<textarea name="_default" id="_default"><?php echo $this->edit_mode_value; ?></textarea>
|
2174 |
</p>
|
2175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2176 |
<?php } elseif ( $this->set_field_type == 'rating' ) { ?>
|
2177 |
|
2178 |
-
<p><label for="_default"
|
2179 |
<input type="text" name="_default" id="_default" value="<?php echo $this->edit_mode_value; ?>" />
|
2180 |
</p>
|
2181 |
|
2182 |
<?php } else { ?>
|
2183 |
|
2184 |
-
<p><label for="_default"
|
2185 |
<input type="text" name="_default" id="_default" value="<?php echo $this->edit_mode_value; ?>" />
|
2186 |
</p>
|
2187 |
|
40 |
|
41 |
add_filter( 'um_builtin_validation_types_continue_loop', array( &$this, 'validation_types_continue_loop' ), 1, 4 );
|
42 |
add_filter( 'um_restrict_content_hide_metabox', array( &$this, 'hide_metabox_restrict_content_shop' ), 10, 1 );
|
43 |
+
|
44 |
+
|
45 |
+
/**
|
46 |
+
* @todo remove these options
|
47 |
+
*/
|
48 |
+
//add_filter( 'um_admin_access_settings_fields', array( &$this, 'wpml_post_options' ), 10, 2 );
|
49 |
}
|
50 |
|
51 |
|
57 |
*
|
58 |
* @return array
|
59 |
*/
|
60 |
+
/*function wpml_post_options( $fields, $data ) {
|
61 |
global $post;
|
62 |
|
63 |
if ( ! function_exists( 'icl_get_current_language' ) ) {
|
83 |
);
|
84 |
|
85 |
return $fields;
|
86 |
+
}*/
|
87 |
|
88 |
|
89 |
/**
|
2174 |
|
2175 |
<?php if ( $this->set_field_type == 'textarea' ) { ?>
|
2176 |
|
2177 |
+
<p><label for="_default"><?php _e( 'Default Text', 'ultimate-member' ); ?> <?php UM()->tooltip( __( 'Text to display by default in this field', 'ultimate-member' ) ); ?></label>
|
2178 |
<textarea name="_default" id="_default"><?php echo $this->edit_mode_value; ?></textarea>
|
2179 |
</p>
|
2180 |
|
2181 |
+
<?php } elseif ( $this->set_field_type == 'date' ) { ?>
|
2182 |
+
|
2183 |
+
<p class="um"><label for="_default"><?php _e( 'Default Date', 'ultimate-member' ); ?> <?php UM()->tooltip( __( 'You may use all PHP compatible date formats such as: 2020-02-02, 02/02/2020, yesterday, today, tomorrow, next monday, first day of next month, +3 day', 'ultimate-member' ) ); ?></label>
|
2184 |
+
<input type="text" name="_default" id="_default" value="<?php echo $this->edit_mode_value; ?>" class="um-datepicker" data-format="yyyy/mm/dd" />
|
2185 |
+
</p>
|
2186 |
+
|
2187 |
+
<?php } elseif ( $this->set_field_type == 'time' ) { ?>
|
2188 |
+
|
2189 |
+
<p class="um"><label for="_default"><?php _e( 'Default Time', 'ultimate-member' ); ?> <?php UM()->tooltip( __( 'You may use all PHP compatible date formats such as: 2020-02-02, 02/02/2020, yesterday, today, tomorrow, next monday, first day of next month, +3 day', 'ultimate-member' ) ); ?></label>
|
2190 |
+
<input type="text" name="_default" id="_default" value="<?php echo $this->edit_mode_value; ?>" class="um-timepicker" data-format="HH:i" />
|
2191 |
+
</p>
|
2192 |
+
|
2193 |
<?php } elseif ( $this->set_field_type == 'rating' ) { ?>
|
2194 |
|
2195 |
+
<p><label for="_default"><?php _e( 'Default Rating', 'ultimate-member' ); ?> <?php UM()->tooltip( __( 'If you wish the rating field to be prefilled with a number of stars, enter it here.', 'ultimate-member' ) ); ?></label>
|
2196 |
<input type="text" name="_default" id="_default" value="<?php echo $this->edit_mode_value; ?>" />
|
2197 |
</p>
|
2198 |
|
2199 |
<?php } else { ?>
|
2200 |
|
2201 |
+
<p><label for="_default"><?php _e( 'Default Value', 'ultimate-member' ); ?> <?php UM()->tooltip( __( 'This option allows you to pre-fill the field with a default value prior to the user entering a value in the field. Leave blank to have no default value', 'ultimate-member' ) ); ?></label>
|
2202 |
<input type="text" name="_default" id="_default" value="<?php echo $this->edit_mode_value; ?>" />
|
2203 |
</p>
|
2204 |
|
includes/admin/core/class-admin-settings.php
CHANGED
@@ -1073,6 +1073,16 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
|
1073 |
'label' => __( 'Enable Gutenberg Blocks', 'ultimate-member' ),
|
1074 |
'tooltip' => __( 'Check this box if you would like to use Ultimate Member blocks in Gutenberg editor. Important some themes have the conflicts with Gutenberg editor.', 'ultimate-member' ),
|
1075 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1076 |
array(
|
1077 |
'id' => 'uninstall_on_delete',
|
1078 |
'type' => 'checkbox',
|
@@ -1722,8 +1732,9 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
|
1722 |
$email_key = empty( $_GET['email'] ) ? '' : urldecode( $_GET['email'] );
|
1723 |
$emails = UM()->config()->email_notifications;
|
1724 |
|
1725 |
-
if ( empty( $email_key ) || empty( $emails[$email_key] ) )
|
1726 |
include_once um_path . 'includes/admin/core/list-tables/emails-list-table.php';
|
|
|
1727 |
}
|
1728 |
|
1729 |
|
@@ -2579,7 +2590,9 @@ Use Only Cookies: <?php echo ini_get( 'session.use_only_cookies' ) ?
|
|
2579 |
|
2580 |
$theme_template_path = UM()->mail()->get_template_file( 'theme', $template );
|
2581 |
|
2582 |
-
|
|
|
|
|
2583 |
|
2584 |
$fp = fopen( $theme_template_path, "w" );
|
2585 |
$result = fputs( $fp, $content );
|
1073 |
'label' => __( 'Enable Gutenberg Blocks', 'ultimate-member' ),
|
1074 |
'tooltip' => __( 'Check this box if you would like to use Ultimate Member blocks in Gutenberg editor. Important some themes have the conflicts with Gutenberg editor.', 'ultimate-member' ),
|
1075 |
),
|
1076 |
+
array(
|
1077 |
+
'id' => 'rest_api_version',
|
1078 |
+
'type' => 'select',
|
1079 |
+
'label' => __( 'REST API version','ultimate-member' ),
|
1080 |
+
'tooltip' => __( 'This controls the REST API version, we recommend to use the last version', 'ultimate-member' ),
|
1081 |
+
'options' => array(
|
1082 |
+
'1.0' => __( '1.0 version', 'ultimate-member' ),
|
1083 |
+
'2.0' => __( '2.0 version', 'ultimate-member' ),
|
1084 |
+
),
|
1085 |
+
),
|
1086 |
array(
|
1087 |
'id' => 'uninstall_on_delete',
|
1088 |
'type' => 'checkbox',
|
1732 |
$email_key = empty( $_GET['email'] ) ? '' : urldecode( $_GET['email'] );
|
1733 |
$emails = UM()->config()->email_notifications;
|
1734 |
|
1735 |
+
if ( empty( $email_key ) || empty( $emails[ $email_key ] ) ) {
|
1736 |
include_once um_path . 'includes/admin/core/list-tables/emails-list-table.php';
|
1737 |
+
}
|
1738 |
}
|
1739 |
|
1740 |
|
2590 |
|
2591 |
$theme_template_path = UM()->mail()->get_template_file( 'theme', $template );
|
2592 |
|
2593 |
+
if ( ! file_exists( $theme_template_path ) ) {
|
2594 |
+
UM()->mail()->copy_email_template( $template );
|
2595 |
+
}
|
2596 |
|
2597 |
$fp = fopen( $theme_template_path, "w" );
|
2598 |
$result = fputs( $fp, $content );
|
includes/admin/core/class-admin-theme-updater.php
ADDED
@@ -0,0 +1,187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace um\admin\core;
|
3 |
+
|
4 |
+
|
5 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
|
10 |
+
if ( ! class_exists( 'um\admin\core\Admin_Theme_Updater' ) ) {
|
11 |
+
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Class Admin_Theme_Updater
|
15 |
+
* @package um\admin\core
|
16 |
+
*/
|
17 |
+
class Admin_Theme_Updater {
|
18 |
+
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Restored themes
|
22 |
+
* @var array
|
23 |
+
*/
|
24 |
+
private $restored = array();
|
25 |
+
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Saved themes
|
29 |
+
* @var array
|
30 |
+
*/
|
31 |
+
private $saved = array();
|
32 |
+
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Constructor.
|
36 |
+
*/
|
37 |
+
public function __construct() {
|
38 |
+
add_filter( 'upgrader_package_options', array( $this, 'upgrader_package_options' ), 40, 1 );
|
39 |
+
add_action( 'upgrader_process_complete', array( $this, 'upgrader_process_complete' ), 40, 2 );
|
40 |
+
}
|
41 |
+
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Copy directory
|
45 |
+
* @param string $src
|
46 |
+
* @param string $dest
|
47 |
+
*/
|
48 |
+
public static function recurse_copy( $src, $dest ) {
|
49 |
+
|
50 |
+
if ( ! is_dir( $dest ) ) {
|
51 |
+
@mkdir( $dest, 0777, true );
|
52 |
+
}
|
53 |
+
|
54 |
+
$dir = opendir( $src );
|
55 |
+
while ( false !== ( $file = readdir( $dir ) ) ) {
|
56 |
+
if ( ( $file != '.' ) && ( $file != '..' ) ) {
|
57 |
+
if ( is_dir( $src . DIRECTORY_SEPARATOR . $file ) ) {
|
58 |
+
self::recurse_copy( $src . DIRECTORY_SEPARATOR . $file, $dest . DIRECTORY_SEPARATOR . $file );
|
59 |
+
} else {
|
60 |
+
copy( $src . DIRECTORY_SEPARATOR . $file, $dest . DIRECTORY_SEPARATOR . $file );
|
61 |
+
}
|
62 |
+
}
|
63 |
+
}
|
64 |
+
closedir( $dir );
|
65 |
+
}
|
66 |
+
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Restore UM templates to theme directory
|
70 |
+
*
|
71 |
+
* @param string $name
|
72 |
+
* @return void
|
73 |
+
*/
|
74 |
+
public function restore_templates( $name = '' ) {
|
75 |
+
$theme = wp_get_theme( $name );
|
76 |
+
|
77 |
+
if ( empty( $theme ) || ! $theme->exists() ) {
|
78 |
+
return;
|
79 |
+
}
|
80 |
+
if ( isset( $this->restored[ $theme->get( 'Name' ) ] ) ) {
|
81 |
+
return;
|
82 |
+
}
|
83 |
+
if ( empty( $this->saved[ $theme->get( 'Name' ) ] ) ) {
|
84 |
+
return;
|
85 |
+
}
|
86 |
+
|
87 |
+
$old_version = get_option( 'theme_version ' . $theme->get( 'Name' ) );
|
88 |
+
$version = $theme->get( 'Version' );
|
89 |
+
if ( $old_version === $version ) {
|
90 |
+
return;
|
91 |
+
}
|
92 |
+
|
93 |
+
$temp_dir = UM()->uploader()->get_core_temp_dir() . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $theme->get( 'template' );
|
94 |
+
if ( ! is_dir( $temp_dir ) ) {
|
95 |
+
return;
|
96 |
+
}
|
97 |
+
|
98 |
+
$um_dir = $theme->get_stylesheet_directory() . DIRECTORY_SEPARATOR . 'ultimate-member';
|
99 |
+
@mkdir( $um_dir, 0777, true );
|
100 |
+
|
101 |
+
$src = realpath( $temp_dir );
|
102 |
+
$dest = realpath( $um_dir );
|
103 |
+
if ( $src && $dest ) {
|
104 |
+
self::recurse_copy( $src, $dest );
|
105 |
+
error_log( "UM Log. Theme '" . $theme->get( 'template' ) . "' templates restored." );
|
106 |
+
UM()->files()->remove_dir( $src );
|
107 |
+
} else {
|
108 |
+
error_log( "UM Error. Can not restore theme templates." );
|
109 |
+
}
|
110 |
+
|
111 |
+
delete_option( 'theme_version ' . $theme->get( 'Name' ) );
|
112 |
+
$this->restored[ $theme->get( 'Name' ) ] = $theme->get( 'Version' );
|
113 |
+
}
|
114 |
+
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Save UM templates to temp directory
|
118 |
+
* @param string $name
|
119 |
+
*
|
120 |
+
* @return void
|
121 |
+
*/
|
122 |
+
public function save_templates( $name = '' ) {
|
123 |
+
$theme = wp_get_theme( $name );
|
124 |
+
|
125 |
+
if ( empty( $theme ) || ! $theme->exists() ) {
|
126 |
+
return;
|
127 |
+
}
|
128 |
+
if ( isset( $this->restored[ $theme->get( 'Name' ) ] ) ) {
|
129 |
+
return;
|
130 |
+
}
|
131 |
+
if ( isset( $this->saved[ $theme->get( 'Name' ) ] ) ) {
|
132 |
+
return;
|
133 |
+
}
|
134 |
+
|
135 |
+
$um_dir = $theme->get_stylesheet_directory() . DIRECTORY_SEPARATOR . 'ultimate-member';
|
136 |
+
if ( ! is_dir( $um_dir ) ) {
|
137 |
+
return;
|
138 |
+
}
|
139 |
+
|
140 |
+
$temp_dir = UM()->uploader()->get_core_temp_dir() . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $theme->get( 'template' );
|
141 |
+
@mkdir( $temp_dir, 0777, true );
|
142 |
+
|
143 |
+
$src = realpath( $um_dir );
|
144 |
+
$dest = realpath( $temp_dir );
|
145 |
+
if ( $src && $dest ) {
|
146 |
+
self::recurse_copy( $src, $dest );
|
147 |
+
error_log( "UM Log. Theme '" . $theme->get( 'template' ) . "' templates saved." );
|
148 |
+
} else {
|
149 |
+
error_log( "UM Error. Can not save theme templates." );
|
150 |
+
}
|
151 |
+
|
152 |
+
update_option( 'theme_version ' . $theme->get( 'Name' ), $theme->get( 'Version' ) );
|
153 |
+
$this->saved[ $theme->get( 'Name' ) ] = $theme->get( 'Version' );
|
154 |
+
}
|
155 |
+
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Filter: upgrader_package_options
|
159 |
+
*
|
160 |
+
* @param array $options
|
161 |
+
* @return array
|
162 |
+
*/
|
163 |
+
function upgrader_package_options( $options ) {
|
164 |
+
if ( isset( $options['hook_extra'] ) && isset( $options['hook_extra']['theme'] ) ) {
|
165 |
+
$this->save_templates( $options['hook_extra']['theme'] );
|
166 |
+
}
|
167 |
+
return $options;
|
168 |
+
}
|
169 |
+
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Action: upgrader_process_complete
|
173 |
+
*
|
174 |
+
* @param \WP_Upgrader $WP_Upgrader
|
175 |
+
* @param array $options
|
176 |
+
*/
|
177 |
+
public function upgrader_process_complete( $WP_Upgrader, $options ) {
|
178 |
+
if ( isset( $options['themes'] ) && is_array( $options['themes'] ) ) {
|
179 |
+
foreach ( $options['themes'] as $theme ) {
|
180 |
+
$this->restore_templates( $theme );
|
181 |
+
}
|
182 |
+
}
|
183 |
+
}
|
184 |
+
|
185 |
+
}
|
186 |
+
|
187 |
+
}
|
includes/admin/core/class-admin-users.php
CHANGED
@@ -74,6 +74,9 @@ if ( ! class_exists( 'um\admin\core\Admin_Users' ) ) {
|
|
74 |
case 'um_approve_membership':
|
75 |
case 'um_reenable':
|
76 |
|
|
|
|
|
|
|
77 |
UM()->user()->approve();
|
78 |
break;
|
79 |
|
@@ -82,6 +85,10 @@ if ( ! class_exists( 'um\admin\core\Admin_Users' ) ) {
|
|
82 |
break;
|
83 |
|
84 |
case 'um_resend_activation':
|
|
|
|
|
|
|
|
|
85 |
UM()->user()->email_pending();
|
86 |
break;
|
87 |
|
74 |
case 'um_approve_membership':
|
75 |
case 'um_reenable':
|
76 |
|
77 |
+
add_filter( 'um_template_tags_patterns_hook', array( UM()->password(), 'add_placeholder' ), 10, 1 );
|
78 |
+
add_filter( 'um_template_tags_replaces_hook', array( UM()->password(), 'add_replace_placeholder' ), 10, 1 );
|
79 |
+
|
80 |
UM()->user()->approve();
|
81 |
break;
|
82 |
|
85 |
break;
|
86 |
|
87 |
case 'um_resend_activation':
|
88 |
+
|
89 |
+
add_filter( 'um_template_tags_patterns_hook', array( UM()->user(), 'add_activation_placeholder' ), 10, 1 );
|
90 |
+
add_filter( 'um_template_tags_replaces_hook', array( UM()->user(), 'add_activation_replace_placeholder' ), 10, 1 );
|
91 |
+
|
92 |
UM()->user()->email_pending();
|
93 |
break;
|
94 |
|
includes/admin/core/list-tables/emails-list-table.php
CHANGED
@@ -13,8 +13,9 @@ if ( !empty( $_GET['_wp_http_referer'] ) ) {
|
|
13 |
um_js_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce'), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
|
14 |
}
|
15 |
|
16 |
-
if( ! class_exists( 'WP_List_Table' ) )
|
17 |
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
|
|
|
18 |
|
19 |
|
20 |
/**
|
@@ -265,7 +266,6 @@ class UM_Emails_List_Table extends WP_List_Table {
|
|
265 |
}
|
266 |
}
|
267 |
|
268 |
-
|
269 |
$ListTable = new UM_Emails_List_Table( array(
|
270 |
'singular' => __( 'Email Notification', 'ultimate-member' ),
|
271 |
'plural' => __( 'Email Notifications', 'ultimate-member' ),
|
@@ -310,9 +310,16 @@ $ListTable->prepare_items();
|
|
310 |
$ListTable->items = $emails;
|
311 |
$ListTable->wpc_set_pagination_args( array( 'total_items' => count( $emails ), 'per_page' => $per_page ) ); ?>
|
312 |
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
<form action="" method="get" name="um-settings-emails" id="um-settings-emails">
|
314 |
<input type="hidden" name="page" value="um_options" />
|
315 |
<input type="hidden" name="tab" value="email" />
|
|
|
316 |
<?php if ( ! empty( $_GET['section'] ) ) { ?>
|
317 |
<input type="hidden" name="section" value="<?php echo esc_attr( $_GET['section'] ) ?>" />
|
318 |
<?php }
|
13 |
um_js_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce'), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
|
14 |
}
|
15 |
|
16 |
+
if( ! class_exists( 'WP_List_Table' ) ) {
|
17 |
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
|
18 |
+
}
|
19 |
|
20 |
|
21 |
/**
|
266 |
}
|
267 |
}
|
268 |
|
|
|
269 |
$ListTable = new UM_Emails_List_Table( array(
|
270 |
'singular' => __( 'Email Notification', 'ultimate-member' ),
|
271 |
'plural' => __( 'Email Notifications', 'ultimate-member' ),
|
310 |
$ListTable->items = $emails;
|
311 |
$ListTable->wpc_set_pagination_args( array( 'total_items' => count( $emails ), 'per_page' => $per_page ) ); ?>
|
312 |
|
313 |
+
<p class="description" style="margin: 20px 0 0 0;">
|
314 |
+
<?php printf( __( 'You may get more details about email notifications customization <a href="%s">here</a>', 'ultimate-member' ),
|
315 |
+
'https://docs.ultimatemember.com/article/1335-email-templates'
|
316 |
+
); ?>
|
317 |
+
</p>
|
318 |
+
|
319 |
<form action="" method="get" name="um-settings-emails" id="um-settings-emails">
|
320 |
<input type="hidden" name="page" value="um_options" />
|
321 |
<input type="hidden" name="tab" value="email" />
|
322 |
+
|
323 |
<?php if ( ! empty( $_GET['section'] ) ) { ?>
|
324 |
<input type="hidden" name="section" value="<?php echo esc_attr( $_GET['section'] ) ?>" />
|
325 |
<?php }
|
includes/admin/core/packages/2.0.44/functions.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( ! defined( 'ABSPATH' ) ) exit;
|
2 |
+
|
3 |
+
|
4 |
+
function um_upgrade_fields2044() {
|
5 |
+
UM()->admin()->check_ajax_nonce();
|
6 |
+
|
7 |
+
um_maybe_unset_time_limit();
|
8 |
+
|
9 |
+
include 'metafields.php';
|
10 |
+
|
11 |
+
update_option( 'um_last_version_upgrade', '2.0.44' );
|
12 |
+
|
13 |
+
wp_send_json_success( array( 'message' => __( 'Field was upgraded successfully', 'ultimate-member' ) ) );
|
14 |
+
}
|
includes/admin/core/packages/2.0.44/hooks.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( ! defined( 'ABSPATH' ) ) exit;
|
2 |
+
|
3 |
+
return array(
|
4 |
+
'fields2044' => 'fields2044',
|
5 |
+
);
|
includes/admin/core/packages/2.0.44/init.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
|
2 |
+
|
3 |
+
|
4 |
+
<script type="text/javascript">
|
5 |
+
jQuery( document ).ready( function() {
|
6 |
+
//upgrade styles
|
7 |
+
um_add_upgrade_log( '<?php echo esc_js( __( 'Upgrade predefined metafields...', 'ultimate-member' ) ) ?>' );
|
8 |
+
|
9 |
+
jQuery.ajax({
|
10 |
+
url: wp.ajax.settings.url,
|
11 |
+
type: 'POST',
|
12 |
+
dataType: 'json',
|
13 |
+
data: {
|
14 |
+
action: 'um_fields2044',
|
15 |
+
nonce: um_admin_scripts.nonce
|
16 |
+
},
|
17 |
+
success: function( response ) {
|
18 |
+
if ( typeof response.data != 'undefined' ) {
|
19 |
+
um_add_upgrade_log( response.data.message );
|
20 |
+
//switch to the next package
|
21 |
+
um_run_upgrade();
|
22 |
+
} else {
|
23 |
+
um_wrong_ajax();
|
24 |
+
}
|
25 |
+
},
|
26 |
+
error: function() {
|
27 |
+
um_something_wrong();
|
28 |
+
}
|
29 |
+
});
|
30 |
+
});
|
31 |
+
</script>
|
includes/admin/core/packages/2.0.44/metafields.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( ! defined( 'ABSPATH' ) ) exit;
|
2 |
+
|
3 |
+
|
4 |
+
$forms_query = new WP_Query;
|
5 |
+
$profile_forms = $forms_query->query( array(
|
6 |
+
'post_type' => 'um_form',
|
7 |
+
'meta_query' => array(
|
8 |
+
array(
|
9 |
+
'key' => '_um_mode',
|
10 |
+
'value' => 'profile'
|
11 |
+
),
|
12 |
+
),
|
13 |
+
'posts_per_page' => -1,
|
14 |
+
'fields' => 'ids'
|
15 |
+
) );
|
16 |
+
|
17 |
+
foreach ( $profile_forms as $form_id ) {
|
18 |
+
$profile_forms_fields = get_post_meta( $form_id, '_um_custom_fields', true );
|
19 |
+
|
20 |
+
foreach ( $profile_forms_fields as $key => $field ) {
|
21 |
+
|
22 |
+
if ( isset( $field['metakey'] ) ) {
|
23 |
+
$metakey = $field['metakey'];
|
24 |
+
if ( $key != $metakey ) {
|
25 |
+
$profile_forms_fields[ $metakey ] = $profile_forms_fields[ $key ];
|
26 |
+
unset( $profile_forms_fields[ $key ] );
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
}
|
31 |
+
|
32 |
+
update_post_meta( $form_id, '_um_custom_fields', $profile_forms_fields );
|
33 |
+
}
|
includes/class-config.php
CHANGED
@@ -535,7 +535,8 @@ if ( ! class_exists( 'um\Config' ) ) {
|
|
535 |
'profile_photo_max_size' => 999999999,
|
536 |
'cover_photo_max_size' => 999999999,
|
537 |
'custom_roles_increment' => 1,
|
538 |
-
'um_profile_object_cache_stop' => 0
|
|
|
539 |
);
|
540 |
|
541 |
$tabs = UM()->profile()->tabs_primary();
|
535 |
'profile_photo_max_size' => 999999999,
|
536 |
'cover_photo_max_size' => 999999999,
|
537 |
'custom_roles_increment' => 1,
|
538 |
+
'um_profile_object_cache_stop' => 0,
|
539 |
+
'rest_api_version' => '2.0'
|
540 |
);
|
541 |
|
542 |
$tabs = UM()->profile()->tabs_primary();
|
includes/class-dependencies.php
CHANGED
@@ -60,9 +60,12 @@ if ( ! class_exists( 'um\Dependencies' ) ) {
|
|
60 |
'beaver-builder' => '2.0',
|
61 |
'user-photos' => '2.0.1',
|
62 |
'user-exporter' => '1.0.0',
|
63 |
-
'bookmark' => '2.0',
|
64 |
'user-events' => '1.0.0',
|
65 |
'filesharing' => '1.0.0',
|
|
|
|
|
|
|
66 |
);
|
67 |
|
68 |
|
60 |
'beaver-builder' => '2.0',
|
61 |
'user-photos' => '2.0.1',
|
62 |
'user-exporter' => '1.0.0',
|
63 |
+
// 'bookmark' => '2.0',
|
64 |
'user-events' => '1.0.0',
|
65 |
'filesharing' => '1.0.0',
|
66 |
+
'user-notes' => '2.0',
|
67 |
+
'user-bookmarks' => '2.0',
|
68 |
+
'unsplash' => '2.0',
|
69 |
);
|
70 |
|
71 |
|
includes/class-functions.php
CHANGED
@@ -328,5 +328,26 @@ if ( ! class_exists( 'UM_Functions' ) ) {
|
|
328 |
$cpt = apply_filters( 'um_cpt_list', array( 'um_form', 'um_directory' ) );
|
329 |
return $cpt;
|
330 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
}
|
332 |
}
|
328 |
$cpt = apply_filters( 'um_cpt_list', array( 'um_form', 'um_directory' ) );
|
329 |
return $cpt;
|
330 |
}
|
331 |
+
|
332 |
+
|
333 |
+
/**
|
334 |
+
* @param array $array
|
335 |
+
* @param string $key
|
336 |
+
* @param array $insert_array
|
337 |
+
*
|
338 |
+
* @return array
|
339 |
+
*/
|
340 |
+
function array_insert_before( $array, $key, $insert_array ) {
|
341 |
+
$index = array_search( $key, array_keys( $array ) );
|
342 |
+
if ( $index === false ) {
|
343 |
+
return $array;
|
344 |
+
}
|
345 |
+
|
346 |
+
$array = array_slice( $array, 0, $index, true ) +
|
347 |
+
$insert_array +
|
348 |
+
array_slice( $array, $index, count( $array ) - 1, true );
|
349 |
+
|
350 |
+
return $array;
|
351 |
+
}
|
352 |
}
|
353 |
}
|
includes/class-init.php
CHANGED
@@ -32,7 +32,10 @@ if ( ! class_exists( 'UM' ) ) {
|
|
32 |
* @method UM_User_Location_API User_Location_API()
|
33 |
* @method UM_Photos_API Photos_API()
|
34 |
* @method UM_Groups Groups()
|
35 |
-
*
|
|
|
|
|
|
|
36 |
*/
|
37 |
final class UM extends UM_Functions {
|
38 |
|
@@ -437,14 +440,18 @@ if ( ! class_exists( 'UM' ) ) {
|
|
437 |
*/
|
438 |
function activation() {
|
439 |
if ( is_multisite() ) {
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
$
|
447 |
-
|
|
|
|
|
|
|
|
|
448 |
}
|
449 |
}
|
450 |
} else {
|
@@ -468,6 +475,8 @@ if ( ! class_exists( 'UM' ) ) {
|
|
468 |
if ( ! get_option( 'show_avatars' ) ) {
|
469 |
update_option( 'show_avatars', 1 );
|
470 |
}
|
|
|
|
|
471 |
}
|
472 |
|
473 |
if ( $version != ultimatemember_version ) {
|
@@ -509,6 +518,7 @@ if ( ! class_exists( 'UM' ) ) {
|
|
509 |
$this->columns();
|
510 |
$this->notices();
|
511 |
$this->admin_navmenu();
|
|
|
512 |
} elseif ( $this->is_request( 'admin' ) ) {
|
513 |
$this->admin();
|
514 |
$this->admin_menu();
|
@@ -523,6 +533,7 @@ if ( ! class_exists( 'UM' ) ) {
|
|
523 |
$this->plugin_updater();
|
524 |
$this->admin_gdpr();
|
525 |
$this->admin_navmenu();
|
|
|
526 |
} elseif ( $this->is_request( 'frontend' ) ) {
|
527 |
$this->enqueue();
|
528 |
$this->account();
|
@@ -551,6 +562,12 @@ if ( ! class_exists( 'UM' ) ) {
|
|
551 |
$this->mobile();
|
552 |
$this->external_integrations();
|
553 |
$this->gdpr();
|
|
|
|
|
|
|
|
|
|
|
|
|
554 |
}
|
555 |
|
556 |
|
@@ -645,6 +662,18 @@ if ( ! class_exists( 'UM' ) ) {
|
|
645 |
}
|
646 |
|
647 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
648 |
/**
|
649 |
* @since 2.0
|
650 |
*/
|
@@ -936,11 +965,20 @@ if ( ! class_exists( 'UM' ) ) {
|
|
936 |
/**
|
937 |
* @since 2.0
|
938 |
*
|
939 |
-
* @return um\core\
|
940 |
*/
|
941 |
function rest_api() {
|
|
|
|
|
|
|
942 |
if ( empty( $this->classes['rest_api'] ) ) {
|
943 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
944 |
}
|
945 |
|
946 |
return $this->classes['rest_api'];
|
@@ -1379,6 +1417,19 @@ if ( ! class_exists( 'UM' ) ) {
|
|
1379 |
return $this->classes['mobile'];
|
1380 |
}
|
1381 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1382 |
|
1383 |
/**
|
1384 |
* Include files with hooked filters/actions
|
@@ -1427,7 +1478,6 @@ if ( ! class_exists( 'UM' ) ) {
|
|
1427 |
function widgets_init() {
|
1428 |
register_widget( 'um\widgets\UM_Search_Widget' );
|
1429 |
}
|
1430 |
-
|
1431 |
}
|
1432 |
}
|
1433 |
|
32 |
* @method UM_User_Location_API User_Location_API()
|
33 |
* @method UM_Photos_API Photos_API()
|
34 |
* @method UM_Groups Groups()
|
35 |
+
* @method UM_Frontend_Posting Frontend_Posting()
|
36 |
+
* @method UM_Notes Notes()
|
37 |
+
* @method UM_User_Bookmarks User_Bookmarks()
|
38 |
+
* @method UM_Unsplash Unsplash()
|
39 |
*/
|
40 |
final class UM extends UM_Functions {
|
41 |
|
440 |
*/
|
441 |
function activation() {
|
442 |
if ( is_multisite() ) {
|
443 |
+
if ( ! is_plugin_active_for_network( um_plugin ) ) {
|
444 |
+
$this->single_site_activation();
|
445 |
+
} else {
|
446 |
+
//get all blogs
|
447 |
+
$blogs = get_sites();
|
448 |
+
if ( ! empty( $blogs ) ) {
|
449 |
+
foreach( $blogs as $blog ) {
|
450 |
+
switch_to_blog( $blog->blog_id );
|
451 |
+
//make activation script for each sites blog
|
452 |
+
$this->single_site_activation();
|
453 |
+
restore_current_blog();
|
454 |
+
}
|
455 |
}
|
456 |
}
|
457 |
} else {
|
475 |
if ( ! get_option( 'show_avatars' ) ) {
|
476 |
update_option( 'show_avatars', 1 );
|
477 |
}
|
478 |
+
} else {
|
479 |
+
UM()->options()->update( 'rest_api_version', '1.0' );
|
480 |
}
|
481 |
|
482 |
if ( $version != ultimatemember_version ) {
|
518 |
$this->columns();
|
519 |
$this->notices();
|
520 |
$this->admin_navmenu();
|
521 |
+
$this->theme_updater();
|
522 |
} elseif ( $this->is_request( 'admin' ) ) {
|
523 |
$this->admin();
|
524 |
$this->admin_menu();
|
533 |
$this->plugin_updater();
|
534 |
$this->admin_gdpr();
|
535 |
$this->admin_navmenu();
|
536 |
+
$this->theme_updater();
|
537 |
} elseif ( $this->is_request( 'frontend' ) ) {
|
538 |
$this->enqueue();
|
539 |
$this->account();
|
562 |
$this->mobile();
|
563 |
$this->external_integrations();
|
564 |
$this->gdpr();
|
565 |
+
|
566 |
+
//if multisite networks active
|
567 |
+
if ( is_multisite() ) {
|
568 |
+
$this->multisite();
|
569 |
+
}
|
570 |
+
|
571 |
}
|
572 |
|
573 |
|
662 |
}
|
663 |
|
664 |
|
665 |
+
/**
|
666 |
+
* @since 2.0.45
|
667 |
+
* @return um\admin\core\Admin_Theme_Updater()
|
668 |
+
*/
|
669 |
+
function theme_updater() {
|
670 |
+
if ( empty( $this->classes['theme_updater'] ) ) {
|
671 |
+
$this->classes['theme_updater'] = new um\admin\core\Admin_Theme_Updater();
|
672 |
+
}
|
673 |
+
return $this->classes['theme_updater'];
|
674 |
+
}
|
675 |
+
|
676 |
+
|
677 |
/**
|
678 |
* @since 2.0
|
679 |
*/
|
965 |
/**
|
966 |
* @since 2.0
|
967 |
*
|
968 |
+
* @return um\core\rest\API_v1|um\core\rest\API_v2
|
969 |
*/
|
970 |
function rest_api() {
|
971 |
+
|
972 |
+
$api_version = $this->options()->get( 'rest_api_version' );
|
973 |
+
|
974 |
if ( empty( $this->classes['rest_api'] ) ) {
|
975 |
+
if ( '1.0' === $api_version ) {
|
976 |
+
$this->classes['rest_api'] = new um\core\rest\API_v1();
|
977 |
+
} elseif ( '2.0' === $api_version ) {
|
978 |
+
$this->classes['rest_api'] = new um\core\rest\API_v2();
|
979 |
+
} else {
|
980 |
+
$this->classes['rest_api'] = new um\core\rest\API_v1();
|
981 |
+
}
|
982 |
}
|
983 |
|
984 |
return $this->classes['rest_api'];
|
1417 |
return $this->classes['mobile'];
|
1418 |
}
|
1419 |
|
1420 |
+
/**
|
1421 |
+
* @since 2.0.44
|
1422 |
+
*
|
1423 |
+
* @return um\lib\mobiledetect\Um_Mobile_Detect
|
1424 |
+
*/
|
1425 |
+
function multisite() {
|
1426 |
+
|
1427 |
+
if ( empty( $this->classes['multisite'] ) ) {
|
1428 |
+
$this->classes['multisite'] = new um\core\Multisite();
|
1429 |
+
}
|
1430 |
+
|
1431 |
+
return $this->classes['multisite'];
|
1432 |
+
}
|
1433 |
|
1434 |
/**
|
1435 |
* Include files with hooked filters/actions
|
1478 |
function widgets_init() {
|
1479 |
register_widget( 'um\widgets\UM_Search_Widget' );
|
1480 |
}
|
|
|
1481 |
}
|
1482 |
}
|
1483 |
|
includes/core/class-access.php
CHANGED
@@ -59,6 +59,10 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
|
59 |
add_filter( 'get_pages', array( &$this, 'filter_protected_posts' ), 99, 2 );
|
60 |
//filter menu items
|
61 |
add_filter( 'wp_nav_menu_objects', array( &$this, 'filter_menu' ), 99, 2 );
|
|
|
|
|
|
|
|
|
62 |
|
63 |
|
64 |
//check the site's accessible more priority have Individual Post/Term Restriction settings
|
@@ -557,6 +561,36 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
|
557 |
|
558 |
if ( ! empty( $restriction['_um_custom_access_settings'] ) ) {
|
559 |
if ( ! isset( $restriction['_um_accessible'] ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
560 |
return false;
|
561 |
} else {
|
562 |
return $restriction;
|
@@ -587,7 +621,7 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
|
587 |
$restriction = get_term_meta( $term_id, 'um_content_restriction', true );
|
588 |
|
589 |
if ( ! empty( $restriction['_um_custom_access_settings'] ) ) {
|
590 |
-
if ( ! isset( $restriction['_um_accessible'] )
|
591 |
continue;
|
592 |
} else {
|
593 |
return $restriction;
|
@@ -629,7 +663,7 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
|
629 |
foreach ( $posts as $post ) {
|
630 |
|
631 |
//Woocommerce AJAX fixes....remove filtration on wc-ajax which goes to Front Page
|
632 |
-
if ( ! empty( $_GET['wc-ajax'] ) /*&& $query->is_front_page()*/ ) {
|
633 |
$filtered_posts[] = $post;
|
634 |
continue;
|
635 |
}
|
@@ -984,7 +1018,7 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
|
984 |
* @param int $post_id
|
985 |
* @return boolean
|
986 |
*/
|
987 |
-
|
988 |
static $cache = array();
|
989 |
|
990 |
if ( isset( $cache[ $post_id ] ) ) {
|
@@ -1041,7 +1075,7 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
|
1041 |
* @param int $post_id
|
1042 |
* @return boolean
|
1043 |
*/
|
1044 |
-
|
1045 |
static $cache_number = array();
|
1046 |
|
1047 |
if ( isset( $cache_number[ $post_id ] ) ) {
|
@@ -1089,6 +1123,105 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
|
1089 |
$cache_number[ $post_id ] = $count;
|
1090 |
return $count;
|
1091 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1092 |
|
1093 |
|
1094 |
/**
|
59 |
add_filter( 'get_pages', array( &$this, 'filter_protected_posts' ), 99, 2 );
|
60 |
//filter menu items
|
61 |
add_filter( 'wp_nav_menu_objects', array( &$this, 'filter_menu' ), 99, 2 );
|
62 |
+
|
63 |
+
//filter attachment
|
64 |
+
add_filter( 'wp_get_attachment_url', array( &$this, 'filter_attachment' ), 99, 2 );
|
65 |
+
add_filter( 'has_post_thumbnail', array( &$this, 'filter_post_thumbnail' ), 99, 3 );
|
66 |
|
67 |
|
68 |
//check the site's accessible more priority have Individual Post/Term Restriction settings
|
561 |
|
562 |
if ( ! empty( $restriction['_um_custom_access_settings'] ) ) {
|
563 |
if ( ! isset( $restriction['_um_accessible'] ) ) {
|
564 |
+
$restricted_taxonomies = UM()->options()->get( 'restricted_access_taxonomy_metabox' );
|
565 |
+
|
566 |
+
//get all taxonomies for current post type
|
567 |
+
$taxonomies = get_object_taxonomies( $post );
|
568 |
+
|
569 |
+
//get all post terms
|
570 |
+
$terms = array();
|
571 |
+
if ( ! empty( $taxonomies ) ) {
|
572 |
+
foreach ( $taxonomies as $taxonomy ) {
|
573 |
+
if ( empty( $restricted_taxonomies[ $taxonomy ] ) ) {
|
574 |
+
continue;
|
575 |
+
}
|
576 |
+
|
577 |
+
$terms = array_merge( $terms, wp_get_post_terms( $post->ID, $taxonomy, array( 'fields' => 'ids' ) ) );
|
578 |
+
}
|
579 |
+
}
|
580 |
+
|
581 |
+
//get restriction options for first term with privacy settigns
|
582 |
+
foreach ( $terms as $term_id ) {
|
583 |
+
$restriction = get_term_meta( $term_id, 'um_content_restriction', true );
|
584 |
+
|
585 |
+
if ( ! empty( $restriction['_um_custom_access_settings'] ) ) {
|
586 |
+
if ( ! isset( $restriction['_um_accessible'] ) ) {
|
587 |
+
continue;
|
588 |
+
} else {
|
589 |
+
return $restriction;
|
590 |
+
}
|
591 |
+
}
|
592 |
+
}
|
593 |
+
|
594 |
return false;
|
595 |
} else {
|
596 |
return $restriction;
|
621 |
$restriction = get_term_meta( $term_id, 'um_content_restriction', true );
|
622 |
|
623 |
if ( ! empty( $restriction['_um_custom_access_settings'] ) ) {
|
624 |
+
if ( ! isset( $restriction['_um_accessible'] ) ) {
|
625 |
continue;
|
626 |
} else {
|
627 |
return $restriction;
|
663 |
foreach ( $posts as $post ) {
|
664 |
|
665 |
//Woocommerce AJAX fixes....remove filtration on wc-ajax which goes to Front Page
|
666 |
+
if ( ! empty( $_GET['wc-ajax'] ) && defined('WC_DOING_AJAX') && WC_DOING_AJAX /*&& $query->is_front_page()*/ ) {
|
667 |
$filtered_posts[] = $post;
|
668 |
continue;
|
669 |
}
|
1018 |
* @param int $post_id
|
1019 |
* @return boolean
|
1020 |
*/
|
1021 |
+
function disable_comments_open( $open, $post_id ) {
|
1022 |
static $cache = array();
|
1023 |
|
1024 |
if ( isset( $cache[ $post_id ] ) ) {
|
1075 |
* @param int $post_id
|
1076 |
* @return boolean
|
1077 |
*/
|
1078 |
+
function disable_comments_open_number( $count, $post_id ) {
|
1079 |
static $cache_number = array();
|
1080 |
|
1081 |
if ( isset( $cache_number[ $post_id ] ) ) {
|
1123 |
$cache_number[ $post_id ] = $count;
|
1124 |
return $count;
|
1125 |
}
|
1126 |
+
|
1127 |
+
|
1128 |
+
/**
|
1129 |
+
* Is post restricted?
|
1130 |
+
*
|
1131 |
+
* @param int $post_id
|
1132 |
+
* @return boolean
|
1133 |
+
*/
|
1134 |
+
function is_restricted( $post_id ) {
|
1135 |
+
|
1136 |
+
$restricted = true;
|
1137 |
+
|
1138 |
+
$post = get_post( $post_id );
|
1139 |
+
$restriction = $this->get_post_privacy_settings( $post );
|
1140 |
+
|
1141 |
+
if ( ! $restriction ) {
|
1142 |
+
$restricted = false;
|
1143 |
+
} else {
|
1144 |
+
|
1145 |
+
if ( '0' == $restriction[ '_um_accessible' ] ) {
|
1146 |
+
//post is private
|
1147 |
+
$restricted = false;
|
1148 |
+
} elseif ( '1' == $restriction[ '_um_accessible' ] ) {
|
1149 |
+
//if post for not logged in users and user is not logged in
|
1150 |
+
if ( !is_user_logged_in() ) {
|
1151 |
+
$restricted = false;
|
1152 |
+
} else {
|
1153 |
+
|
1154 |
+
if ( current_user_can( 'administrator' ) ) {
|
1155 |
+
$restricted = false;
|
1156 |
+
}
|
1157 |
+
}
|
1158 |
+
} elseif ( '2' == $restriction[ '_um_accessible' ] ) {
|
1159 |
+
//if post for logged in users and user is not logged in
|
1160 |
+
if ( is_user_logged_in() ) {
|
1161 |
+
|
1162 |
+
if ( current_user_can( 'administrator' ) ) {
|
1163 |
+
$restricted = false;
|
1164 |
+
}
|
1165 |
+
|
1166 |
+
$custom_restrict = $this->um_custom_restriction( $restriction );
|
1167 |
+
|
1168 |
+
if ( empty( $restriction[ '_um_access_roles' ] ) || false === array_search( '1', $restriction[ '_um_access_roles' ] ) ) {
|
1169 |
+
if ( $custom_restrict ) {
|
1170 |
+
$restricted = false;
|
1171 |
+
}
|
1172 |
+
} else {
|
1173 |
+
$user_can = $this->user_can( get_current_user_id(), $restriction[ '_um_access_roles' ] );
|
1174 |
+
|
1175 |
+
if ( isset( $user_can ) && $user_can && $custom_restrict ) {
|
1176 |
+
$restricted = false;
|
1177 |
+
}
|
1178 |
+
}
|
1179 |
+
}
|
1180 |
+
}
|
1181 |
+
}
|
1182 |
+
|
1183 |
+
return $restricted;
|
1184 |
+
}
|
1185 |
+
|
1186 |
+
|
1187 |
+
/**
|
1188 |
+
* Hide attachment if the post is restricted
|
1189 |
+
*
|
1190 |
+
* @param string $url
|
1191 |
+
* @param int $attachment_id
|
1192 |
+
*
|
1193 |
+
* @return boolean|string
|
1194 |
+
*/
|
1195 |
+
function filter_attachment( $url, $attachment_id ) {
|
1196 |
+
return ( $attachment_id && $this->is_restricted( $attachment_id ) ) ? false : $url;
|
1197 |
+
}
|
1198 |
+
|
1199 |
+
|
1200 |
+
/**
|
1201 |
+
* Hide attachment if the post is restricted
|
1202 |
+
*
|
1203 |
+
* @param $has_thumbnail
|
1204 |
+
* @param $post
|
1205 |
+
* @param $thumbnail_id
|
1206 |
+
*
|
1207 |
+
* @return bool
|
1208 |
+
*/
|
1209 |
+
function filter_post_thumbnail( $has_thumbnail, $post, $thumbnail_id ) {
|
1210 |
+
if ( $this->is_restricted( $thumbnail_id ) ) {
|
1211 |
+
$has_thumbnail = false;
|
1212 |
+
} elseif ( ! empty( $post ) ) {
|
1213 |
+
if ( $this->is_restricted( $post ) ) {
|
1214 |
+
$has_thumbnail = false;
|
1215 |
+
}
|
1216 |
+
} else {
|
1217 |
+
$post_id = get_the_ID();
|
1218 |
+
if ( $this->is_restricted( $post_id ) ) {
|
1219 |
+
$has_thumbnail = false;
|
1220 |
+
}
|
1221 |
+
}
|
1222 |
+
|
1223 |
+
return $has_thumbnail;
|
1224 |
+
}
|
1225 |
|
1226 |
|
1227 |
/**
|
includes/core/class-builtin.php
CHANGED
@@ -392,27 +392,27 @@ if ( ! class_exists( 'um\core\Builtin' ) ) {
|
|
392 |
),
|
393 |
'_max_size' => array(
|
394 |
'mode' => 'numeric',
|
395 |
-
'error' => __('Please enter a valid size','ultimate-member')
|
396 |
),
|
397 |
)
|
398 |
),
|
399 |
|
400 |
'date' => array(
|
401 |
'name' => 'Date Picker',
|
402 |
-
'col1' => array('_title','_metakey','_help','_range','_years','_years_x','_range_start','_range_end','_visibility'),
|
403 |
'col2' => array('_label','_placeholder','_public','_roles','_format','_pretty_format','_disabled_weekdays'),
|
404 |
'col3' => array('_required','_editable','_icon'),
|
405 |
'validate' => array(
|
406 |
'_title' => array(
|
407 |
'mode' => 'required',
|
408 |
-
'error' => __('You must provide a title','ultimate-member')
|
409 |
),
|
410 |
'_metakey' => array(
|
411 |
'mode' => 'unique',
|
412 |
),
|
413 |
'_years' => array(
|
414 |
'mode' => 'numeric',
|
415 |
-
'error' => __('Number of years is not valid','ultimate-member')
|
416 |
),
|
417 |
'_range_start' => array(
|
418 |
'mode' => 'range-start',
|
@@ -426,12 +426,12 @@ if ( ! class_exists( 'um\core\Builtin' ) ) {
|
|
426 |
'time' => array(
|
427 |
'name' => 'Time Picker',
|
428 |
'col1' => array('_title','_metakey','_help','_format','_visibility'),
|
429 |
-
'col2' => array('_label','_placeholder','_public','_roles','_intervals'),
|
430 |
'col3' => array('_required','_editable','_icon'),
|
431 |
'validate' => array(
|
432 |
'_title' => array(
|
433 |
'mode' => 'required',
|
434 |
-
'error' => __('You must provide a title','ultimate-member')
|
435 |
),
|
436 |
'_metakey' => array(
|
437 |
'mode' => 'unique',
|
@@ -663,6 +663,11 @@ if ( ! class_exists( 'um\core\Builtin' ) ) {
|
|
663 |
'Only me' => __( 'Only me', 'ultimate-member' )
|
664 |
) );
|
665 |
|
|
|
|
|
|
|
|
|
|
|
666 |
$this->predefined_fields = array(
|
667 |
|
668 |
'user_login' => array(
|
@@ -755,7 +760,7 @@ if ( ! class_exists( 'um\core\Builtin' ) ) {
|
|
755 |
'edit_forbidden' => 1,
|
756 |
),
|
757 |
|
758 |
-
'
|
759 |
'title' => __('Last Login','ultimate-member'),
|
760 |
'metakey' => '_um_last_login',
|
761 |
'type' => 'text',
|
@@ -980,7 +985,7 @@ if ( ! class_exists( 'um\core\Builtin' ) ) {
|
|
980 |
'match' => 'https://soundcloud.com/',
|
981 |
),
|
982 |
|
983 |
-
'
|
984 |
'title' => __('VKontakte','ultimate-member'),
|
985 |
'metakey' => 'vkontakte',
|
986 |
'type' => 'url',
|
392 |
),
|
393 |
'_max_size' => array(
|
394 |
'mode' => 'numeric',
|
395 |
+
'error' => __( 'Please enter a valid size', 'ultimate-member' )
|
396 |
),
|
397 |
)
|
398 |
),
|
399 |
|
400 |
'date' => array(
|
401 |
'name' => 'Date Picker',
|
402 |
+
'col1' => array('_title','_metakey','_help','_default','_range','_years','_years_x','_range_start','_range_end','_visibility'),
|
403 |
'col2' => array('_label','_placeholder','_public','_roles','_format','_pretty_format','_disabled_weekdays'),
|
404 |
'col3' => array('_required','_editable','_icon'),
|
405 |
'validate' => array(
|
406 |
'_title' => array(
|
407 |
'mode' => 'required',
|
408 |
+
'error' => __( 'You must provide a title', 'ultimate-member' )
|
409 |
),
|
410 |
'_metakey' => array(
|
411 |
'mode' => 'unique',
|
412 |
),
|
413 |
'_years' => array(
|
414 |
'mode' => 'numeric',
|
415 |
+
'error' => __( 'Number of years is not valid', 'ultimate-member' )
|
416 |
),
|
417 |
'_range_start' => array(
|
418 |
'mode' => 'range-start',
|
426 |
'time' => array(
|
427 |
'name' => 'Time Picker',
|
428 |
'col1' => array('_title','_metakey','_help','_format','_visibility'),
|
429 |
+
'col2' => array('_label','_placeholder','_default','_public','_roles','_intervals'),
|
430 |
'col3' => array('_required','_editable','_icon'),
|
431 |
'validate' => array(
|
432 |
'_title' => array(
|
433 |
'mode' => 'required',
|
434 |
+
'error' => __( 'You must provide a title', 'ultimate-member' )
|
435 |
),
|
436 |
'_metakey' => array(
|
437 |
'mode' => 'unique',
|
663 |
'Only me' => __( 'Only me', 'ultimate-member' )
|
664 |
) );
|
665 |
|
666 |
+
/*
|
667 |
+
* it's important create key for array equals value of 'metakey'.
|
668 |
+
*
|
669 |
+
*/
|
670 |
+
|
671 |
$this->predefined_fields = array(
|
672 |
|
673 |
'user_login' => array(
|
760 |
'edit_forbidden' => 1,
|
761 |
),
|
762 |
|
763 |
+
'_um_last_login' => array(
|
764 |
'title' => __('Last Login','ultimate-member'),
|
765 |
'metakey' => '_um_last_login',
|
766 |
'type' => 'text',
|
985 |
'match' => 'https://soundcloud.com/',
|
986 |
),
|
987 |
|
988 |
+
'vkontakte' => array(
|
989 |
'title' => __('VKontakte','ultimate-member'),
|
990 |
'metakey' => 'vkontakte',
|
991 |
'type' => 'url',
|
includes/core/class-enqueue.php
CHANGED
@@ -82,7 +82,7 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
|
|
82 |
}
|
83 |
wp_register_script( 'select2', $this->js_baseurl . 'select2/select2.full.min.js', array( 'jquery', 'jquery-masonry' ), ultimatemember_version, true );
|
84 |
|
85 |
-
wp_register_script( 'um_scrollbar', $this->js_baseurl . '
|
86 |
|
87 |
wp_register_script( 'um_jquery_form', $this->js_baseurl . 'um-jquery-form' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
88 |
wp_register_script( 'um_fileupload', $this->js_baseurl . 'um-fileupload' . $this->suffix . '.js', array( 'jquery', 'um_jquery_form' ), ultimatemember_version, true );
|
@@ -103,9 +103,10 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
|
|
103 |
wp_register_script( 'um_crop', $this->js_baseurl . 'um-crop' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
104 |
|
105 |
wp_register_script( 'um_modal', $this->js_baseurl . 'um-modal' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'um_crop' ), ultimatemember_version, true );
|
106 |
-
wp_register_script( 'um_responsive', $this->js_baseurl . 'um-responsive' . $this->suffix . '.js', array( 'jquery', 'um_functions', 'um_crop' ), ultimatemember_version, true );
|
107 |
|
108 |
wp_register_script('um_functions', $this->js_baseurl . 'um-functions' . $this->suffix . '.js', array( 'jquery', 'jquery-masonry', 'wp-util', 'um_scrollbar' ), ultimatemember_version, true );
|
|
|
|
|
109 |
wp_register_script( 'um-gdpr', $this->js_baseurl . 'um-gdpr' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, false );
|
110 |
wp_register_script('um_conditional', $this->js_baseurl . 'um-conditional' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
111 |
wp_register_script('um_scripts', $this->js_baseurl . 'um-scripts' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'um_conditional', 'um_datetime', 'um_datetime_date', 'um_datetime_time', 'um_datetime_legacy' ), ultimatemember_version, true );
|
@@ -157,7 +158,7 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
|
|
157 |
wp_register_style( 'um_datetime', $this->css_baseurl . 'pickadate/default.css', array(), ultimatemember_version );
|
158 |
wp_register_style( 'um_datetime_date', $this->css_baseurl . 'pickadate/default.date.css', array( 'um_datetime' ), ultimatemember_version );
|
159 |
wp_register_style( 'um_datetime_time', $this->css_baseurl . 'pickadate/default.time.css', array( 'um_datetime' ), ultimatemember_version );
|
160 |
-
wp_register_style( 'um_scrollbar', $this->css_baseurl . '
|
161 |
|
162 |
wp_register_style( 'um_rtl', $this->css_baseurl . 'um.rtl.css', array(), ultimatemember_version );
|
163 |
wp_register_style( 'um_default_css', $this->css_baseurl . 'um-old-default.css', array(), ultimatemember_version );
|
82 |
}
|
83 |
wp_register_script( 'select2', $this->js_baseurl . 'select2/select2.full.min.js', array( 'jquery', 'jquery-masonry' ), ultimatemember_version, true );
|
84 |
|
85 |
+
wp_register_script( 'um_scrollbar', $this->js_baseurl . 'simplebar' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
86 |
|
87 |
wp_register_script( 'um_jquery_form', $this->js_baseurl . 'um-jquery-form' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
88 |
wp_register_script( 'um_fileupload', $this->js_baseurl . 'um-fileupload' . $this->suffix . '.js', array( 'jquery', 'um_jquery_form' ), ultimatemember_version, true );
|
103 |
wp_register_script( 'um_crop', $this->js_baseurl . 'um-crop' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
104 |
|
105 |
wp_register_script( 'um_modal', $this->js_baseurl . 'um-modal' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'um_crop' ), ultimatemember_version, true );
|
|
|
106 |
|
107 |
wp_register_script('um_functions', $this->js_baseurl . 'um-functions' . $this->suffix . '.js', array( 'jquery', 'jquery-masonry', 'wp-util', 'um_scrollbar' ), ultimatemember_version, true );
|
108 |
+
wp_register_script( 'um_responsive', $this->js_baseurl . 'um-responsive' . $this->suffix . '.js', array( 'jquery', 'um_functions', 'um_crop' ), ultimatemember_version, true );
|
109 |
+
|
110 |
wp_register_script( 'um-gdpr', $this->js_baseurl . 'um-gdpr' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, false );
|
111 |
wp_register_script('um_conditional', $this->js_baseurl . 'um-conditional' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
112 |
wp_register_script('um_scripts', $this->js_baseurl . 'um-scripts' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'um_conditional', 'um_datetime', 'um_datetime_date', 'um_datetime_time', 'um_datetime_legacy' ), ultimatemember_version, true );
|
158 |
wp_register_style( 'um_datetime', $this->css_baseurl . 'pickadate/default.css', array(), ultimatemember_version );
|
159 |
wp_register_style( 'um_datetime_date', $this->css_baseurl . 'pickadate/default.date.css', array( 'um_datetime' ), ultimatemember_version );
|
160 |
wp_register_style( 'um_datetime_time', $this->css_baseurl . 'pickadate/default.time.css', array( 'um_datetime' ), ultimatemember_version );
|
161 |
+
wp_register_style( 'um_scrollbar', $this->css_baseurl . 'simplebar.css', array(), ultimatemember_version );
|
162 |
|
163 |
wp_register_style( 'um_rtl', $this->css_baseurl . 'um.rtl.css', array(), ultimatemember_version );
|
164 |
wp_register_style( 'um_default_css', $this->css_baseurl . 'um-old-default.css', array(), ultimatemember_version );
|
includes/core/class-external-integrations.php
CHANGED
@@ -33,7 +33,7 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
|
|
33 |
add_filter( 'icl_ls_languages', array( &$this, 'um_core_page_wpml_permalink' ), 10, 1 );
|
34 |
|
35 |
// Integration for the "Transposh Translation Filter" plugin
|
36 |
-
add_action( 'template_redirect', array( &$this, 'transposh_user_profile'), 9990 );
|
37 |
|
38 |
/**
|
39 |
* @todo Customize this form metadata
|
@@ -151,11 +151,11 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
|
|
151 |
if ( ! $this->is_wpml_active() )
|
152 |
return $profile_url;
|
153 |
|
154 |
-
if ( function_exists( 'icl_get_current_language' ) && icl_get_current_language() != icl_get_default_language() ) {
|
155 |
if ( get_the_ID() > 0 && get_post_meta( get_the_ID(), '_um_wpml_user', true ) == 1 ) {
|
156 |
$profile_url = get_permalink( get_the_ID() );
|
157 |
}
|
158 |
-
}
|
159 |
|
160 |
// WPML compatibility
|
161 |
if ( function_exists( 'icl_object_id' ) ) {
|
@@ -286,11 +286,15 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
|
|
286 |
if ( function_exists( 'icl_get_current_language' ) && icl_get_current_language() != icl_get_default_language() ) {
|
287 |
$url = $this->get_url_for_language( UM()->config()->permalinks[ $slug ], icl_get_current_language() );
|
288 |
|
289 |
-
if ( get_post_meta( get_the_ID(), '_um_wpml_account', true ) == 1 ) {
|
290 |
$url = get_permalink( get_the_ID() );
|
291 |
}
|
292 |
if ( get_post_meta( get_the_ID(), '_um_wpml_user', true ) == 1 ) {
|
293 |
$url = $this->get_url_for_language( UM()->config()->permalinks[ $slug ], icl_get_current_language() );
|
|
|
|
|
|
|
|
|
294 |
}
|
295 |
}
|
296 |
|
@@ -358,6 +362,12 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
|
|
358 |
}
|
359 |
|
360 |
|
|
|
|
|
|
|
|
|
|
|
|
|
361 |
function locate_email_template( $template, $template_name ) {
|
362 |
if ( ! $this->is_wpml_active() ) {
|
363 |
return $template;
|
@@ -367,8 +377,7 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
|
|
367 |
$language_codes = $this->get_languages_codes();
|
368 |
|
369 |
$lang = '';
|
370 |
-
if ( $language_codes['default'] != $language_codes['current']
|
371 |
-
UM()->config()->email_notifications[ $template_name ]['recipient'] != 'admin'*/ ) {
|
372 |
$lang = $language_codes['current'] . '/';
|
373 |
}
|
374 |
|
@@ -381,13 +390,18 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
|
|
381 |
//if there isn't template at theme folder get template file from plugin dir
|
382 |
if ( ! $template ) {
|
383 |
$path = ! empty( UM()->mail()->path_by_slug[ $template_name ] ) ? UM()->mail()->path_by_slug[ $template_name ] : um_path . 'templates/email';
|
384 |
-
$template = trailingslashit( $path ) . $
|
385 |
}
|
386 |
|
387 |
return $template;
|
388 |
}
|
389 |
|
390 |
|
|
|
|
|
|
|
|
|
|
|
391 |
function change_email_template_file( $template ) {
|
392 |
if ( ! $this->is_wpml_active() ) {
|
393 |
return $template;
|
@@ -404,7 +418,11 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
|
|
404 |
}
|
405 |
|
406 |
|
407 |
-
|
|
|
|
|
|
|
|
|
408 |
function add_email_templates_wpml_column( $columns ) {
|
409 |
if ( ! $this->is_wpml_active() ) {
|
410 |
return $columns;
|
@@ -435,6 +453,11 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
|
|
435 |
}
|
436 |
|
437 |
|
|
|
|
|
|
|
|
|
|
|
438 |
function wpml_column_content( $item ) {
|
439 |
if ( ! $this->is_wpml_active() ) {
|
440 |
return '';
|
@@ -453,6 +476,12 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
|
|
453 |
}
|
454 |
|
455 |
|
|
|
|
|
|
|
|
|
|
|
|
|
456 |
function get_status_html( $template, $code ) {
|
457 |
global $sitepress;
|
458 |
$status = 'add';
|
@@ -475,14 +504,21 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
|
|
475 |
)
|
476 |
);
|
477 |
|
478 |
-
$language_codes = $this->get_languages_codes($code);
|
479 |
|
480 |
$lang = '';
|
481 |
if ( $language_codes['default'] != $language_codes['current'] ) {
|
482 |
$lang = $language_codes['current'] . '/';
|
483 |
}
|
484 |
|
|
|
485 |
$template_path = trailingslashit( get_stylesheet_directory() . '/ultimate-member/email' ) . $lang . $template . '.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
486 |
if ( file_exists( $template_path ) ) {
|
487 |
$status = 'edit';
|
488 |
}
|
@@ -492,6 +528,14 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
|
|
492 |
return $this->render_status_icon( $link, $translation[ $status ]['text'], $translation[ $status ]['icon'] );
|
493 |
}
|
494 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
495 |
function render_status_icon( $link, $text, $img ) {
|
496 |
|
497 |
$icon_html = '<a href="' . $link . '" title="' . $text . '">';
|
33 |
add_filter( 'icl_ls_languages', array( &$this, 'um_core_page_wpml_permalink' ), 10, 1 );
|
34 |
|
35 |
// Integration for the "Transposh Translation Filter" plugin
|
36 |
+
add_action( 'template_redirect', array( &$this, 'transposh_user_profile' ), 9990 );
|
37 |
|
38 |
/**
|
39 |
* @todo Customize this form metadata
|
151 |
if ( ! $this->is_wpml_active() )
|
152 |
return $profile_url;
|
153 |
|
154 |
+
/*if ( function_exists( 'icl_get_current_language' ) && icl_get_current_language() != icl_get_default_language() ) {
|
155 |
if ( get_the_ID() > 0 && get_post_meta( get_the_ID(), '_um_wpml_user', true ) == 1 ) {
|
156 |
$profile_url = get_permalink( get_the_ID() );
|
157 |
}
|
158 |
+
}*/
|
159 |
|
160 |
// WPML compatibility
|
161 |
if ( function_exists( 'icl_object_id' ) ) {
|
286 |
if ( function_exists( 'icl_get_current_language' ) && icl_get_current_language() != icl_get_default_language() ) {
|
287 |
$url = $this->get_url_for_language( UM()->config()->permalinks[ $slug ], icl_get_current_language() );
|
288 |
|
289 |
+
/*if ( get_post_meta( get_the_ID(), '_um_wpml_account', true ) == 1 ) {
|
290 |
$url = get_permalink( get_the_ID() );
|
291 |
}
|
292 |
if ( get_post_meta( get_the_ID(), '_um_wpml_user', true ) == 1 ) {
|
293 |
$url = $this->get_url_for_language( UM()->config()->permalinks[ $slug ], icl_get_current_language() );
|
294 |
+
}*/
|
295 |
+
|
296 |
+
if ( $updated ) {
|
297 |
+
$url = add_query_arg( 'updated', esc_attr( $updated ), $url );
|
298 |
}
|
299 |
}
|
300 |
|
362 |
}
|
363 |
|
364 |
|
365 |
+
/**
|
366 |
+
* @param $template
|
367 |
+
* @param $template_name
|
368 |
+
*
|
369 |
+
* @return string
|
370 |
+
*/
|
371 |
function locate_email_template( $template, $template_name ) {
|
372 |
if ( ! $this->is_wpml_active() ) {
|
373 |
return $template;
|
377 |
$language_codes = $this->get_languages_codes();
|
378 |
|
379 |
$lang = '';
|
380 |
+
if ( $language_codes['default'] != $language_codes['current'] ) {
|
|
|
381 |
$lang = $language_codes['current'] . '/';
|
382 |
}
|
383 |
|
390 |
//if there isn't template at theme folder get template file from plugin dir
|
391 |
if ( ! $template ) {
|
392 |
$path = ! empty( UM()->mail()->path_by_slug[ $template_name ] ) ? UM()->mail()->path_by_slug[ $template_name ] : um_path . 'templates/email';
|
393 |
+
$template = trailingslashit( $path ) . $template_name . '.php';
|
394 |
}
|
395 |
|
396 |
return $template;
|
397 |
}
|
398 |
|
399 |
|
400 |
+
/**
|
401 |
+
* @param $template
|
402 |
+
*
|
403 |
+
* @return string
|
404 |
+
*/
|
405 |
function change_email_template_file( $template ) {
|
406 |
if ( ! $this->is_wpml_active() ) {
|
407 |
return $template;
|
418 |
}
|
419 |
|
420 |
|
421 |
+
/**
|
422 |
+
* @param $columns
|
423 |
+
*
|
424 |
+
* @return array
|
425 |
+
*/
|
426 |
function add_email_templates_wpml_column( $columns ) {
|
427 |
if ( ! $this->is_wpml_active() ) {
|
428 |
return $columns;
|
453 |
}
|
454 |
|
455 |
|
456 |
+
/**
|
457 |
+
* @param $item
|
458 |
+
*
|
459 |
+
* @return string
|
460 |
+
*/
|
461 |
function wpml_column_content( $item ) {
|
462 |
if ( ! $this->is_wpml_active() ) {
|
463 |
return '';
|
476 |
}
|
477 |
|
478 |
|
479 |
+
/**
|
480 |
+
* @param $template
|
481 |
+
* @param $code
|
482 |
+
*
|
483 |
+
* @return string
|
484 |
+
*/
|
485 |
function get_status_html( $template, $code ) {
|
486 |
global $sitepress;
|
487 |
$status = 'add';
|
504 |
)
|
505 |
);
|
506 |
|
507 |
+
$language_codes = $this->get_languages_codes( $code );
|
508 |
|
509 |
$lang = '';
|
510 |
if ( $language_codes['default'] != $language_codes['current'] ) {
|
511 |
$lang = $language_codes['current'] . '/';
|
512 |
}
|
513 |
|
514 |
+
//theme location
|
515 |
$template_path = trailingslashit( get_stylesheet_directory() . '/ultimate-member/email' ) . $lang . $template . '.php';
|
516 |
+
|
517 |
+
//plugin location for default language
|
518 |
+
if ( empty( $lang ) && ! file_exists( $template_path ) ) {
|
519 |
+
$template_path = UM()->mail()->get_template_file( 'plugin', $template );
|
520 |
+
}
|
521 |
+
|
522 |
if ( file_exists( $template_path ) ) {
|
523 |
$status = 'edit';
|
524 |
}
|
528 |
return $this->render_status_icon( $link, $translation[ $status ]['text'], $translation[ $status ]['icon'] );
|
529 |
}
|
530 |
|
531 |
+
|
532 |
+
/**
|
533 |
+
* @param $link
|
534 |
+
* @param $text
|
535 |
+
* @param $img
|
536 |
+
*
|
537 |
+
* @return string
|
538 |
+
*/
|
539 |
function render_status_icon( $link, $text, $img ) {
|
540 |
|
541 |
$icon_html = '<a href="' . $link . '" title="' . $text . '">';
|
includes/core/class-fields.php
CHANGED
@@ -580,8 +580,9 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
|
580 |
* @return mixed
|
581 |
*/
|
582 |
function field_value( $key, $default = false, $data = null ) {
|
583 |
-
if ( isset( $_SESSION ) && isset( $_SESSION['um_social_profile'][ $key ] ) && isset( $this->set_mode ) && $this->set_mode == 'register' )
|
584 |
return $_SESSION['um_social_profile'][ $key ];
|
|
|
585 |
|
586 |
$type = ( isset( $data['type'] ) ) ? $data['type'] : '';
|
587 |
|
@@ -785,9 +786,26 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
|
785 |
*/
|
786 |
$value = apply_filters( "um_edit_{$key}_field_value", $default, $key );
|
787 |
|
|
|
|
|
788 |
}
|
789 |
|
790 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
791 |
}
|
792 |
|
793 |
|
@@ -2257,13 +2275,13 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
|
2257 |
/* Single Image Upload */
|
2258 |
case 'image':
|
2259 |
$output .= '<div class="um-field' . $classes . '"' . $conditional . ' data-key="' . $key . '">';
|
2260 |
-
if (in_array( $key, array( 'profile_photo', 'cover_photo' ) )) {
|
2261 |
$field_value = '';
|
2262 |
} else {
|
2263 |
$field_value = $this->field_value( $key, $default, $data );
|
2264 |
}
|
2265 |
$output .= '<input type="hidden" name="' . $key . UM()->form()->form_suffix . '" id="' . $key . UM()->form()->form_suffix . '" value="' . $field_value . '" />';
|
2266 |
-
if (isset( $data['label'] )) {
|
2267 |
$output .= $this->field_label( $label, $key, $data );
|
2268 |
}
|
2269 |
$modal_label = ( isset( $data['label'] ) ) ? $data['label'] : __( 'Upload Photo', 'ultimate-member' );
|
580 |
* @return mixed
|
581 |
*/
|
582 |
function field_value( $key, $default = false, $data = null ) {
|
583 |
+
if ( isset( $_SESSION ) && isset( $_SESSION['um_social_profile'][ $key ] ) && isset( $this->set_mode ) && $this->set_mode == 'register' ) {
|
584 |
return $_SESSION['um_social_profile'][ $key ];
|
585 |
+
}
|
586 |
|
587 |
$type = ( isset( $data['type'] ) ) ? $data['type'] : '';
|
588 |
|
786 |
*/
|
787 |
$value = apply_filters( "um_edit_{$key}_field_value", $default, $key );
|
788 |
|
789 |
+
} elseif ( ! isset( $value ) ) {
|
790 |
+
$value = '';
|
791 |
}
|
792 |
|
793 |
+
|
794 |
+
/**
|
795 |
+
* UM hook
|
796 |
+
*
|
797 |
+
* @type filter
|
798 |
+
* @title um_field_value
|
799 |
+
* @description Change field value
|
800 |
+
* @input_vars
|
801 |
+
* [{"var":"$value","type":"string","desc":"Field Value"},
|
802 |
+
* {"var":"$key","type":"string","desc":"Field Key"},,
|
803 |
+
* {"var":"$type","type":"string","desc":"Field Type"}
|
804 |
+
* {"var":"$default","type":"string","desc":"Field Default Value"},
|
805 |
+
* {"var":"$data","type":"array","desc":"Field Data"}]
|
806 |
+
* @usage add_filter( 'um_field_value', 'function_name', 10, 5 );
|
807 |
+
*/
|
808 |
+
return apply_filters( 'um_field_value', $value, $default, $key, $type, $data );
|
809 |
}
|
810 |
|
811 |
|
2275 |
/* Single Image Upload */
|
2276 |
case 'image':
|
2277 |
$output .= '<div class="um-field' . $classes . '"' . $conditional . ' data-key="' . $key . '">';
|
2278 |
+
if ( in_array( $key, array( 'profile_photo', 'cover_photo' ) ) ) {
|
2279 |
$field_value = '';
|
2280 |
} else {
|
2281 |
$field_value = $this->field_value( $key, $default, $data );
|
2282 |
}
|
2283 |
$output .= '<input type="hidden" name="' . $key . UM()->form()->form_suffix . '" id="' . $key . UM()->form()->form_suffix . '" value="' . $field_value . '" />';
|
2284 |
+
if ( isset( $data['label'] ) ) {
|
2285 |
$output .= $this->field_label( $label, $key, $data );
|
2286 |
}
|
2287 |
$modal_label = ( isset( $data['label'] ) ) ? $data['label'] : __( 'Upload Photo', 'ultimate-member' );
|
includes/core/class-form.php
CHANGED
@@ -504,7 +504,7 @@ if ( ! class_exists( 'um\core\Form' ) ) {
|
|
504 |
* @param integer $post_id
|
505 |
* @return string
|
506 |
*/
|
507 |
-
function form_type( $post_id ){
|
508 |
$mode = get_post_meta( $post_id, '_um_mode', true );
|
509 |
return $mode;
|
510 |
}
|
504 |
* @param integer $post_id
|
505 |
* @return string
|
506 |
*/
|
507 |
+
function form_type( $post_id ) {
|
508 |
$mode = get_post_meta( $post_id, '_um_mode', true );
|
509 |
return $mode;
|
510 |
}
|
includes/core/class-logout.php
CHANGED
@@ -45,15 +45,15 @@ if ( ! class_exists( 'um\core\Logout' ) ) {
|
|
45 |
}
|
46 |
|
47 |
$trid = 0;
|
48 |
-
|
49 |
if ( UM()->external_integrations()->is_wpml_active() ) {
|
50 |
global $sitepress;
|
51 |
$default_lang = $sitepress->get_default_language();
|
52 |
|
53 |
-
|
54 |
if ( $language_code == $default_lang ) {
|
55 |
$language_code = '';
|
56 |
-
}
|
57 |
|
58 |
$current_page_ID = get_the_ID();
|
59 |
if ( function_exists( 'icl_object_id' ) ) {
|
@@ -64,7 +64,7 @@ if ( ! class_exists( 'um\core\Logout' ) ) {
|
|
64 |
}
|
65 |
|
66 |
$logout_page_id = UM()->config()->permalinks['logout'];
|
67 |
-
if ( um_is_core_page( 'logout' ) || ( $trid > 0 && $trid == $logout_page_id )
|
68 |
|
69 |
if ( is_user_logged_in() ) {
|
70 |
|
@@ -77,7 +77,7 @@ if ( ! class_exists( 'um\core\Logout' ) ) {
|
|
77 |
} else if ( um_user('after_logout') == 'redirect_home' ) {
|
78 |
wp_logout();
|
79 |
session_unset();
|
80 |
-
exit( wp_safe_redirect( home_url(
|
81 |
} else {
|
82 |
/**
|
83 |
* UM hook
|
@@ -109,7 +109,7 @@ if ( ! class_exists( 'um\core\Logout' ) ) {
|
|
109 |
|
110 |
} else {
|
111 |
add_filter( 'wp_safe_redirect_fallback', array( &$this, 'safe_redirect_default' ), 10, 2 );
|
112 |
-
exit( wp_safe_redirect( home_url(
|
113 |
}
|
114 |
|
115 |
}
|
45 |
}
|
46 |
|
47 |
$trid = 0;
|
48 |
+
//$language_code = '';
|
49 |
if ( UM()->external_integrations()->is_wpml_active() ) {
|
50 |
global $sitepress;
|
51 |
$default_lang = $sitepress->get_default_language();
|
52 |
|
53 |
+
/*$language_code = $sitepress->get_current_language();
|
54 |
if ( $language_code == $default_lang ) {
|
55 |
$language_code = '';
|
56 |
+
}*/
|
57 |
|
58 |
$current_page_ID = get_the_ID();
|
59 |
if ( function_exists( 'icl_object_id' ) ) {
|
64 |
}
|
65 |
|
66 |
$logout_page_id = UM()->config()->permalinks['logout'];
|
67 |
+
if ( um_is_core_page( 'logout' ) || ( $trid > 0 && $trid == $logout_page_id ) ) {
|
68 |
|
69 |
if ( is_user_logged_in() ) {
|
70 |
|
77 |
} else if ( um_user('after_logout') == 'redirect_home' ) {
|
78 |
wp_logout();
|
79 |
session_unset();
|
80 |
+
exit( wp_safe_redirect( home_url() ) );
|
81 |
} else {
|
82 |
/**
|
83 |
* UM hook
|
109 |
|
110 |
} else {
|
111 |
add_filter( 'wp_safe_redirect_fallback', array( &$this, 'safe_redirect_default' ), 10, 2 );
|
112 |
+
exit( wp_safe_redirect( home_url() ) );
|
113 |
}
|
114 |
|
115 |
}
|
includes/core/class-mail.php
CHANGED
@@ -1,9 +1,11 @@
|
|
1 |
<?php
|
2 |
namespace um\core;
|
3 |
|
|
|
4 |
// Exit if accessed directly
|
5 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
6 |
|
|
|
7 |
if ( ! class_exists( 'um\core\Mail' ) ) {
|
8 |
|
9 |
|
@@ -378,6 +380,9 @@ if ( ! class_exists( 'um\core\Mail' ) ) {
|
|
378 |
*/
|
379 |
$message = apply_filters( 'um_email_send_message_content', $message, $slug, $args );
|
380 |
|
|
|
|
|
|
|
381 |
// Convert tags in email template
|
382 |
return um_convert_tags( $message, $args );
|
383 |
}
|
@@ -392,8 +397,13 @@ if ( ! class_exists( 'um\core\Mail' ) ) {
|
|
392 |
*/
|
393 |
function send( $email, $template, $args = array() ) {
|
394 |
|
395 |
-
if ( ! is_email( $email ) )
|
396 |
-
|
|
|
|
|
|
|
|
|
|
|
397 |
|
398 |
$this->attachments = null;
|
399 |
$this->headers = 'From: '. UM()->options()->get('mail_from') .' <'. UM()->options()->get('mail_from_addr') .'>' . "\r\n";
|
@@ -420,6 +430,10 @@ if ( ! class_exists( 'um\core\Mail' ) ) {
|
|
420 |
* }
|
421 |
* ?>
|
422 |
*/
|
|
|
|
|
|
|
|
|
423 |
$subject = apply_filters( 'um_email_send_subject', UM()->options()->get( $template . '_sub' ), $template );
|
424 |
$this->subject = um_convert_tags( $subject , $args );
|
425 |
|
@@ -485,7 +499,11 @@ if ( ! class_exists( 'um\core\Mail' ) ) {
|
|
485 |
) );
|
486 |
|
487 |
// Return what we found.
|
488 |
-
|
|
|
|
|
|
|
|
|
489 |
}
|
490 |
|
491 |
|
@@ -557,5 +575,43 @@ if ( ! class_exists( 'um\core\Mail' ) ) {
|
|
557 |
return false;
|
558 |
}
|
559 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
560 |
}
|
561 |
}
|
1 |
<?php
|
2 |
namespace um\core;
|
3 |
|
4 |
+
|
5 |
// Exit if accessed directly
|
6 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
7 |
|
8 |
+
|
9 |
if ( ! class_exists( 'um\core\Mail' ) ) {
|
10 |
|
11 |
|
380 |
*/
|
381 |
$message = apply_filters( 'um_email_send_message_content', $message, $slug, $args );
|
382 |
|
383 |
+
add_filter( 'um_template_tags_patterns_hook', array( &$this, 'add_placeholder' ), 10, 1 );
|
384 |
+
add_filter( 'um_template_tags_replaces_hook', array( &$this, 'add_replace_placeholder' ), 10, 1 );
|
385 |
+
|
386 |
// Convert tags in email template
|
387 |
return um_convert_tags( $message, $args );
|
388 |
}
|
397 |
*/
|
398 |
function send( $email, $template, $args = array() ) {
|
399 |
|
400 |
+
if ( ! is_email( $email ) ) {
|
401 |
+
return;
|
402 |
+
}
|
403 |
+
|
404 |
+
if ( UM()->options()->get( $template . '_on' ) != 1 ) {
|
405 |
+
return;
|
406 |
+
}
|
407 |
|
408 |
$this->attachments = null;
|
409 |
$this->headers = 'From: '. UM()->options()->get('mail_from') .' <'. UM()->options()->get('mail_from_addr') .'>' . "\r\n";
|
430 |
* }
|
431 |
* ?>
|
432 |
*/
|
433 |
+
|
434 |
+
add_filter( 'um_template_tags_patterns_hook', array( UM()->mail(), 'add_placeholder' ), 10, 1 );
|
435 |
+
add_filter( 'um_template_tags_replaces_hook', array( UM()->mail(), 'add_replace_placeholder' ), 10, 1 );
|
436 |
+
|
437 |
$subject = apply_filters( 'um_email_send_subject', UM()->options()->get( $template . '_sub' ), $template );
|
438 |
$this->subject = um_convert_tags( $subject , $args );
|
439 |
|
499 |
) );
|
500 |
|
501 |
// Return what we found.
|
502 |
+
if ( get_template_directory() === get_stylesheet_directory() ) {
|
503 |
+
return ! $template ? false : true;
|
504 |
+
} else {
|
505 |
+
return strstr( $template, get_stylesheet_directory() );
|
506 |
+
}
|
507 |
}
|
508 |
|
509 |
|
575 |
return false;
|
576 |
}
|
577 |
}
|
578 |
+
|
579 |
+
|
580 |
+
/**
|
581 |
+
* UM Placeholders for site url, admin email, submit registration
|
582 |
+
*
|
583 |
+
* @param $placeholders
|
584 |
+
*
|
585 |
+
* @return array
|
586 |
+
*/
|
587 |
+
function add_placeholder( $placeholders ) {
|
588 |
+
$placeholders[] = '{user_profile_link}';
|
589 |
+
$placeholders[] = '{site_url}';
|
590 |
+
$placeholders[] = '{admin_email}';
|
591 |
+
$placeholders[] = '{submitted_registration}';
|
592 |
+
$placeholders[] = '{login_url}';
|
593 |
+
$placeholders[] = '{password}';
|
594 |
+
$placeholders[] = '{account_activation_link}';
|
595 |
+
return $placeholders;
|
596 |
+
}
|
597 |
+
|
598 |
+
|
599 |
+
/**
|
600 |
+
* UM Replace Placeholders for site url, admin email, submit registration
|
601 |
+
*
|
602 |
+
* @param $replace_placeholders
|
603 |
+
*
|
604 |
+
* @return array
|
605 |
+
*/
|
606 |
+
function add_replace_placeholder( $replace_placeholders ) {
|
607 |
+
$replace_placeholders[] = um_user_profile_url();
|
608 |
+
$replace_placeholders[] = get_bloginfo( 'url' );
|
609 |
+
$replace_placeholders[] = um_admin_email();
|
610 |
+
$replace_placeholders[] = um_user_submitted_registration();
|
611 |
+
$replace_placeholders[] = um_get_core_page( 'login' );
|
612 |
+
$replace_placeholders[] = esc_html__( 'Your set password', 'ultimate-member' );
|
613 |
+
$replace_placeholders[] = um_user( 'account_activation_link' );
|
614 |
+
return $replace_placeholders;
|
615 |
+
}
|
616 |
}
|
617 |
}
|
includes/core/class-members.php
CHANGED
@@ -25,9 +25,9 @@ if ( ! class_exists( 'um\core\Members' ) ) {
|
|
25 |
*/
|
26 |
function __construct() {
|
27 |
|
28 |
-
add_filter('user_search_columns', array(&$this, 'user_search_columns'), 99 );
|
29 |
|
30 |
-
add_action('template_redirect', array(&$this, 'access_members'), 555);
|
31 |
|
32 |
$this->core_search_fields = array(
|
33 |
'user_login',
|
@@ -48,7 +48,7 @@ if ( ! class_exists( 'um\core\Members' ) ) {
|
|
48 |
*
|
49 |
* @return array
|
50 |
*/
|
51 |
-
function user_search_columns( $search_columns ){
|
52 |
if ( is_admin() ) {
|
53 |
$search_columns[] = 'display_name';
|
54 |
}
|
@@ -198,7 +198,7 @@ if ( ! class_exists( 'um\core\Members' ) ) {
|
|
198 |
$attrs = apply_filters( 'um_search_fields', $attrs );
|
199 |
|
200 |
if ( $type == 'select' ) {
|
201 |
-
if( isset($attrs) && is_array( $attrs['options'] ) ){
|
202 |
asort( $attrs['options'] );
|
203 |
}
|
204 |
/**
|
@@ -228,6 +228,7 @@ if ( ! class_exists( 'um\core\Members' ) ) {
|
|
228 |
return compact( 'type', 'attrs' );
|
229 |
}
|
230 |
|
|
|
231 |
/**
|
232 |
* Show filter
|
233 |
*
|
@@ -441,9 +442,9 @@ if ( ! class_exists( 'um\core\Members' ) ) {
|
|
441 |
do_action( 'um_user_after_query', $query_args, $users );
|
442 |
|
443 |
|
444 |
-
$array['users'] =
|
445 |
|
446 |
-
$array['total_users'] = (isset( $max_users ) && $max_users && $max_users <= $users->total_users ) ? $max_users : $users->total_users;
|
447 |
|
448 |
$array['page'] = $members_page;
|
449 |
|
@@ -458,7 +459,7 @@ if ( ! class_exists( 'um\core\Members' ) ) {
|
|
458 |
|
459 |
$array['users_per_page'] = $array['users'];
|
460 |
|
461 |
-
for( $i = $array['page']; $i <= $array['page'] + 2; $i++ ) {
|
462 |
if ( $i <= $array['total_pages'] ) {
|
463 |
$pages_to_show[] = $i;
|
464 |
}
|
@@ -468,7 +469,7 @@ if ( ! class_exists( 'um\core\Members' ) ) {
|
|
468 |
$pages_needed = 5 - count( $pages_to_show );
|
469 |
|
470 |
for ( $c = $array['page']; $c >= $array['page'] - 2; $c-- ) {
|
471 |
-
if ( !in_array( $c, $pages_to_show ) && $c > 0 ) {
|
472 |
$pages_to_add[] = $c;
|
473 |
}
|
474 |
}
|
@@ -500,15 +501,15 @@ if ( ! class_exists( 'um\core\Members' ) ) {
|
|
500 |
} else {
|
501 |
|
502 |
if ( isset( $pages_to_show ) && count( $pages_to_show ) < 5 ) {
|
503 |
-
if ( max($pages_to_show) - $array['page'] >= 2 ) {
|
504 |
-
$pages_to_show[] = max($pages_to_show) + 1;
|
505 |
if ( count( $pages_to_show ) < 5 ) {
|
506 |
-
$pages_to_show[] = max($pages_to_show) + 1;
|
507 |
}
|
508 |
-
}
|
509 |
-
$pages_to_show[] = min($pages_to_show) - 1;
|
510 |
if ( count( $pages_to_show ) < 5 ) {
|
511 |
-
$pages_to_show[] = min($pages_to_show) - 1;
|
512 |
}
|
513 |
}
|
514 |
}
|
@@ -526,14 +527,14 @@ if ( ! class_exists( 'um\core\Members' ) ) {
|
|
526 |
if ( isset( $array['pages_to_show'] ) ) {
|
527 |
|
528 |
if ( $array['total_pages'] < count( $array['pages_to_show'] ) ) {
|
529 |
-
foreach( $array['pages_to_show'] as $k => $v ) {
|
530 |
if ( $v > $array['total_pages'] ) unset( $array['pages_to_show'][$k] );
|
531 |
}
|
532 |
}
|
533 |
|
534 |
-
foreach( $array['pages_to_show'] as $k => $v ) {
|
535 |
-
if ( (int)$v <= 0 ) {
|
536 |
-
unset( $array['pages_to_show'][$k] );
|
537 |
}
|
538 |
}
|
539 |
|
25 |
*/
|
26 |
function __construct() {
|
27 |
|
28 |
+
add_filter( 'user_search_columns', array( &$this, 'user_search_columns' ), 99 );
|
29 |
|
30 |
+
add_action( 'template_redirect', array( &$this, 'access_members' ), 555);
|
31 |
|
32 |
$this->core_search_fields = array(
|
33 |
'user_login',
|
48 |
*
|
49 |
* @return array
|
50 |
*/
|
51 |
+
function user_search_columns( $search_columns ) {
|
52 |
if ( is_admin() ) {
|
53 |
$search_columns[] = 'display_name';
|
54 |
}
|
198 |
$attrs = apply_filters( 'um_search_fields', $attrs );
|
199 |
|
200 |
if ( $type == 'select' ) {
|
201 |
+
if ( isset( $attrs ) && is_array( $attrs['options'] ) ) {
|
202 |
asort( $attrs['options'] );
|
203 |
}
|
204 |
/**
|
228 |
return compact( 'type', 'attrs' );
|
229 |
}
|
230 |
|
231 |
+
|
232 |
/**
|
233 |
* Show filter
|
234 |
*
|
442 |
do_action( 'um_user_after_query', $query_args, $users );
|
443 |
|
444 |
|
445 |
+
$array['users'] = ! empty( $users->results ) ? $users->results : array();
|
446 |
|
447 |
+
$array['total_users'] = ( isset( $max_users ) && $max_users && $max_users <= $users->total_users ) ? $max_users : $users->total_users;
|
448 |
|
449 |
$array['page'] = $members_page;
|
450 |
|
459 |
|
460 |
$array['users_per_page'] = $array['users'];
|
461 |
|
462 |
+
for ( $i = $array['page']; $i <= $array['page'] + 2; $i++ ) {
|
463 |
if ( $i <= $array['total_pages'] ) {
|
464 |
$pages_to_show[] = $i;
|
465 |
}
|
469 |
$pages_needed = 5 - count( $pages_to_show );
|
470 |
|
471 |
for ( $c = $array['page']; $c >= $array['page'] - 2; $c-- ) {
|
472 |
+
if ( ! in_array( $c, $pages_to_show ) && $c > 0 ) {
|
473 |
$pages_to_add[] = $c;
|
474 |
}
|
475 |
}
|
501 |
} else {
|
502 |
|
503 |
if ( isset( $pages_to_show ) && count( $pages_to_show ) < 5 ) {
|
504 |
+
if ( max( $pages_to_show ) - $array['page'] >= 2 ) {
|
505 |
+
$pages_to_show[] = max( $pages_to_show ) + 1;
|
506 |
if ( count( $pages_to_show ) < 5 ) {
|
507 |
+
$pages_to_show[] = max( $pages_to_show ) + 1;
|
508 |
}
|
509 |
+
} elseif ( $array['page'] - min( $pages_to_show ) >= 2 ) {
|
510 |
+
$pages_to_show[] = min( $pages_to_show ) - 1;
|
511 |
if ( count( $pages_to_show ) < 5 ) {
|
512 |
+
$pages_to_show[] = min( $pages_to_show ) - 1;
|
513 |
}
|
514 |
}
|
515 |
}
|
527 |
if ( isset( $array['pages_to_show'] ) ) {
|
528 |
|
529 |
if ( $array['total_pages'] < count( $array['pages_to_show'] ) ) {
|
530 |
+
foreach ( $array['pages_to_show'] as $k => $v ) {
|
531 |
if ( $v > $array['total_pages'] ) unset( $array['pages_to_show'][$k] );
|
532 |
}
|
533 |
}
|
534 |
|
535 |
+
foreach ( $array['pages_to_show'] as $k => $v ) {
|
536 |
+
if ( (int) $v <= 0 ) {
|
537 |
+
unset( $array['pages_to_show'][ $k ] );
|
538 |
}
|
539 |
}
|
540 |
|
includes/core/class-modal.php
CHANGED
@@ -1,14 +1,17 @@
|
|
1 |
<?php
|
2 |
namespace um\core;
|
3 |
|
|
|
4 |
// Exit if accessed directly
|
5 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
6 |
|
|
|
7 |
if ( ! class_exists( 'um\core\Modal' ) ) {
|
8 |
|
9 |
|
10 |
/**
|
11 |
* Class Modal
|
|
|
12 |
* @package um\core
|
13 |
*/
|
14 |
class Modal {
|
@@ -18,17 +21,22 @@ if ( ! class_exists( 'um\core\Modal' ) ) {
|
|
18 |
* Modal constructor.
|
19 |
*/
|
20 |
function __construct() {
|
21 |
-
add_action('wp_footer', array(&$this, 'load_modal_content'), 9);
|
22 |
}
|
23 |
|
24 |
|
25 |
/**
|
26 |
* Load modal content
|
27 |
*/
|
28 |
-
function load_modal_content(){
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
32 |
}
|
33 |
}
|
34 |
|
1 |
<?php
|
2 |
namespace um\core;
|
3 |
|
4 |
+
|
5 |
// Exit if accessed directly
|
6 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
7 |
|
8 |
+
|
9 |
if ( ! class_exists( 'um\core\Modal' ) ) {
|
10 |
|
11 |
|
12 |
/**
|
13 |
* Class Modal
|
14 |
+
*
|
15 |
* @package um\core
|
16 |
*/
|
17 |
class Modal {
|
21 |
* Modal constructor.
|
22 |
*/
|
23 |
function __construct() {
|
24 |
+
add_action( 'wp_footer', array(&$this, 'load_modal_content' ), 9 );
|
25 |
}
|
26 |
|
27 |
|
28 |
/**
|
29 |
* Load modal content
|
30 |
*/
|
31 |
+
function load_modal_content() {
|
32 |
+
|
33 |
+
if ( ! is_admin() ) {
|
34 |
+
$modal_templates = glob( um_path . 'templates/modal/*.php' );
|
35 |
+
|
36 |
+
if ( ! empty( $modal_templates ) ) {
|
37 |
+
foreach ( $modal_templates as $modal_content ) {
|
38 |
+
include_once $modal_content;
|
39 |
+
}
|
40 |
}
|
41 |
}
|
42 |
|
includes/core/class-multisite.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace um\core;
|
3 |
+
|
4 |
+
|
5 |
+
// Exit if accessed directly.
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
7 |
+
|
8 |
+
|
9 |
+
if ( ! class_exists( 'um\core\Multisite' ) ) {
|
10 |
+
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class Multisite
|
14 |
+
*
|
15 |
+
* @package um\core
|
16 |
+
*/
|
17 |
+
class Multisite {
|
18 |
+
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Multisite constructor.
|
22 |
+
*/
|
23 |
+
function __construct() {
|
24 |
+
add_action( 'wpmu_new_blog', array( &$this, 'create_new_blog_old_wp' ), 10, 1 );
|
25 |
+
add_action( 'wp_insert_site', array( &$this, 'create_new_blog' ), 10, 1 );
|
26 |
+
}
|
27 |
+
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Make default UM installation at the new blog if UM is active for network
|
31 |
+
*
|
32 |
+
* is deprecated in WP 5.1
|
33 |
+
*
|
34 |
+
* @param $blog_id
|
35 |
+
*/
|
36 |
+
function create_new_blog_old_wp( $blog_id ) {
|
37 |
+
|
38 |
+
switch_to_blog( $blog_id );
|
39 |
+
UM()->single_site_activation();
|
40 |
+
restore_current_blog();
|
41 |
+
|
42 |
+
}
|
43 |
+
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Make default UM installation at the new blog if UM is active for network
|
47 |
+
* works since 5.1 WP version
|
48 |
+
*
|
49 |
+
* @param \WP_Site $blog
|
50 |
+
*/
|
51 |
+
function create_new_blog( $blog ) {
|
52 |
+
|
53 |
+
switch_to_blog( $blog->blog_id );
|
54 |
+
UM()->single_site_activation();
|
55 |
+
restore_current_blog();
|
56 |
+
|
57 |
+
}
|
58 |
+
|
59 |
+
|
60 |
+
}
|
61 |
+
|
62 |
+
}
|
includes/core/class-password.php
CHANGED
@@ -1,9 +1,11 @@
|
|
1 |
<?php
|
2 |
namespace um\core;
|
3 |
|
|
|
4 |
// Exit if accessed directly
|
5 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
6 |
|
|
|
7 |
if ( ! class_exists( 'um\core\Password' ) ) {
|
8 |
|
9 |
|
@@ -279,7 +281,6 @@ if ( ! class_exists( 'um\core\Password' ) ) {
|
|
279 |
if ( um_is_core_page( 'password-reset' ) && isset( $_REQUEST['act'] ) && $_REQUEST['act'] == 'reset_password' ) {
|
280 |
wp_fix_server_vars();
|
281 |
|
282 |
-
list( $rp_path ) = explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) );
|
283 |
$rp_cookie = 'wp-resetpass-' . COOKIEHASH;
|
284 |
|
285 |
if ( isset( $_GET['hash'] ) ) {
|
@@ -294,11 +295,11 @@ if ( ! class_exists( 'um\core\Password' ) ) {
|
|
294 |
$user = check_password_reset_key( $rp_key, $rp_login );
|
295 |
|
296 |
if ( is_wp_error( $user ) ) {
|
297 |
-
setcookie( $rp_cookie,
|
298 |
wp_redirect( add_query_arg( array( 'updated' => 'invalidkey' ), get_permalink() ) );
|
299 |
} else {
|
300 |
$value = sprintf( '%s:%s', $rp_login, wp_unslash( $_GET['hash'] ) );
|
301 |
-
setcookie( $rp_cookie, $value
|
302 |
wp_safe_redirect( remove_query_arg( array( 'hash', 'user_id' ) ) );
|
303 |
}
|
304 |
|
@@ -313,7 +314,7 @@ if ( ! class_exists( 'um\core\Password' ) ) {
|
|
313 |
}
|
314 |
|
315 |
if ( ( ! $user || is_wp_error( $user ) ) && ! isset( $_GET['updated'] ) ) {
|
316 |
-
setcookie( $rp_cookie,
|
317 |
if ( $user && $user->get_error_code() === 'expired_key' ) {
|
318 |
wp_redirect( add_query_arg( array( 'updated' => 'expiredkey' ), get_permalink() ) );
|
319 |
} else {
|
@@ -573,10 +574,9 @@ if ( ! class_exists( 'um\core\Password' ) ) {
|
|
573 |
|
574 |
if ( isset( $_POST['_um_password_change'] ) && $_POST['_um_password_change'] == 1 ) {
|
575 |
|
576 |
-
list( $rp_path ) = explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) );
|
577 |
$rp_cookie = 'wp-resetpass-' . COOKIEHASH;
|
578 |
-
|
579 |
$user = get_userdata( $args['user_id'] );
|
|
|
580 |
if ( isset( $_COOKIE[ $rp_cookie ] ) && 0 < strpos( $_COOKIE[ $rp_cookie ], ':' ) ) {
|
581 |
list( $rp_login, $rp_key ) = explode( ':', wp_unslash( $_COOKIE[ $rp_cookie ] ), 2 );
|
582 |
|
@@ -593,7 +593,7 @@ if ( ! class_exists( 'um\core\Password' ) ) {
|
|
593 |
}
|
594 |
|
595 |
if ( ! $user || is_wp_error( $user ) ) {
|
596 |
-
setcookie( $rp_cookie,
|
597 |
if ( $user && $user->get_error_code() === 'expired_key' ) {
|
598 |
wp_redirect( add_query_arg( array( 'updated' => 'expiredkey' ), get_permalink() ) );
|
599 |
} else {
|
@@ -616,9 +616,8 @@ if ( ! class_exists( 'um\core\Password' ) ) {
|
|
616 |
|
617 |
if ( ( ! $errors->get_error_code() ) ) {
|
618 |
reset_password( $user, $args['user_password'] );
|
619 |
-
setcookie( $rp_cookie, ' ', time() - YEAR_IN_SECONDS, $rp_path, COOKIE_DOMAIN, is_ssl(), true );
|
620 |
delete_user_meta( $args['user_id'], 'password_rst_attempts' );
|
621 |
-
|
622 |
if ( is_user_logged_in() ) {
|
623 |
wp_logout();
|
624 |
}
|
@@ -648,5 +647,59 @@ if ( ! class_exists( 'um\core\Password' ) ) {
|
|
648 |
}
|
649 |
}
|
650 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
651 |
}
|
652 |
}
|
1 |
<?php
|
2 |
namespace um\core;
|
3 |
|
4 |
+
|
5 |
// Exit if accessed directly
|
6 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
7 |
|
8 |
+
|
9 |
if ( ! class_exists( 'um\core\Password' ) ) {
|
10 |
|
11 |
|
281 |
if ( um_is_core_page( 'password-reset' ) && isset( $_REQUEST['act'] ) && $_REQUEST['act'] == 'reset_password' ) {
|
282 |
wp_fix_server_vars();
|
283 |
|
|
|
284 |
$rp_cookie = 'wp-resetpass-' . COOKIEHASH;
|
285 |
|
286 |
if ( isset( $_GET['hash'] ) ) {
|
295 |
$user = check_password_reset_key( $rp_key, $rp_login );
|
296 |
|
297 |
if ( is_wp_error( $user ) ) {
|
298 |
+
$this->setcookie( $rp_cookie, false );
|
299 |
wp_redirect( add_query_arg( array( 'updated' => 'invalidkey' ), get_permalink() ) );
|
300 |
} else {
|
301 |
$value = sprintf( '%s:%s', $rp_login, wp_unslash( $_GET['hash'] ) );
|
302 |
+
$this->setcookie( $rp_cookie, $value );
|
303 |
wp_safe_redirect( remove_query_arg( array( 'hash', 'user_id' ) ) );
|
304 |
}
|
305 |
|
314 |
}
|
315 |
|
316 |
if ( ( ! $user || is_wp_error( $user ) ) && ! isset( $_GET['updated'] ) ) {
|
317 |
+
$this->setcookie( $rp_cookie, false );
|
318 |
if ( $user && $user->get_error_code() === 'expired_key' ) {
|
319 |
wp_redirect( add_query_arg( array( 'updated' => 'expiredkey' ), get_permalink() ) );
|
320 |
} else {
|
574 |
|
575 |
if ( isset( $_POST['_um_password_change'] ) && $_POST['_um_password_change'] == 1 ) {
|
576 |
|
|
|
577 |
$rp_cookie = 'wp-resetpass-' . COOKIEHASH;
|
|
|
578 |
$user = get_userdata( $args['user_id'] );
|
579 |
+
|
580 |
if ( isset( $_COOKIE[ $rp_cookie ] ) && 0 < strpos( $_COOKIE[ $rp_cookie ], ':' ) ) {
|
581 |
list( $rp_login, $rp_key ) = explode( ':', wp_unslash( $_COOKIE[ $rp_cookie ] ), 2 );
|
582 |
|
593 |
}
|
594 |
|
595 |
if ( ! $user || is_wp_error( $user ) ) {
|
596 |
+
$this->setcookie( $rp_cookie, false );
|
597 |
if ( $user && $user->get_error_code() === 'expired_key' ) {
|
598 |
wp_redirect( add_query_arg( array( 'updated' => 'expiredkey' ), get_permalink() ) );
|
599 |
} else {
|
616 |
|
617 |
if ( ( ! $errors->get_error_code() ) ) {
|
618 |
reset_password( $user, $args['user_password'] );
|
|
|
619 |
delete_user_meta( $args['user_id'], 'password_rst_attempts' );
|
620 |
+
$this->setcookie( $rp_cookie, false );
|
621 |
if ( is_user_logged_in() ) {
|
622 |
wp_logout();
|
623 |
}
|
647 |
}
|
648 |
}
|
649 |
}
|
650 |
+
|
651 |
+
|
652 |
+
/**
|
653 |
+
* Disable page caching and set or clear cookie
|
654 |
+
*
|
655 |
+
* @param string $name
|
656 |
+
* @param string $value
|
657 |
+
* @param int $expire
|
658 |
+
* @param string $path
|
659 |
+
*/
|
660 |
+
public function setcookie( $name, $value = '', $expire = 0, $path = '' ) {
|
661 |
+
if ( empty( $value ) ) {
|
662 |
+
$expire = time() - YEAR_IN_SECONDS;
|
663 |
+
}
|
664 |
+
if ( empty( $path ) ) {
|
665 |
+
list( $path ) = explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) );
|
666 |
+
}
|
667 |
+
|
668 |
+
$levels = ob_get_level();
|
669 |
+
for ( $i = 0; $i < $levels; $i++ ) {
|
670 |
+
@ob_end_clean();
|
671 |
+
}
|
672 |
+
|
673 |
+
nocache_headers();
|
674 |
+
setcookie( $name, $value, $expire, $path, COOKIE_DOMAIN, is_ssl(), true );
|
675 |
+
}
|
676 |
+
|
677 |
+
|
678 |
+
/**
|
679 |
+
* UM Placeholders for reset password
|
680 |
+
*
|
681 |
+
* @param $placeholders
|
682 |
+
*
|
683 |
+
* @return array
|
684 |
+
*/
|
685 |
+
function add_placeholder( $placeholders ) {
|
686 |
+
$placeholders[] = '{password_reset_link}';
|
687 |
+
$placeholders[] = '{password}';
|
688 |
+
return $placeholders;
|
689 |
+
}
|
690 |
+
|
691 |
+
|
692 |
+
/**
|
693 |
+
* UM Replace Placeholders for reset password
|
694 |
+
*
|
695 |
+
* @param $replace_placeholders
|
696 |
+
*
|
697 |
+
* @return array
|
698 |
+
*/
|
699 |
+
function add_replace_placeholder( $replace_placeholders ) {
|
700 |
+
$replace_placeholders[] = um_user( 'password_reset_link' );
|
701 |
+
$replace_placeholders[] = esc_html__( 'Your set password', 'ultimate-member' );
|
702 |
+
return $replace_placeholders;
|
703 |
+
}
|
704 |
}
|
705 |
}
|
includes/core/class-permalinks.php
CHANGED
@@ -133,7 +133,13 @@ if ( ! class_exists( 'um\core\Permalinks' ) ) {
|
|
133 |
//use WP native function for fill $_SERVER variables by correct values
|
134 |
wp_fix_server_vars();
|
135 |
|
136 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
if ( $no_query_params == true ) {
|
139 |
$page_url = strtok( $page_url, '?' );
|
133 |
//use WP native function for fill $_SERVER variables by correct values
|
134 |
wp_fix_server_vars();
|
135 |
|
136 |
+
//check if WP-CLI there isn't set HTTP_HOST, use localhost instead
|
137 |
+
if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
138 |
+
$host = isset( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : 'localhost';
|
139 |
+
} else {
|
140 |
+
$host = $_SERVER['HTTP_HOST'];
|
141 |
+
}
|
142 |
+
$page_url = ( is_ssl() ? 'https://' : 'http://' ) . $host . $_SERVER['REQUEST_URI'];
|
143 |
|
144 |
if ( $no_query_params == true ) {
|
145 |
$page_url = strtok( $page_url, '?' );
|
includes/core/class-plugin-updater.php
CHANGED
@@ -69,7 +69,7 @@ if ( ! class_exists( 'um\core\Plugin_Updater' ) ) {
|
|
69 |
),
|
70 |
'um-messaging/um-messaging.php' => array(
|
71 |
'key' => 'messaging',
|
72 |
-
'title' => '
|
73 |
),
|
74 |
'um-mycred/um-mycred.php' => array(
|
75 |
'key' => 'mycred',
|
@@ -81,7 +81,7 @@ if ( ! class_exists( 'um\core\Plugin_Updater' ) ) {
|
|
81 |
),
|
82 |
'um-notifications/um-notifications.php' => array(
|
83 |
'key' => 'notifications',
|
84 |
-
'title' => 'Notifications',
|
85 |
),
|
86 |
'um-profile-completeness/um-profile-completeness.php' => array(
|
87 |
'key' => 'profile_completeness',
|
@@ -89,7 +89,7 @@ if ( ! class_exists( 'um\core\Plugin_Updater' ) ) {
|
|
89 |
),
|
90 |
'um-reviews/um-reviews.php' => array(
|
91 |
'key' => 'reviews',
|
92 |
-
'title' => 'Reviews',
|
93 |
),
|
94 |
'um-social-activity/um-social-activity.php' => array(
|
95 |
'key' => 'activity',
|
@@ -109,7 +109,7 @@ if ( ! class_exists( 'um\core\Plugin_Updater' ) ) {
|
|
109 |
),
|
110 |
'um-woocommerce/um-woocommerce.php' => array(
|
111 |
'key' => 'woocommerce',
|
112 |
-
'title' => '
|
113 |
),
|
114 |
'um-user-photos/um-user-photos.php' => array(
|
115 |
'key' => 'user_photos',
|
@@ -119,6 +119,26 @@ if ( ! class_exists( 'um\core\Plugin_Updater' ) ) {
|
|
119 |
'key' => 'private_content',
|
120 |
'title' => 'Private Content',
|
121 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
);
|
123 |
|
124 |
$active_um_plugins = array();
|
@@ -186,8 +206,9 @@ if ( ! class_exists( 'um\core\Plugin_Updater' ) ) {
|
|
186 |
function um_checklicenses() {
|
187 |
$exts = $this->um_get_active_plugins();
|
188 |
|
189 |
-
if ( 0 == count( $exts ) )
|
190 |
return;
|
|
|
191 |
|
192 |
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
193 |
|
@@ -198,13 +219,14 @@ if ( ! class_exists( 'um\core\Plugin_Updater' ) ) {
|
|
198 |
);
|
199 |
|
200 |
$api_params['active_extensions'] = array();
|
|
|
201 |
foreach ( $exts as $slug => $data ) {
|
202 |
$plugin_data = get_plugin_data( WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $slug );
|
203 |
|
204 |
-
$api_params['active_extensions'][$slug] = array(
|
205 |
'slug' => $slug,
|
206 |
'license' => $data['license'],
|
207 |
-
'item_name' =>
|
208 |
'version' => $plugin_data['Version']
|
209 |
);
|
210 |
}
|
69 |
),
|
70 |
'um-messaging/um-messaging.php' => array(
|
71 |
'key' => 'messaging',
|
72 |
+
'title' => 'Private Messages',
|
73 |
),
|
74 |
'um-mycred/um-mycred.php' => array(
|
75 |
'key' => 'mycred',
|
81 |
),
|
82 |
'um-notifications/um-notifications.php' => array(
|
83 |
'key' => 'notifications',
|
84 |
+
'title' => 'Real-time Notifications',
|
85 |
),
|
86 |
'um-profile-completeness/um-profile-completeness.php' => array(
|
87 |
'key' => 'profile_completeness',
|
89 |
),
|
90 |
'um-reviews/um-reviews.php' => array(
|
91 |
'key' => 'reviews',
|
92 |
+
'title' => 'User Reviews',
|
93 |
),
|
94 |
'um-social-activity/um-social-activity.php' => array(
|
95 |
'key' => 'activity',
|
109 |
),
|
110 |
'um-woocommerce/um-woocommerce.php' => array(
|
111 |
'key' => 'woocommerce',
|
112 |
+
'title' => 'WooCommerce',
|
113 |
),
|
114 |
'um-user-photos/um-user-photos.php' => array(
|
115 |
'key' => 'user_photos',
|
119 |
'key' => 'private_content',
|
120 |
'title' => 'Private Content',
|
121 |
),
|
122 |
+
'um-user-bookmarks/um-user-bookmarks.php' => array(
|
123 |
+
'key' => 'user_bookmarks',
|
124 |
+
'title' => 'User Bookmarks',
|
125 |
+
),
|
126 |
+
'um-unsplash/um-unsplash.php' => array(
|
127 |
+
'key' => 'unsplash',
|
128 |
+
'title' => 'Unsplash',
|
129 |
+
),
|
130 |
+
'um-user-notes/um-user-notes.php' => array(
|
131 |
+
'key' => 'user_notes',
|
132 |
+
'title' => 'User Notes',
|
133 |
+
),
|
134 |
+
'um-frontend-posting/um-frontend-posting.php' => array(
|
135 |
+
'key' => 'frontend_posting',
|
136 |
+
'title' => 'Frontend Posting',
|
137 |
+
),
|
138 |
+
'um-filesharing/um-filesharing.php' => array(
|
139 |
+
'key' => 'filesharing',
|
140 |
+
'title' => 'File Sharing',
|
141 |
+
),
|
142 |
);
|
143 |
|
144 |
$active_um_plugins = array();
|
206 |
function um_checklicenses() {
|
207 |
$exts = $this->um_get_active_plugins();
|
208 |
|
209 |
+
if ( 0 == count( $exts ) ) {
|
210 |
return;
|
211 |
+
}
|
212 |
|
213 |
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
214 |
|
219 |
);
|
220 |
|
221 |
$api_params['active_extensions'] = array();
|
222 |
+
|
223 |
foreach ( $exts as $slug => $data ) {
|
224 |
$plugin_data = get_plugin_data( WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $slug );
|
225 |
|
226 |
+
$api_params['active_extensions'][ $slug ] = array(
|
227 |
'slug' => $slug,
|
228 |
'license' => $data['license'],
|
229 |
+
'item_name' => $data['title'],
|
230 |
'version' => $plugin_data['Version']
|
231 |
);
|
232 |
}
|
includes/core/class-profile.php
CHANGED
@@ -394,5 +394,36 @@ if ( ! class_exists( 'um\core\Profile' ) ) {
|
|
394 |
|
395 |
<?php
|
396 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
397 |
}
|
398 |
}
|
394 |
|
395 |
<?php
|
396 |
}
|
397 |
+
|
398 |
+
|
399 |
+
/**
|
400 |
+
* UM Placeholders for user link, avatar link
|
401 |
+
*
|
402 |
+
* @param $placeholders
|
403 |
+
*
|
404 |
+
* @return array
|
405 |
+
*/
|
406 |
+
function add_placeholder( $placeholders ) {
|
407 |
+
$placeholders[] = '{user_profile_link}';
|
408 |
+
$placeholders[] = '{user_avatar_url}';
|
409 |
+
$placeholders[] = '{password}';
|
410 |
+
return $placeholders;
|
411 |
+
}
|
412 |
+
|
413 |
+
|
414 |
+
/**
|
415 |
+
* UM Replace Placeholders for user link, avatar link
|
416 |
+
*
|
417 |
+
* @param $replace_placeholders
|
418 |
+
*
|
419 |
+
* @return array
|
420 |
+
*/
|
421 |
+
function add_replace_placeholder( $replace_placeholders ) {
|
422 |
+
$replace_placeholders[] = um_get_user_avatar_url();
|
423 |
+
$replace_placeholders[] = um_user_profile_url();
|
424 |
+
$replace_placeholders[] = esc_html__( 'Your set password', 'ultimate-member' );
|
425 |
+
return $replace_placeholders;
|
426 |
+
}
|
427 |
+
|
428 |
}
|
429 |
}
|
includes/core/class-rest-api.php
DELETED
@@ -1,1160 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace um\core;
|
3 |
-
|
4 |
-
// Exit if accessed directly
|
5 |
-
if ( ! defined( 'ABSPATH' ) ) exit;
|
6 |
-
|
7 |
-
if ( ! class_exists( 'um\core\REST_API' ) ) {
|
8 |
-
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Class REST_API
|
12 |
-
* @package um\core
|
13 |
-
*/
|
14 |
-
class REST_API {
|
15 |
-
|
16 |
-
/**
|
17 |
-
*
|
18 |
-
*/
|
19 |
-
const VERSION = '1.0';
|
20 |
-
|
21 |
-
|
22 |
-
/**
|
23 |
-
* @var bool|int|null
|
24 |
-
*/
|
25 |
-
private $pretty_print = false;
|
26 |
-
|
27 |
-
|
28 |
-
/**
|
29 |
-
* @var bool|mixed|void
|
30 |
-
*/
|
31 |
-
public $log_requests = true;
|
32 |
-
|
33 |
-
|
34 |
-
/**
|
35 |
-
* @var bool
|
36 |
-
*/
|
37 |
-
private $is_valid_request = false;
|
38 |
-
|
39 |
-
|
40 |
-
/**
|
41 |
-
* @var int
|
42 |
-
*/
|
43 |
-
private $user_id = 0;
|
44 |
-
|
45 |
-
|
46 |
-
/**
|
47 |
-
* @var
|
48 |
-
*/
|
49 |
-
private $stats;
|
50 |
-
|
51 |
-
|
52 |
-
/**
|
53 |
-
* @var array
|
54 |
-
*/
|
55 |
-
private $data = array();
|
56 |
-
|
57 |
-
|
58 |
-
/**
|
59 |
-
* @var bool
|
60 |
-
*/
|
61 |
-
private $override = true;
|
62 |
-
|
63 |
-
|
64 |
-
/**
|
65 |
-
* REST_API constructor.
|
66 |
-
*/
|
67 |
-
public function __construct() {
|
68 |
-
|
69 |
-
add_action( 'init', array( $this, 'add_endpoint' ) );
|
70 |
-
add_action( 'template_redirect', array( $this, 'process_query' ), -1 );
|
71 |
-
add_filter( 'query_vars', array( $this, 'query_vars' ) );
|
72 |
-
|
73 |
-
//add_filter( 'um_user_profile_additional_fields', array( $this, 'user_key_field' ), 3, 2 );
|
74 |
-
|
75 |
-
//add_action( 'personal_options_update', array( $this, 'update_key' ) );
|
76 |
-
//add_action( 'edit_user_profile_update', array( $this, 'update_key' ) );
|
77 |
-
|
78 |
-
// Determine if JSON_PRETTY_PRINT is available
|
79 |
-
$this->pretty_print = defined( 'JSON_PRETTY_PRINT' ) ? JSON_PRETTY_PRINT : null;
|
80 |
-
|
81 |
-
/**
|
82 |
-
* UM hook
|
83 |
-
*
|
84 |
-
* @type filter
|
85 |
-
* @title um_api_log_requests
|
86 |
-
* @description Allow API request logging to be turned off
|
87 |
-
* @input_vars
|
88 |
-
* [{"var":"$allow_log","type":"bool","desc":"Enable api logs"}]
|
89 |
-
* @change_log
|
90 |
-
* ["Since: 2.0"]
|
91 |
-
* @usage
|
92 |
-
* <?php add_filter( 'um_api_log_requests', 'function_name', 10, 1 ); ?>
|
93 |
-
* @example
|
94 |
-
* <?php
|
95 |
-
* add_filter( 'um_api_log_requests', 'my_api_log_requests', 10, 1 );
|
96 |
-
* function my_api_log_requests( $allow_log ) {
|
97 |
-
* // your code here
|
98 |
-
* return $allow_log;
|
99 |
-
* }
|
100 |
-
* ?>
|
101 |
-
*/
|
102 |
-
$this->log_requests = apply_filters( 'um_api_log_requests', $this->log_requests );
|
103 |
-
}
|
104 |
-
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Registers a new rewrite endpoint for accessing the API
|
108 |
-
*
|
109 |
-
* @param $rewrite_rules
|
110 |
-
*/
|
111 |
-
public function add_endpoint( $rewrite_rules ) {
|
112 |
-
add_rewrite_endpoint( 'um-api', EP_ALL );
|
113 |
-
}
|
114 |
-
|
115 |
-
|
116 |
-
/**
|
117 |
-
* Registers query vars for API access
|
118 |
-
*
|
119 |
-
* @param $vars
|
120 |
-
*
|
121 |
-
* @return array
|
122 |
-
*/
|
123 |
-
public function query_vars( $vars ) {
|
124 |
-
|
125 |
-
$vars[] = 'key';
|
126 |
-
$vars[] = 'token';
|
127 |
-
$vars[] = 'format';
|
128 |
-
$vars[] = 'query';
|
129 |
-
$vars[] = 'type';
|
130 |
-
$vars[] = 'data';
|
131 |
-
$vars[] = 'fields';
|
132 |
-
$vars[] = 'value';
|
133 |
-
$vars[] = 'number';
|
134 |
-
$vars[] = 'id';
|
135 |
-
$vars[] = 'email';
|
136 |
-
$vars[] = 'orderby';
|
137 |
-
$vars[] = 'order';
|
138 |
-
$vars[] = 'include';
|
139 |
-
$vars[] = 'exclude';
|
140 |
-
|
141 |
-
$this->vars = $vars;
|
142 |
-
|
143 |
-
return $vars;
|
144 |
-
}
|
145 |
-
|
146 |
-
|
147 |
-
/**
|
148 |
-
* Validate the API request
|
149 |
-
*/
|
150 |
-
private function validate_request() {
|
151 |
-
global $wp_query;
|
152 |
-
|
153 |
-
$this->override = false;
|
154 |
-
|
155 |
-
// Make sure we have both user and api key
|
156 |
-
if ( ! empty( $wp_query->query_vars['um-api'] ) ) {
|
157 |
-
|
158 |
-
if ( empty( $wp_query->query_vars['token'] ) || empty( $wp_query->query_vars['key'] ) )
|
159 |
-
$this->missing_auth();
|
160 |
-
|
161 |
-
// Retrieve the user by public API key and ensure they exist
|
162 |
-
if ( ! ( $user = $this->get_user( $wp_query->query_vars['key'] ) ) ) :
|
163 |
-
$this->invalid_key();
|
164 |
-
else :
|
165 |
-
$token = urldecode( $wp_query->query_vars['token'] );
|
166 |
-
$secret = get_user_meta( $user, 'um_user_secret_key', true );
|
167 |
-
$public = urldecode( $wp_query->query_vars['key'] );
|
168 |
-
|
169 |
-
if ( hash_equals( md5( $secret . $public ), $token ) )
|
170 |
-
$this->is_valid_request = true;
|
171 |
-
else
|
172 |
-
$this->invalid_auth();
|
173 |
-
endif;
|
174 |
-
}
|
175 |
-
}
|
176 |
-
|
177 |
-
|
178 |
-
/**
|
179 |
-
* Retrieve the user ID based on the public key provided
|
180 |
-
*
|
181 |
-
* @param string $key
|
182 |
-
*
|
183 |
-
* @return bool|mixed|null|string
|
184 |
-
*/
|
185 |
-
public function get_user( $key = '' ) {
|
186 |
-
global $wpdb, $wp_query;
|
187 |
-
|
188 |
-
if( empty( $key ) )
|
189 |
-
$key = urldecode( $wp_query->query_vars['key'] );
|
190 |
-
|
191 |
-
if ( empty( $key ) ) {
|
192 |
-
return false;
|
193 |
-
}
|
194 |
-
|
195 |
-
$user = get_transient( md5( 'um_api_user_' . $key ) );
|
196 |
-
|
197 |
-
if ( false === $user ) {
|
198 |
-
$user = $wpdb->get_var( $wpdb->prepare( "SELECT user_id FROM $wpdb->usermeta WHERE meta_key = 'um_user_public_key' AND meta_value = %s LIMIT 1", $key ) );
|
199 |
-
set_transient( md5( 'um_api_user_' . $key ) , $user, DAY_IN_SECONDS );
|
200 |
-
}
|
201 |
-
|
202 |
-
if ( $user != NULL ) {
|
203 |
-
$this->user_id = $user;
|
204 |
-
return $user;
|
205 |
-
}
|
206 |
-
|
207 |
-
return false;
|
208 |
-
}
|
209 |
-
|
210 |
-
|
211 |
-
/**
|
212 |
-
* Displays a missing authentication error if all the parameters aren't
|
213 |
-
* provided
|
214 |
-
*/
|
215 |
-
private function missing_auth() {
|
216 |
-
$error = array();
|
217 |
-
$error['error'] = __( 'You must specify both a token and API key!', 'ultimate-member' );
|
218 |
-
|
219 |
-
$this->data = $error;
|
220 |
-
$this->output( 401 );
|
221 |
-
}
|
222 |
-
|
223 |
-
|
224 |
-
/**
|
225 |
-
* Displays an authentication failed error if the user failed to provide valid credentials
|
226 |
-
*/
|
227 |
-
private function invalid_auth() {
|
228 |
-
$error = array();
|
229 |
-
$error['error'] = __( 'Your request could not be authenticated', 'ultimate-member' );
|
230 |
-
|
231 |
-
$this->data = $error;
|
232 |
-
$this->output( 401 );
|
233 |
-
}
|
234 |
-
|
235 |
-
|
236 |
-
/**
|
237 |
-
* Displays an invalid API key error if the API key provided couldn't be validated
|
238 |
-
*/
|
239 |
-
private function invalid_key() {
|
240 |
-
$error = array();
|
241 |
-
$error['error'] = __( 'Invalid API key', 'ultimate-member' );
|
242 |
-
|
243 |
-
$this->data = $error;
|
244 |
-
$this->output( 401 );
|
245 |
-
}
|
246 |
-
|
247 |
-
|
248 |
-
/**
|
249 |
-
* Listens for the API and then processes the API requests
|
250 |
-
*/
|
251 |
-
public function process_query() {
|
252 |
-
global $wp_query;
|
253 |
-
|
254 |
-
// Check for um-api var. Get out if not present
|
255 |
-
if ( ! isset( $wp_query->query_vars['um-api'] ) )
|
256 |
-
return;
|
257 |
-
|
258 |
-
// Check for a valid user and set errors if necessary
|
259 |
-
$this->validate_request();
|
260 |
-
|
261 |
-
// Only proceed if no errors have been noted
|
262 |
-
if( ! $this->is_valid_request )
|
263 |
-
return;
|
264 |
-
|
265 |
-
if( ! defined( 'UM_DOING_API' ) ) {
|
266 |
-
define( 'UM_DOING_API', true );
|
267 |
-
}
|
268 |
-
|
269 |
-
// Determine the kind of query
|
270 |
-
$args = array();
|
271 |
-
$query_mode = $this->get_query_mode();
|
272 |
-
foreach( $this->vars as $k ) {
|
273 |
-
$args[ $k ] = isset( $wp_query->query_vars[ $k ] ) ? $wp_query->query_vars[ $k ] : null;
|
274 |
-
}
|
275 |
-
|
276 |
-
$data = array();
|
277 |
-
|
278 |
-
switch( $query_mode ) {
|
279 |
-
|
280 |
-
case 'get.stats':
|
281 |
-
$data = $this->get_stats( $args );
|
282 |
-
break;
|
283 |
-
|
284 |
-
case 'get.users':
|
285 |
-
$data = $this->get_users( $args );
|
286 |
-
break;
|
287 |
-
|
288 |
-
case 'get.user':
|
289 |
-
$data = $this->get_auser( $args );
|
290 |
-
break;
|
291 |
-
|
292 |
-
case 'update.user':
|
293 |
-
$data = $this->update_user( $args );
|
294 |
-
break;
|
295 |
-
|
296 |
-
case 'delete.user':
|
297 |
-
$data = $this->delete_user( $args );
|
298 |
-
break;
|
299 |
-
|
300 |
-
default:
|
301 |
-
/**
|
302 |
-
* UM hook
|
303 |
-
*
|
304 |
-
* @type filter
|
305 |
-
* @title um_rest_query_mode
|
306 |
-
* @description Change query attributes
|
307 |
-
* @input_vars
|
308 |
-
* [{"var":"$data","type":"array","desc":"Query Data"},
|
309 |
-
* {"var":"$query_mode","type":"string","desc":"Query Mode"},
|
310 |
-
* {"var":"$args","type":"array","desc":"Query Arguments"}]
|
311 |
-
* @change_log
|
312 |
-
* ["Since: 2.0"]
|
313 |
-
* @usage
|
314 |
-
* <?php add_filter( 'um_rest_query_mode', 'function_name', 10, 3 ); ?>
|
315 |
-
* @example
|
316 |
-
* <?php
|
317 |
-
* add_filter( 'um_rest_query_mode', 'my_rest_query_mode', 10, 3 );
|
318 |
-
* function um_rest_query_mode( $data, $query_mode, $args ) {
|
319 |
-
* // your code here
|
320 |
-
* return $data;
|
321 |
-
* }
|
322 |
-
* ?>
|
323 |
-
*/
|
324 |
-
$data = apply_filters( 'um_rest_query_mode', $data, $query_mode, $args );
|
325 |
-
}
|
326 |
-
|
327 |
-
/**
|
328 |
-
* UM hook
|
329 |
-
*
|
330 |
-
* @type filter
|
331 |
-
* @title um_api_output_data
|
332 |
-
* @description Change output data for Rest API call
|
333 |
-
* @input_vars
|
334 |
-
* [{"var":"$data","type":"array","desc":"Output Data"},
|
335 |
-
* {"var":"$query_mode","type":"string","desc":"Query Mode"},
|
336 |
-
* {"var":"$api_class","type":"REST_API","desc":"REST_API instance"}]
|
337 |
-
* @change_log
|
338 |
-
* ["Since: 2.0"]
|
339 |
-
* @usage
|
340 |
-
* <?php add_filter( 'um_api_output_data', 'function_name', 10, 3 ); ?>
|
341 |
-
* @example
|
342 |
-
* <?php
|
343 |
-
* add_filter( 'um_api_output_data', 'my_api_output_data', 10, 3 );
|
344 |
-
* function my_api_output_data( $data, $query_mode, $api_class ) {
|
345 |
-
* // your code here
|
346 |
-
* return $data;
|
347 |
-
* }
|
348 |
-
* ?>
|
349 |
-
*/
|
350 |
-
$this->data = apply_filters( 'um_api_output_data', $data, $query_mode, $this );
|
351 |
-
|
352 |
-
// Log this API request, if enabled. We log it here because we have access to errors.
|
353 |
-
$this->log_request( $this->data );
|
354 |
-
|
355 |
-
// Send out data to the output function
|
356 |
-
$this->output();
|
357 |
-
}
|
358 |
-
|
359 |
-
|
360 |
-
/**
|
361 |
-
* Get some stats
|
362 |
-
*
|
363 |
-
* @param $args
|
364 |
-
*
|
365 |
-
* @return array|mixed|void
|
366 |
-
*/
|
367 |
-
public function get_stats( $args ) {
|
368 |
-
global $wpdb;
|
369 |
-
extract( $args );
|
370 |
-
|
371 |
-
$response = array();
|
372 |
-
|
373 |
-
$query = "SELECT COUNT(*) FROM {$wpdb->prefix}users";
|
374 |
-
$count = absint( $wpdb->get_var($query) );
|
375 |
-
$response['stats']['total_users'] = $count;
|
376 |
-
|
377 |
-
$pending = UM()->user()->get_pending_users_count();
|
378 |
-
$response['stats']['pending_users'] = absint( $pending );
|
379 |
-
|
380 |
-
/**
|
381 |
-
* UM hook
|
382 |
-
*
|
383 |
-
* @type filter
|
384 |
-
* @title um_rest_api_get_stats
|
385 |
-
* @description Change output data for Rest API get stats call
|
386 |
-
* @input_vars
|
387 |
-
* [{"var":"$response","type":"array","desc":"Output Data"}]
|
388 |
-
* @change_log
|
389 |
-
* ["Since: 2.0"]
|
390 |
-
* @usage
|
391 |
-
* <?php add_filter( 'um_rest_api_get_stats', 'function_name', 10, 1 ); ?>
|
392 |
-
* @example
|
393 |
-
* <?php
|
394 |
-
* add_filter( 'um_rest_api_get_stats', 'my_rest_api_get_stats', 10, 1 );
|
395 |
-
* function my_rest_api_get_stats( $response ) {
|
396 |
-
* // your code here
|
397 |
-
* return $response;
|
398 |
-
* }
|
399 |
-
* ?>
|
400 |
-
*/
|
401 |
-
$response = apply_filters( 'um_rest_api_get_stats', $response );
|
402 |
-
return $response;
|
403 |
-
}
|
404 |
-
|
405 |
-
|
406 |
-
/**
|
407 |
-
* Update user API query
|
408 |
-
*
|
409 |
-
* @param $args
|
410 |
-
*
|
411 |
-
* @return array
|
412 |
-
*/
|
413 |
-
public function update_user( $args ) {
|
414 |
-
extract( $args );
|
415 |
-
|
416 |
-
$response = array();
|
417 |
-
$error = array();
|
418 |
-
|
419 |
-
if ( !$id ) {
|
420 |
-
$error['error'] = __('You must provide a user ID','ultimate-member');
|
421 |
-
return $error;
|
422 |
-
}
|
423 |
-
|
424 |
-
if ( !$data ) {
|
425 |
-
$error['error'] = __('You need to provide data to update','ultimate-member');
|
426 |
-
return $error;
|
427 |
-
}
|
428 |
-
|
429 |
-
um_fetch_user( $id );
|
430 |
-
|
431 |
-
switch ( $data ) {
|
432 |
-
case 'status':
|
433 |
-
UM()->user()->set_status( $value );
|
434 |
-
$response['success'] = __('User status has been changed.','ultimate-member');
|
435 |
-
break;
|
436 |
-
case 'role':
|
437 |
-
$wp_user_object = new \WP_User( $id );
|
438 |
-
$old_roles = $wp_user_object->roles;
|
439 |
-
$wp_user_object->set_role( $value );
|
440 |
-
|
441 |
-
/**
|
442 |
-
* UM hook
|
443 |
-
*
|
444 |
-
* @type action
|
445 |
-
* @title um_after_member_role_upgrade
|
446 |
-
* @description Action after user role was changed
|
447 |
-
* @input_vars
|
448 |
-
* [{"var":"$new_roles","type":"array","desc":"New User Roles"},
|
449 |
-
* {"var":"$old_roles","type":"array","desc":"Old roles"}]
|
450 |
-
* @change_log
|
451 |
-
* ["Since: 2.0"]
|
452 |
-
* @usage add_action( 'um_after_member_role_upgrade', 'function_name', 10, 2 );
|
453 |
-
* @example
|
454 |
-
* <?php
|
455 |
-
* add_action( 'um_after_member_role_upgrade', 'my_after_member_role_upgrade', 10, 2 );
|
456 |
-
* function my_after_member_role_upgrade( $new_roles, $old_roles ) {
|
457 |
-
* // your code here
|
458 |
-
* }
|
459 |
-
* ?>
|
460 |
-
*/
|
461 |
-
do_action( 'um_after_member_role_upgrade', array( $value ), $old_roles, $id );
|
462 |
-
|
463 |
-
$response['success'] = __( 'User role has been changed.', 'ultimate-member' );
|
464 |
-
break;
|
465 |
-
default:
|
466 |
-
update_user_meta( $id, $data, esc_attr( $value ) );
|
467 |
-
$response['success'] = __('User meta has been changed.','ultimate-member');
|
468 |
-
break;
|
469 |
-
}
|
470 |
-
|
471 |
-
return $response;
|
472 |
-
}
|
473 |
-
|
474 |
-
|
475 |
-
/**
|
476 |
-
* Process Get users API Request
|
477 |
-
*
|
478 |
-
* @param $args
|
479 |
-
*
|
480 |
-
* @return array
|
481 |
-
*/
|
482 |
-
public function get_users( $args ) {
|
483 |
-
extract( $args );
|
484 |
-
|
485 |
-
$response = array();
|
486 |
-
$error = array();
|
487 |
-
|
488 |
-
if ( !$number )
|
489 |
-
$number = 10;
|
490 |
-
|
491 |
-
if ( !$orderby )
|
492 |
-
$orderby = 'user_registered';
|
493 |
-
|
494 |
-
if ( !$order )
|
495 |
-
$order = 'desc';
|
496 |
-
|
497 |
-
$loop_a = array('number' => $number, 'orderby' => $orderby, 'order' => $order );
|
498 |
-
|
499 |
-
if ( $include ) {
|
500 |
-
$include = explode(',', $include );
|
501 |
-
$loop_a['include'] = $include;
|
502 |
-
}
|
503 |
-
|
504 |
-
if ( $exclude ) {
|
505 |
-
$exclude = explode(',', $exclude );
|
506 |
-
$loop_a['exclude'] = $exclude;
|
507 |
-
}
|
508 |
-
|
509 |
-
$loop = get_users( $loop_a );
|
510 |
-
|
511 |
-
foreach( $loop as $user ) {
|
512 |
-
|
513 |
-
unset( $user->data->user_status );
|
514 |
-
unset( $user->data->user_activation_key );
|
515 |
-
unset( $user->data->user_pass );
|
516 |
-
|
517 |
-
um_fetch_user( $user->ID );
|
518 |
-
|
519 |
-
foreach( $user as $key => $val ) {
|
520 |
-
if ( $key != 'data' ) continue;
|
521 |
-
if ( $key == 'data' ) {
|
522 |
-
$key = 'profile';
|
523 |
-
$val->roles = $user->roles;
|
524 |
-
$val->first_name = um_user('first_name');
|
525 |
-
$val->last_name = um_user('last_name');
|
526 |
-
$val->account_status = um_user('account_status');
|
527 |
-
$val->profile_pic_original = um_get_user_avatar_url('', 'original');
|
528 |
-
$val->profile_pic_normal = um_get_user_avatar_url('', 200);
|
529 |
-
$val->profile_pic_small = um_get_user_avatar_url('', 40);
|
530 |
-
$val->cover_photo = $this->getsrc( um_user('cover_photo', 1000) );
|
531 |
-
|
532 |
-
/**
|
533 |
-
* UM hook
|
534 |
-
*
|
535 |
-
* @type filter
|
536 |
-
* @title um_rest_userdata
|
537 |
-
* @description Change output data for Rest API userdata call
|
538 |
-
* @input_vars
|
539 |
-
* [{"var":"$value","type":"array","desc":"Output Data"},
|
540 |
-
* {"var":"$user_id","type":"string","desc":"User ID"}]
|
541 |
-
* @change_log
|
542 |
-
* ["Since: 2.0"]
|
543 |
-
* @usage
|
544 |
-
* <?php add_filter( 'um_rest_userdata', 'function_name', 10, 2 ); ?>
|
545 |
-
* @example
|
546 |
-
* <?php
|
547 |
-
* add_filter( 'um_rest_userdata', 'my_rest_userdata', 10, 2 );
|
548 |
-
* function my_rest_userdata( $value, $user_id ) {
|
549 |
-
* // your code here
|
550 |
-
* return $value;
|
551 |
-
* }
|
552 |
-
* ?>
|
553 |
-
*/
|
554 |
-
$val = apply_filters( 'um_rest_userdata', $val, $user->ID );
|
555 |
-
}
|
556 |
-
$response[ $user->ID ] = $val;
|
557 |
-
}
|
558 |
-
|
559 |
-
}
|
560 |
-
|
561 |
-
return $response;
|
562 |
-
}
|
563 |
-
|
564 |
-
|
565 |
-
/**
|
566 |
-
* Process delete user via API
|
567 |
-
*
|
568 |
-
* @param $args
|
569 |
-
*
|
570 |
-
* @return array
|
571 |
-
*/
|
572 |
-
public function delete_user( $args ) {
|
573 |
-
extract( $args );
|
574 |
-
|
575 |
-
$response = array();
|
576 |
-
$error = array();
|
577 |
-
|
578 |
-
if ( !isset( $id ) ) {
|
579 |
-
$error['error'] = __('You must provide a user ID','ultimate-member');
|
580 |
-
return $error;
|
581 |
-
}
|
582 |
-
|
583 |
-
$user = get_userdata( $id );
|
584 |
-
if ( !$user ) {
|
585 |
-
$error['error'] = __('Invalid user specified','ultimate-member');
|
586 |
-
return $error;
|
587 |
-
}
|
588 |
-
|
589 |
-
um_fetch_user( $id );
|
590 |
-
UM()->user()->delete();
|
591 |
-
|
592 |
-
$response['success'] = __('User has been successfully deleted.','ultimate-member');
|
593 |
-
|
594 |
-
return $response;
|
595 |
-
}
|
596 |
-
|
597 |
-
|
598 |
-
/**
|
599 |
-
* Process Get user API Request
|
600 |
-
*
|
601 |
-
* @param $args
|
602 |
-
*
|
603 |
-
* @return array|mixed|void
|
604 |
-
*/
|
605 |
-
public function get_auser( $args ) {
|
606 |
-
extract( $args );
|
607 |
-
|
608 |
-
$response = array();
|
609 |
-
$error = array();
|
610 |
-
|
611 |
-
if ( !isset( $id ) ) {
|
612 |
-
$error['error'] = __('You must provide a user ID','ultimate-member');
|
613 |
-
return $error;
|
614 |
-
}
|
615 |
-
|
616 |
-
$user = get_userdata( $id );
|
617 |
-
if ( ! $user ) {
|
618 |
-
$error['error'] = __('Invalid user specified','ultimate-member');
|
619 |
-
return $error;
|
620 |
-
}
|
621 |
-
|
622 |
-
unset( $user->data->user_status );
|
623 |
-
unset( $user->data->user_activation_key );
|
624 |
-
unset( $user->data->user_pass );
|
625 |
-
|
626 |
-
um_fetch_user( $user->ID );
|
627 |
-
|
628 |
-
if ( isset( $fields ) && $fields ) {
|
629 |
-
$fields = explode(',', $fields );
|
630 |
-
$response['ID'] = $user->ID;
|
631 |
-
$response['username'] = $user->user_login;
|
632 |
-
foreach ( $fields as $field ) {
|
633 |
-
|
634 |
-
switch( $field ) {
|
635 |
-
|
636 |
-
default:
|
637 |
-
$response[ $field ] = ( um_profile( $field ) ) ? um_profile( $field ) : '';
|
638 |
-
|
639 |
-
/**
|
640 |
-
* UM hook
|
641 |
-
*
|
642 |
-
* @type filter
|
643 |
-
* @title um_rest_get_auser
|
644 |
-
* @description Change output data for Rest API user authentification call
|
645 |
-
* @input_vars
|
646 |
-
* [{"var":"$response","type":"array","desc":"Output Data"},
|
647 |
-
* {"var":"$field","type":"string","desc":"Field Key"},
|
648 |
-
* {"var":"$user_id","type":"int","desc":"User ID"}]
|
649 |
-
* @change_log
|
650 |
-
* ["Since: 2.0"]
|
651 |
-
* @usage
|
652 |
-
* <?php add_filter( 'um_rest_get_auser', 'function_name', 10, 3 ); ?>
|
653 |
-
* @example
|
654 |
-
* <?php
|
655 |
-
* add_filter( 'um_rest_get_auser', 'my_rest_get_auser', 10, 3 );
|
656 |
-
* function my_rest_get_auser( $response, $field, $user_id ) {
|
657 |
-
* // your code here
|
658 |
-
* return $response;
|
659 |
-
* }
|
660 |
-
* ?>
|
661 |
-
*/
|
662 |
-
$response = apply_filters( 'um_rest_get_auser', $response, $field, $user->ID );
|
663 |
-
break;
|
664 |
-
|
665 |
-
case 'cover_photo':
|
666 |
-
$response['cover_photo'] = $this->getsrc( um_user('cover_photo', 1000) );
|
667 |
-
break;
|
668 |
-
|
669 |
-
case 'profile_pic':
|
670 |
-
$response['profile_pic_original'] = um_get_user_avatar_url('', 'original');
|
671 |
-
$response['profile_pic_normal'] = um_get_user_avatar_url('', 200);
|
672 |
-
$response['profile_pic_small'] = um_get_user_avatar_url('', 40);
|
673 |
-
break;
|
674 |
-
|
675 |
-
case 'status':
|
676 |
-
$response['status'] = um_user('account_status');
|
677 |
-
break;
|
678 |
-
|
679 |
-
case 'role':
|
680 |
-
//get priority role here
|
681 |
-
$response['role'] = um_user( 'role' );
|
682 |
-
break;
|
683 |
-
|
684 |
-
case 'email':
|
685 |
-
case 'user_email':
|
686 |
-
$response['email'] = um_user('user_email');
|
687 |
-
break;
|
688 |
-
|
689 |
-
}
|
690 |
-
|
691 |
-
}
|
692 |
-
} else {
|
693 |
-
|
694 |
-
foreach( $user as $key => $val ) {
|
695 |
-
if ( $key != 'data' ) continue;
|
696 |
-
if ( $key == 'data' ) {
|
697 |
-
$key = 'profile';
|
698 |
-
$val->roles = $user->roles;
|
699 |
-
$val->first_name = um_user('first_name');
|
700 |
-
$val->last_name = um_user('last_name');
|
701 |
-
$val->account_status = um_user('account_status');
|
702 |
-
$val->profile_pic_original = um_get_user_avatar_url('', 'original');
|
703 |
-
$val->profile_pic_normal = um_get_user_avatar_url('', 200);
|
704 |
-
$val->profile_pic_small = um_get_user_avatar_url('', 40);
|
705 |
-
$val->cover_photo = $this->getsrc( um_user('cover_photo', 1000) );
|
706 |
-
|
707 |
-
/**
|
708 |
-
* UM hook
|
709 |
-
*
|
710 |
-
* @type filter
|
711 |
-
* @title um_rest_userdata
|
712 |
-
* @description Change output data for Rest API userdata call
|
713 |
-
* @input_vars
|
714 |
-
* [{"var":"$value","type":"array","desc":"Output Data"},
|
715 |
-
* {"var":"$user_id","type":"string","desc":"User ID"}]
|
716 |
-
* @change_log
|
717 |
-
* ["Since: 2.0"]
|
718 |
-
* @usage
|
719 |
-
* <?php add_filter( 'um_rest_userdata', 'function_name', 10, 2 ); ?>
|
720 |
-
* @example
|
721 |
-
* <?php
|
722 |
-
* add_filter( 'um_rest_userdata', 'my_rest_userdata', 10, 2 );
|
723 |
-
* function my_rest_userdata( $value, $user_id ) {
|
724 |
-
* // your code here
|
725 |
-
* return $value;
|
726 |
-
* }
|
727 |
-
* ?>
|
728 |
-
*/
|
729 |
-
$val = apply_filters( 'um_rest_userdata', $val, $user->ID );
|
730 |
-
}
|
731 |
-
$response = $val;
|
732 |
-
}
|
733 |
-
|
734 |
-
}
|
735 |
-
|
736 |
-
return $response;
|
737 |
-
}
|
738 |
-
|
739 |
-
|
740 |
-
/**
|
741 |
-
* Get source
|
742 |
-
*
|
743 |
-
* @param $image
|
744 |
-
*
|
745 |
-
* @return string
|
746 |
-
*/
|
747 |
-
public function getsrc( $image ) {
|
748 |
-
if (preg_match('/<img.+?src(?: )*=(?: )*[\'"](.*?)[\'"]/si', $image, $arrResult)) {
|
749 |
-
return $arrResult[1];
|
750 |
-
}
|
751 |
-
return '';
|
752 |
-
}
|
753 |
-
|
754 |
-
|
755 |
-
/**
|
756 |
-
* Determines the kind of query requested and also ensure it is a valid query
|
757 |
-
*
|
758 |
-
* @return null
|
759 |
-
*/
|
760 |
-
public function get_query_mode() {
|
761 |
-
global $wp_query;
|
762 |
-
|
763 |
-
/**
|
764 |
-
* UM hook
|
765 |
-
*
|
766 |
-
* @type filter
|
767 |
-
* @title um_api_valid_query_modes
|
768 |
-
* @description Whitelist UM query options
|
769 |
-
* @input_vars
|
770 |
-
* [{"var":"$list","type":"array","desc":"Whitelist"}]
|
771 |
-
* @change_log
|
772 |
-
* ["Since: 2.0"]
|
773 |
-
* @usage
|
774 |
-
* <?php add_filter( 'um_api_valid_query_modes', 'function_name', 10, 1 ); ?>
|
775 |
-
* @example
|
776 |
-
* <?php
|
777 |
-
* add_filter( 'um_api_valid_query_modes', 'my_api_valid_query_modes', 10, 1 );
|
778 |
-
* function my_api_valid_query_modes( $list ) {
|
779 |
-
* // your code here
|
780 |
-
* return $list;
|
781 |
-
* }
|
782 |
-
* ?>
|
783 |
-
*/
|
784 |
-
$accepted = apply_filters( 'um_api_valid_query_modes', array(
|
785 |
-
'get.users',
|
786 |
-
'get.user',
|
787 |
-
'update.user',
|
788 |
-
'delete.user',
|
789 |
-
'get.following',
|
790 |
-
'get.followers',
|
791 |
-
'get.stats',
|
792 |
-
) );
|
793 |
-
|
794 |
-
$query = isset( $wp_query->query_vars['um-api'] ) ? $wp_query->query_vars['um-api'] : null;
|
795 |
-
$error = array();
|
796 |
-
// Make sure our query is valid
|
797 |
-
if ( ! in_array( $query, $accepted ) ) {
|
798 |
-
$error['error'] = __( 'Invalid query!', 'ultimate-member' );
|
799 |
-
|
800 |
-
$this->data = $error;
|
801 |
-
$this->output();
|
802 |
-
}
|
803 |
-
|
804 |
-
return $query;
|
805 |
-
}
|
806 |
-
|
807 |
-
|
808 |
-
/**
|
809 |
-
* Get page number
|
810 |
-
*/
|
811 |
-
public function get_paged() {
|
812 |
-
global $wp_query;
|
813 |
-
|
814 |
-
return isset( $wp_query->query_vars['page'] ) ? $wp_query->query_vars['page'] : 1;
|
815 |
-
}
|
816 |
-
|
817 |
-
|
818 |
-
/**
|
819 |
-
* Retrieve the output format
|
820 |
-
*/
|
821 |
-
public function get_output_format() {
|
822 |
-
global $wp_query;
|
823 |
-
|
824 |
-
$format = isset( $wp_query->query_vars['format'] ) ? $wp_query->query_vars['format'] : 'json';
|
825 |
-
|
826 |
-
/**
|
827 |
-
* UM hook
|
828 |
-
*
|
829 |
-
* @type filter
|
830 |
-
* @title um_api_output_format
|
831 |
-
* @description UM Rest API output format
|
832 |
-
* @input_vars
|
833 |
-
* [{"var":"$format","type":"string","desc":"Format"}]
|
834 |
-
* @change_log
|
835 |
-
* ["Since: 2.0"]
|
836 |
-
* @usage
|
837 |
-
* <?php add_filter( 'um_api_output_format', 'function_name', 10, 1 ); ?>
|
838 |
-
* @example
|
839 |
-
* <?php
|
840 |
-
* add_filter( 'um_api_output_format', 'my_api_output_format', 10, 1 );
|
841 |
-
* function my_api_output_format( $format ) {
|
842 |
-
* // your code here
|
843 |
-
* return $format;
|
844 |
-
* }
|
845 |
-
* ?>
|
846 |
-
*/
|
847 |
-
return apply_filters( 'um_api_output_format', $format );
|
848 |
-
}
|
849 |
-
|
850 |
-
|
851 |
-
/**
|
852 |
-
* Log each API request, if enabled
|
853 |
-
*
|
854 |
-
* @param array $data
|
855 |
-
*/
|
856 |
-
private function log_request( $data = array() ) {
|
857 |
-
if ( ! $this->log_requests )
|
858 |
-
return;
|
859 |
-
}
|
860 |
-
|
861 |
-
|
862 |
-
/**
|
863 |
-
* Retrieve the output data
|
864 |
-
*/
|
865 |
-
public function get_output() {
|
866 |
-
return $this->data;
|
867 |
-
}
|
868 |
-
|
869 |
-
|
870 |
-
/**
|
871 |
-
* Output Query in either JSON/XML. The query data is outputted as JSON
|
872 |
-
* by default
|
873 |
-
*/
|
874 |
-
public function output( $status_code = 200 ) {
|
875 |
-
global $wp_query;
|
876 |
-
|
877 |
-
$format = $this->get_output_format();
|
878 |
-
|
879 |
-
status_header( $status_code );
|
880 |
-
|
881 |
-
/**
|
882 |
-
* UM hook
|
883 |
-
*
|
884 |
-
* @type action
|
885 |
-
* @title um_api_output_before
|
886 |
-
* @description Action before API output
|
887 |
-
* @input_vars
|
888 |
-
* [{"var":"$data","type":"array","desc":"API data"},
|
889 |
-
* {"var":"$rest_api","type":"object","desc":"REST API class"},
|
890 |
-
* {"var":"$format","type":"string","desc":"Format"}]
|
891 |
-
* @change_log
|
892 |
-
* ["Since: 2.0"]
|
893 |
-
* @usage add_action( 'um_api_output_before', 'function_name', 10, 3 );
|
894 |
-
* @example
|
895 |
-
* <?php
|
896 |
-
* add_action( 'um_api_output_before', 'my_api_output_before', 10, 3 );
|
897 |
-
* function my_api_output_before( $data, $rest_api, $format ) {
|
898 |
-
* // your code here
|
899 |
-
* }
|
900 |
-
* ?>
|
901 |
-
*/
|
902 |
-
do_action( 'um_api_output_before', $this->data, $this, $format );
|
903 |
-
|
904 |
-
switch ( $format ) :
|
905 |
-
|
906 |
-
case 'xml' :
|
907 |
-
|
908 |
-
require_once um_path . 'includes/lib/array2xml.php';
|
909 |
-
$xml = Array2XML::createXML( 'um', $this->data );
|
910 |
-
echo $xml->saveXML();
|
911 |
-
|
912 |
-
break;
|
913 |
-
|
914 |
-
case 'json' :
|
915 |
-
case '' :
|
916 |
-
|
917 |
-
header( 'Content-Type: application/json' );
|
918 |
-
if ( ! empty( $this->pretty_print ) )
|
919 |
-
echo json_encode( $this->data, $this->pretty_print );
|
920 |
-
else
|
921 |
-
echo json_encode( $this->data );
|
922 |
-
|
923 |
-
break;
|
924 |
-
|
925 |
-
|
926 |
-
default :
|
927 |
-
|
928 |
-
// Allow other formats to be added via extensions
|
929 |
-
/**
|
930 |
-
* UM hook
|
931 |
-
*
|
932 |
-
* @type action
|
933 |
-
* @title um_api_output_{$format}
|
934 |
-
* @description Action before API output
|
935 |
-
* @input_vars
|
936 |
-
* [{"var":"$data","type":"array","desc":"API data"},
|
937 |
-
* {"var":"$rest_api","type":"object","desc":"REST API class"}]
|
938 |
-
* @change_log
|
939 |
-
* ["Since: 2.0"]
|
940 |
-
* @usage add_action( 'um_api_output_{$format}', 'function_name', 10, 2 );
|
941 |
-
* @example
|
942 |
-
* <?php
|
943 |
-
* add_action( 'um_api_output_{$format}', 'my_api_output', 10, 2 );
|
944 |
-
* function my_api_output( $data, $rest_api ) {
|
945 |
-
* // your code here
|
946 |
-
* }
|
947 |
-
* ?>
|
948 |
-
*/
|
949 |
-
do_action( 'um_api_output_' . $format, $this->data, $this );
|
950 |
-
|
951 |
-
break;
|
952 |
-
|
953 |
-
endswitch;
|
954 |
-
|
955 |
-
/**
|
956 |
-
* UM hook
|
957 |
-
*
|
958 |
-
* @type action
|
959 |
-
* @title um_api_output_after
|
960 |
-
* @description Action after API output
|
961 |
-
* @input_vars
|
962 |
-
* [{"var":"$data","type":"array","desc":"API data"},
|
963 |
-
* {"var":"$rest_api","type":"object","desc":"REST API class"},
|
964 |
-
* {"var":"$format","type":"string","desc":"Format"}]
|
965 |
-
* @change_log
|
966 |
-
* ["Since: 2.0"]
|
967 |
-
* @usage add_action( 'um_api_output_after', 'function_name', 10, 3 );
|
968 |
-
* @example
|
969 |
-
* <?php
|
970 |
-
* add_action( 'um_api_output_after', 'my_api_output_after', 10, 3 );
|
971 |
-
* function my_api_output_after( $data, $rest_api, $format ) {
|
972 |
-
* // your code here
|
973 |
-
* }
|
974 |
-
* ?>
|
975 |
-
*/
|
976 |
-
do_action( 'um_api_output_after', $this->data, $this, $format );
|
977 |
-
|
978 |
-
die();
|
979 |
-
}
|
980 |
-
|
981 |
-
|
982 |
-
/**
|
983 |
-
* Modify User Profile Page fields
|
984 |
-
*
|
985 |
-
* @param $content
|
986 |
-
* @param $user
|
987 |
-
* @return string
|
988 |
-
*/
|
989 |
-
function user_key_field( $content, $user ) {
|
990 |
-
if ( empty( $user ) )
|
991 |
-
return $content;
|
992 |
-
|
993 |
-
if( ! isset( $user->ID ) )
|
994 |
-
return $content;
|
995 |
-
|
996 |
-
if ( current_user_can( 'edit_users' ) && current_user_can( 'edit_user', $user->ID ) ) {
|
997 |
-
$user = get_userdata( $user->ID );
|
998 |
-
|
999 |
-
ob_start(); ?>
|
1000 |
-
|
1001 |
-
<table class="form-table">
|
1002 |
-
<tbody>
|
1003 |
-
<tr>
|
1004 |
-
<th>
|
1005 |
-
<label for="um_set_api_key"><?php _e( 'Ultimate Member REST API', 'ultimate-member' ); ?></label>
|
1006 |
-
</th>
|
1007 |
-
<td>
|
1008 |
-
<?php if ( empty( $user->um_user_public_key ) ) { ?>
|
1009 |
-
<p><input name="um_set_api_key" type="checkbox" id="um_set_api_key" value="0" />
|
1010 |
-
<span class="description"><?php _e( 'Generate API Key', 'ultimate-member' ); ?></span></p>
|
1011 |
-
<?php } else { ?>
|
1012 |
-
<p>
|
1013 |
-
<strong><?php _e( 'Public key:', 'ultimate-member' ); ?> </strong><span id="publickey"><?php echo $user->um_user_public_key; ?></span><br/>
|
1014 |
-
<strong><?php _e( 'Secret key:', 'ultimate-member' ); ?> </strong><span id="privatekey"><?php echo $user->um_user_secret_key; ?></span><br/>
|
1015 |
-
<strong><?php _e( 'Token:', 'ultimate-member' ); ?> </strong><span id="token"><?php echo $this->get_token( $user->ID ); ?></span>
|
1016 |
-
</p>
|
1017 |
-
<p><input name="um_set_api_key" type="checkbox" id="um_set_api_key" value="0" />
|
1018 |
-
<span class="description"><?php _e( 'Revoke API Keys', 'ultimate-member' ); ?></span></p>
|
1019 |
-
<?php } ?>
|
1020 |
-
</td>
|
1021 |
-
</tr>
|
1022 |
-
</tbody>
|
1023 |
-
</table>
|
1024 |
-
|
1025 |
-
<?php $content .= ob_get_clean();
|
1026 |
-
}
|
1027 |
-
|
1028 |
-
|
1029 |
-
return $content;
|
1030 |
-
}
|
1031 |
-
|
1032 |
-
|
1033 |
-
/**
|
1034 |
-
* Generate new API keys for a user
|
1035 |
-
*
|
1036 |
-
* @param int $user_id
|
1037 |
-
* @param bool $regenerate
|
1038 |
-
*
|
1039 |
-
* @return bool
|
1040 |
-
*/
|
1041 |
-
public function generate_api_key( $user_id = 0, $regenerate = false ) {
|
1042 |
-
|
1043 |
-
if( empty( $user_id ) ) {
|
1044 |
-
return false;
|
1045 |
-
}
|
1046 |
-
|
1047 |
-
$user = get_userdata( $user_id );
|
1048 |
-
|
1049 |
-
if( ! $user ) {
|
1050 |
-
return false;
|
1051 |
-
}
|
1052 |
-
|
1053 |
-
if ( empty( $user->um_user_public_key ) ) {
|
1054 |
-
update_user_meta( $user_id, 'um_user_public_key', $this->generate_public_key( $user->user_email ) );
|
1055 |
-
update_user_meta( $user_id, 'um_user_secret_key', $this->generate_private_key( $user->ID ) );
|
1056 |
-
} elseif( $regenerate == true ) {
|
1057 |
-
$this->revoke_api_key( $user->ID );
|
1058 |
-
update_user_meta( $user_id, 'um_user_public_key', $this->generate_public_key( $user->user_email ) );
|
1059 |
-
update_user_meta( $user_id, 'um_user_secret_key', $this->generate_private_key( $user->ID ) );
|
1060 |
-
} else {
|
1061 |
-
return false;
|
1062 |
-
}
|
1063 |
-
|
1064 |
-
return true;
|
1065 |
-
}
|
1066 |
-
|
1067 |
-
|
1068 |
-
/**
|
1069 |
-
* Revoke a users API keys
|
1070 |
-
*
|
1071 |
-
* @param int $user_id
|
1072 |
-
*
|
1073 |
-
* @return bool
|
1074 |
-
*/
|
1075 |
-
public function revoke_api_key( $user_id = 0 ) {
|
1076 |
-
|
1077 |
-
if( empty( $user_id ) ) {
|
1078 |
-
return false;
|
1079 |
-
}
|
1080 |
-
|
1081 |
-
$user = get_userdata( $user_id );
|
1082 |
-
|
1083 |
-
if( ! $user ) {
|
1084 |
-
return false;
|
1085 |
-
}
|
1086 |
-
|
1087 |
-
if ( ! empty( $user->um_user_public_key ) ) {
|
1088 |
-
delete_transient( md5( 'um_api_user_' . $user->um_user_public_key ) );
|
1089 |
-
delete_user_meta( $user_id, 'um_user_public_key' );
|
1090 |
-
delete_user_meta( $user_id, 'um_user_secret_key' );
|
1091 |
-
} else {
|
1092 |
-
return false;
|
1093 |
-
}
|
1094 |
-
|
1095 |
-
return true;
|
1096 |
-
}
|
1097 |
-
|
1098 |
-
|
1099 |
-
/**
|
1100 |
-
* Generate and Save API key
|
1101 |
-
*
|
1102 |
-
* @param $user_id
|
1103 |
-
*/
|
1104 |
-
public function update_key( $user_id ) {
|
1105 |
-
if ( current_user_can( 'edit_user', $user_id ) && isset( $_POST['um_set_api_key'] ) ) {
|
1106 |
-
|
1107 |
-
$user = get_userdata( $user_id );
|
1108 |
-
|
1109 |
-
if ( empty( $user->um_user_public_key ) ) {
|
1110 |
-
update_user_meta( $user_id, 'um_user_public_key', $this->generate_public_key( $user->user_email ) );
|
1111 |
-
update_user_meta( $user_id, 'um_user_secret_key', $this->generate_private_key( $user->ID ) );
|
1112 |
-
} else {
|
1113 |
-
$this->revoke_api_key( $user_id );
|
1114 |
-
}
|
1115 |
-
}
|
1116 |
-
}
|
1117 |
-
|
1118 |
-
|
1119 |
-
/**
|
1120 |
-
* Generate the public key for a user
|
1121 |
-
*
|
1122 |
-
* @param string $user_email
|
1123 |
-
*
|
1124 |
-
* @return string
|
1125 |
-
*/
|
1126 |
-
private function generate_public_key( $user_email = '' ) {
|
1127 |
-
$auth_key = defined( 'AUTH_KEY' ) ? AUTH_KEY : '';
|
1128 |
-
$public = hash( 'md5', $user_email . $auth_key . date( 'U' ) );
|
1129 |
-
return $public;
|
1130 |
-
}
|
1131 |
-
|
1132 |
-
|
1133 |
-
/**
|
1134 |
-
* Generate the secret key for a user
|
1135 |
-
*
|
1136 |
-
* @param int $user_id
|
1137 |
-
*
|
1138 |
-
* @return string
|
1139 |
-
*/
|
1140 |
-
private function generate_private_key( $user_id = 0 ) {
|
1141 |
-
$auth_key = defined( 'AUTH_KEY' ) ? AUTH_KEY : '';
|
1142 |
-
$secret = hash( 'md5', $user_id . $auth_key . date( 'U' ) );
|
1143 |
-
return $secret;
|
1144 |
-
}
|
1145 |
-
|
1146 |
-
|
1147 |
-
/**
|
1148 |
-
* Retrieve the user's token
|
1149 |
-
*
|
1150 |
-
* @param int $user_id
|
1151 |
-
*
|
1152 |
-
* @return string
|
1153 |
-
*/
|
1154 |
-
private function get_token( $user_id = 0 ) {
|
1155 |
-
$user = get_userdata( $user_id );
|
1156 |
-
return hash( 'md5', $user->um_user_secret_key . $user->um_user_public_key );
|
1157 |
-
}
|
1158 |
-
|
1159 |
-
}
|
1160 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/core/class-shortcodes.php
CHANGED
@@ -983,6 +983,8 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
|
|
983 |
* @return mixed|string
|
984 |
*/
|
985 |
function convert_locker_tags( $str ) {
|
|
|
|
|
986 |
return um_convert_tags( $str, array(), false );
|
987 |
}
|
988 |
|
@@ -1002,6 +1004,7 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
|
|
1002 |
'{display_name}',
|
1003 |
'{user_avatar_small}',
|
1004 |
'{username}',
|
|
|
1005 |
);
|
1006 |
|
1007 |
/**
|
@@ -1047,6 +1050,10 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
|
|
1047 |
$value = um_user( 'user_login' );
|
1048 |
}
|
1049 |
|
|
|
|
|
|
|
|
|
1050 |
/**
|
1051 |
* UM hook
|
1052 |
*
|
@@ -1158,5 +1165,31 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
|
|
1158 |
return $template;
|
1159 |
}
|
1160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1161 |
}
|
1162 |
}
|
983 |
* @return mixed|string
|
984 |
*/
|
985 |
function convert_locker_tags( $str ) {
|
986 |
+
add_filter( 'um_template_tags_patterns_hook', array( &$this, 'add_placeholder' ), 10, 1 );
|
987 |
+
add_filter( 'um_template_tags_replaces_hook', array( &$this, 'add_replace_placeholder' ), 10, 1 );
|
988 |
return um_convert_tags( $str, array(), false );
|
989 |
}
|
990 |
|
1004 |
'{display_name}',
|
1005 |
'{user_avatar_small}',
|
1006 |
'{username}',
|
1007 |
+
'{nickname}',
|
1008 |
);
|
1009 |
|
1010 |
/**
|
1050 |
$value = um_user( 'user_login' );
|
1051 |
}
|
1052 |
|
1053 |
+
if ( $usermeta == 'nickname' ) {
|
1054 |
+
$value = um_profile( 'nickname' );
|
1055 |
+
}
|
1056 |
+
|
1057 |
/**
|
1058 |
* UM hook
|
1059 |
*
|
1165 |
return $template;
|
1166 |
}
|
1167 |
|
1168 |
+
|
1169 |
+
/**
|
1170 |
+
* UM Placeholders for login referrer
|
1171 |
+
*
|
1172 |
+
* @param $placeholders
|
1173 |
+
*
|
1174 |
+
* @return array
|
1175 |
+
*/
|
1176 |
+
function add_placeholder( $placeholders ) {
|
1177 |
+
$placeholders[] = '{login_referrer}';
|
1178 |
+
return $placeholders;
|
1179 |
+
}
|
1180 |
+
|
1181 |
+
|
1182 |
+
/**
|
1183 |
+
* UM Replace Placeholders for login referrer
|
1184 |
+
*
|
1185 |
+
* @param $replace_placeholders
|
1186 |
+
*
|
1187 |
+
* @return array
|
1188 |
+
*/
|
1189 |
+
function add_replace_placeholder( $replace_placeholders ) {
|
1190 |
+
$replace_placeholders[] = um_dynamic_login_page_redirect();
|
1191 |
+
return $replace_placeholders;
|
1192 |
+
}
|
1193 |
+
|
1194 |
}
|
1195 |
}
|
includes/core/class-user.php
CHANGED
@@ -837,7 +837,9 @@ if ( ! class_exists( 'um\core\User' ) ) {
|
|
837 |
|
838 |
// add user meta
|
839 |
foreach( $this->usermeta as $k=>$v ) {
|
840 |
-
if ( $k == 'display_name')
|
|
|
|
|
841 |
$this->profile[$k] = $v[0];
|
842 |
}
|
843 |
|
@@ -1190,6 +1192,10 @@ if ( ! class_exists( 'um\core\User' ) ) {
|
|
1190 |
function password_reset() {
|
1191 |
$userdata = get_userdata( um_user('ID') );
|
1192 |
get_password_reset_key( $userdata );
|
|
|
|
|
|
|
|
|
1193 |
UM()->mail()->send( um_user('user_email'), 'resetpw_email' );
|
1194 |
}
|
1195 |
|
@@ -1242,7 +1248,6 @@ if ( ! class_exists( 'um\core\User' ) ) {
|
|
1242 |
|
1243 |
$this->set_status('approved');
|
1244 |
$this->delete_meta('account_secret_hash');
|
1245 |
-
$this->delete_meta('_um_cool_but_hard_to_guess_plain_pw');
|
1246 |
|
1247 |
/**
|
1248 |
* UM hook
|
@@ -1895,5 +1900,31 @@ if ( ! class_exists( 'um\core\User' ) ) {
|
|
1895 |
|
1896 |
return $hash_email_address;
|
1897 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1898 |
}
|
1899 |
}
|
837 |
|
838 |
// add user meta
|
839 |
foreach( $this->usermeta as $k=>$v ) {
|
840 |
+
if ( $k == 'display_name') {
|
841 |
+
continue;
|
842 |
+
}
|
843 |
$this->profile[$k] = $v[0];
|
844 |
}
|
845 |
|
1192 |
function password_reset() {
|
1193 |
$userdata = get_userdata( um_user('ID') );
|
1194 |
get_password_reset_key( $userdata );
|
1195 |
+
|
1196 |
+
add_filter( 'um_template_tags_patterns_hook', array( UM()->password(), 'add_placeholder' ), 10, 1 );
|
1197 |
+
add_filter( 'um_template_tags_replaces_hook', array( UM()->password(), 'add_replace_placeholder' ), 10, 1 );
|
1198 |
+
|
1199 |
UM()->mail()->send( um_user('user_email'), 'resetpw_email' );
|
1200 |
}
|
1201 |
|
1248 |
|
1249 |
$this->set_status('approved');
|
1250 |
$this->delete_meta('account_secret_hash');
|
|
|
1251 |
|
1252 |
/**
|
1253 |
* UM hook
|
1900 |
|
1901 |
return $hash_email_address;
|
1902 |
}
|
1903 |
+
|
1904 |
+
|
1905 |
+
/**
|
1906 |
+
* UM Placeholders for activation link in email
|
1907 |
+
*
|
1908 |
+
* @param $placeholders
|
1909 |
+
*
|
1910 |
+
* @return array
|
1911 |
+
*/
|
1912 |
+
function add_activation_placeholder( $placeholders ) {
|
1913 |
+
$placeholders[] = '{account_activation_link}';
|
1914 |
+
return $placeholders;
|
1915 |
+
}
|
1916 |
+
|
1917 |
+
|
1918 |
+
/**
|
1919 |
+
* UM Replace Placeholders for activation link in email
|
1920 |
+
*
|
1921 |
+
* @param $replace_placeholders
|
1922 |
+
*
|
1923 |
+
* @return array
|
1924 |
+
*/
|
1925 |
+
function add_activation_replace_placeholder( $replace_placeholders ) {
|
1926 |
+
$replace_placeholders[] = um_user( 'account_activation_link' );
|
1927 |
+
return $replace_placeholders;
|
1928 |
+
}
|
1929 |
}
|
1930 |
}
|
includes/core/rest/class-api-v1.php
ADDED
@@ -0,0 +1,541 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace um\core\rest;
|
3 |
+
|
4 |
+
|
5 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
6 |
+
|
7 |
+
|
8 |
+
if ( ! class_exists( 'um\core\rest\API_v1' ) ) {
|
9 |
+
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Class REST_API
|
13 |
+
* @package um\core
|
14 |
+
*/
|
15 |
+
class API_v1 extends API {
|
16 |
+
|
17 |
+
/**
|
18 |
+
*
|
19 |
+
*/
|
20 |
+
const VERSION = '1.0';
|
21 |
+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* REST_API constructor.
|
25 |
+
*/
|
26 |
+
public function __construct() {
|
27 |
+
parent::__construct();
|
28 |
+
|
29 |
+
add_filter( 'query_vars', array( $this, 'query_vars' ) );
|
30 |
+
}
|
31 |
+
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Registers query vars for API access
|
35 |
+
*
|
36 |
+
* @param $vars
|
37 |
+
*
|
38 |
+
* @return array
|
39 |
+
*/
|
40 |
+
public function query_vars( $vars ) {
|
41 |
+
$vars[] = 'key';
|
42 |
+
$vars[] = 'token';
|
43 |
+
$vars[] = 'format';
|
44 |
+
$vars[] = 'query';
|
45 |
+
$vars[] = 'type';
|
46 |
+
$vars[] = 'data';
|
47 |
+
$vars[] = 'fields';
|
48 |
+
$vars[] = 'value';
|
49 |
+
$vars[] = 'number';
|
50 |
+
$vars[] = 'id';
|
51 |
+
$vars[] = 'email';
|
52 |
+
$vars[] = 'orderby';
|
53 |
+
$vars[] = 'order';
|
54 |
+
$vars[] = 'include';
|
55 |
+
$vars[] = 'exclude';
|
56 |
+
|
57 |
+
$this->vars = $vars;
|
58 |
+
|
59 |
+
return $vars;
|
60 |
+
}
|
61 |
+
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Validate the API request
|
65 |
+
*/
|
66 |
+
protected function validate_request() {
|
67 |
+
global $wp_query;
|
68 |
+
|
69 |
+
$this->override = false;
|
70 |
+
|
71 |
+
// Make sure we have both user and api key
|
72 |
+
if ( ! empty( $wp_query->query_vars['um-api'] ) ) {
|
73 |
+
|
74 |
+
if ( empty( $wp_query->query_vars['token'] ) || empty( $wp_query->query_vars['key'] ) ) {
|
75 |
+
$this->missing_auth();
|
76 |
+
}
|
77 |
+
|
78 |
+
// Retrieve the user by public API key and ensure they exist
|
79 |
+
if ( ! ( $user = $this->get_user( $wp_query->query_vars['key'] ) ) ) {
|
80 |
+
$this->invalid_key();
|
81 |
+
} else {
|
82 |
+
$token = urldecode( $wp_query->query_vars['token'] );
|
83 |
+
$secret = get_user_meta( $user, 'um_user_secret_key', true );
|
84 |
+
$public = urldecode( $wp_query->query_vars['key'] );
|
85 |
+
|
86 |
+
if ( hash_equals( md5( $secret . $public ), $token ) ) {
|
87 |
+
$this->is_valid_request = true;
|
88 |
+
} else {
|
89 |
+
$this->invalid_auth();
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Retrieve the user ID based on the public key provided
|
99 |
+
*
|
100 |
+
* @param string $key
|
101 |
+
*
|
102 |
+
* @return bool|mixed|null|string
|
103 |
+
*/
|
104 |
+
public function get_user( $key = '' ) {
|
105 |
+
global $wpdb, $wp_query;
|
106 |
+
|
107 |
+
if ( empty( $key ) ) {
|
108 |
+
$key = urldecode( $wp_query->query_vars['key'] );
|
109 |
+
}
|
110 |
+
|
111 |
+
if ( empty( $key ) ) {
|
112 |
+
return false;
|
113 |
+
}
|
114 |
+
|
115 |
+
$user = get_transient( md5( 'um_api_user_' . $key ) );
|
116 |
+
|
117 |
+
if ( false === $user ) {
|
118 |
+
$user = $wpdb->get_var( $wpdb->prepare(
|
119 |
+
"SELECT user_id
|
120 |
+
FROM $wpdb->usermeta
|
121 |
+
WHERE meta_key = 'um_user_public_key' AND
|
122 |
+
meta_value = %s
|
123 |
+
LIMIT 1",
|
124 |
+
$key
|
125 |
+
) );
|
126 |
+
set_transient( md5( 'um_api_user_' . $key ) , $user, DAY_IN_SECONDS );
|
127 |
+
}
|
128 |
+
|
129 |
+
if ( $user != null ) {
|
130 |
+
$this->user_id = $user;
|
131 |
+
return $user;
|
132 |
+
}
|
133 |
+
|
134 |
+
return false;
|
135 |
+
}
|
136 |
+
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Process Get users API Request
|
140 |
+
*
|
141 |
+
* @param $args
|
142 |
+
*
|
143 |
+
* @return array
|
144 |
+
*/
|
145 |
+
public function get_users( $args ) {
|
146 |
+
/**
|
147 |
+
* @var int $number
|
148 |
+
* @var string $orderby
|
149 |
+
* @var string $order
|
150 |
+
* @var string $include
|
151 |
+
* @var string $exclude
|
152 |
+
*/
|
153 |
+
extract( $args );
|
154 |
+
|
155 |
+
$response = array();
|
156 |
+
|
157 |
+
if ( ! $number ) {
|
158 |
+
$number = 10;
|
159 |
+
}
|
160 |
+
|
161 |
+
if ( ! $orderby ) {
|
162 |
+
$orderby = 'user_registered';
|
163 |
+
}
|
164 |
+
|
165 |
+
if ( ! $order ) {
|
166 |
+
$order = 'desc';
|
167 |
+
}
|
168 |
+
|
169 |
+
$loop_a = array( 'number' => $number, 'orderby' => $orderby, 'order' => $order );
|
170 |
+
|
171 |
+
if ( $include ) {
|
172 |
+
$include = explode(',', $include );
|
173 |
+
$loop_a['include'] = $include;
|
174 |
+
}
|
175 |
+
|
176 |
+
if ( $exclude ) {
|
177 |
+
$exclude = explode(',', $exclude );
|
178 |
+
$loop_a['exclude'] = $exclude;
|
179 |
+
}
|
180 |
+
|
181 |
+
$loop = get_users( $loop_a );
|
182 |
+
|
183 |
+
foreach ( $loop as $user ) {
|
184 |
+
|
185 |
+
unset( $user->data->user_status );
|
186 |
+
unset( $user->data->user_activation_key );
|
187 |
+
unset( $user->data->user_pass );
|
188 |
+
|
189 |
+
um_fetch_user( $user->ID );
|
190 |
+
|
191 |
+
foreach ( $user as $key => $val ) {
|
192 |
+
if ( $key != 'data' ) {
|
193 |
+
continue;
|
194 |
+
}
|
195 |
+
|
196 |
+
$key = 'profile';
|
197 |
+
$val->roles = $user->roles;
|
198 |
+
$val->first_name = um_user('first_name');
|
199 |
+
$val->last_name = um_user('last_name');
|
200 |
+
$val->account_status = um_user('account_status');
|
201 |
+
$val->profile_pic_original = um_get_user_avatar_url('', 'original');
|
202 |
+
$val->profile_pic_normal = um_get_user_avatar_url('', 200);
|
203 |
+
$val->profile_pic_small = um_get_user_avatar_url('', 40);
|
204 |
+
$val->cover_photo = $this->getsrc( um_user('cover_photo', 1000) );
|
205 |
+
|
206 |
+
/**
|
207 |
+
* UM hook
|
208 |
+
*
|
209 |
+
* @type filter
|
210 |
+
* @title um_rest_userdata
|
211 |
+
* @description Change output data for Rest API userdata call
|
212 |
+
* @input_vars
|
213 |
+
* [{"var":"$value","type":"array","desc":"Output Data"},
|
214 |
+
* {"var":"$user_id","type":"string","desc":"User ID"}]
|
215 |
+
* @change_log
|
216 |
+
* ["Since: 2.0"]
|
217 |
+
* @usage
|
218 |
+
* <?php add_filter( 'um_rest_userdata', 'function_name', 10, 2 ); ?>
|
219 |
+
* @example
|
220 |
+
* <?php
|
221 |
+
* add_filter( 'um_rest_userdata', 'my_rest_userdata', 10, 2 );
|
222 |
+
* function my_rest_userdata( $value, $user_id ) {
|
223 |
+
* // your code here
|
224 |
+
* return $value;
|
225 |
+
* }
|
226 |
+
* ?>
|
227 |
+
*/
|
228 |
+
$val = apply_filters( 'um_rest_userdata', $val, $user->ID );
|
229 |
+
$response[ $user->ID ] = $val;
|
230 |
+
}
|
231 |
+
}
|
232 |
+
|
233 |
+
return $response;
|
234 |
+
}
|
235 |
+
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Update user API query
|
239 |
+
*
|
240 |
+
* @param $args
|
241 |
+
*
|
242 |
+
* @return array
|
243 |
+
*/
|
244 |
+
public function update_user( $args ) {
|
245 |
+
/**
|
246 |
+
* @var int $id
|
247 |
+
* @var string $data
|
248 |
+
* @var string $value
|
249 |
+
*/
|
250 |
+
extract( $args );
|
251 |
+
|
252 |
+
$response = array();
|
253 |
+
$error = array();
|
254 |
+
|
255 |
+
if ( ! $id ) {
|
256 |
+
$error['error'] = __( 'You must provide a user ID', 'ultimate-member' );
|
257 |
+
return $error;
|
258 |
+
}
|
259 |
+
|
260 |
+
if ( ! $data ) {
|
261 |
+
$error['error'] = __( 'You need to provide data to update', 'ultimate-member' );
|
262 |
+
return $error;
|
263 |
+
}
|
264 |
+
|
265 |
+
um_fetch_user( $id );
|
266 |
+
|
267 |
+
switch ( $data ) {
|
268 |
+
case 'status':
|
269 |
+
UM()->user()->set_status( $value );
|
270 |
+
$response['success'] = __( 'User status has been changed.', 'ultimate-member' );
|
271 |
+
break;
|
272 |
+
case 'role':
|
273 |
+
$wp_user_object = new \WP_User( $id );
|
274 |
+
$old_roles = $wp_user_object->roles;
|
275 |
+
$wp_user_object->set_role( $value );
|
276 |
+
|
277 |
+
/**
|
278 |
+
* UM hook
|
279 |
+
*
|
280 |
+
* @type action
|
281 |
+
* @title um_after_member_role_upgrade
|
282 |
+
* @description Action after user role was changed
|
283 |
+
* @input_vars
|
284 |
+
* [{"var":"$new_roles","type":"array","desc":"New User Roles"},
|
285 |
+
* {"var":"$old_roles","type":"array","desc":"Old roles"}]
|
286 |
+
* @change_log
|
287 |
+
* ["Since: 2.0"]
|
288 |
+
* @usage add_action( 'um_after_member_role_upgrade', 'function_name', 10, 2 );
|
289 |
+
* @example
|
290 |
+
* <?php
|
291 |
+
* add_action( 'um_after_member_role_upgrade', 'my_after_member_role_upgrade', 10, 2 );
|
292 |
+
* function my_after_member_role_upgrade( $new_roles, $old_roles ) {
|
293 |
+
* // your code here
|
294 |
+
* }
|
295 |
+
* ?>
|
296 |
+
*/
|
297 |
+
do_action( 'um_after_member_role_upgrade', array( $value ), $old_roles, $id );
|
298 |
+
|
299 |
+
$response['success'] = __( 'User role has been changed.', 'ultimate-member' );
|
300 |
+
break;
|
301 |
+
default:
|
302 |
+
update_user_meta( $id, $data, esc_attr( $value ) );
|
303 |
+
$response['success'] = __( 'User meta has been changed.', 'ultimate-member' );
|
304 |
+
break;
|
305 |
+
}
|
306 |
+
|
307 |
+
return $response;
|
308 |
+
}
|
309 |
+
|
310 |
+
|
311 |
+
/**
|
312 |
+
* Process delete user via API
|
313 |
+
*
|
314 |
+
* @param $args
|
315 |
+
*
|
316 |
+
* @return array
|
317 |
+
*/
|
318 |
+
public function delete_user( $args ) {
|
319 |
+
/**
|
320 |
+
* @var int $id
|
321 |
+
*/
|
322 |
+
extract( $args );
|
323 |
+
|
324 |
+
$response = array();
|
325 |
+
$error = array();
|
326 |
+
|
327 |
+
if ( ! isset( $id ) ) {
|
328 |
+
$error['error'] = __( 'You must provide a user ID', 'ultimate-member' );
|
329 |
+
return $error;
|
330 |
+
}
|
331 |
+
|
332 |
+
$user = get_userdata( $id );
|
333 |
+
if ( ! $user ) {
|
334 |
+
$error['error'] = __( 'Invalid user specified', 'ultimate-member' );
|
335 |
+
return $error;
|
336 |
+
}
|
337 |
+
|
338 |
+
um_fetch_user( $id );
|
339 |
+
UM()->user()->delete();
|
340 |
+
|
341 |
+
$response['success'] = __( 'User has been successfully deleted.', 'ultimate-member' );
|
342 |
+
|
343 |
+
return $response;
|
344 |
+
}
|
345 |
+
|
346 |
+
|
347 |
+
/**
|
348 |
+
* Process Get user API Request
|
349 |
+
*
|
350 |
+
* @param $args
|
351 |
+
*
|
352 |
+
* @return array|mixed
|
353 |
+
*/
|
354 |
+
public function get_auser( $args ) {
|
355 |
+
/**
|
356 |
+
* @var int $um_id
|
357 |
+
* @var string $um_fields
|
358 |
+
*/
|
359 |
+
extract( $args );
|
360 |
+
|
361 |
+
$response = array();
|
362 |
+
$error = array();
|
363 |
+
|
364 |
+
if ( ! isset( $id ) ) {
|
365 |
+
$error['error'] = __('You must provide a user ID','ultimate-member');
|
366 |
+
return $error;
|
367 |
+
}
|
368 |
+
|
369 |
+
$user = get_userdata( $id );
|
370 |
+
if ( ! $user ) {
|
371 |
+
$error['error'] = __('Invalid user specified','ultimate-member');
|
372 |
+
return $error;
|
373 |
+
}
|
374 |
+
|
375 |
+
unset( $user->data->user_status );
|
376 |
+
unset( $user->data->user_activation_key );
|
377 |
+
unset( $user->data->user_pass );
|
378 |
+
|
379 |
+
um_fetch_user( $user->ID );
|
380 |
+
|
381 |
+
if ( isset( $fields ) && $fields ) {
|
382 |
+
$fields = explode(',', $fields );
|
383 |
+
$response['ID'] = $user->ID;
|
384 |
+
$response['username'] = $user->user_login;
|
385 |
+
foreach ( $fields as $field ) {
|
386 |
+
|
387 |
+
switch ( $field ) {
|
388 |
+
|
389 |
+
default:
|
390 |
+
$response[ $field ] = ( um_profile( $field ) ) ? um_profile( $field ) : '';
|
391 |
+
|
392 |
+
/**
|
393 |
+
* UM hook
|
394 |
+
*
|
395 |
+
* @type filter
|
396 |
+
* @title um_rest_get_auser
|
397 |
+
* @description Change output data for Rest API user authentification call
|
398 |
+
* @input_vars
|
399 |
+
* [{"var":"$response","type":"array","desc":"Output Data"},
|
400 |
+
* {"var":"$field","type":"string","desc":"Field Key"},
|
401 |
+
* {"var":"$user_id","type":"int","desc":"User ID"}]
|
402 |
+
* @change_log
|
403 |
+
* ["Since: 2.0"]
|
404 |
+
* @usage
|
405 |
+
* <?php add_filter( 'um_rest_get_auser', 'function_name', 10, 3 ); ?>
|
406 |
+
* @example
|
407 |
+
* <?php
|
408 |
+
* add_filter( 'um_rest_get_auser', 'my_rest_get_auser', 10, 3 );
|
409 |
+
* function my_rest_get_auser( $response, $field, $user_id ) {
|
410 |
+
* // your code here
|
411 |
+
* return $response;
|
412 |
+
* }
|
413 |
+
* ?>
|
414 |
+
*/
|
415 |
+
$response = apply_filters( 'um_rest_get_auser', $response, $field, $user->ID );
|
416 |
+
break;
|
417 |
+
|
418 |
+
case 'cover_photo':
|
419 |
+
$response['cover_photo'] = $this->getsrc( um_user('cover_photo', 1000) );
|
420 |
+
break;
|
421 |
+
|
422 |
+
case 'profile_pic':
|
423 |
+
$response['profile_pic_original'] = um_get_user_avatar_url('', 'original');
|
424 |
+
$response['profile_pic_normal'] = um_get_user_avatar_url('', 200);
|
425 |
+
$response['profile_pic_small'] = um_get_user_avatar_url('', 40);
|
426 |
+
break;
|
427 |
+
|
428 |
+
case 'status':
|
429 |
+
$response['status'] = um_user('account_status');
|
430 |
+
break;
|
431 |
+
|
432 |
+
case 'role':
|
433 |
+
//get priority role here
|
434 |
+
$response['role'] = um_user( 'role' );
|
435 |
+
break;
|
436 |
+
|
437 |
+
case 'email':
|
438 |
+
case 'user_email':
|
439 |
+
$response['email'] = um_user('user_email');
|
440 |
+
break;
|
441 |
+
|
442 |
+
}
|
443 |
+
|
444 |
+
}
|
445 |
+
} else {
|
446 |
+
|
447 |
+
foreach ( $user as $key => $val ) {
|
448 |
+
if ( $key != 'data' ) {
|
449 |
+
continue;
|
450 |
+
}
|
451 |
+
|
452 |
+
$key = 'profile';
|
453 |
+
$val->roles = $user->roles;
|
454 |
+
$val->first_name = um_user( 'first_name' );
|
455 |
+
$val->last_name = um_user('last_name' );
|
456 |
+
$val->account_status = um_user( 'account_status' );
|
457 |
+
$val->profile_pic_original = um_get_user_avatar_url( '', 'original' );
|
458 |
+
$val->profile_pic_normal = um_get_user_avatar_url( '', 200 );
|
459 |
+
$val->profile_pic_small = um_get_user_avatar_url( '', 40 );
|
460 |
+
$val->cover_photo = $this->getsrc( um_user( 'cover_photo', 1000 ) );
|
461 |
+
|
462 |
+
/**
|
463 |
+
* UM hook
|
464 |
+
*
|
465 |
+
* @type filter
|
466 |
+
* @title um_rest_userdata
|
467 |
+
* @description Change output data for Rest API userdata call
|
468 |
+
* @input_vars
|
469 |
+
* [{"var":"$value","type":"array","desc":"Output Data"},
|
470 |
+
* {"var":"$user_id","type":"string","desc":"User ID"}]
|
471 |
+
* @change_log
|
472 |
+
* ["Since: 2.0"]
|
473 |
+
* @usage
|
474 |
+
* <?php add_filter( 'um_rest_userdata', 'function_name', 10, 2 ); ?>
|
475 |
+
* @example
|
476 |
+
* <?php
|
477 |
+
* add_filter( 'um_rest_userdata', 'my_rest_userdata', 10, 2 );
|
478 |
+
* function my_rest_userdata( $value, $user_id ) {
|
479 |
+
* // your code here
|
480 |
+
* return $value;
|
481 |
+
* }
|
482 |
+
* ?>
|
483 |
+
*/
|
484 |
+
$val = apply_filters( 'um_rest_userdata', $val, $user->ID );
|
485 |
+
$response = $val;
|
486 |
+
}
|
487 |
+
|
488 |
+
}
|
489 |
+
|
490 |
+
return $response;
|
491 |
+
}
|
492 |
+
|
493 |
+
|
494 |
+
/**
|
495 |
+
* Get source
|
496 |
+
*
|
497 |
+
* @param $image
|
498 |
+
*
|
499 |
+
* @return string
|
500 |
+
*/
|
501 |
+
public function getsrc( $image ) {
|
502 |
+
if (preg_match('/<img.+?src(?: )*=(?: )*[\'"](.*?)[\'"]/si', $image, $arrResult)) {
|
503 |
+
return $arrResult[1];
|
504 |
+
}
|
505 |
+
return '';
|
506 |
+
}
|
507 |
+
|
508 |
+
|
509 |
+
/**
|
510 |
+
* Retrieve the output format
|
511 |
+
*/
|
512 |
+
public function get_output_format() {
|
513 |
+
global $wp_query;
|
514 |
+
|
515 |
+
$format = isset( $wp_query->query_vars['format'] ) ? $wp_query->query_vars['format'] : 'json';
|
516 |
+
|
517 |
+
/**
|
518 |
+
* UM hook
|
519 |
+
*
|
520 |
+
* @type filter
|
521 |
+
* @title um_api_output_format
|
522 |
+
* @description UM Rest API output format
|
523 |
+
* @input_vars
|
524 |
+
* [{"var":"$format","type":"string","desc":"Format"}]
|
525 |
+
* @change_log
|
526 |
+
* ["Since: 2.0"]
|
527 |
+
* @usage
|
528 |
+
* <?php add_filter( 'um_api_output_format', 'function_name', 10, 1 ); ?>
|
529 |
+
* @example
|
530 |
+
* <?php
|
531 |
+
* add_filter( 'um_api_output_format', 'my_api_output_format', 10, 1 );
|
532 |
+
* function my_api_output_format( $format ) {
|
533 |
+
* // your code here
|
534 |
+
* return $format;
|
535 |
+
* }
|
536 |
+
* ?>
|
537 |
+
*/
|
538 |
+
return apply_filters( 'um_api_output_format', $format );
|
539 |
+
}
|
540 |
+
}
|
541 |
+
}
|
includes/core/rest/class-api-v2.php
ADDED
@@ -0,0 +1,540 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace um\core\rest;
|
3 |
+
|
4 |
+
|
5 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
6 |
+
|
7 |
+
|
8 |
+
if ( ! class_exists( 'um\core\rest\API_v2' ) ) {
|
9 |
+
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Class API_v2
|
13 |
+
* @package um\core\rest
|
14 |
+
*/
|
15 |
+
class API_v2 extends API {
|
16 |
+
|
17 |
+
/**
|
18 |
+
*
|
19 |
+
*/
|
20 |
+
const VERSION = '2.0';
|
21 |
+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* REST_API constructor.
|
25 |
+
*/
|
26 |
+
public function __construct() {
|
27 |
+
parent::__construct();
|
28 |
+
|
29 |
+
add_filter( 'query_vars', array( $this, 'query_vars' ) );
|
30 |
+
}
|
31 |
+
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Registers query vars for API access
|
35 |
+
*
|
36 |
+
* @param $vars
|
37 |
+
*
|
38 |
+
* @return array
|
39 |
+
*/
|
40 |
+
public function query_vars( $vars ) {
|
41 |
+
$vars[] = 'um_key';
|
42 |
+
$vars[] = 'um_token';
|
43 |
+
$vars[] = 'um_format';
|
44 |
+
$vars[] = 'um_query';
|
45 |
+
$vars[] = 'um_type';
|
46 |
+
$vars[] = 'um_data';
|
47 |
+
$vars[] = 'um_fields';
|
48 |
+
$vars[] = 'um_value';
|
49 |
+
$vars[] = 'um_number';
|
50 |
+
$vars[] = 'um_id';
|
51 |
+
$vars[] = 'um_email';
|
52 |
+
$vars[] = 'um_orderby';
|
53 |
+
$vars[] = 'um_order';
|
54 |
+
$vars[] = 'um_include';
|
55 |
+
$vars[] = 'um_exclude';
|
56 |
+
|
57 |
+
$this->vars = $vars;
|
58 |
+
|
59 |
+
return $vars;
|
60 |
+
}
|
61 |
+
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Validate the API request
|
65 |
+
*/
|
66 |
+
protected function validate_request() {
|
67 |
+
global $wp_query;
|
68 |
+
|
69 |
+
$this->override = false;
|
70 |
+
|
71 |
+
// Make sure we have both user and api key
|
72 |
+
if ( ! empty( $wp_query->query_vars['um-api'] ) ) {
|
73 |
+
|
74 |
+
if ( empty( $wp_query->query_vars['um_token'] ) || empty( $wp_query->query_vars['um_key'] ) ) {
|
75 |
+
$this->missing_auth();
|
76 |
+
}
|
77 |
+
|
78 |
+
// Retrieve the user by public API key and ensure they exist
|
79 |
+
if ( ! ( $user = $this->get_user( $wp_query->query_vars['um_key'] ) ) ) {
|
80 |
+
$this->invalid_key();
|
81 |
+
} else {
|
82 |
+
$token = urldecode( $wp_query->query_vars['um_token'] );
|
83 |
+
$secret = get_user_meta( $user, 'um_user_secret_key', true );
|
84 |
+
$public = urldecode( $wp_query->query_vars['um_key'] );
|
85 |
+
|
86 |
+
if ( hash_equals( md5( $secret . $public ), $token ) ) {
|
87 |
+
$this->is_valid_request = true;
|
88 |
+
} else {
|
89 |
+
$this->invalid_auth();
|
90 |
+
}
|
91 |
+
}
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Retrieve the user ID based on the public key provided
|
98 |
+
*
|
99 |
+
* @param string $key
|
100 |
+
*
|
101 |
+
* @return bool|mixed|null|string
|
102 |
+
*/
|
103 |
+
public function get_user( $key = '' ) {
|
104 |
+
global $wpdb, $wp_query;
|
105 |
+
|
106 |
+
if ( empty( $key ) ) {
|
107 |
+
$key = urldecode( $wp_query->query_vars['um_key'] );
|
108 |
+
}
|
109 |
+
|
110 |
+
if ( empty( $key ) ) {
|
111 |
+
return false;
|
112 |
+
}
|
113 |
+
|
114 |
+
$user = get_transient( md5( 'um_api_user_' . $key ) );
|
115 |
+
|
116 |
+
if ( false === $user ) {
|
117 |
+
$user = $wpdb->get_var( $wpdb->prepare(
|
118 |
+
"SELECT user_id
|
119 |
+
FROM $wpdb->usermeta
|
120 |
+
WHERE meta_key = 'um_user_public_key' AND
|
121 |
+
meta_value = %s
|
122 |
+
LIMIT 1",
|
123 |
+
$key
|
124 |
+
) );
|
125 |
+
set_transient( md5( 'um_api_user_' . $key ) , $user, DAY_IN_SECONDS );
|
126 |
+
}
|
127 |
+
|
128 |
+
if ( $user != NULL ) {
|
129 |
+
$this->user_id = $user;
|
130 |
+
return $user;
|
131 |
+
}
|
132 |
+
|
133 |
+
return false;
|
134 |
+
}
|
135 |
+
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Process Get users API Request
|
139 |
+
*
|
140 |
+
* @param $args
|
141 |
+
*
|
142 |
+
* @return array
|
143 |
+
*/
|
144 |
+
public function get_users( $args ) {
|
145 |
+
/**
|
146 |
+
* @var int $um_number
|
147 |
+
* @var string $um_orderby
|
148 |
+
* @var string $um_order
|
149 |
+
* @var string $um_include
|
150 |
+
* @var string $um_exclude
|
151 |
+
*/
|
152 |
+
extract( $args );
|
153 |
+
|
154 |
+
$response = array();
|
155 |
+
|
156 |
+
if ( ! $um_number ) {
|
157 |
+
$um_number = 10;
|
158 |
+
}
|
159 |
+
|
160 |
+
if ( ! $um_orderby ) {
|
161 |
+
$um_orderby = 'user_registered';
|
162 |
+
}
|
163 |
+
|
164 |
+
if ( ! $um_order ) {
|
165 |
+
$um_order = 'desc';
|
166 |
+
}
|
167 |
+
|
168 |
+
$loop_a = array( 'number' => $um_number, 'orderby' => $um_orderby, 'order' => $um_order );
|
169 |
+
|
170 |
+
if ( $um_include ) {
|
171 |
+
$um_include = explode(',', $um_include );
|
172 |
+
$loop_a['include'] = $um_include;
|
173 |
+
}
|
174 |
+
|
175 |
+
if ( $um_exclude ) {
|
176 |
+
$um_exclude = explode(',', $um_exclude );
|
177 |
+
$loop_a['exclude'] = $um_exclude;
|
178 |
+
}
|
179 |
+
|
180 |
+
$loop = get_users( $loop_a );
|
181 |
+
|
182 |
+
foreach ( $loop as $user ) {
|
183 |
+
|
184 |
+
unset( $user->data->user_status );
|
185 |
+
unset( $user->data->user_activation_key );
|
186 |
+
unset( $user->data->user_pass );
|
187 |
+
|
188 |
+
um_fetch_user( $user->ID );
|
189 |
+
|
190 |
+
foreach ( $user as $key => $val ) {
|
191 |
+
if ( $key != 'data' ) {
|
192 |
+
continue;
|
193 |
+
}
|
194 |
+
|
195 |
+
$key = 'profile';
|
196 |
+
$val->roles = $user->roles;
|
197 |
+
$val->first_name = um_user( 'first_name' );
|
198 |
+
$val->last_name = um_user( 'last_name' );
|
199 |
+
$val->account_status = um_user( 'account_status' );
|
200 |
+
$val->profile_pic_original = um_get_user_avatar_url( '', 'original' );
|
201 |
+
$val->profile_pic_normal = um_get_user_avatar_url( '', 200 );
|
202 |
+
$val->profile_pic_small = um_get_user_avatar_url( '', 40 );
|
203 |
+
$val->cover_photo = $this->getsrc( um_user( 'cover_photo', 1000 ) );
|
204 |
+
|
205 |
+
/**
|
206 |
+
* UM hook
|
207 |
+
*
|
208 |
+
* @type filter
|
209 |
+
* @title um_rest_userdata
|
210 |
+
* @description Change output data for Rest API userdata call
|
211 |
+
* @input_vars
|
212 |
+
* [{"var":"$value","type":"array","desc":"Output Data"},
|
213 |
+
* {"var":"$user_id","type":"string","desc":"User ID"}]
|
214 |
+
* @change_log
|
215 |
+
* ["Since: 2.0"]
|
216 |
+
* @usage
|
217 |
+
* <?php add_filter( 'um_rest_userdata', 'function_name', 10, 2 ); ?>
|
218 |
+
* @example
|
219 |
+
* <?php
|
220 |
+
* add_filter( 'um_rest_userdata', 'my_rest_userdata', 10, 2 );
|
221 |
+
* function my_rest_userdata( $value, $user_id ) {
|
222 |
+
* // your code here
|
223 |
+
* return $value;
|
224 |
+
* }
|
225 |
+
* ?>
|
226 |
+
*/
|
227 |
+
$val = apply_filters( 'um_rest_userdata', $val, $user->ID );
|
228 |
+
|
229 |
+
$response[ $user->ID ] = $val;
|
230 |
+
}
|
231 |
+
}
|
232 |
+
|
233 |
+
return $response;
|
234 |
+
}
|
235 |
+
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Update user API query
|
239 |
+
*
|
240 |
+
* @param $args
|
241 |
+
*
|
242 |
+
* @return array
|
243 |
+
*/
|
244 |
+
public function update_user( $args ) {
|
245 |
+
/**
|
246 |
+
* @var int $um_id
|
247 |
+
* @var string $um_data
|
248 |
+
* @var string $um_value
|
249 |
+
*/
|
250 |
+
extract( $args );
|
251 |
+
|
252 |
+
$response = array();
|
253 |
+
$error = array();
|
254 |
+
|
255 |
+
if ( ! $um_id ) {
|
256 |
+
$error['error'] = __( 'You must provide a user ID', 'ultimate-member' );
|
257 |
+
return $error;
|
258 |
+
}
|
259 |
+
|
260 |
+
if ( ! $um_data ) {
|
261 |
+
$error['error'] = __( 'You need to provide data to update', 'ultimate-member' );
|
262 |
+
return $error;
|
263 |
+
}
|
264 |
+
|
265 |
+
um_fetch_user( $um_id );
|
266 |
+
|
267 |
+
switch ( $um_data ) {
|
268 |
+
case 'status':
|
269 |
+
UM()->user()->set_status( $um_value );
|
270 |
+
$response['success'] = __( 'User status has been changed.', 'ultimate-member' );
|
271 |
+
break;
|
272 |
+
case 'role':
|
273 |
+
$wp_user_object = new \WP_User( $um_id );
|
274 |
+
$old_roles = $wp_user_object->roles;
|
275 |
+
$wp_user_object->set_role( $um_value );
|
276 |
+
|
277 |
+
/**
|
278 |
+
* UM hook
|
279 |
+
*
|
280 |
+
* @type action
|
281 |
+
* @title um_after_member_role_upgrade
|
282 |
+
* @description Action after user role was changed
|
283 |
+
* @input_vars
|
284 |
+
* [{"var":"$new_roles","type":"array","desc":"New User Roles"},
|
285 |
+
* {"var":"$old_roles","type":"array","desc":"Old roles"}]
|
286 |
+
* @change_log
|
287 |
+
* ["Since: 2.0"]
|
288 |
+
* @usage add_action( 'um_after_member_role_upgrade', 'function_name', 10, 2 );
|
289 |
+
* @example
|
290 |
+
* <?php
|
291 |
+
* add_action( 'um_after_member_role_upgrade', 'my_after_member_role_upgrade', 10, 2 );
|
292 |
+
* function my_after_member_role_upgrade( $new_roles, $old_roles ) {
|
293 |
+
* // your code here
|
294 |
+
* }
|
295 |
+
* ?>
|
296 |
+
*/
|
297 |
+
do_action( 'um_after_member_role_upgrade', array( $um_value ), $old_roles, $um_id );
|
298 |
+
|
299 |
+
$response['success'] = __( 'User role has been changed.', 'ultimate-member' );
|
300 |
+
break;
|
301 |
+
default:
|
302 |
+
update_user_meta( $um_id, $um_data, esc_attr( $um_value ) );
|
303 |
+
$response['success'] = __( 'User meta has been changed.', 'ultimate-member' );
|
304 |
+
break;
|
305 |
+
}
|
306 |
+
|
307 |
+
return $response;
|
308 |
+
}
|
309 |
+
|
310 |
+
|
311 |
+
/**
|
312 |
+
* Process delete user via API
|
313 |
+
*
|
314 |
+
* @param $args
|
315 |
+
*
|
316 |
+
* @return array
|
317 |
+
*/
|
318 |
+
public function delete_user( $args ) {
|
319 |
+
/**
|
320 |
+
* @var int $um_id
|
321 |
+
*/
|
322 |
+
extract( $args );
|
323 |
+
|
324 |
+
$response = array();
|
325 |
+
$error = array();
|
326 |
+
|
327 |
+
if ( ! isset( $um_id ) ) {
|
328 |
+
$error['error'] = __( 'You must provide a user ID', 'ultimate-member' );
|
329 |
+
return $error;
|
330 |
+
}
|
331 |
+
|
332 |
+
$user = get_userdata( $um_id );
|
333 |
+
if ( ! $user ) {
|
334 |
+
$error['error'] = __( 'Invalid user specified', 'ultimate-member' );
|
335 |
+
return $error;
|
336 |
+
}
|
337 |
+
|
338 |
+
um_fetch_user( $um_id );
|
339 |
+
UM()->user()->delete();
|
340 |
+
|
341 |
+
$response['success'] = __( 'User has been successfully deleted.', 'ultimate-member' );
|
342 |
+
|
343 |
+
return $response;
|
344 |
+
}
|
345 |
+
|
346 |
+
|
347 |
+
/**
|
348 |
+
* Process Get user API Request
|
349 |
+
*
|
350 |
+
* @param $args
|
351 |
+
*
|
352 |
+
* @return array
|
353 |
+
*/
|
354 |
+
public function get_auser( $args ) {
|
355 |
+
/**
|
356 |
+
* @var int $um_id
|
357 |
+
* @var string $um_fields
|
358 |
+
*/
|
359 |
+
extract( $args );
|
360 |
+
|
361 |
+
$response = array();
|
362 |
+
$error = array();
|
363 |
+
|
364 |
+
if ( ! isset( $um_id ) ) {
|
365 |
+
$error['error'] = __( 'You must provide a user ID', 'ultimate-member' );
|
366 |
+
return $error;
|
367 |
+
}
|
368 |
+
|
369 |
+
$user = get_userdata( $um_id );
|
370 |
+
if ( ! $user ) {
|
371 |
+
$error['error'] = __('Invalid user specified','ultimate-member');
|
372 |
+
return $error;
|
373 |
+
}
|
374 |
+
|
375 |
+
unset( $user->data->user_status );
|
376 |
+
unset( $user->data->user_activation_key );
|
377 |
+
unset( $user->data->user_pass );
|
378 |
+
|
379 |
+
um_fetch_user( $user->ID );
|
380 |
+
|
381 |
+
if ( isset( $um_fields ) && $um_fields ) {
|
382 |
+
$um_fields = explode(',', $um_fields );
|
383 |
+
$response['ID'] = $user->ID;
|
384 |
+
$response['username'] = $user->user_login;
|
385 |
+
foreach ( $um_fields as $field ) {
|
386 |
+
|
387 |
+
switch ( $field ) {
|
388 |
+
|
389 |
+
default:
|
390 |
+
$response[ $field ] = ( um_profile( $field ) ) ? um_profile( $field ) : '';
|
391 |
+
|
392 |
+
/**
|
393 |
+
* UM hook
|
394 |
+
*
|
395 |
+
* @type filter
|
396 |
+
* @title um_rest_get_auser
|
397 |
+
* @description Change output data for Rest API user authentification call
|
398 |
+
* @input_vars
|
399 |
+
* [{"var":"$response","type":"array","desc":"Output Data"},
|
400 |
+
* {"var":"$field","type":"string","desc":"Field Key"},
|
401 |
+
* {"var":"$user_id","type":"int","desc":"User ID"}]
|
402 |
+
* @change_log
|
403 |
+
* ["Since: 2.0"]
|
404 |
+
* @usage
|
405 |
+
* <?php add_filter( 'um_rest_get_auser', 'function_name', 10, 3 ); ?>
|
406 |
+
* @example
|
407 |
+
* <?php
|
408 |
+
* add_filter( 'um_rest_get_auser', 'my_rest_get_auser', 10, 3 );
|
409 |
+
* function my_rest_get_auser( $response, $field, $user_id ) {
|
410 |
+
* // your code here
|
411 |
+
* return $response;
|
412 |
+
* }
|
413 |
+
* ?>
|
414 |
+
*/
|
415 |
+
$response = apply_filters( 'um_rest_get_auser', $response, $field, $user->ID );
|
416 |
+
break;
|
417 |
+
|
418 |
+
case 'cover_photo':
|
419 |
+
$response['cover_photo'] = $this->getsrc( um_user( 'cover_photo', 1000 ) );
|
420 |
+
break;
|
421 |
+
|
422 |
+
case 'profile_pic':
|
423 |
+
$response['profile_pic_original'] = um_get_user_avatar_url( '', 'original' );
|
424 |
+
$response['profile_pic_normal'] = um_get_user_avatar_url( '', 200 );
|
425 |
+
$response['profile_pic_small'] = um_get_user_avatar_url( '', 40 );
|
426 |
+
break;
|
427 |
+
|
428 |
+
case 'status':
|
429 |
+
$response['status'] = um_user( 'account_status' );
|
430 |
+
break;
|
431 |
+
|
432 |
+
case 'role':
|
433 |
+
//get priority role here
|
434 |
+
$response['role'] = um_user( 'role' );
|
435 |
+
break;
|
436 |
+
|
437 |
+
case 'email':
|
438 |
+
case 'user_email':
|
439 |
+
$response['email'] = um_user( 'user_email' );
|
440 |
+
break;
|
441 |
+
}
|
442 |
+
}
|
443 |
+
} else {
|
444 |
+
|
445 |
+
foreach ( $user as $key => $val ) {
|
446 |
+
if ( $key != 'data' ) {
|
447 |
+
continue;
|
448 |
+
}
|
449 |
+
if ( $key == 'data' ) {
|
450 |
+
$key = 'profile';
|
451 |
+
$val->roles = $user->roles;
|
452 |
+
$val->first_name = um_user( 'first_name' );
|
453 |
+
$val->last_name = um_user( 'last_name' );
|
454 |
+
$val->account_status = um_user( 'account_status' );
|
455 |
+
$val->profile_pic_original = um_get_user_avatar_url( '', 'original' );
|
456 |
+
$val->profile_pic_normal = um_get_user_avatar_url( '', 200 );
|
457 |
+
$val->profile_pic_small = um_get_user_avatar_url( '', 40 );
|
458 |
+
$val->cover_photo = $this->getsrc( um_user( 'cover_photo', 1000 ) );
|
459 |
+
|
460 |
+
/**
|
461 |
+
* UM hook
|
462 |
+
*
|
463 |
+
* @type filter
|
464 |
+
* @title um_rest_userdata
|
465 |
+
* @description Change output data for Rest API userdata call
|
466 |
+
* @input_vars
|
467 |
+
* [{"var":"$value","type":"array","desc":"Output Data"},
|
468 |
+
* {"var":"$user_id","type":"string","desc":"User ID"}]
|
469 |
+
* @change_log
|
470 |
+
* ["Since: 2.0"]
|
471 |
+
* @usage
|
472 |
+
* <?php add_filter( 'um_rest_userdata', 'function_name', 10, 2 ); ?>
|
473 |
+
* @example
|
474 |
+
* <?php
|
475 |
+
* add_filter( 'um_rest_userdata', 'my_rest_userdata', 10, 2 );
|
476 |
+
* function my_rest_userdata( $value, $user_id ) {
|
477 |
+
* // your code here
|
478 |
+
* return $value;
|
479 |
+
* }
|
480 |
+
* ?>
|
481 |
+
*/
|
482 |
+
$val = apply_filters( 'um_rest_userdata', $val, $user->ID );
|
483 |
+
}
|
484 |
+
$response = $val;
|
485 |
+
}
|
486 |
+
|
487 |
+
}
|
488 |
+
|
489 |
+
return $response;
|
490 |
+
}
|
491 |
+
|
492 |
+
|
493 |
+
/**
|
494 |
+
* Get source
|
495 |
+
*
|
496 |
+
* @param $image
|
497 |
+
*
|
498 |
+
* @return string
|
499 |
+
*/
|
500 |
+
public function getsrc( $image ) {
|
501 |
+
if (preg_match('/<img.+?src(?: )*=(?: )*[\'"](.*?)[\'"]/si', $image, $arrResult)) {
|
502 |
+
return $arrResult[1];
|
503 |
+
}
|
504 |
+
return '';
|
505 |
+
}
|
506 |
+
|
507 |
+
|
508 |
+
/**
|
509 |
+
* Retrieve the output format
|
510 |
+
*/
|
511 |
+
public function get_output_format() {
|
512 |
+
global $wp_query;
|
513 |
+
|
514 |
+
$format = isset( $wp_query->query_vars['um_format'] ) ? $wp_query->query_vars['um_format'] : 'json';
|
515 |
+
|
516 |
+
/**
|
517 |
+
* UM hook
|
518 |
+
*
|
519 |
+
* @type filter
|
520 |
+
* @title um_api_output_format
|
521 |
+
* @description UM Rest API output format
|
522 |
+
* @input_vars
|
523 |
+
* [{"var":"$format","type":"string","desc":"Format"}]
|
524 |
+
* @change_log
|
525 |
+
* ["Since: 2.0"]
|
526 |
+
* @usage
|
527 |
+
* <?php add_filter( 'um_api_output_format', 'function_name', 10, 1 ); ?>
|
528 |
+
* @example
|
529 |
+
* <?php
|
530 |
+
* add_filter( 'um_api_output_format', 'my_api_output_format', 10, 1 );
|
531 |
+
* function my_api_output_format( $format ) {
|
532 |
+
* // your code here
|
533 |
+
* return $format;
|
534 |
+
* }
|
535 |
+
* ?>
|
536 |
+
*/
|
537 |
+
return apply_filters( 'um_api_output_format', $format );
|
538 |
+
}
|
539 |
+
}
|
540 |
+
}
|
includes/core/rest/class-api.php
ADDED
@@ -0,0 +1,615 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace um\core\rest;
|
3 |
+
|
4 |
+
|
5 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
6 |
+
|
7 |
+
|
8 |
+
if ( ! class_exists( 'um\core\rest\API' ) ) {
|
9 |
+
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Class API
|
13 |
+
*
|
14 |
+
* @package um\core\rest
|
15 |
+
*/
|
16 |
+
class API {
|
17 |
+
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @var bool|int|null
|
21 |
+
*/
|
22 |
+
protected $pretty_print = false;
|
23 |
+
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @var bool|mixed|void
|
27 |
+
*/
|
28 |
+
public $log_requests = true;
|
29 |
+
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @var bool
|
33 |
+
*/
|
34 |
+
protected $is_valid_request = false;
|
35 |
+
|
36 |
+
|
37 |
+
/**
|
38 |
+
* @var int
|
39 |
+
*/
|
40 |
+
protected $user_id = 0;
|
41 |
+
|
42 |
+
|
43 |
+
/**
|
44 |
+
* @var
|
45 |
+
*/
|
46 |
+
protected $stats;
|
47 |
+
|
48 |
+
|
49 |
+
/**
|
50 |
+
* @var array
|
51 |
+
*/
|
52 |
+
protected $data = array();
|
53 |
+
|
54 |
+
|
55 |
+
/**
|
56 |
+
* @var bool
|
57 |
+
*/
|
58 |
+
protected $override = true;
|
59 |
+
|
60 |
+
|
61 |
+
/**
|
62 |
+
* @var array
|
63 |
+
*/
|
64 |
+
protected $vars = array();
|
65 |
+
|
66 |
+
|
67 |
+
/**
|
68 |
+
* REST_API constructor.
|
69 |
+
*/
|
70 |
+
public function __construct() {
|
71 |
+
|
72 |
+
add_action( 'init', array( $this, 'add_endpoint' ) );
|
73 |
+
add_action( 'template_redirect', array( $this, 'process_query' ), -1 );
|
74 |
+
|
75 |
+
// Determine if JSON_PRETTY_PRINT is available
|
76 |
+
$this->pretty_print = defined( 'JSON_PRETTY_PRINT' ) ? JSON_PRETTY_PRINT : null;
|
77 |
+
|
78 |
+
/**
|
79 |
+
* UM hook
|
80 |
+
*
|
81 |
+
* @type filter
|
82 |
+
* @title um_api_log_requests
|
83 |
+
* @description Allow API request logging to be turned off
|
84 |
+
* @input_vars
|
85 |
+
* [{"var":"$allow_log","type":"bool","desc":"Enable api logs"}]
|
86 |
+
* @change_log
|
87 |
+
* ["Since: 2.0"]
|
88 |
+
* @usage
|
89 |
+
* <?php add_filter( 'um_api_log_requests', 'function_name', 10, 1 ); ?>
|
90 |
+
* @example
|
91 |
+
* <?php
|
92 |
+
* add_filter( 'um_api_log_requests', 'my_api_log_requests', 10, 1 );
|
93 |
+
* function my_api_log_requests( $allow_log ) {
|
94 |
+
* // your code here
|
95 |
+
* return $allow_log;
|
96 |
+
* }
|
97 |
+
* ?>
|
98 |
+
*/
|
99 |
+
$this->log_requests = apply_filters( 'um_api_log_requests', $this->log_requests );
|
100 |
+
}
|
101 |
+
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Registers a new rewrite endpoint for accessing the API
|
105 |
+
*
|
106 |
+
* @param $rewrite_rules
|
107 |
+
*/
|
108 |
+
public function add_endpoint( $rewrite_rules ) {
|
109 |
+
add_rewrite_endpoint( 'um-api', EP_ALL );
|
110 |
+
}
|
111 |
+
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Listens for the API and then processes the API requests
|
115 |
+
*/
|
116 |
+
public function process_query() {
|
117 |
+
global $wp_query;
|
118 |
+
|
119 |
+
// Check for um-api var. Get out if not present
|
120 |
+
if ( ! isset( $wp_query->query_vars['um-api'] ) ) {
|
121 |
+
return;
|
122 |
+
}
|
123 |
+
|
124 |
+
// Check for a valid user and set errors if necessary
|
125 |
+
$this->validate_request();
|
126 |
+
|
127 |
+
// Only proceed if no errors have been noted
|
128 |
+
if ( ! $this->is_valid_request ) {
|
129 |
+
return;
|
130 |
+
}
|
131 |
+
|
132 |
+
if ( ! defined( 'UM_DOING_API' ) ) {
|
133 |
+
define( 'UM_DOING_API', true );
|
134 |
+
}
|
135 |
+
|
136 |
+
// Determine the kind of query
|
137 |
+
$args = array();
|
138 |
+
$query_mode = $this->get_query_mode();
|
139 |
+
foreach ( $this->vars as $k ) {
|
140 |
+
$args[ $k ] = isset( $wp_query->query_vars[ $k ] ) ? $wp_query->query_vars[ $k ] : null;
|
141 |
+
}
|
142 |
+
|
143 |
+
$data = array();
|
144 |
+
|
145 |
+
switch ( $query_mode ) {
|
146 |
+
case 'get.stats':
|
147 |
+
$data = $this->get_stats( $args );
|
148 |
+
break;
|
149 |
+
|
150 |
+
case 'get.users':
|
151 |
+
$data = $this->get_users( $args );
|
152 |
+
break;
|
153 |
+
|
154 |
+
case 'get.user':
|
155 |
+
$data = $this->get_auser( $args );
|
156 |
+
break;
|
157 |
+
|
158 |
+
case 'update.user':
|
159 |
+
$data = $this->update_user( $args );
|
160 |
+
break;
|
161 |
+
|
162 |
+
case 'delete.user':
|
163 |
+
$data = $this->delete_user( $args );
|
164 |
+
break;
|
165 |
+
|
166 |
+
default:
|
167 |
+
/**
|
168 |
+
* UM hook
|
169 |
+
*
|
170 |
+
* @type filter
|
171 |
+
* @title um_rest_query_mode
|
172 |
+
* @description Change query attributes
|
173 |
+
* @input_vars
|
174 |
+
* [{"var":"$data","type":"array","desc":"Query Data"},
|
175 |
+
* {"var":"$query_mode","type":"string","desc":"Query Mode"},
|
176 |
+
* {"var":"$args","type":"array","desc":"Query Arguments"}]
|
177 |
+
* @change_log
|
178 |
+
* ["Since: 2.0"]
|
179 |
+
* @usage
|
180 |
+
* <?php add_filter( 'um_rest_query_mode', 'function_name', 10, 3 ); ?>
|
181 |
+
* @example
|
182 |
+
* <?php
|
183 |
+
* add_filter( 'um_rest_query_mode', 'my_rest_query_mode', 10, 3 );
|
184 |
+
* function um_rest_query_mode( $data, $query_mode, $args ) {
|
185 |
+
* // your code here
|
186 |
+
* return $data;
|
187 |
+
* }
|
188 |
+
* ?>
|
189 |
+
*/
|
190 |
+
$data = apply_filters( 'um_rest_query_mode', $data, $query_mode, $args );
|
191 |
+
break;
|
192 |
+
}
|
193 |
+
|
194 |
+
/**
|
195 |
+
* UM hook
|
196 |
+
*
|
197 |
+
* @type filter
|
198 |
+
* @title um_api_output_data
|
199 |
+
* @description Change output data for Rest API call
|
200 |
+
* @input_vars
|
201 |
+
* [{"var":"$data","type":"array","desc":"Output Data"},
|
202 |
+
* {"var":"$query_mode","type":"string","desc":"Query Mode"},
|
203 |
+
* {"var":"$api_class","type":"REST_API","desc":"REST_API instance"}]
|
204 |
+
* @change_log
|
205 |
+
* ["Since: 2.0"]
|
206 |
+
* @usage
|
207 |
+
* <?php add_filter( 'um_api_output_data', 'function_name', 10, 3 ); ?>
|
208 |
+
* @example
|
209 |
+
* <?php
|
210 |
+
* add_filter( 'um_api_output_data', 'my_api_output_data', 10, 3 );
|
211 |
+
* function my_api_output_data( $data, $query_mode, $api_class ) {
|
212 |
+
* // your code here
|
213 |
+
* return $data;
|
214 |
+
* }
|
215 |
+
* ?>
|
216 |
+
*/
|
217 |
+
$this->data = apply_filters( 'um_api_output_data', $data, $query_mode, $this );
|
218 |
+
|
219 |
+
// Log this API request, if enabled. We log it here because we have access to errors.
|
220 |
+
$this->log_request( $this->data );
|
221 |
+
|
222 |
+
// Send out data to the output function
|
223 |
+
$this->output();
|
224 |
+
}
|
225 |
+
|
226 |
+
|
227 |
+
/**
|
228 |
+
* Validate the API request
|
229 |
+
*/
|
230 |
+
protected function validate_request() {
|
231 |
+
|
232 |
+
}
|
233 |
+
|
234 |
+
|
235 |
+
/**
|
236 |
+
* Retrieve the user ID based on the public key provided
|
237 |
+
*
|
238 |
+
* @param string $key
|
239 |
+
*
|
240 |
+
* @return bool
|
241 |
+
*/
|
242 |
+
public function get_user( $key = '' ) {
|
243 |
+
return false;
|
244 |
+
}
|
245 |
+
|
246 |
+
|
247 |
+
/**
|
248 |
+
* Displays a missing authentication error if all the parameters aren't
|
249 |
+
* provided
|
250 |
+
*/
|
251 |
+
protected function missing_auth() {
|
252 |
+
$error = array();
|
253 |
+
$error['error'] = __( 'You must specify both a token and API key!', 'ultimate-member' );
|
254 |
+
|
255 |
+
$this->data = $error;
|
256 |
+
$this->output( 401 );
|
257 |
+
}
|
258 |
+
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Displays an authentication failed error if the user failed to provide valid credentials
|
262 |
+
*/
|
263 |
+
protected function invalid_auth() {
|
264 |
+
$error = array();
|
265 |
+
$error['error'] = __( 'Your request could not be authenticated', 'ultimate-member' );
|
266 |
+
|
267 |
+
$this->data = $error;
|
268 |
+
$this->output( 401 );
|
269 |
+
}
|
270 |
+
|
271 |
+
|
272 |
+
/**
|
273 |
+
* Displays an invalid API key error if the API key provided couldn't be validated
|
274 |
+
*/
|
275 |
+
protected function invalid_key() {
|
276 |
+
$error = array();
|
277 |
+
$error['error'] = __( 'Invalid API key', 'ultimate-member' );
|
278 |
+
|
279 |
+
$this->data = $error;
|
280 |
+
$this->output( 401 );
|
281 |
+
}
|
282 |
+
|
283 |
+
|
284 |
+
/**
|
285 |
+
* Get some stats
|
286 |
+
*
|
287 |
+
* @param $args
|
288 |
+
*
|
289 |
+
* @return array
|
290 |
+
*/
|
291 |
+
public function get_stats( $args ) {
|
292 |
+
global $wpdb;
|
293 |
+
|
294 |
+
$response = array();
|
295 |
+
|
296 |
+
$count = absint( $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}users" ) );
|
297 |
+
$response['stats']['total_users'] = $count;
|
298 |
+
|
299 |
+
$pending = UM()->user()->get_pending_users_count();
|
300 |
+
$response['stats']['pending_users'] = absint( $pending );
|
301 |
+
|
302 |
+
/**
|
303 |
+
* UM hook
|
304 |
+
*
|
305 |
+
* @type filter
|
306 |
+
* @title um_rest_api_get_stats
|
307 |
+
* @description Change output data for Rest API get stats call
|
308 |
+
* @input_vars
|
309 |
+
* [{"var":"$response","type":"array","desc":"Output Data"}]
|
310 |
+
* @change_log
|
311 |
+
* ["Since: 2.0"]
|
312 |
+
* @usage
|
313 |
+
* <?php add_filter( 'um_rest_api_get_stats', 'function_name', 10, 1 ); ?>
|
314 |
+
* @example
|
315 |
+
* <?php
|
316 |
+
* add_filter( 'um_rest_api_get_stats', 'my_rest_api_get_stats', 10, 1 );
|
317 |
+
* function my_rest_api_get_stats( $response ) {
|
318 |
+
* // your code here
|
319 |
+
* return $response;
|
320 |
+
* }
|
321 |
+
* ?>
|
322 |
+
*/
|
323 |
+
$response = apply_filters( 'um_rest_api_get_stats', $response );
|
324 |
+
return $response;
|
325 |
+
}
|
326 |
+
|
327 |
+
|
328 |
+
/**
|
329 |
+
* Process Get users API Request
|
330 |
+
*
|
331 |
+
* @param $args
|
332 |
+
*
|
333 |
+
* @return array
|
334 |
+
*/
|
335 |
+
public function get_users( $args ) {
|
336 |
+
return array();
|
337 |
+
}
|
338 |
+
|
339 |
+
|
340 |
+
/**
|
341 |
+
* Update user API query
|
342 |
+
*
|
343 |
+
* @param $args
|
344 |
+
*
|
345 |
+
* @return array
|
346 |
+
*/
|
347 |
+
public function update_user( $args ) {
|
348 |
+
return array();
|
349 |
+
}
|
350 |
+
|
351 |
+
|
352 |
+
/**
|
353 |
+
* Process delete user via API
|
354 |
+
*
|
355 |
+
* @param $args
|
356 |
+
*
|
357 |
+
* @return array
|
358 |
+
*/
|
359 |
+
public function delete_user( $args ) {
|
360 |
+
return array();
|
361 |
+
}
|
362 |
+
|
363 |
+
|
364 |
+
/**
|
365 |
+
* Process Get user API Request
|
366 |
+
*
|
367 |
+
* @param $args
|
368 |
+
*
|
369 |
+
* @return array
|
370 |
+
*/
|
371 |
+
public function get_auser( $args ) {
|
372 |
+
return array();
|
373 |
+
}
|
374 |
+
|
375 |
+
|
376 |
+
/**
|
377 |
+
* Get source
|
378 |
+
*
|
379 |
+
* @param $image
|
380 |
+
*
|
381 |
+
* @return string
|
382 |
+
*/
|
383 |
+
protected function getsrc( $image ) {
|
384 |
+
if ( preg_match( '/<img.+?src(?: )*=(?: )*[\'"](.*?)[\'"]/si', $image, $arrResult ) ) {
|
385 |
+
return $arrResult[1];
|
386 |
+
}
|
387 |
+
return '';
|
388 |
+
}
|
389 |
+
|
390 |
+
|
391 |
+
/**
|
392 |
+
* Determines the kind of query requested and also ensure it is a valid query
|
393 |
+
*
|
394 |
+
* @return null
|
395 |
+
*/
|
396 |
+
public function get_query_mode() {
|
397 |
+
global $wp_query;
|
398 |
+
|
399 |
+
/**
|
400 |
+
* UM hook
|
401 |
+
*
|
402 |
+
* @type filter
|
403 |
+
* @title um_api_valid_query_modes
|
404 |
+
* @description Whitelist UM query options
|
405 |
+
* @input_vars
|
406 |
+
* [{"var":"$list","type":"array","desc":"Whitelist"}]
|
407 |
+
* @change_log
|
408 |
+
* ["Since: 2.0"]
|
409 |
+
* @usage
|
410 |
+
* <?php add_filter( 'um_api_valid_query_modes', 'function_name', 10, 1 ); ?>
|
411 |
+
* @example
|
412 |
+
* <?php
|
413 |
+
* add_filter( 'um_api_valid_query_modes', 'my_api_valid_query_modes', 10, 1 );
|
414 |
+
* function my_api_valid_query_modes( $list ) {
|
415 |
+
* // your code here
|
416 |
+
* return $list;
|
417 |
+
* }
|
418 |
+
* ?>
|
419 |
+
*/
|
420 |
+
$accepted = apply_filters( 'um_api_valid_query_modes', array(
|
421 |
+
'get.users',
|
422 |
+
'get.user',
|
423 |
+
'update.user',
|
424 |
+
'delete.user',
|
425 |
+
'get.following',
|
426 |
+
'get.followers',
|
427 |
+
'get.stats',
|
428 |
+
) );
|
429 |
+
|
430 |
+
$query = isset( $wp_query->query_vars['um-api'] ) ? $wp_query->query_vars['um-api'] : null;
|
431 |
+
$error = array();
|
432 |
+
// Make sure our query is valid
|
433 |
+
if ( ! in_array( $query, $accepted ) ) {
|
434 |
+
$error['error'] = __( 'Invalid query!', 'ultimate-member' );
|
435 |
+
|
436 |
+
$this->data = $error;
|
437 |
+
$this->output();
|
438 |
+
}
|
439 |
+
|
440 |
+
return $query;
|
441 |
+
}
|
442 |
+
|
443 |
+
|
444 |
+
/**
|
445 |
+
* Get page number
|
446 |
+
*/
|
447 |
+
public function get_paged() {
|
448 |
+
global $wp_query;
|
449 |
+
|
450 |
+
return isset( $wp_query->query_vars['page'] ) ? $wp_query->query_vars['page'] : 1;
|
451 |
+
}
|
452 |
+
|
453 |
+
|
454 |
+
/**
|
455 |
+
* Retrieve the output format
|
456 |
+
*/
|
457 |
+
public function get_output_format() {
|
458 |
+
/**
|
459 |
+
* UM hook
|
460 |
+
*
|
461 |
+
* @type filter
|
462 |
+
* @title um_api_output_format
|
463 |
+
* @description UM Rest API output format
|
464 |
+
* @input_vars
|
465 |
+
* [{"var":"$format","type":"string","desc":"Format"}]
|
466 |
+
* @change_log
|
467 |
+
* ["Since: 2.0"]
|
468 |
+
* @usage
|
469 |
+
* <?php add_filter( 'um_api_output_format', 'function_name', 10, 1 ); ?>
|
470 |
+
* @example
|
471 |
+
* <?php
|
472 |
+
* add_filter( 'um_api_output_format', 'my_api_output_format', 10, 1 );
|
473 |
+
* function my_api_output_format( $format ) {
|
474 |
+
* // your code here
|
475 |
+
* return $format;
|
476 |
+
* }
|
477 |
+
* ?>
|
478 |
+
*/
|
479 |
+
return apply_filters( 'um_api_output_format', 'json' );
|
480 |
+
}
|
481 |
+
|
482 |
+
|
483 |
+
/**
|
484 |
+
* Log each API request, if enabled
|
485 |
+
*
|
486 |
+
* @param array $data
|
487 |
+
*/
|
488 |
+
protected function log_request( $data = array() ) {
|
489 |
+
if ( ! $this->log_requests ) {
|
490 |
+
return;
|
491 |
+
}
|
492 |
+
}
|
493 |
+
|
494 |
+
|
495 |
+
/**
|
496 |
+
* Retrieve the output data
|
497 |
+
*/
|
498 |
+
public function get_output() {
|
499 |
+
return $this->data;
|
500 |
+
}
|
501 |
+
|
502 |
+
|
503 |
+
/**
|
504 |
+
* Output Query in either JSON/XML. The query data is outputted as JSON
|
505 |
+
* by default
|
506 |
+
*
|
507 |
+
* @param int $status_code
|
508 |
+
*/
|
509 |
+
public function output( $status_code = 200 ) {
|
510 |
+
$format = $this->get_output_format();
|
511 |
+
|
512 |
+
status_header( $status_code );
|
513 |
+
|
514 |
+
/**
|
515 |
+
* UM hook
|
516 |
+
*
|
517 |
+
* @type action
|
518 |
+
* @title um_api_output_before
|
519 |
+
* @description Action before API output
|
520 |
+
* @input_vars
|
521 |
+
* [{"var":"$data","type":"array","desc":"API data"},
|
522 |
+
* {"var":"$rest_api","type":"object","desc":"REST API class"},
|
523 |
+
* {"var":"$format","type":"string","desc":"Format"}]
|
524 |
+
* @change_log
|
525 |
+
* ["Since: 2.0"]
|
526 |
+
* @usage add_action( 'um_api_output_before', 'function_name', 10, 3 );
|
527 |
+
* @example
|
528 |
+
* <?php
|
529 |
+
* add_action( 'um_api_output_before', 'my_api_output_before', 10, 3 );
|
530 |
+
* function my_api_output_before( $data, $rest_api, $format ) {
|
531 |
+
* // your code here
|
532 |
+
* }
|
533 |
+
* ?>
|
534 |
+
*/
|
535 |
+
do_action( 'um_api_output_before', $this->data, $this, $format );
|
536 |
+
|
537 |
+
switch ( $format ) {
|
538 |
+
|
539 |
+
case 'xml' :
|
540 |
+
|
541 |
+
require_once um_path . 'includes/lib/array2xml.php';
|
542 |
+
$xml = \Array2XML::createXML( 'um', $this->data );
|
543 |
+
echo $xml->saveXML();
|
544 |
+
|
545 |
+
break;
|
546 |
+
|
547 |
+
case 'json' :
|
548 |
+
case '' :
|
549 |
+
|
550 |
+
header( 'Content-Type: application/json' );
|
551 |
+
if ( ! empty( $this->pretty_print ) ) {
|
552 |
+
echo json_encode( $this->data, $this->pretty_print );
|
553 |
+
} else {
|
554 |
+
echo json_encode( $this->data );
|
555 |
+
}
|
556 |
+
|
557 |
+
break;
|
558 |
+
|
559 |
+
|
560 |
+
default :
|
561 |
+
|
562 |
+
// Allow other formats to be added via extensions
|
563 |
+
/**
|
564 |
+
* UM hook
|
565 |
+
*
|
566 |
+
* @type action
|
567 |
+
* @title um_api_output_{$format}
|
568 |
+
* @description Action before API output
|
569 |
+
* @input_vars
|
570 |
+
* [{"var":"$data","type":"array","desc":"API data"},
|
571 |
+
* {"var":"$rest_api","type":"object","desc":"REST API class"}]
|
572 |
+
* @change_log
|
573 |
+
* ["Since: 2.0"]
|
574 |
+
* @usage add_action( 'um_api_output_{$format}', 'function_name', 10, 2 );
|
575 |
+
* @example
|
576 |
+
* <?php
|
577 |
+
* add_action( 'um_api_output_{$format}', 'my_api_output', 10, 2 );
|
578 |
+
* function my_api_output( $data, $rest_api ) {
|
579 |
+
* // your code here
|
580 |
+
* }
|
581 |
+
* ?>
|
582 |
+
*/
|
583 |
+
do_action( 'um_api_output_' . $format, $this->data, $this );
|
584 |
+
|
585 |
+
break;
|
586 |
+
}
|
587 |
+
|
588 |
+
/**
|
589 |
+
* UM hook
|
590 |
+
*
|
591 |
+
* @type action
|
592 |
+
* @title um_api_output_after
|
593 |
+
* @description Action after API output
|
594 |
+
* @input_vars
|
595 |
+
* [{"var":"$data","type":"array","desc":"API data"},
|
596 |
+
* {"var":"$rest_api","type":"object","desc":"REST API class"},
|
597 |
+
* {"var":"$format","type":"string","desc":"Format"}]
|
598 |
+
* @change_log
|
599 |
+
* ["Since: 2.0"]
|
600 |
+
* @usage add_action( 'um_api_output_after', 'function_name', 10, 3 );
|
601 |
+
* @example
|
602 |
+
* <?php
|
603 |
+
* add_action( 'um_api_output_after', 'my_api_output_after', 10, 3 );
|
604 |
+
* function my_api_output_after( $data, $rest_api, $format ) {
|
605 |
+
* // your code here
|
606 |
+
* }
|
607 |
+
* ?>
|
608 |
+
*/
|
609 |
+
do_action( 'um_api_output_after', $this->data, $this, $format );
|
610 |
+
|
611 |
+
die();
|
612 |
+
}
|
613 |
+
|
614 |
+
}
|
615 |
+
}
|
includes/core/um-actions-core.php
CHANGED
@@ -100,6 +100,9 @@ function um_action_request_process() {
|
|
100 |
wp_die( __( 'You do not have permission to make this action.', 'ultimate-member' ) );
|
101 |
}
|
102 |
|
|
|
|
|
|
|
103 |
um_fetch_user( $uid );
|
104 |
UM()->user()->approve();
|
105 |
exit( wp_redirect( UM()->permalinks()->get_current_url( true ) ) );
|
@@ -120,6 +123,9 @@ function um_action_request_process() {
|
|
120 |
wp_die( __( 'You do not have permission to make this action.', 'ultimate-member' ) );
|
121 |
}
|
122 |
|
|
|
|
|
|
|
123 |
um_fetch_user( $uid );
|
124 |
UM()->user()->email_pending();
|
125 |
exit( wp_redirect( UM()->permalinks()->get_current_url( true ) ) );
|
100 |
wp_die( __( 'You do not have permission to make this action.', 'ultimate-member' ) );
|
101 |
}
|
102 |
|
103 |
+
add_filter( 'um_template_tags_patterns_hook', array( UM()->password(), 'add_placeholder' ), 10, 1 );
|
104 |
+
add_filter( 'um_template_tags_replaces_hook', array( UM()->password(), 'add_replace_placeholder' ), 10, 1 );
|
105 |
+
|
106 |
um_fetch_user( $uid );
|
107 |
UM()->user()->approve();
|
108 |
exit( wp_redirect( UM()->permalinks()->get_current_url( true ) ) );
|
123 |
wp_die( __( 'You do not have permission to make this action.', 'ultimate-member' ) );
|
124 |
}
|
125 |
|
126 |
+
add_filter( 'um_template_tags_patterns_hook', array( UM()->user(), 'add_activation_placeholder' ), 10, 1 );
|
127 |
+
add_filter( 'um_template_tags_replaces_hook', array( UM()->user(), 'add_activation_replace_placeholder' ), 10, 1 );
|
128 |
+
|
129 |
um_fetch_user( $uid );
|
130 |
UM()->user()->email_pending();
|
131 |
exit( wp_redirect( UM()->permalinks()->get_current_url( true ) ) );
|
includes/core/um-actions-form.php
CHANGED
@@ -614,14 +614,14 @@ function um_submit_form_errors_hook_( $args ) {
|
|
614 |
|
615 |
case 'unique_username':
|
616 |
|
617 |
-
if ( $args[$key] == '' ) {
|
618 |
-
UM()->form()->add_error($key, __('You must provide a username','ultimate-member') );
|
619 |
-
}
|
620 |
-
UM()->form()->add_error($key, __('Your username is already taken','ultimate-member') );
|
621 |
-
}
|
622 |
-
UM()->form()->add_error($key, __('Username cannot be an email','ultimate-member') );
|
623 |
-
}
|
624 |
-
UM()->form()->add_error($key, __('Your username contains invalid characters','ultimate-member') );
|
625 |
}
|
626 |
|
627 |
break;
|
614 |
|
615 |
case 'unique_username':
|
616 |
|
617 |
+
if ( $args[ $key ] == '' ) {
|
618 |
+
UM()->form()->add_error( $key, __( 'You must provide a username', 'ultimate-member' ) );
|
619 |
+
} elseif ( $mode == 'register' && username_exists( sanitize_user( $args[ $key ] ) ) ) {
|
620 |
+
UM()->form()->add_error( $key, __( 'Your username is already taken', 'ultimate-member' ) );
|
621 |
+
} elseif ( is_email( $args[ $key ] ) ) {
|
622 |
+
UM()->form()->add_error( $key, __( 'Username cannot be an email', 'ultimate-member' ) );
|
623 |
+
} elseif ( ! UM()->validation()->safe_username( $args[$key] ) ) {
|
624 |
+
UM()->form()->add_error( $key, __( 'Your username contains invalid characters', 'ultimate-member' ) );
|
625 |
}
|
626 |
|
627 |
break;
|
includes/core/um-actions-profile.php
CHANGED
@@ -482,8 +482,8 @@ function um_profile_dynamic_meta_desc() {
|
|
482 |
|
483 |
$content = um_convert_tags( UM()->options()->get( 'profile_desc' ) );
|
484 |
$user_id = um_user( 'ID' );
|
485 |
-
$url = um_user_profile_url();
|
486 |
|
|
|
487 |
$avatar = um_get_user_avatar_url( $user_id, 'original' );
|
488 |
|
489 |
um_reset_user(); ?>
|
482 |
|
483 |
$content = um_convert_tags( UM()->options()->get( 'profile_desc' ) );
|
484 |
$user_id = um_user( 'ID' );
|
|
|
485 |
|
486 |
+
$url = um_user_profile_url();
|
487 |
$avatar = um_get_user_avatar_url( $user_id, 'original' );
|
488 |
|
489 |
um_reset_user(); ?>
|
includes/core/um-filters-members.php
CHANGED
@@ -345,9 +345,9 @@ function um_prepare_user_query_args( $query_args, $args ) {
|
|
345 |
// must have a cover photo
|
346 |
if ( $has_cover_photo == 1 ) {
|
347 |
$query_args['meta_query'][] = array(
|
348 |
-
'key'
|
349 |
-
'value'
|
350 |
-
'compare'
|
351 |
);
|
352 |
}
|
353 |
|
@@ -362,16 +362,8 @@ function um_prepare_user_query_args( $query_args, $args ) {
|
|
362 |
|
363 |
// add roles to appear in directory
|
364 |
if ( ! empty( $roles ) ) {
|
365 |
-
|
366 |
//since WP4.4 use 'role__in' argument
|
367 |
$query_args['role__in'] = $roles;
|
368 |
-
|
369 |
-
/*$query_args['meta_query'][] = array(
|
370 |
-
'key' => 'role',
|
371 |
-
'value' => $roles,
|
372 |
-
'compare' => 'IN'
|
373 |
-
);*/
|
374 |
-
|
375 |
}
|
376 |
|
377 |
// sort members by
|
@@ -384,7 +376,24 @@ function um_prepare_user_query_args( $query_args, $args ) {
|
|
384 |
$query_args['meta_key'] = $sortby_custom;
|
385 |
$query_args['orderby'] = 'meta_value, display_name';
|
386 |
|
387 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
388 |
|
389 |
$query_args['meta_key'] = $sortby;
|
390 |
$query_args['orderby'] = 'meta_value';
|
@@ -392,7 +401,7 @@ function um_prepare_user_query_args( $query_args, $args ) {
|
|
392 |
} else {
|
393 |
|
394 |
if ( strstr( $sortby, '_desc' ) ) {
|
395 |
-
$sortby = str_replace('_desc',''
|
396 |
$order = 'DESC';
|
397 |
}
|
398 |
|
@@ -431,7 +440,7 @@ function um_prepare_user_query_args( $query_args, $args ) {
|
|
431 |
* }
|
432 |
* ?>
|
433 |
*/
|
434 |
-
$query_args = apply_filters('um_modify_sortby_parameter', $query_args, $sortby);
|
435 |
|
436 |
}
|
437 |
|
345 |
// must have a cover photo
|
346 |
if ( $has_cover_photo == 1 ) {
|
347 |
$query_args['meta_query'][] = array(
|
348 |
+
'key' => 'cover_photo',
|
349 |
+
'value' => '',
|
350 |
+
'compare' => '!='
|
351 |
);
|
352 |
}
|
353 |
|
362 |
|
363 |
// add roles to appear in directory
|
364 |
if ( ! empty( $roles ) ) {
|
|
|
365 |
//since WP4.4 use 'role__in' argument
|
366 |
$query_args['role__in'] = $roles;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
367 |
}
|
368 |
|
369 |
// sort members by
|
376 |
$query_args['meta_key'] = $sortby_custom;
|
377 |
$query_args['orderby'] = 'meta_value, display_name';
|
378 |
|
379 |
+
} elseif ( 'display_name' == $sortby ) {
|
380 |
+
|
381 |
+
$query_args['meta_query'][] = array(
|
382 |
+
'relation' => 'OR',
|
383 |
+
'full_name' => array(
|
384 |
+
'key' => 'full_name',
|
385 |
+
'compare' => 'EXISTS'
|
386 |
+
),
|
387 |
+
array(
|
388 |
+
'key' => 'full_name',
|
389 |
+
'compare' => 'NOT EXISTS'
|
390 |
+
)
|
391 |
+
);
|
392 |
+
|
393 |
+
$query_args['orderby'] = 'full_name, display_name';
|
394 |
+
$order = 'ASC';
|
395 |
+
|
396 |
+
} elseif ( in_array( $sortby, array( 'last_name', 'first_name' ) ) ) {
|
397 |
|
398 |
$query_args['meta_key'] = $sortby;
|
399 |
$query_args['orderby'] = 'meta_value';
|
401 |
} else {
|
402 |
|
403 |
if ( strstr( $sortby, '_desc' ) ) {
|
404 |
+
$sortby = str_replace( '_desc', '', $sortby );
|
405 |
$order = 'DESC';
|
406 |
}
|
407 |
|
440 |
* }
|
441 |
* ?>
|
442 |
*/
|
443 |
+
$query_args = apply_filters( 'um_modify_sortby_parameter', $query_args, $sortby );
|
444 |
|
445 |
}
|
446 |
|
includes/core/um-filters-profile.php
CHANGED
@@ -14,7 +14,7 @@ function um_dynamic_user_profile_pagetitle( $title, $sep = '' ) {
|
|
14 |
|
15 |
$profile_title = UM()->options()->get( 'profile_title' );
|
16 |
|
17 |
-
if ( um_is_core_page('user') && um_get_requested_user() ) {
|
18 |
|
19 |
um_fetch_user( um_get_requested_user() );
|
20 |
|
14 |
|
15 |
$profile_title = UM()->options()->get( 'profile_title' );
|
16 |
|
17 |
+
if ( um_is_core_page( 'user' ) && um_get_requested_user() ) {
|
18 |
|
19 |
um_fetch_user( um_get_requested_user() );
|
20 |
|
includes/um-deprecated-functions.php
CHANGED
@@ -132,20 +132,20 @@ function um_set_redirect_url( $url ) {
|
|
132 |
*/
|
133 |
function um_get_redirect_url( $key ) {
|
134 |
|
135 |
-
if (um_is_session_started() === false) {
|
136 |
session_start();
|
137 |
}
|
138 |
|
139 |
-
if (isset( $_SESSION['um_redirect_key'][$key] )) {
|
140 |
|
141 |
-
$url = $_SESSION['um_redirect_key'][$key];
|
142 |
|
143 |
return $url;
|
144 |
|
145 |
} else {
|
146 |
|
147 |
-
if (isset( $_SESSION['um_redirect_key'] )) {
|
148 |
-
foreach ($_SESSION['um_redirect_key'] as $key => $url) {
|
149 |
|
150 |
return $url;
|
151 |
|
132 |
*/
|
133 |
function um_get_redirect_url( $key ) {
|
134 |
|
135 |
+
if ( um_is_session_started() === false ) {
|
136 |
session_start();
|
137 |
}
|
138 |
|
139 |
+
if ( isset( $_SESSION['um_redirect_key'][ $key ] ) ) {
|
140 |
|
141 |
+
$url = $_SESSION['um_redirect_key'][ $key ];
|
142 |
|
143 |
return $url;
|
144 |
|
145 |
} else {
|
146 |
|
147 |
+
if ( isset( $_SESSION['um_redirect_key'] ) ) {
|
148 |
+
foreach ( $_SESSION['um_redirect_key'] as $key => $url ) {
|
149 |
|
150 |
return $url;
|
151 |
|
includes/um-short-functions.php
CHANGED
@@ -61,7 +61,6 @@ function um_is_session_started() {
|
|
61 |
return false;
|
62 |
}
|
63 |
|
64 |
-
|
65 |
/**
|
66 |
* User clean basename
|
67 |
*
|
@@ -104,15 +103,12 @@ function um_clean_user_basename( $value ) {
|
|
104 |
|
105 |
|
106 |
/**
|
107 |
-
*
|
108 |
*
|
109 |
-
* @
|
110 |
-
* @param array $args
|
111 |
-
* @param bool $with_kses
|
112 |
-
*
|
113 |
-
* @return mixed|string
|
114 |
*/
|
115 |
-
function
|
|
|
116 |
$search = array(
|
117 |
'{display_name}',
|
118 |
'{first_name}',
|
@@ -120,20 +116,11 @@ function um_convert_tags( $content, $args = array(), $with_kses = true ) {
|
|
120 |
'{gender}',
|
121 |
'{username}',
|
122 |
'{email}',
|
123 |
-
'{password}',
|
124 |
-
'{login_url}',
|
125 |
-
'{login_referrer}',
|
126 |
'{site_name}',
|
127 |
-
'{site_url}',
|
128 |
-
'{account_activation_link}',
|
129 |
-
'{password_reset_link}',
|
130 |
-
'{admin_email}',
|
131 |
-
'{user_profile_link}',
|
132 |
'{user_account_link}',
|
133 |
-
'{submitted_registration}',
|
134 |
-
'{user_avatar_url}',
|
135 |
);
|
136 |
|
|
|
137 |
/**
|
138 |
* UM hook
|
139 |
*
|
@@ -164,18 +151,8 @@ function um_convert_tags( $content, $args = array(), $with_kses = true ) {
|
|
164 |
um_user( 'gender' ),
|
165 |
um_user( 'user_login' ),
|
166 |
um_user( 'user_email' ),
|
167 |
-
um_user( '_um_cool_but_hard_to_guess_plain_pw' ),
|
168 |
-
um_get_core_page( 'login' ),
|
169 |
-
um_dynamic_login_page_redirect(),
|
170 |
UM()->options()->get( 'site_name' ),
|
171 |
-
get_bloginfo( 'url' ),
|
172 |
-
um_user( 'account_activation_link' ),
|
173 |
-
um_user( 'password_reset_link' ),
|
174 |
-
um_admin_email(),
|
175 |
-
um_user_profile_url(),
|
176 |
um_get_core_page( 'account' ),
|
177 |
-
um_user_submitted_registration(),
|
178 |
-
um_get_user_avatar_url(),
|
179 |
);
|
180 |
|
181 |
/**
|
@@ -201,7 +178,23 @@ function um_convert_tags( $content, $args = array(), $with_kses = true ) {
|
|
201 |
*/
|
202 |
$replace = apply_filters( 'um_template_tags_replaces_hook', $replace );
|
203 |
|
204 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
if ( $with_kses ) {
|
206 |
$content = wp_kses_decode_entities( $content );
|
207 |
}
|
@@ -220,11 +213,35 @@ function um_convert_tags( $content, $args = array(), $with_kses = true ) {
|
|
220 |
$content = str_replace( '{' . $match . '}', um_user( $strip_key ), $content );
|
221 |
}
|
222 |
}
|
223 |
-
|
224 |
return $content;
|
225 |
}
|
226 |
|
227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
/**
|
229 |
* @function um_user_ip()
|
230 |
*
|
@@ -2143,8 +2160,8 @@ function um_user( $data, $attrs = null ) {
|
|
2143 |
|
2144 |
$value = maybe_unserialize( $value );
|
2145 |
|
2146 |
-
if (in_array( $data, array( 'role', 'gender' ) )) {
|
2147 |
-
if (is_array( $value )) {
|
2148 |
$value = implode( ",", $value );
|
2149 |
}
|
2150 |
|
@@ -2157,7 +2174,7 @@ function um_user( $data, $attrs = null ) {
|
|
2157 |
case 'user_email':
|
2158 |
|
2159 |
$user_email_in_meta = get_user_meta( um_user( 'ID' ), 'user_email', true );
|
2160 |
-
if ($user_email_in_meta) {
|
2161 |
delete_user_meta( um_user( 'ID' ), 'user_email' );
|
2162 |
}
|
2163 |
|
@@ -2166,6 +2183,18 @@ function um_user( $data, $attrs = null ) {
|
|
2166 |
return $value;
|
2167 |
break;
|
2168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2169 |
case 'first_name':
|
2170 |
case 'last_name':
|
2171 |
|
@@ -2203,7 +2232,7 @@ function um_user( $data, $attrs = null ) {
|
|
2203 |
|
2204 |
case 'full_name':
|
2205 |
|
2206 |
-
if (um_user( 'first_name' ) && um_user( 'last_name' )) {
|
2207 |
$full_name = um_user( 'first_name' ) . ' ' . um_user( 'last_name' );
|
2208 |
} else {
|
2209 |
$full_name = um_user( 'display_name' );
|
@@ -2212,7 +2241,7 @@ function um_user( $data, $attrs = null ) {
|
|
2212 |
$full_name = UM()->validation()->safe_name_in_url( $full_name );
|
2213 |
|
2214 |
// update full_name changed
|
2215 |
-
if (um_profile( $data ) !== $full_name) {
|
2216 |
update_user_meta( um_user( 'ID' ), 'full_name', $full_name );
|
2217 |
}
|
2218 |
|
@@ -2224,7 +2253,7 @@ function um_user( $data, $attrs = null ) {
|
|
2224 |
|
2225 |
$f_and_l_initial = '';
|
2226 |
|
2227 |
-
if (um_user( 'first_name' ) && um_user( 'last_name' )) {
|
2228 |
$initial = um_user( 'last_name' );
|
2229 |
$f_and_l_initial = um_user( 'first_name' ) . ' ' . $initial[0];
|
2230 |
} else {
|
@@ -2249,47 +2278,46 @@ function um_user( $data, $attrs = null ) {
|
|
2249 |
|
2250 |
$name = '';
|
2251 |
|
2252 |
-
|
2253 |
-
if ($op == 'default') {
|
2254 |
$name = um_profile( 'display_name' );
|
2255 |
}
|
2256 |
|
2257 |
-
if ($op == 'nickname') {
|
2258 |
$name = um_profile( 'nickname' );
|
2259 |
}
|
2260 |
|
2261 |
-
if ($op == 'full_name') {
|
2262 |
-
if (um_user( 'first_name' ) && um_user( 'last_name' )) {
|
2263 |
$name = um_user( 'first_name' ) . ' ' . um_user( 'last_name' );
|
2264 |
} else {
|
2265 |
$name = um_profile( $data );
|
2266 |
}
|
2267 |
-
if (
|
2268 |
$name = um_user( 'user_login' );
|
2269 |
}
|
2270 |
}
|
2271 |
|
2272 |
-
if ($op == 'sur_name') {
|
2273 |
-
if (um_user( 'first_name' ) && um_user( 'last_name' )) {
|
2274 |
$name = um_user( 'last_name' ) . ' ' . um_user( 'first_name' );
|
2275 |
} else {
|
2276 |
$name = um_profile( $data );
|
2277 |
}
|
2278 |
}
|
2279 |
|
2280 |
-
if ($op == 'first_name') {
|
2281 |
-
if (um_user( 'first_name' )) {
|
2282 |
$name = um_user( 'first_name' );
|
2283 |
} else {
|
2284 |
$name = um_profile( $data );
|
2285 |
}
|
2286 |
}
|
2287 |
|
2288 |
-
if ($op == 'username') {
|
2289 |
$name = um_user( 'user_login' );
|
2290 |
}
|
2291 |
|
2292 |
-
if ($op == 'initial_name') {
|
2293 |
if (um_user( 'first_name' ) && um_user( 'last_name' )) {
|
2294 |
$initial = um_user( 'last_name' );
|
2295 |
$name = um_user( 'first_name' ) . ' ' . $initial[0];
|
@@ -2298,8 +2326,8 @@ function um_user( $data, $attrs = null ) {
|
|
2298 |
}
|
2299 |
}
|
2300 |
|
2301 |
-
if ($op == 'initial_name_f') {
|
2302 |
-
if (um_user( 'first_name' ) && um_user( 'last_name' )) {
|
2303 |
$initial = um_user( 'first_name' );
|
2304 |
$name = $initial[0] . ' ' . um_user( 'last_name' );
|
2305 |
} else {
|
@@ -2315,7 +2343,7 @@ function um_user( $data, $attrs = null ) {
|
|
2315 |
foreach ( $fields as $field ) {
|
2316 |
if ( um_profile( $field ) ) {
|
2317 |
$name .= um_profile( $field ) . ' ';
|
2318 |
-
} elseif ( um_user( $field ) && $field != 'display_name' ) {
|
2319 |
$name .= um_user( $field ) . ' ';
|
2320 |
}
|
2321 |
}
|
@@ -2426,7 +2454,9 @@ function um_user( $data, $attrs = null ) {
|
|
2426 |
*/
|
2427 |
$cover_uri = apply_filters( 'um_user_cover_photo_uri__filter', $cover_uri, $is_default, $attrs );
|
2428 |
|
2429 |
-
|
|
|
|
|
2430 |
break;
|
2431 |
|
2432 |
|
@@ -2655,4 +2685,28 @@ function is_ultimatemember() {
|
|
2655 |
*/
|
2656 |
function um_maybe_unset_time_limit() {
|
2657 |
@set_time_limit( 0 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2658 |
}
|
61 |
return false;
|
62 |
}
|
63 |
|
|
|
64 |
/**
|
65 |
* User clean basename
|
66 |
*
|
103 |
|
104 |
|
105 |
/**
|
106 |
+
* Getting replace placeholders array
|
107 |
*
|
108 |
+
* @return array
|
|
|
|
|
|
|
|
|
109 |
*/
|
110 |
+
function um_replace_placeholders() {
|
111 |
+
|
112 |
$search = array(
|
113 |
'{display_name}',
|
114 |
'{first_name}',
|
116 |
'{gender}',
|
117 |
'{username}',
|
118 |
'{email}',
|
|
|
|
|
|
|
119 |
'{site_name}',
|
|
|
|
|
|
|
|
|
|
|
120 |
'{user_account_link}',
|
|
|
|
|
121 |
);
|
122 |
|
123 |
+
|
124 |
/**
|
125 |
* UM hook
|
126 |
*
|
151 |
um_user( 'gender' ),
|
152 |
um_user( 'user_login' ),
|
153 |
um_user( 'user_email' ),
|
|
|
|
|
|
|
154 |
UM()->options()->get( 'site_name' ),
|
|
|
|
|
|
|
|
|
|
|
155 |
um_get_core_page( 'account' ),
|
|
|
|
|
156 |
);
|
157 |
|
158 |
/**
|
178 |
*/
|
179 |
$replace = apply_filters( 'um_template_tags_replaces_hook', $replace );
|
180 |
|
181 |
+
return array_combine( $search, $replace );
|
182 |
+
}
|
183 |
+
|
184 |
+
|
185 |
+
/**
|
186 |
+
* Convert template tags
|
187 |
+
*
|
188 |
+
* @param $content
|
189 |
+
* @param array $args
|
190 |
+
* @param bool $with_kses
|
191 |
+
*
|
192 |
+
* @return mixed|string
|
193 |
+
*/
|
194 |
+
function um_convert_tags( $content, $args = array(), $with_kses = true ) {
|
195 |
+
$placeholders = um_replace_placeholders();
|
196 |
+
|
197 |
+
$content = str_replace( array_keys( $placeholders ), array_values( $placeholders ), $content );
|
198 |
if ( $with_kses ) {
|
199 |
$content = wp_kses_decode_entities( $content );
|
200 |
}
|
213 |
$content = str_replace( '{' . $match . '}', um_user( $strip_key ), $content );
|
214 |
}
|
215 |
}
|
|
|
216 |
return $content;
|
217 |
}
|
218 |
|
219 |
|
220 |
+
/**
|
221 |
+
* UM Placeholders for activation link in email
|
222 |
+
*
|
223 |
+
* @param $placeholders
|
224 |
+
*
|
225 |
+
* @return array
|
226 |
+
*/
|
227 |
+
function account_activation_link_tags_patterns( $placeholders ) {
|
228 |
+
$placeholders[] = '{account_activation_link}';
|
229 |
+
return $placeholders;
|
230 |
+
}
|
231 |
+
|
232 |
+
/**
|
233 |
+
* UM Replace Placeholders for activation link in email
|
234 |
+
*
|
235 |
+
* @param $replace_placeholders
|
236 |
+
*
|
237 |
+
* @return array
|
238 |
+
*/
|
239 |
+
function account_activation_link_tags_replaces( $replace_placeholders ) {
|
240 |
+
$replace_placeholders[] = um_user( 'account_activation_link' );
|
241 |
+
return $replace_placeholders;
|
242 |
+
}
|
243 |
+
|
244 |
+
|
245 |
/**
|
246 |
* @function um_user_ip()
|
247 |
*
|
2160 |
|
2161 |
$value = maybe_unserialize( $value );
|
2162 |
|
2163 |
+
if ( in_array( $data, array( 'role', 'gender' ) ) ) {
|
2164 |
+
if ( is_array( $value ) ) {
|
2165 |
$value = implode( ",", $value );
|
2166 |
}
|
2167 |
|
2174 |
case 'user_email':
|
2175 |
|
2176 |
$user_email_in_meta = get_user_meta( um_user( 'ID' ), 'user_email', true );
|
2177 |
+
if ( $user_email_in_meta ) {
|
2178 |
delete_user_meta( um_user( 'ID' ), 'user_email' );
|
2179 |
}
|
2180 |
|
2183 |
return $value;
|
2184 |
break;
|
2185 |
|
2186 |
+
case 'user_login':
|
2187 |
+
|
2188 |
+
$user_login_in_meta = get_user_meta( um_user( 'ID' ), 'user_login', true );
|
2189 |
+
if ( $user_login_in_meta ) {
|
2190 |
+
delete_user_meta( um_user( 'ID' ), 'user_login' );
|
2191 |
+
}
|
2192 |
+
|
2193 |
+
$value = um_profile( $data );
|
2194 |
+
|
2195 |
+
return $value;
|
2196 |
+
break;
|
2197 |
+
|
2198 |
case 'first_name':
|
2199 |
case 'last_name':
|
2200 |
|
2232 |
|
2233 |
case 'full_name':
|
2234 |
|
2235 |
+
if ( um_user( 'first_name' ) && um_user( 'last_name' ) ) {
|
2236 |
$full_name = um_user( 'first_name' ) . ' ' . um_user( 'last_name' );
|
2237 |
} else {
|
2238 |
$full_name = um_user( 'display_name' );
|
2241 |
$full_name = UM()->validation()->safe_name_in_url( $full_name );
|
2242 |
|
2243 |
// update full_name changed
|
2244 |
+
if ( um_profile( $data ) !== $full_name ) {
|
2245 |
update_user_meta( um_user( 'ID' ), 'full_name', $full_name );
|
2246 |
}
|
2247 |
|
2253 |
|
2254 |
$f_and_l_initial = '';
|
2255 |
|
2256 |
+
if ( um_user( 'first_name' ) && um_user( 'last_name' ) ) {
|
2257 |
$initial = um_user( 'last_name' );
|
2258 |
$f_and_l_initial = um_user( 'first_name' ) . ' ' . $initial[0];
|
2259 |
} else {
|
2278 |
|
2279 |
$name = '';
|
2280 |
|
2281 |
+
if ( $op == 'default' ) {
|
|
|
2282 |
$name = um_profile( 'display_name' );
|
2283 |
}
|
2284 |
|
2285 |
+
if ( $op == 'nickname' ) {
|
2286 |
$name = um_profile( 'nickname' );
|
2287 |
}
|
2288 |
|
2289 |
+
if ( $op == 'full_name' ) {
|
2290 |
+
if ( um_user( 'first_name' ) && um_user( 'last_name' ) ) {
|
2291 |
$name = um_user( 'first_name' ) . ' ' . um_user( 'last_name' );
|
2292 |
} else {
|
2293 |
$name = um_profile( $data );
|
2294 |
}
|
2295 |
+
if ( ! $name ) {
|
2296 |
$name = um_user( 'user_login' );
|
2297 |
}
|
2298 |
}
|
2299 |
|
2300 |
+
if ( $op == 'sur_name' ) {
|
2301 |
+
if ( um_user( 'first_name' ) && um_user( 'last_name' ) ) {
|
2302 |
$name = um_user( 'last_name' ) . ' ' . um_user( 'first_name' );
|
2303 |
} else {
|
2304 |
$name = um_profile( $data );
|
2305 |
}
|
2306 |
}
|
2307 |
|
2308 |
+
if ( $op == 'first_name' ) {
|
2309 |
+
if ( um_user( 'first_name' ) ) {
|
2310 |
$name = um_user( 'first_name' );
|
2311 |
} else {
|
2312 |
$name = um_profile( $data );
|
2313 |
}
|
2314 |
}
|
2315 |
|
2316 |
+
if ( $op == 'username' ) {
|
2317 |
$name = um_user( 'user_login' );
|
2318 |
}
|
2319 |
|
2320 |
+
if ( $op == 'initial_name' ) {
|
2321 |
if (um_user( 'first_name' ) && um_user( 'last_name' )) {
|
2322 |
$initial = um_user( 'last_name' );
|
2323 |
$name = um_user( 'first_name' ) . ' ' . $initial[0];
|
2326 |
}
|
2327 |
}
|
2328 |
|
2329 |
+
if ( $op == 'initial_name_f' ) {
|
2330 |
+
if ( um_user( 'first_name' ) && um_user( 'last_name' ) ) {
|
2331 |
$initial = um_user( 'first_name' );
|
2332 |
$name = $initial[0] . ' ' . um_user( 'last_name' );
|
2333 |
} else {
|
2343 |
foreach ( $fields as $field ) {
|
2344 |
if ( um_profile( $field ) ) {
|
2345 |
$name .= um_profile( $field ) . ' ';
|
2346 |
+
} elseif ( um_user( $field ) && $field != 'display_name' && $field != 'full_name' ) {
|
2347 |
$name .= um_user( $field ) . ' ';
|
2348 |
}
|
2349 |
}
|
2454 |
*/
|
2455 |
$cover_uri = apply_filters( 'um_user_cover_photo_uri__filter', $cover_uri, $is_default, $attrs );
|
2456 |
|
2457 |
+
$alt = um_profile( 'nickname' );
|
2458 |
+
|
2459 |
+
return $cover_uri ? '<img src="' . esc_attr( $cover_uri ) . '" alt="' . esc_attr( $alt ) . '" />' : '';
|
2460 |
break;
|
2461 |
|
2462 |
|
2685 |
*/
|
2686 |
function um_maybe_unset_time_limit() {
|
2687 |
@set_time_limit( 0 );
|
2688 |
+
}
|
2689 |
+
|
2690 |
+
|
2691 |
+
/*
|
2692 |
+
* Check if current user is owner of requested profile
|
2693 |
+
* @Returns Boolean
|
2694 |
+
*/
|
2695 |
+
if ( ! function_exists( 'um_is_profile_owner' ) ) {
|
2696 |
+
/**
|
2697 |
+
* @param $user_id
|
2698 |
+
*
|
2699 |
+
* @return bool
|
2700 |
+
*/
|
2701 |
+
function um_is_profile_owner( $user_id = false ) {
|
2702 |
+
if ( ! is_user_logged_in() ) {
|
2703 |
+
return false;
|
2704 |
+
}
|
2705 |
+
|
2706 |
+
if ( empty( $user_id ) ) {
|
2707 |
+
$user_id = get_current_user_id();
|
2708 |
+
}
|
2709 |
+
|
2710 |
+
return ( $user_id == um_profile_id() );
|
2711 |
+
}
|
2712 |
}
|
languages/ultimate-member-en.po
CHANGED
@@ -6351,6 +6351,11 @@ msgstr ""
|
|
6351 |
msgid "Comments"
|
6352 |
msgstr ""
|
6353 |
|
|
|
|
|
|
|
|
|
|
|
6354 |
#: includes/core/class-rest-api.php:217
|
6355 |
msgid "You must specify both a token and API key!"
|
6356 |
msgstr ""
|
6351 |
msgid "Comments"
|
6352 |
msgstr ""
|
6353 |
|
6354 |
+
#: includes/core/class-profile.php:424 includes/core/class-mail.php:609
|
6355 |
+
#: includes/core/class-password.php:701
|
6356 |
+
msgid "Your set password"
|
6357 |
+
msgstr ""
|
6358 |
+
|
6359 |
#: includes/core/class-rest-api.php:217
|
6360 |
msgid "You must specify both a token and API key!"
|
6361 |
msgstr ""
|
languages/ultimate-member-en_US.mo
CHANGED
Binary file
|
languages/ultimate-member-en_US.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Ultimate Member\n"
|
4 |
-
"POT-Creation-Date: 2019-
|
5 |
-
"PO-Revision-Date: 2019-
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: en_US\n"
|
@@ -35,7 +35,7 @@ msgid "Docs"
|
|
35 |
msgstr ""
|
36 |
|
37 |
#: includes/admin/class-admin.php:308
|
38 |
-
#: includes/admin/core/class-admin-settings.php:
|
39 |
msgid "Settings"
|
40 |
msgstr ""
|
41 |
|
@@ -103,7 +103,7 @@ msgstr ""
|
|
103 |
#: includes/admin/core/class-admin-builder.php:767
|
104 |
#: includes/admin/core/class-admin-dragdrop.php:32
|
105 |
#: includes/admin/core/class-admin-menu.php:104
|
106 |
-
#: includes/core/class-fields.php:
|
107 |
msgid "Please login as administrator"
|
108 |
msgstr ""
|
109 |
|
@@ -139,7 +139,7 @@ msgid "Predefined Fields"
|
|
139 |
msgstr ""
|
140 |
|
141 |
#: includes/admin/core/class-admin-builder.php:880
|
142 |
-
#: includes/core/class-builtin.php:
|
143 |
msgid "None"
|
144 |
msgstr ""
|
145 |
|
@@ -158,7 +158,7 @@ msgstr ""
|
|
158 |
|
159 |
#: includes/admin/core/class-admin-builder.php:1143
|
160 |
#: includes/core/class-form.php:155 includes/core/class-form.php:328
|
161 |
-
#: includes/core/class-password.php:
|
162 |
msgid "This is not possible for security reasons."
|
163 |
msgstr ""
|
164 |
|
@@ -196,8 +196,8 @@ msgstr ""
|
|
196 |
|
197 |
#: includes/admin/core/class-admin-columns.php:134
|
198 |
#: includes/admin/core/class-admin-columns.php:153
|
199 |
-
#: includes/admin/core/class-admin-metabox.php:
|
200 |
-
#: includes/admin/core/class-admin-metabox.php:
|
201 |
msgid "Shortcode"
|
202 |
msgstr ""
|
203 |
|
@@ -224,8 +224,8 @@ msgstr ""
|
|
224 |
#: includes/admin/templates/form/register_customize.php:20
|
225 |
#: includes/admin/templates/form/register_customize.php:76
|
226 |
#: includes/admin/templates/form/register_gdpr.php:23
|
227 |
-
#: includes/core/class-builtin.php:
|
228 |
-
#: includes/core/class-builtin.php:
|
229 |
#: includes/core/um-actions-account.php:271
|
230 |
msgid "No"
|
231 |
msgstr ""
|
@@ -248,21 +248,21 @@ msgstr ""
|
|
248 |
#: includes/admin/templates/form/register_customize.php:21
|
249 |
#: includes/admin/templates/form/register_customize.php:77
|
250 |
#: includes/admin/templates/form/register_gdpr.php:24
|
251 |
-
#: includes/core/class-builtin.php:
|
252 |
#: includes/core/um-filters-members.php:69
|
253 |
msgid "Yes"
|
254 |
msgstr ""
|
255 |
|
256 |
-
#: includes/admin/core/class-admin-enqueue.php:
|
257 |
msgid "e.g. Member Directory"
|
258 |
msgstr ""
|
259 |
|
260 |
-
#: includes/admin/core/class-admin-enqueue.php:
|
261 |
msgid "e.g. New Registration Form"
|
262 |
msgstr ""
|
263 |
|
264 |
-
#: includes/admin/core/class-admin-enqueue.php:
|
265 |
-
#: includes/admin/core/class-admin-enqueue.php:
|
266 |
#: includes/admin/core/class-admin-forms.php:832
|
267 |
#: includes/admin/core/class-admin-forms.php:846
|
268 |
#: includes/admin/core/class-admin-forms.php:951
|
@@ -272,39 +272,39 @@ msgstr ""
|
|
272 |
msgid "Remove"
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: includes/admin/core/class-admin-enqueue.php:
|
276 |
-
#: includes/admin/core/class-admin-enqueue.php:
|
277 |
#: includes/admin/core/class-admin-forms.php:1028
|
278 |
msgid "Select"
|
279 |
msgstr ""
|
280 |
|
281 |
-
#: includes/admin/core/class-admin-enqueue.php:
|
282 |
msgid "Are sure, maybe some settings not saved"
|
283 |
msgstr ""
|
284 |
|
285 |
-
#: includes/admin/core/class-admin-enqueue.php:
|
286 |
-
#: includes/core/class-builtin.php:
|
287 |
-
#: includes/core/class-builtin.php:
|
288 |
msgid "Password"
|
289 |
msgstr ""
|
290 |
|
291 |
-
#: includes/admin/core/class-admin-enqueue.php:
|
292 |
#: includes/core/class-account.php:104
|
293 |
msgid "Privacy"
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: includes/admin/core/class-admin-enqueue.php:
|
297 |
#: includes/core/class-account.php:110
|
298 |
msgid "Notifications"
|
299 |
msgstr ""
|
300 |
|
301 |
-
#: includes/admin/core/class-admin-enqueue.php:
|
302 |
#: includes/admin/core/list-tables/roles-list-table.php:338
|
303 |
#: includes/admin/core/list-tables/roles-list-table.php:406
|
304 |
msgid "Delete"
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: includes/admin/core/class-admin-enqueue.php:
|
308 |
msgid "Ultimate Member Blocks"
|
309 |
msgstr ""
|
310 |
|
@@ -483,556 +483,548 @@ msgstr ""
|
|
483 |
msgid "Upgrade's Manual Request"
|
484 |
msgstr ""
|
485 |
|
486 |
-
#: includes/admin/core/class-admin-metabox.php:
|
487 |
-
msgid "This is a translation of UM profile page?"
|
488 |
-
msgstr ""
|
489 |
-
|
490 |
-
#: includes/admin/core/class-admin-metabox.php:76
|
491 |
-
msgid "This is a translation of UM account page?"
|
492 |
-
msgstr ""
|
493 |
-
|
494 |
-
#: includes/admin/core/class-admin-metabox.php:257
|
495 |
msgid "UM Content Restriction"
|
496 |
msgstr ""
|
497 |
|
498 |
-
#: includes/admin/core/class-admin-metabox.php:
|
499 |
-
#: includes/admin/core/class-admin-metabox.php:
|
500 |
#: includes/admin/templates/access/restrict_content.php:47
|
501 |
msgid "Restrict access to this content?"
|
502 |
msgstr ""
|
503 |
|
504 |
-
#: includes/admin/core/class-admin-metabox.php:
|
505 |
-
#: includes/admin/core/class-admin-metabox.php:
|
506 |
-
#: includes/admin/core/class-admin-metabox.php:
|
507 |
-
#: includes/admin/core/class-admin-metabox.php:
|
508 |
-
#: includes/admin/core/class-admin-metabox.php:
|
509 |
-
#: includes/admin/core/class-admin-metabox.php:
|
510 |
#: includes/admin/templates/access/restrict_content.php:48
|
511 |
#: includes/admin/templates/access/restrict_content.php:55
|
512 |
#: includes/admin/templates/access/restrict_content.php:68
|
513 |
msgid "Activate content restriction for this post"
|
514 |
msgstr ""
|
515 |
|
516 |
-
#: includes/admin/core/class-admin-metabox.php:
|
517 |
-
#: includes/admin/core/class-admin-metabox.php:
|
518 |
#: includes/admin/templates/access/restrict_content.php:54
|
519 |
msgid "Who can access this content?"
|
520 |
msgstr ""
|
521 |
|
522 |
-
#: includes/admin/core/class-admin-metabox.php:
|
523 |
-
#: includes/admin/core/class-admin-metabox.php:
|
524 |
#: includes/admin/core/class-admin-navmenu.php:141
|
525 |
#: includes/admin/templates/access/restrict_content.php:58
|
526 |
#: includes/core/class-builtin.php:662
|
527 |
msgid "Everyone"
|
528 |
msgstr ""
|
529 |
|
530 |
-
#: includes/admin/core/class-admin-metabox.php:
|
531 |
-
#: includes/admin/core/class-admin-metabox.php:
|
532 |
#: includes/admin/templates/access/restrict_content.php:59
|
533 |
msgid "Logged out users"
|
534 |
msgstr ""
|
535 |
|
536 |
-
#: includes/admin/core/class-admin-metabox.php:
|
537 |
-
#: includes/admin/core/class-admin-metabox.php:
|
538 |
#: includes/admin/templates/access/restrict_content.php:60
|
539 |
msgid "Logged in users"
|
540 |
msgstr ""
|
541 |
|
542 |
-
#: includes/admin/core/class-admin-metabox.php:
|
543 |
-
#: includes/admin/core/class-admin-metabox.php:
|
544 |
#: includes/admin/templates/access/restrict_content.php:67
|
545 |
msgid "Select which roles can access this content"
|
546 |
msgstr ""
|
547 |
|
548 |
-
#: includes/admin/core/class-admin-metabox.php:
|
549 |
-
#: includes/admin/core/class-admin-metabox.php:
|
550 |
#: includes/admin/templates/access/restrict_content.php:77
|
551 |
msgid "What happens when users without access tries to view the content?"
|
552 |
msgstr ""
|
553 |
|
554 |
-
#: includes/admin/core/class-admin-metabox.php:
|
555 |
-
#: includes/admin/core/class-admin-metabox.php:
|
556 |
-
#: includes/admin/core/class-admin-metabox.php:
|
557 |
-
#: includes/admin/core/class-admin-metabox.php:
|
558 |
#: includes/admin/templates/access/restrict_content.php:78
|
559 |
#: includes/admin/templates/access/restrict_content.php:90
|
560 |
msgid "Action when users without access tries to view the content"
|
561 |
msgstr ""
|
562 |
|
563 |
-
#: includes/admin/core/class-admin-metabox.php:
|
564 |
-
#: includes/admin/core/class-admin-metabox.php:
|
565 |
#: includes/admin/templates/access/restrict_content.php:81
|
566 |
msgid "Show access restricted message"
|
567 |
msgstr ""
|
568 |
|
569 |
-
#: includes/admin/core/class-admin-metabox.php:
|
570 |
-
#: includes/admin/core/class-admin-metabox.php:
|
571 |
#: includes/admin/templates/access/restrict_content.php:82
|
572 |
msgid "Redirect user"
|
573 |
msgstr ""
|
574 |
|
575 |
-
#: includes/admin/core/class-admin-metabox.php:
|
576 |
-
#: includes/admin/core/class-admin-metabox.php:
|
577 |
#: includes/admin/templates/access/restrict_content.php:89
|
578 |
msgid ""
|
579 |
"Would you like to use the global default message or apply a custom message "
|
580 |
"to this content?"
|
581 |
msgstr ""
|
582 |
|
583 |
-
#: includes/admin/core/class-admin-metabox.php:
|
584 |
-
#: includes/admin/core/class-admin-metabox.php:
|
585 |
#: includes/admin/templates/access/restrict_content.php:93
|
586 |
msgid "Global default message (default)"
|
587 |
msgstr ""
|
588 |
|
589 |
-
#: includes/admin/core/class-admin-metabox.php:
|
590 |
-
#: includes/admin/core/class-admin-metabox.php:
|
591 |
#: includes/admin/templates/access/restrict_content.php:94
|
592 |
msgid "Custom message"
|
593 |
msgstr ""
|
594 |
|
595 |
-
#: includes/admin/core/class-admin-metabox.php:
|
596 |
-
#: includes/admin/core/class-admin-metabox.php:
|
597 |
#: includes/admin/templates/access/restrict_content.php:101
|
598 |
msgid "Custom Restrict Content message"
|
599 |
msgstr ""
|
600 |
|
601 |
-
#: includes/admin/core/class-admin-metabox.php:
|
602 |
-
#: includes/admin/core/class-admin-metabox.php:
|
603 |
-
#: includes/admin/core/class-admin-metabox.php:
|
604 |
-
#: includes/admin/core/class-admin-metabox.php:
|
605 |
#: includes/admin/templates/access/restrict_content.php:102
|
606 |
#: includes/admin/templates/access/restrict_content.php:122
|
607 |
msgid "Changed global restrict message"
|
608 |
msgstr ""
|
609 |
|
610 |
-
#: includes/admin/core/class-admin-metabox.php:
|
611 |
-
#: includes/admin/core/class-admin-metabox.php:
|
612 |
#: includes/admin/templates/access/restrict_content.php:109
|
613 |
msgid "Where should users be redirected to?"
|
614 |
msgstr ""
|
615 |
|
616 |
-
#: includes/admin/core/class-admin-metabox.php:
|
617 |
-
#: includes/admin/core/class-admin-metabox.php:
|
618 |
#: includes/admin/templates/access/restrict_content.php:110
|
619 |
msgid "Select redirect to page when user hasn't access to content"
|
620 |
msgstr ""
|
621 |
|
622 |
-
#: includes/admin/core/class-admin-metabox.php:
|
623 |
-
#: includes/admin/core/class-admin-metabox.php:
|
624 |
#: includes/admin/templates/access/restrict_content.php:114
|
625 |
msgid "Login page"
|
626 |
msgstr ""
|
627 |
|
628 |
-
#: includes/admin/core/class-admin-metabox.php:
|
629 |
-
#: includes/admin/core/class-admin-metabox.php:
|
630 |
#: includes/admin/templates/access/restrict_content.php:115
|
631 |
msgid "Custom URL"
|
632 |
msgstr ""
|
633 |
|
634 |
-
#: includes/admin/core/class-admin-metabox.php:
|
635 |
-
#: includes/admin/core/class-admin-metabox.php:
|
636 |
#: includes/admin/templates/access/restrict_content.php:121
|
637 |
msgid "Redirect URL"
|
638 |
msgstr ""
|
639 |
|
640 |
-
#: includes/admin/core/class-admin-metabox.php:
|
641 |
-
#: includes/admin/core/class-admin-metabox.php:
|
642 |
#: includes/admin/templates/access/restrict_content.php:129
|
643 |
msgid "Hide from queries"
|
644 |
msgstr ""
|
645 |
|
646 |
-
#: includes/admin/core/class-admin-metabox.php:
|
647 |
-
#: includes/admin/core/class-admin-metabox.php:
|
648 |
#: includes/admin/templates/access/restrict_content.php:130
|
649 |
msgid ""
|
650 |
"Hide this content from archives, RSS feeds etc for users who do not have "
|
651 |
"permission to view this content"
|
652 |
msgstr ""
|
653 |
|
654 |
-
#: includes/admin/core/class-admin-metabox.php:
|
655 |
msgid "General Options"
|
656 |
msgstr ""
|
657 |
|
658 |
-
#: includes/admin/core/class-admin-metabox.php:
|
659 |
msgid "Profile Card"
|
660 |
msgstr ""
|
661 |
|
662 |
-
#: includes/admin/core/class-admin-metabox.php:
|
663 |
msgid "Search Options"
|
664 |
msgstr ""
|
665 |
|
666 |
-
#: includes/admin/core/class-admin-metabox.php:
|
667 |
msgid "Results & Pagination"
|
668 |
msgstr ""
|
669 |
|
670 |
-
#: includes/admin/core/class-admin-metabox.php:
|
671 |
msgid "Styling: General"
|
672 |
msgstr ""
|
673 |
|
674 |
-
#: includes/admin/core/class-admin-metabox.php:
|
675 |
msgid "Administrative Permissions"
|
676 |
msgstr ""
|
677 |
|
678 |
-
#: includes/admin/core/class-admin-metabox.php:
|
679 |
msgid "General Permissions"
|
680 |
msgstr ""
|
681 |
|
682 |
-
#: includes/admin/core/class-admin-metabox.php:
|
683 |
msgid "Profile Access"
|
684 |
msgstr ""
|
685 |
|
686 |
-
#: includes/admin/core/class-admin-metabox.php:
|
687 |
msgid "Homepage Options"
|
688 |
msgstr ""
|
689 |
|
690 |
-
#: includes/admin/core/class-admin-metabox.php:
|
691 |
msgid "Registration Options"
|
692 |
msgstr ""
|
693 |
|
694 |
-
#: includes/admin/core/class-admin-metabox.php:
|
695 |
msgid "Login Options"
|
696 |
msgstr ""
|
697 |
|
698 |
-
#: includes/admin/core/class-admin-metabox.php:
|
699 |
msgid "Logout Options"
|
700 |
msgstr ""
|
701 |
|
702 |
-
#: includes/admin/core/class-admin-metabox.php:
|
703 |
msgid "Delete Options"
|
704 |
msgstr ""
|
705 |
|
706 |
-
#: includes/admin/core/class-admin-metabox.php:
|
707 |
msgid "Publish"
|
708 |
msgstr ""
|
709 |
|
710 |
-
#: includes/admin/core/class-admin-metabox.php:
|
711 |
msgid "WP Capabilities"
|
712 |
msgstr ""
|
713 |
|
714 |
-
#: includes/admin/core/class-admin-metabox.php:
|
715 |
msgid "Select Form Type"
|
716 |
msgstr ""
|
717 |
|
718 |
-
#: includes/admin/core/class-admin-metabox.php:
|
719 |
msgid "Form Builder"
|
720 |
msgstr ""
|
721 |
|
722 |
-
#: includes/admin/core/class-admin-metabox.php:
|
723 |
-
#: includes/admin/core/class-admin-metabox.php:
|
724 |
-
#: includes/admin/core/class-admin-metabox.php:
|
725 |
msgid "Customize this form"
|
726 |
msgstr ""
|
727 |
|
728 |
-
#: includes/admin/core/class-admin-metabox.php:
|
729 |
msgid "User Meta"
|
730 |
msgstr ""
|
731 |
|
732 |
-
#: includes/admin/core/class-admin-metabox.php:
|
733 |
msgid "Options"
|
734 |
msgstr ""
|
735 |
|
736 |
-
#: includes/admin/core/class-admin-metabox.php:
|
737 |
msgid ""
|
738 |
"Select where this field should appear. This option should only be changed on "
|
739 |
"the profile form and allows you to show a field in one mode only (edit or "
|
740 |
"view) or in both modes."
|
741 |
msgstr ""
|
742 |
|
743 |
-
#: includes/admin/core/class-admin-metabox.php:
|
744 |
msgid "If"
|
745 |
msgstr ""
|
746 |
|
747 |
-
#: includes/admin/core/class-admin-metabox.php:
|
748 |
msgid "Value"
|
749 |
msgstr ""
|
750 |
|
751 |
-
#: includes/admin/core/class-admin-metabox.php:
|
752 |
msgid "Does this field require a special validation"
|
753 |
msgstr ""
|
754 |
|
755 |
-
#: includes/admin/core/class-admin-metabox.php:
|
756 |
msgid ""
|
757 |
"If you want to apply your custom validation, you can use action hooks to add "
|
758 |
"custom validation. Please refer to documentation for further details."
|
759 |
msgstr ""
|
760 |
|
761 |
-
#: includes/admin/core/class-admin-metabox.php:
|
762 |
-
#: includes/admin/core/class-admin-metabox.php:
|
763 |
msgid ""
|
764 |
"Select an icon to appear in the field. Leave blank if you do not want an "
|
765 |
"icon to show in the field."
|
766 |
msgstr ""
|
767 |
|
768 |
-
#: includes/admin/core/class-admin-metabox.php:
|
769 |
msgid "Specify a custom CSS class to be applied to this element"
|
770 |
msgstr ""
|
771 |
|
772 |
-
#: includes/admin/core/class-admin-metabox.php:
|
773 |
msgid "This is the width in pixels, e.g. 4 or 2, etc"
|
774 |
msgstr ""
|
775 |
|
776 |
-
#: includes/admin/core/class-admin-metabox.php:
|
777 |
msgid "Optional text to include with the divider"
|
778 |
msgstr ""
|
779 |
|
780 |
-
#: includes/admin/core/class-admin-metabox.php:
|
781 |
msgid "Set padding for this section"
|
782 |
msgstr ""
|
783 |
|
784 |
-
#: includes/admin/core/class-admin-metabox.php:
|
785 |
msgid "Set margin for this section"
|
786 |
msgstr ""
|
787 |
|
788 |
-
#: includes/admin/core/class-admin-metabox.php:
|
789 |
msgid "Set border for this section"
|
790 |
msgstr ""
|
791 |
|
792 |
-
#: includes/admin/core/class-admin-metabox.php:
|
793 |
msgid "Choose the border style"
|
794 |
msgstr ""
|
795 |
|
796 |
-
#: includes/admin/core/class-admin-metabox.php:
|
797 |
msgid "Rounded corners can be applied by setting a pixels value here. e.g. 5px"
|
798 |
msgstr ""
|
799 |
|
800 |
-
#: includes/admin/core/class-admin-metabox.php:
|
801 |
msgid "Give a color to this border"
|
802 |
msgstr ""
|
803 |
|
804 |
-
#: includes/admin/core/class-admin-metabox.php:
|
805 |
msgid "Enable Row Heading"
|
806 |
msgstr ""
|
807 |
|
808 |
-
#: includes/admin/core/class-admin-metabox.php:
|
809 |
msgid "Whether to enable a heading for this row"
|
810 |
msgstr ""
|
811 |
|
812 |
-
#: includes/admin/core/class-admin-metabox.php:
|
813 |
msgid "Enter the row heading text here"
|
814 |
msgstr ""
|
815 |
|
816 |
-
#: includes/admin/core/class-admin-metabox.php:
|
817 |
msgid "This will be the background of entire section"
|
818 |
msgstr ""
|
819 |
|
820 |
-
#: includes/admin/core/class-admin-metabox.php:
|
821 |
msgid "This will be the background of the heading section"
|
822 |
msgstr ""
|
823 |
|
824 |
-
#: includes/admin/core/class-admin-metabox.php:
|
825 |
msgid "This will be the text color of heading part only"
|
826 |
msgstr ""
|
827 |
|
828 |
-
#: includes/admin/core/class-admin-metabox.php:
|
829 |
msgid "This will be the text color of entire section"
|
830 |
msgstr ""
|
831 |
|
832 |
-
#: includes/admin/core/class-admin-metabox.php:
|
833 |
msgid ""
|
834 |
"This will be the color of selected icon. By default It will be the same "
|
835 |
"color as heading text color"
|
836 |
msgstr ""
|
837 |
|
838 |
-
#: includes/admin/core/class-admin-metabox.php:
|
839 |
msgid "Select a color for this divider"
|
840 |
msgstr ""
|
841 |
|
842 |
-
#: includes/admin/core/class-admin-metabox.php:
|
843 |
msgid "Entering custom text here will replace the url with a text link"
|
844 |
msgstr ""
|
845 |
|
846 |
-
#: includes/admin/core/class-admin-metabox.php:
|
847 |
msgid "Choose whether to open this link in same window or in a new window"
|
848 |
msgstr ""
|
849 |
|
850 |
-
#: includes/admin/core/class-admin-metabox.php:
|
851 |
msgid "Whether to follow or nofollow this link by search engines"
|
852 |
msgstr ""
|
853 |
|
854 |
-
#: includes/admin/core/class-admin-metabox.php:
|
855 |
msgid ""
|
856 |
"Turn on to force users to create a strong password (A combination of one "
|
857 |
"lowercase letter, one uppercase letter, and one number). If turned on this "
|
858 |
"option is only applied to register forms and not to login forms."
|
859 |
msgstr ""
|
860 |
|
861 |
-
#: includes/admin/core/class-admin-metabox.php:
|
862 |
msgid ""
|
863 |
"Turn on to add a confirm password field. If turned on the confirm password "
|
864 |
"field will only show on register forms and not on login forms."
|
865 |
msgstr ""
|
866 |
|
867 |
-
#: includes/admin/core/class-admin-metabox.php:
|
868 |
msgid "This is the line-style of divider"
|
869 |
msgstr ""
|
870 |
|
871 |
-
#: includes/admin/core/class-admin-metabox.php:
|
872 |
msgid "Choose the minutes interval between each time in the time picker."
|
873 |
msgstr ""
|
874 |
|
875 |
-
#: includes/admin/core/class-admin-metabox.php:
|
876 |
msgid "The display format of the date which is visible to user."
|
877 |
msgstr ""
|
878 |
|
879 |
-
#: includes/admin/core/class-admin-metabox.php:
|
880 |
msgid "Choose the displayed time-format for this field"
|
881 |
msgstr ""
|
882 |
|
883 |
-
#: includes/admin/core/class-admin-metabox.php:
|
884 |
msgid ""
|
885 |
"Whether you wish to show the date in full or only show the years e.g. 25 "
|
886 |
"Years"
|
887 |
msgstr ""
|
888 |
|
889 |
-
#: includes/admin/core/class-admin-metabox.php:
|
890 |
msgid ""
|
891 |
"Disable specific week days from being available for selection in this date "
|
892 |
"picker"
|
893 |
msgstr ""
|
894 |
|
895 |
-
#: includes/admin/core/class-admin-metabox.php:
|
896 |
msgid ""
|
897 |
"Number of years available for the date selection. Default to last 50 years"
|
898 |
msgstr ""
|
899 |
|
900 |
-
#: includes/admin/core/class-admin-metabox.php:
|
901 |
msgid "This decides which years should be shown relative to today date"
|
902 |
msgstr ""
|
903 |
|
904 |
-
#: includes/admin/core/class-admin-metabox.php:
|
905 |
msgid "Set the minimum date/day in range in the format YYYY/MM/DD"
|
906 |
msgstr ""
|
907 |
|
908 |
-
#: includes/admin/core/class-admin-metabox.php:
|
909 |
msgid "Set the maximum date/day in range in the format YYYY/MM/DD"
|
910 |
msgstr ""
|
911 |
|
912 |
-
#: includes/admin/core/class-admin-metabox.php:
|
913 |
msgid ""
|
914 |
"Whether to show a specific number of years or specify a date range to be "
|
915 |
"available for the date picker."
|
916 |
msgstr ""
|
917 |
|
918 |
-
#: includes/admin/core/class-admin-metabox.php:
|
919 |
msgid ""
|
920 |
"Enter the shortcode in the following textarea and it will be displayed on "
|
921 |
"the fields"
|
922 |
msgstr ""
|
923 |
|
924 |
-
#: includes/admin/core/class-admin-metabox.php:
|
925 |
msgid "Edit the content of this field here"
|
926 |
msgstr ""
|
927 |
|
928 |
-
#: includes/admin/core/class-admin-metabox.php:
|
929 |
msgid "Enable/disable crop feature for this image upload and define ratio"
|
930 |
msgstr ""
|
931 |
|
932 |
-
#: includes/admin/core/class-admin-metabox.php:
|
933 |
-
#: includes/admin/core/class-admin-metabox.php:
|
934 |
msgid ""
|
935 |
"Select the image types that you want to allow to be uploaded via this field."
|
936 |
msgstr ""
|
937 |
|
938 |
-
#: includes/admin/core/class-admin-metabox.php:
|
939 |
msgid "This is the headline that appears in the upload box for this field"
|
940 |
msgstr ""
|
941 |
|
942 |
-
#: includes/admin/core/class-admin-metabox.php:
|
943 |
msgid ""
|
944 |
"If you need to add information or secondary line below the headline of "
|
945 |
"upload box, enter it here"
|
946 |
msgstr ""
|
947 |
|
948 |
-
#: includes/admin/core/class-admin-metabox.php:
|
949 |
msgid "The text that appears on the button. e.g. Upload"
|
950 |
msgstr ""
|
951 |
|
952 |
-
#: includes/admin/core/class-admin-metabox.php:
|
953 |
msgid ""
|
954 |
"The maximum size for image that can be uploaded through this field. Leave "
|
955 |
"empty for unlimited size."
|
956 |
msgstr ""
|
957 |
|
958 |
-
#: includes/admin/core/class-admin-metabox.php:
|
959 |
msgid "The height of textarea in pixels. Default is 100 pixels"
|
960 |
msgstr ""
|
961 |
|
962 |
-
#: includes/admin/core/class-admin-metabox.php:
|
963 |
msgid "This is the required spacing in pixels. e.g. 20px"
|
964 |
msgstr ""
|
965 |
|
966 |
-
#: includes/admin/core/class-admin-metabox.php:
|
967 |
msgid "Enable/disable multiple selections for this field"
|
968 |
msgstr ""
|
969 |
|
970 |
-
#: includes/admin/core/class-admin-metabox.php:
|
971 |
msgid ""
|
972 |
"Enter a number here to force a maximum number of selections by user for this "
|
973 |
"field"
|
974 |
msgstr ""
|
975 |
|
976 |
-
#: includes/admin/core/class-admin-metabox.php:
|
977 |
msgid ""
|
978 |
"Enter a number here to force a minimum number of selections by user for this "
|
979 |
"field"
|
980 |
msgstr ""
|
981 |
|
982 |
-
#: includes/admin/core/class-admin-metabox.php:
|
983 |
msgid "This is the max number of entries the user can add via field group."
|
984 |
msgstr ""
|
985 |
|
986 |
-
#: includes/admin/core/class-admin-metabox.php:
|
987 |
msgid ""
|
988 |
"If you want to enable a maximum number of words to be input in this "
|
989 |
"textarea. Leave empty to disable this setting"
|
990 |
msgstr ""
|
991 |
|
992 |
-
#: includes/admin/core/class-admin-metabox.php:
|
993 |
msgid "Minimum number that can be entered in this field"
|
994 |
msgstr ""
|
995 |
|
996 |
-
#: includes/admin/core/class-admin-metabox.php:
|
997 |
msgid "Maximum number that can be entered in this field"
|
998 |
msgstr ""
|
999 |
|
1000 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1001 |
msgid ""
|
1002 |
"If you want to enable a minimum number of characters to be input in this "
|
1003 |
"field. Leave empty to disable this setting"
|
1004 |
msgstr ""
|
1005 |
|
1006 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1007 |
msgid ""
|
1008 |
"If you want to enable a maximum number of characters to be input in this "
|
1009 |
"field. Leave empty to disable this setting"
|
1010 |
msgstr ""
|
1011 |
|
1012 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1013 |
msgid "Turn on/off HTML tags for this textarea"
|
1014 |
msgstr ""
|
1015 |
|
1016 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1017 |
msgid ""
|
1018 |
"Enter one choice per line. This will represent the available choices or "
|
1019 |
"selections available for user."
|
1020 |
msgstr ""
|
1021 |
|
1022 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1023 |
msgid ""
|
1024 |
"This is the title of the field for your reference in the backend. The title "
|
1025 |
"will not appear on the front-end of your website."
|
1026 |
msgstr ""
|
1027 |
|
1028 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1029 |
msgid ""
|
1030 |
"The meta key cannot be changed for duplicated fields or when editing an "
|
1031 |
"existing field. If you require a different meta key please create a new "
|
1032 |
"field."
|
1033 |
msgstr ""
|
1034 |
|
1035 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1036 |
msgid ""
|
1037 |
"A meta key is required to store the entered info in this field in the "
|
1038 |
"database. The meta key should be unique to this field and be written in "
|
@@ -1040,7 +1032,7 @@ msgid ""
|
|
1040 |
"job_title"
|
1041 |
msgstr ""
|
1042 |
|
1043 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1044 |
msgid ""
|
1045 |
"This is the text that appears in a tooltip when a user hovers over the info "
|
1046 |
"icon. Help text is useful for providing users with more information about "
|
@@ -1048,73 +1040,100 @@ msgid ""
|
|
1048 |
"for field."
|
1049 |
msgstr ""
|
1050 |
|
1051 |
-
#: includes/admin/core/class-admin-metabox.php:
|
|
|
|
|
|
|
|
|
1052 |
msgid "Text to display by default in this field"
|
1053 |
msgstr ""
|
1054 |
|
1055 |
-
#: includes/admin/core/class-admin-metabox.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1056 |
msgid ""
|
1057 |
"If you wish the rating field to be prefilled with a number of stars, enter "
|
1058 |
"it here."
|
1059 |
msgstr ""
|
1060 |
|
1061 |
-
#: includes/admin/core/class-admin-metabox.php:
|
|
|
|
|
|
|
|
|
1062 |
msgid ""
|
1063 |
"This option allows you to pre-fill the field with a default value prior to "
|
1064 |
"the user entering a value in the field. Leave blank to have no default value"
|
1065 |
msgstr ""
|
1066 |
|
1067 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1068 |
msgid ""
|
1069 |
"The field label is the text that appears above the field on your front-end "
|
1070 |
"form. Leave blank to not show a label above field."
|
1071 |
msgstr ""
|
1072 |
|
1073 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1074 |
msgid ""
|
1075 |
"This is the text that appears within the field e.g please enter your email "
|
1076 |
"address. Leave blank to not show any placeholder text."
|
1077 |
msgstr ""
|
1078 |
|
1079 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1080 |
msgid ""
|
1081 |
"Field privacy allows you to select who can view this field on the front-end. "
|
1082 |
"The site admin can view all fields regardless of the option set here."
|
1083 |
msgstr ""
|
1084 |
|
1085 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1086 |
msgid "Select the member roles that can view this field on the front-end."
|
1087 |
msgstr ""
|
1088 |
|
1089 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1090 |
msgid ""
|
1091 |
"This option allows you to set whether the field must be filled in before the "
|
1092 |
"form can be processed."
|
1093 |
msgstr ""
|
1094 |
|
1095 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1096 |
msgid ""
|
1097 |
"This option allows you to set whether or not the user can edit the "
|
1098 |
"information in this field."
|
1099 |
msgstr ""
|
1100 |
|
1101 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1102 |
msgid "Choose whether you want a 5-stars or 10-stars ratings based here."
|
1103 |
msgstr ""
|
1104 |
|
1105 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1106 |
msgid "Add a callback source to retrieve choices."
|
1107 |
msgstr ""
|
1108 |
|
1109 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1110 |
msgid "Parent Option"
|
1111 |
msgstr ""
|
1112 |
|
1113 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1114 |
msgid "Dynamically populates the option based from selected parent option."
|
1115 |
msgstr ""
|
1116 |
|
1117 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1118 |
msgid "No Selected"
|
1119 |
msgstr ""
|
1120 |
|
@@ -1523,7 +1542,7 @@ msgstr ""
|
|
1523 |
|
1524 |
#: includes/admin/core/class-admin-settings.php:350
|
1525 |
#: includes/admin/core/class-admin-settings.php:367
|
1526 |
-
#: includes/core/class-builtin.php:
|
1527 |
msgid "Username"
|
1528 |
msgstr ""
|
1529 |
|
@@ -1563,7 +1582,7 @@ msgid "Default WP Display Name"
|
|
1563 |
msgstr ""
|
1564 |
|
1565 |
#: includes/admin/core/class-admin-settings.php:366
|
1566 |
-
#: includes/core/class-builtin.php:
|
1567 |
msgid "Nickname"
|
1568 |
msgstr ""
|
1569 |
|
@@ -1687,7 +1706,7 @@ msgid ""
|
|
1687 |
msgstr ""
|
1688 |
|
1689 |
#: includes/admin/core/class-admin-settings.php:436
|
1690 |
-
#: includes/class-config.php:134 includes/class-config.php:
|
1691 |
#: includes/core/class-account.php:92
|
1692 |
msgid "Account"
|
1693 |
msgstr ""
|
@@ -2387,143 +2406,160 @@ msgid ""
|
|
2387 |
msgstr ""
|
2388 |
|
2389 |
#: includes/admin/core/class-admin-settings.php:1079
|
2390 |
-
msgid "
|
2391 |
msgstr ""
|
2392 |
|
2393 |
#: includes/admin/core/class-admin-settings.php:1080
|
2394 |
msgid ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2395 |
"Check this box if you would like Ultimate Member to completely remove all of "
|
2396 |
"its data when the plugin/extensions are deleted."
|
2397 |
msgstr ""
|
2398 |
|
2399 |
-
#: includes/admin/core/class-admin-settings.php:
|
2400 |
msgid "Install Info"
|
2401 |
msgstr ""
|
2402 |
|
2403 |
-
#: includes/admin/core/class-admin-settings.php:
|
2404 |
msgid "Ultimate Member - Settings"
|
2405 |
msgstr ""
|
2406 |
|
2407 |
-
#: includes/admin/core/class-admin-settings.php:
|
2408 |
msgid "Save Changes"
|
2409 |
msgstr ""
|
2410 |
|
2411 |
-
#: includes/admin/core/class-admin-settings.php:
|
2412 |
msgid "Subject Line"
|
2413 |
msgstr ""
|
2414 |
|
2415 |
-
#: includes/admin/core/class-admin-settings.php:
|
2416 |
msgid "This is the subject line of the e-mail"
|
2417 |
msgstr ""
|
2418 |
|
2419 |
-
#: includes/admin/core/class-admin-settings.php:
|
2420 |
msgid "Message Body"
|
2421 |
msgstr ""
|
2422 |
|
2423 |
-
#: includes/admin/core/class-admin-settings.php:
|
2424 |
msgid "This is the content of the e-mail"
|
2425 |
msgstr ""
|
2426 |
|
2427 |
-
#: includes/admin/core/class-admin-settings.php:
|
2428 |
-
#: includes/admin/core/class-admin-settings.php:
|
2429 |
#, php-format
|
2430 |
msgid ""
|
2431 |
"Your license key expired on %s. Please <a href=\"%s\" target=\"_blank"
|
2432 |
"\">renew your license key</a>."
|
2433 |
msgstr ""
|
2434 |
|
2435 |
-
#: includes/admin/core/class-admin-settings.php:
|
2436 |
-
#: includes/admin/core/class-admin-settings.php:
|
2437 |
#, php-format
|
2438 |
msgid ""
|
2439 |
"Your license key has been disabled. Please <a href=\"%s\" target=\"_blank"
|
2440 |
"\">contact support</a> for more information."
|
2441 |
msgstr ""
|
2442 |
|
2443 |
-
#: includes/admin/core/class-admin-settings.php:
|
2444 |
-
#: includes/admin/core/class-admin-settings.php:
|
2445 |
#, php-format
|
2446 |
msgid ""
|
2447 |
"Invalid license. Please <a href=\"%s\" target=\"_blank\">visit your account "
|
2448 |
"page</a> and verify it."
|
2449 |
msgstr ""
|
2450 |
|
2451 |
-
#: includes/admin/core/class-admin-settings.php:
|
2452 |
-
#: includes/admin/core/class-admin-settings.php:
|
2453 |
#, php-format
|
2454 |
msgid ""
|
2455 |
"Your %s is not active for this URL. Please <a href=\"%s\" target=\"_blank"
|
2456 |
"\">visit your account page</a> to manage your license key URLs."
|
2457 |
msgstr ""
|
2458 |
|
2459 |
-
#: includes/admin/core/class-admin-settings.php:
|
2460 |
-
#: includes/admin/core/class-admin-settings.php:
|
2461 |
#, php-format
|
2462 |
msgid "This appears to be an invalid license key for %s."
|
2463 |
msgstr ""
|
2464 |
|
2465 |
-
#: includes/admin/core/class-admin-settings.php:
|
2466 |
-
#: includes/admin/core/class-admin-settings.php:
|
2467 |
#, php-format
|
2468 |
msgid ""
|
2469 |
"Your license key has reached its activation limit. <a href=\"%s\">View "
|
2470 |
"possible upgrades</a> now."
|
2471 |
msgstr ""
|
2472 |
|
2473 |
-
#: includes/admin/core/class-admin-settings.php:
|
2474 |
-
#: includes/admin/core/class-admin-settings.php:
|
2475 |
msgid ""
|
2476 |
"The key you entered belongs to a bundle, please use the product specific "
|
2477 |
"license key."
|
2478 |
msgstr ""
|
2479 |
|
2480 |
-
#: includes/admin/core/class-admin-settings.php:
|
2481 |
-
#: includes/admin/core/class-admin-settings.php:
|
2482 |
msgid "unknown_error"
|
2483 |
msgstr ""
|
2484 |
|
2485 |
-
#: includes/admin/core/class-admin-settings.php:
|
2486 |
-
#: includes/admin/core/class-admin-settings.php:
|
2487 |
#, php-format
|
2488 |
msgid ""
|
2489 |
"There was an error with this license key: %s. Please <a href=\"%s\">contact "
|
2490 |
"our support team</a>."
|
2491 |
msgstr ""
|
2492 |
|
2493 |
-
#: includes/admin/core/class-admin-settings.php:
|
2494 |
msgid "License key never expires."
|
2495 |
msgstr ""
|
2496 |
|
2497 |
-
#: includes/admin/core/class-admin-settings.php:
|
2498 |
#, php-format
|
2499 |
msgid ""
|
2500 |
"Your license key expires soon! It expires on %s. <a href=\"%s\" target="
|
2501 |
"\"_blank\">Renew your license key</a>."
|
2502 |
msgstr ""
|
2503 |
|
2504 |
-
#: includes/admin/core/class-admin-settings.php:
|
2505 |
#, php-format
|
2506 |
msgid "Your license key expires on %s."
|
2507 |
msgstr ""
|
2508 |
|
2509 |
-
#: includes/admin/core/class-admin-settings.php:
|
2510 |
#, php-format
|
2511 |
msgid "To receive updates, please enter your valid %s license key."
|
2512 |
msgstr ""
|
2513 |
|
2514 |
-
#: includes/admin/core/class-admin-settings.php:
|
2515 |
msgid "Clear License"
|
2516 |
msgstr ""
|
2517 |
|
2518 |
-
#: includes/admin/core/class-admin-settings.php:
|
2519 |
msgid "Activate"
|
2520 |
msgstr ""
|
2521 |
|
2522 |
-
#: includes/admin/core/class-admin-settings.php:
|
2523 |
msgid "Re-Activate"
|
2524 |
msgstr ""
|
2525 |
|
2526 |
-
#: includes/admin/core/class-admin-settings.php:
|
2527 |
msgid ""
|
2528 |
"To copy the Install info, click below then press Ctrl + C (PC) or Cmd + C "
|
2529 |
"(Mac)."
|
@@ -2588,97 +2624,97 @@ msgstr ""
|
|
2588 |
msgid "Run"
|
2589 |
msgstr ""
|
2590 |
|
2591 |
-
#: includes/admin/core/class-admin-users.php:
|
2592 |
-
#: includes/admin/core/class-admin-users.php:
|
2593 |
msgid "UM Action"
|
2594 |
msgstr ""
|
2595 |
|
2596 |
-
#: includes/admin/core/class-admin-users.php:
|
2597 |
-
#: includes/core/class-fields.php:
|
2598 |
msgid "Apply"
|
2599 |
msgstr ""
|
2600 |
|
2601 |
-
#: includes/admin/core/class-admin-users.php:
|
2602 |
#: includes/core/um-filters-user.php:20 includes/core/um-filters-user.php:25
|
2603 |
msgid "Approve Membership"
|
2604 |
msgstr ""
|
2605 |
|
2606 |
-
#: includes/admin/core/class-admin-users.php:
|
2607 |
#: includes/core/um-filters-user.php:21
|
2608 |
msgid "Reject Membership"
|
2609 |
msgstr ""
|
2610 |
|
2611 |
-
#: includes/admin/core/class-admin-users.php:
|
2612 |
#: includes/core/um-filters-user.php:29
|
2613 |
msgid "Put as Pending Review"
|
2614 |
msgstr ""
|
2615 |
|
2616 |
-
#: includes/admin/core/class-admin-users.php:
|
2617 |
#: includes/core/um-filters-user.php:33
|
2618 |
msgid "Resend Activation E-mail"
|
2619 |
msgstr ""
|
2620 |
|
2621 |
-
#: includes/admin/core/class-admin-users.php:
|
2622 |
msgid "Deactivate"
|
2623 |
msgstr ""
|
2624 |
|
2625 |
-
#: includes/admin/core/class-admin-users.php:
|
2626 |
msgid "Reactivate"
|
2627 |
msgstr ""
|
2628 |
|
2629 |
-
#: includes/admin/core/class-admin-users.php:
|
2630 |
#: templates/account.php:62
|
2631 |
msgid "View profile"
|
2632 |
msgstr ""
|
2633 |
|
2634 |
-
#: includes/admin/core/class-admin-users.php:
|
2635 |
msgid "Info"
|
2636 |
msgstr ""
|
2637 |
|
2638 |
-
#: includes/admin/core/class-admin-users.php:
|
2639 |
#: includes/admin/templates/dashboard/users.php:11
|
2640 |
#: includes/core/class-user.php:819
|
2641 |
msgid "Approved"
|
2642 |
msgstr ""
|
2643 |
|
2644 |
-
#: includes/admin/core/class-admin-users.php:
|
2645 |
msgid "Pending review"
|
2646 |
msgstr ""
|
2647 |
|
2648 |
-
#: includes/admin/core/class-admin-users.php:
|
2649 |
msgid "Waiting e-mail confirmation"
|
2650 |
msgstr ""
|
2651 |
|
2652 |
-
#: includes/admin/core/class-admin-users.php:
|
2653 |
#: includes/admin/templates/dashboard/users.php:37
|
2654 |
msgid "Inactive"
|
2655 |
msgstr ""
|
2656 |
|
2657 |
-
#: includes/admin/core/class-admin-users.php:
|
2658 |
#: includes/admin/templates/dashboard/users.php:16
|
2659 |
msgid "Rejected"
|
2660 |
msgstr ""
|
2661 |
|
2662 |
-
#: includes/admin/core/class-admin-users.php:
|
2663 |
msgid "You do not have enough permissions to do that."
|
2664 |
msgstr ""
|
2665 |
|
2666 |
-
#: includes/admin/core/list-tables/emails-list-table.php:
|
2667 |
#: includes/admin/core/list-tables/roles-list-table.php:172
|
2668 |
msgid "item"
|
2669 |
msgstr ""
|
2670 |
|
2671 |
-
#: includes/admin/core/list-tables/emails-list-table.php:
|
2672 |
#: includes/admin/core/list-tables/roles-list-table.php:173
|
2673 |
msgid "items"
|
2674 |
msgstr ""
|
2675 |
|
2676 |
-
#: includes/admin/core/list-tables/emails-list-table.php:
|
2677 |
#: includes/admin/core/list-tables/roles-list-table.php:177
|
2678 |
msgid "not found."
|
2679 |
msgstr ""
|
2680 |
|
2681 |
-
#: includes/admin/core/list-tables/emails-list-table.php:
|
2682 |
msgid "Member"
|
2683 |
msgstr ""
|
2684 |
|
@@ -2694,6 +2730,13 @@ msgstr ""
|
|
2694 |
msgid "Recipient(s)"
|
2695 |
msgstr ""
|
2696 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2697 |
#: includes/admin/core/list-tables/roles-list-table.php:23
|
2698 |
#: includes/admin/core/list-tables/roles-list-table.php:88
|
2699 |
#: includes/admin/core/list-tables/roles-list-table.php:398
|
@@ -2926,6 +2969,14 @@ msgstr ""
|
|
2926 |
msgid "Purge temp files dir..."
|
2927 |
msgstr ""
|
2928 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2929 |
#: includes/admin/templates/dashboard/cache.php:9
|
2930 |
msgid "Run this task from time to time to keep your DB clean."
|
2931 |
msgstr ""
|
@@ -3000,12 +3051,12 @@ msgid "Display Name"
|
|
3000 |
msgstr ""
|
3001 |
|
3002 |
#: includes/admin/templates/directory/general.php:50
|
3003 |
-
#: includes/core/class-builtin.php:
|
3004 |
msgid "First Name"
|
3005 |
msgstr ""
|
3006 |
|
3007 |
#: includes/admin/templates/directory/general.php:51
|
3008 |
-
#: includes/core/class-builtin.php:
|
3009 |
msgid "Last Name"
|
3010 |
msgstr ""
|
3011 |
|
@@ -3563,7 +3614,7 @@ msgstr ""
|
|
3563 |
#: includes/admin/templates/modal/dynamic_new_group.php:15
|
3564 |
#: includes/admin/templates/modal/fonticons.php:11
|
3565 |
#: includes/admin/templates/role/publish.php:24
|
3566 |
-
#: includes/core/class-fields.php:
|
3567 |
#: includes/core/um-actions-profile.php:557
|
3568 |
#: includes/core/um-actions-profile.php:696
|
3569 |
#: includes/core/um-actions-profile.php:729
|
@@ -3912,31 +3963,31 @@ msgstr ""
|
|
3912 |
msgid "Check All"
|
3913 |
msgstr ""
|
3914 |
|
3915 |
-
#: includes/class-config.php:129 includes/class-config.php:
|
3916 |
msgid "User"
|
3917 |
msgstr ""
|
3918 |
|
3919 |
#: includes/class-config.php:130 includes/class-config.php:235
|
3920 |
-
#: includes/class-config.php:241 includes/class-config.php:
|
3921 |
msgid "Login"
|
3922 |
msgstr ""
|
3923 |
|
3924 |
#: includes/class-config.php:131 includes/class-config.php:233
|
3925 |
-
#: includes/class-config.php:245 includes/class-config.php:
|
3926 |
msgid "Register"
|
3927 |
msgstr ""
|
3928 |
|
3929 |
-
#: includes/class-config.php:132 includes/class-config.php:
|
3930 |
msgid "Members"
|
3931 |
msgstr ""
|
3932 |
|
3933 |
-
#: includes/class-config.php:133 includes/class-config.php:
|
3934 |
#: includes/core/um-actions-profile.php:1080
|
3935 |
#: includes/core/um-actions-user.php:15
|
3936 |
msgid "Logout"
|
3937 |
msgstr ""
|
3938 |
|
3939 |
-
#: includes/class-config.php:135 includes/class-config.php:
|
3940 |
msgid "Password Reset"
|
3941 |
msgstr ""
|
3942 |
|
@@ -4056,36 +4107,36 @@ msgid ""
|
|
4056 |
"account data from the site. To delete your account enter your password below"
|
4057 |
msgstr ""
|
4058 |
|
4059 |
-
#: includes/class-dependencies.php:
|
4060 |
#, php-format
|
4061 |
msgid ""
|
4062 |
"This version of <strong>\"%s\"</strong> requires the core <strong>%s</"
|
4063 |
"strong> plugin to be <strong>%s</strong> or higher."
|
4064 |
msgstr ""
|
4065 |
|
4066 |
-
#: includes/class-dependencies.php:
|
4067 |
#, php-format
|
4068 |
msgid "Please update <strong>%s</strong> to the latest version."
|
4069 |
msgstr ""
|
4070 |
|
4071 |
-
#: includes/class-dependencies.php:
|
4072 |
#, php-format
|
4073 |
msgid ""
|
4074 |
"Sorry, but this version of <strong>%s</strong> does not work with extension "
|
4075 |
"<strong>\"%s\" %s</strong> version."
|
4076 |
msgstr ""
|
4077 |
|
4078 |
-
#: includes/class-dependencies.php:
|
4079 |
#, php-format
|
4080 |
msgid "Please update extension <strong>\"%s\"</strong> to the latest version."
|
4081 |
msgstr ""
|
4082 |
|
4083 |
-
#: includes/class-dependencies.php:
|
4084 |
#, php-format
|
4085 |
msgid "Please check <strong>\"%s\" %s</strong> extension's folder name."
|
4086 |
msgstr ""
|
4087 |
|
4088 |
-
#: includes/class-dependencies.php:
|
4089 |
#, php-format
|
4090 |
msgid "Correct folder name is <strong>\"%s\"</strong>"
|
4091 |
msgstr ""
|
@@ -4095,7 +4146,7 @@ msgstr ""
|
|
4095 |
msgid "%s License Key"
|
4096 |
msgstr ""
|
4097 |
|
4098 |
-
#: includes/class-init.php:
|
4099 |
msgid "Cheatin’ huh?"
|
4100 |
msgstr ""
|
4101 |
|
@@ -4120,7 +4171,7 @@ msgid "Update Notifications"
|
|
4120 |
msgstr ""
|
4121 |
|
4122 |
#: includes/core/class-account.php:119 includes/core/class-account.php:120
|
4123 |
-
#: includes/core/class-builtin.php:
|
4124 |
msgid "Delete Account"
|
4125 |
msgstr ""
|
4126 |
|
@@ -4199,1974 +4250,1974 @@ msgstr ""
|
|
4199 |
msgid "You must add a shortcode to the content area"
|
4200 |
msgstr ""
|
4201 |
|
4202 |
-
#: includes/core/class-builtin.php:663 includes/core/class-user.php:
|
4203 |
msgid "Only me"
|
4204 |
msgstr ""
|
4205 |
|
4206 |
-
#: includes/core/class-builtin.php:
|
4207 |
-
#: includes/core/class-builtin.php:
|
4208 |
msgid "Username or E-mail"
|
4209 |
msgstr ""
|
4210 |
|
4211 |
-
#: includes/core/class-builtin.php:
|
4212 |
-
#: includes/core/class-builtin.php:
|
4213 |
msgid "Website URL"
|
4214 |
msgstr ""
|
4215 |
|
4216 |
-
#: includes/core/class-builtin.php:
|
4217 |
msgid "Registration Date"
|
4218 |
msgstr ""
|
4219 |
|
4220 |
-
#: includes/core/class-builtin.php:
|
4221 |
msgid "Last Login"
|
4222 |
msgstr ""
|
4223 |
|
4224 |
-
#: includes/core/class-builtin.php:
|
4225 |
msgid "E-mail Address"
|
4226 |
msgstr ""
|
4227 |
|
4228 |
-
#: includes/core/class-builtin.php:
|
4229 |
msgid "Secondary E-mail Address"
|
4230 |
msgstr ""
|
4231 |
|
4232 |
-
#: includes/core/class-builtin.php:
|
4233 |
msgid "Biography"
|
4234 |
msgstr ""
|
4235 |
|
4236 |
-
#: includes/core/class-builtin.php:
|
4237 |
msgid "Enter a bit about yourself..."
|
4238 |
msgstr ""
|
4239 |
|
4240 |
-
#: includes/core/class-builtin.php:
|
4241 |
msgid "Birth Date"
|
4242 |
msgstr ""
|
4243 |
|
4244 |
-
#: includes/core/class-builtin.php:
|
4245 |
msgid "Gender"
|
4246 |
msgstr ""
|
4247 |
|
4248 |
-
#: includes/core/class-builtin.php:
|
4249 |
msgid "Male"
|
4250 |
msgstr ""
|
4251 |
|
4252 |
-
#: includes/core/class-builtin.php:
|
4253 |
msgid "Female"
|
4254 |
msgstr ""
|
4255 |
|
4256 |
-
#: includes/core/class-builtin.php:
|
4257 |
msgid "Country"
|
4258 |
msgstr ""
|
4259 |
|
4260 |
-
#: includes/core/class-builtin.php:
|
4261 |
msgid "Choose a Country"
|
4262 |
msgstr ""
|
4263 |
|
4264 |
-
#: includes/core/class-builtin.php:
|
4265 |
msgid "Facebook"
|
4266 |
msgstr ""
|
4267 |
|
4268 |
-
#: includes/core/class-builtin.php:
|
4269 |
msgid "Twitter"
|
4270 |
msgstr ""
|
4271 |
|
4272 |
-
#: includes/core/class-builtin.php:
|
4273 |
msgid "LinkedIn"
|
4274 |
msgstr ""
|
4275 |
|
4276 |
-
#: includes/core/class-builtin.php:
|
4277 |
msgid "Google+"
|
4278 |
msgstr ""
|
4279 |
|
4280 |
-
#: includes/core/class-builtin.php:
|
4281 |
msgid "Instagram"
|
4282 |
msgstr ""
|
4283 |
|
4284 |
-
#: includes/core/class-builtin.php:
|
4285 |
-
#: includes/core/class-builtin.php:
|
4286 |
msgid "Skype ID"
|
4287 |
msgstr ""
|
4288 |
|
4289 |
-
#: includes/core/class-builtin.php:
|
4290 |
msgid "YouTube"
|
4291 |
msgstr ""
|
4292 |
|
4293 |
-
#: includes/core/class-builtin.php:
|
4294 |
msgid "SoundCloud"
|
4295 |
msgstr ""
|
4296 |
|
4297 |
-
#: includes/core/class-builtin.php:
|
4298 |
msgid "VKontakte"
|
4299 |
msgstr ""
|
4300 |
|
4301 |
-
#: includes/core/class-builtin.php:
|
4302 |
msgid "Roles (Dropdown)"
|
4303 |
msgstr ""
|
4304 |
|
4305 |
-
#: includes/core/class-builtin.php:
|
4306 |
msgid "Account Type"
|
4307 |
msgstr ""
|
4308 |
|
4309 |
-
#: includes/core/class-builtin.php:
|
4310 |
msgid "Roles (Radio)"
|
4311 |
msgstr ""
|
4312 |
|
4313 |
-
#: includes/core/class-builtin.php:
|
4314 |
msgid "Languages"
|
4315 |
msgstr ""
|
4316 |
|
4317 |
-
#: includes/core/class-builtin.php:
|
4318 |
msgid "Languages Spoken"
|
4319 |
msgstr ""
|
4320 |
|
4321 |
-
#: includes/core/class-builtin.php:
|
4322 |
msgid "Select languages"
|
4323 |
msgstr ""
|
4324 |
|
4325 |
-
#: includes/core/class-builtin.php:
|
4326 |
-
#: includes/core/class-builtin.php:
|
4327 |
msgid "Phone Number"
|
4328 |
msgstr ""
|
4329 |
|
4330 |
-
#: includes/core/class-builtin.php:
|
4331 |
msgid "Mobile Number"
|
4332 |
msgstr ""
|
4333 |
|
4334 |
-
#: includes/core/class-builtin.php:
|
4335 |
msgid "Profile Photo"
|
4336 |
msgstr ""
|
4337 |
|
4338 |
-
#: includes/core/class-builtin.php:
|
4339 |
msgid "Change your profile photo"
|
4340 |
msgstr ""
|
4341 |
|
4342 |
-
#: includes/core/class-builtin.php:
|
4343 |
msgid "Upload your photo here"
|
4344 |
msgstr ""
|
4345 |
|
4346 |
-
#: includes/core/class-builtin.php:
|
4347 |
msgid "Cover Photo"
|
4348 |
msgstr ""
|
4349 |
|
4350 |
-
#: includes/core/class-builtin.php:
|
4351 |
#: includes/core/um-actions-profile.php:519
|
4352 |
msgid "Change your cover photo"
|
4353 |
msgstr ""
|
4354 |
|
4355 |
-
#: includes/core/class-builtin.php:
|
4356 |
msgid "Upload profile cover here"
|
4357 |
msgstr ""
|
4358 |
|
4359 |
-
#: includes/core/class-builtin.php:
|
4360 |
msgid "Enter your username or email"
|
4361 |
msgstr ""
|
4362 |
|
4363 |
-
#: includes/core/class-builtin.php:
|
4364 |
msgid "Profile Privacy"
|
4365 |
msgstr ""
|
4366 |
|
4367 |
-
#: includes/core/class-builtin.php:
|
4368 |
msgid "Who can see your public profile?"
|
4369 |
msgstr ""
|
4370 |
|
4371 |
-
#: includes/core/class-builtin.php:
|
4372 |
msgid "Hide my profile from directory"
|
4373 |
msgstr ""
|
4374 |
|
4375 |
-
#: includes/core/class-builtin.php:
|
4376 |
msgid "Here you can hide yourself from appearing in public directory"
|
4377 |
msgstr ""
|
4378 |
|
4379 |
-
#: includes/core/class-builtin.php:
|
4380 |
msgid ""
|
4381 |
"If you confirm, everything related to your profile will be deleted "
|
4382 |
"permanently from the site"
|
4383 |
msgstr ""
|
4384 |
|
4385 |
-
#: includes/core/class-builtin.php:
|
4386 |
msgid "Alphabetic value only"
|
4387 |
msgstr ""
|
4388 |
|
4389 |
-
#: includes/core/class-builtin.php:
|
4390 |
msgid "Alpha-numeric value"
|
4391 |
msgstr ""
|
4392 |
|
4393 |
-
#: includes/core/class-builtin.php:
|
4394 |
msgid "English letters only"
|
4395 |
msgstr ""
|
4396 |
|
4397 |
-
#: includes/core/class-builtin.php:
|
4398 |
msgid "Facebook URL"
|
4399 |
msgstr ""
|
4400 |
|
4401 |
-
#: includes/core/class-builtin.php:
|
4402 |
msgid "Google+ URL"
|
4403 |
msgstr ""
|
4404 |
|
4405 |
-
#: includes/core/class-builtin.php:
|
4406 |
msgid "Instagram URL"
|
4407 |
msgstr ""
|
4408 |
|
4409 |
-
#: includes/core/class-builtin.php:
|
4410 |
msgid "LinkedIn URL"
|
4411 |
msgstr ""
|
4412 |
|
4413 |
-
#: includes/core/class-builtin.php:
|
4414 |
msgid "VKontakte URL"
|
4415 |
msgstr ""
|
4416 |
|
4417 |
-
#: includes/core/class-builtin.php:
|
4418 |
msgid "Lowercase only"
|
4419 |
msgstr ""
|
4420 |
|
4421 |
-
#: includes/core/class-builtin.php:
|
4422 |
msgid "Numeric value only"
|
4423 |
msgstr ""
|
4424 |
|
4425 |
-
#: includes/core/class-builtin.php:
|
4426 |
msgid "SoundCloud Profile"
|
4427 |
msgstr ""
|
4428 |
|
4429 |
-
#: includes/core/class-builtin.php:
|
4430 |
msgid "Twitter URL"
|
4431 |
msgstr ""
|
4432 |
|
4433 |
-
#: includes/core/class-builtin.php:
|
4434 |
msgid "Unique E-mail"
|
4435 |
msgstr ""
|
4436 |
|
4437 |
-
#: includes/core/class-builtin.php:
|
4438 |
msgid "Unique Metakey value"
|
4439 |
msgstr ""
|
4440 |
|
4441 |
-
#: includes/core/class-builtin.php:
|
4442 |
msgid "Unique Username"
|
4443 |
msgstr ""
|
4444 |
|
4445 |
-
#: includes/core/class-builtin.php:
|
4446 |
msgid "Unique Username/E-mail"
|
4447 |
msgstr ""
|
4448 |
|
4449 |
-
#: includes/core/class-builtin.php:
|
4450 |
msgid "YouTube Profile"
|
4451 |
msgstr ""
|
4452 |
|
4453 |
-
#: includes/core/class-builtin.php:
|
4454 |
msgid "Custom Validation"
|
4455 |
msgstr ""
|
4456 |
|
4457 |
-
#: includes/core/class-builtin.php:
|
4458 |
msgid "Afar"
|
4459 |
msgstr ""
|
4460 |
|
4461 |
-
#: includes/core/class-builtin.php:
|
4462 |
msgid "Abkhazian"
|
4463 |
msgstr ""
|
4464 |
|
4465 |
-
#: includes/core/class-builtin.php:
|
4466 |
msgid "Avestan"
|
4467 |
msgstr ""
|
4468 |
|
4469 |
-
#: includes/core/class-builtin.php:
|
4470 |
msgid "Afrikaans"
|
4471 |
msgstr ""
|
4472 |
|
4473 |
-
#: includes/core/class-builtin.php:
|
4474 |
msgid "Akan"
|
4475 |
msgstr ""
|
4476 |
|
4477 |
-
#: includes/core/class-builtin.php:
|
4478 |
msgid "Amharic"
|
4479 |
msgstr ""
|
4480 |
|
4481 |
-
#: includes/core/class-builtin.php:
|
4482 |
msgid "Aragonese"
|
4483 |
msgstr ""
|
4484 |
|
4485 |
-
#: includes/core/class-builtin.php:
|
4486 |
msgid "Arabic"
|
4487 |
msgstr ""
|
4488 |
|
4489 |
-
#: includes/core/class-builtin.php:
|
4490 |
msgid "Assamese"
|
4491 |
msgstr ""
|
4492 |
|
4493 |
-
#: includes/core/class-builtin.php:
|
4494 |
msgid "Avaric"
|
4495 |
msgstr ""
|
4496 |
|
4497 |
-
#: includes/core/class-builtin.php:
|
4498 |
msgid "Aymara"
|
4499 |
msgstr ""
|
4500 |
|
4501 |
-
#: includes/core/class-builtin.php:
|
4502 |
msgid "Azerbaijani"
|
4503 |
msgstr ""
|
4504 |
|
4505 |
-
#: includes/core/class-builtin.php:
|
4506 |
msgid "Bashkir"
|
4507 |
msgstr ""
|
4508 |
|
4509 |
-
#: includes/core/class-builtin.php:
|
4510 |
msgid "Belarusian"
|
4511 |
msgstr ""
|
4512 |
|
4513 |
-
#: includes/core/class-builtin.php:
|
4514 |
msgid "Bulgarian"
|
4515 |
msgstr ""
|
4516 |
|
4517 |
-
#: includes/core/class-builtin.php:
|
4518 |
msgid "Bihari"
|
4519 |
msgstr ""
|
4520 |
|
4521 |
-
#: includes/core/class-builtin.php:
|
4522 |
msgid "Bislama"
|
4523 |
msgstr ""
|
4524 |
|
4525 |
-
#: includes/core/class-builtin.php:
|
4526 |
msgid "Bambara"
|
4527 |
msgstr ""
|
4528 |
|
4529 |
-
#: includes/core/class-builtin.php:
|
4530 |
msgid "Bengali"
|
4531 |
msgstr ""
|
4532 |
|
4533 |
-
#: includes/core/class-builtin.php:
|
4534 |
msgid "Tibetan"
|
4535 |
msgstr ""
|
4536 |
|
4537 |
-
#: includes/core/class-builtin.php:
|
4538 |
msgid "Breton"
|
4539 |
msgstr ""
|
4540 |
|
4541 |
-
#: includes/core/class-builtin.php:
|
4542 |
msgid "Bosnian"
|
4543 |
msgstr ""
|
4544 |
|
4545 |
-
#: includes/core/class-builtin.php:
|
4546 |
msgid "Catalan"
|
4547 |
msgstr ""
|
4548 |
|
4549 |
-
#: includes/core/class-builtin.php:
|
4550 |
msgid "Chechen"
|
4551 |
msgstr ""
|
4552 |
|
4553 |
-
#: includes/core/class-builtin.php:
|
4554 |
msgid "Chamorro"
|
4555 |
msgstr ""
|
4556 |
|
4557 |
-
#: includes/core/class-builtin.php:
|
4558 |
msgid "Corsican"
|
4559 |
msgstr ""
|
4560 |
|
4561 |
-
#: includes/core/class-builtin.php:
|
4562 |
msgid "Cree"
|
4563 |
msgstr ""
|
4564 |
|
4565 |
-
#: includes/core/class-builtin.php:
|
4566 |
msgid "Czech"
|
4567 |
msgstr ""
|
4568 |
|
4569 |
-
#: includes/core/class-builtin.php:
|
4570 |
msgid "Church Slavic"
|
4571 |
msgstr ""
|
4572 |
|
4573 |
-
#: includes/core/class-builtin.php:
|
4574 |
msgid "Chuvash"
|
4575 |
msgstr ""
|
4576 |
|
4577 |
-
#: includes/core/class-builtin.php:
|
4578 |
msgid "Welsh"
|
4579 |
msgstr ""
|
4580 |
|
4581 |
-
#: includes/core/class-builtin.php:
|
4582 |
msgid "Danish"
|
4583 |
msgstr ""
|
4584 |
|
4585 |
-
#: includes/core/class-builtin.php:
|
4586 |
msgid "German"
|
4587 |
msgstr ""
|
4588 |
|
4589 |
-
#: includes/core/class-builtin.php:
|
4590 |
msgid "Divehi"
|
4591 |
msgstr ""
|
4592 |
|
4593 |
-
#: includes/core/class-builtin.php:
|
4594 |
msgid "Dzongkha"
|
4595 |
msgstr ""
|
4596 |
|
4597 |
-
#: includes/core/class-builtin.php:
|
4598 |
msgid "Ewe"
|
4599 |
msgstr ""
|
4600 |
|
4601 |
-
#: includes/core/class-builtin.php:
|
4602 |
msgid "Greek"
|
4603 |
msgstr ""
|
4604 |
|
4605 |
-
#: includes/core/class-builtin.php:
|
4606 |
msgid "English"
|
4607 |
msgstr ""
|
4608 |
|
4609 |
-
#: includes/core/class-builtin.php:
|
4610 |
msgid "Esperanto"
|
4611 |
msgstr ""
|
4612 |
|
4613 |
-
#: includes/core/class-builtin.php:
|
4614 |
msgid "Spanish"
|
4615 |
msgstr ""
|
4616 |
|
4617 |
-
#: includes/core/class-builtin.php:
|
4618 |
msgid "Estonian"
|
4619 |
msgstr ""
|
4620 |
|
4621 |
-
#: includes/core/class-builtin.php:
|
4622 |
msgid "Basque"
|
4623 |
msgstr ""
|
4624 |
|
4625 |
-
#: includes/core/class-builtin.php:
|
4626 |
msgid "Persian"
|
4627 |
msgstr ""
|
4628 |
|
4629 |
-
#: includes/core/class-builtin.php:
|
4630 |
msgid "Fulah"
|
4631 |
msgstr ""
|
4632 |
|
4633 |
-
#: includes/core/class-builtin.php:
|
4634 |
msgid "Finnish"
|
4635 |
msgstr ""
|
4636 |
|
4637 |
-
#: includes/core/class-builtin.php:
|
4638 |
msgid "Fijian"
|
4639 |
msgstr ""
|
4640 |
|
4641 |
-
#: includes/core/class-builtin.php:
|
4642 |
msgid "Faroese"
|
4643 |
msgstr ""
|
4644 |
|
4645 |
-
#: includes/core/class-builtin.php:
|
4646 |
msgid "French"
|
4647 |
msgstr ""
|
4648 |
|
4649 |
-
#: includes/core/class-builtin.php:
|
4650 |
msgid "Western Frisian"
|
4651 |
msgstr ""
|
4652 |
|
4653 |
-
#: includes/core/class-builtin.php:
|
4654 |
msgid "Irish"
|
4655 |
msgstr ""
|
4656 |
|
4657 |
-
#: includes/core/class-builtin.php:
|
4658 |
msgid "Scottish Gaelic"
|
4659 |
msgstr ""
|
4660 |
|
4661 |
-
#: includes/core/class-builtin.php:
|
4662 |
msgid "Galician"
|
4663 |
msgstr ""
|
4664 |
|
4665 |
-
#: includes/core/class-builtin.php:
|
4666 |
msgid "Guarani"
|
4667 |
msgstr ""
|
4668 |
|
4669 |
-
#: includes/core/class-builtin.php:
|
4670 |
msgid "Gujarati"
|
4671 |
msgstr ""
|
4672 |
|
4673 |
-
#: includes/core/class-builtin.php:
|
4674 |
msgid "Manx"
|
4675 |
msgstr ""
|
4676 |
|
4677 |
-
#: includes/core/class-builtin.php:
|
4678 |
msgid "Hausa"
|
4679 |
msgstr ""
|
4680 |
|
4681 |
-
#: includes/core/class-builtin.php:
|
4682 |
msgid "Hebrew"
|
4683 |
msgstr ""
|
4684 |
|
4685 |
-
#: includes/core/class-builtin.php:
|
4686 |
msgid "Hindi"
|
4687 |
msgstr ""
|
4688 |
|
4689 |
-
#: includes/core/class-builtin.php:
|
4690 |
msgid "Hiri Motu"
|
4691 |
msgstr ""
|
4692 |
|
4693 |
-
#: includes/core/class-builtin.php:
|
4694 |
msgid "Croatian"
|
4695 |
msgstr ""
|
4696 |
|
4697 |
-
#: includes/core/class-builtin.php:
|
4698 |
msgid "Haitian"
|
4699 |
msgstr ""
|
4700 |
|
4701 |
-
#: includes/core/class-builtin.php:
|
4702 |
msgid "Hungarian"
|
4703 |
msgstr ""
|
4704 |
|
4705 |
-
#: includes/core/class-builtin.php:
|
4706 |
msgid "Armenian"
|
4707 |
msgstr ""
|
4708 |
|
4709 |
-
#: includes/core/class-builtin.php:
|
4710 |
msgid "Herero"
|
4711 |
msgstr ""
|
4712 |
|
4713 |
-
#: includes/core/class-builtin.php:
|
4714 |
msgid "Interlingua (International Auxiliary Language Association)"
|
4715 |
msgstr ""
|
4716 |
|
4717 |
-
#: includes/core/class-builtin.php:
|
4718 |
msgid "Indonesian"
|
4719 |
msgstr ""
|
4720 |
|
4721 |
-
#: includes/core/class-builtin.php:
|
4722 |
msgid "Interlingue"
|
4723 |
msgstr ""
|
4724 |
|
4725 |
-
#: includes/core/class-builtin.php:
|
4726 |
msgid "Igbo"
|
4727 |
msgstr ""
|
4728 |
|
4729 |
-
#: includes/core/class-builtin.php:
|
4730 |
msgid "Sichuan Yi"
|
4731 |
msgstr ""
|
4732 |
|
4733 |
-
#: includes/core/class-builtin.php:
|
4734 |
msgid "Inupiaq"
|
4735 |
msgstr ""
|
4736 |
|
4737 |
-
#: includes/core/class-builtin.php:
|
4738 |
msgid "Ido"
|
4739 |
msgstr ""
|
4740 |
|
4741 |
-
#: includes/core/class-builtin.php:
|
4742 |
msgid "Icelandic"
|
4743 |
msgstr ""
|
4744 |
|
4745 |
-
#: includes/core/class-builtin.php:
|
4746 |
msgid "Italian"
|
4747 |
msgstr ""
|
4748 |
|
4749 |
-
#: includes/core/class-builtin.php:
|
4750 |
msgid "Inuktitut"
|
4751 |
msgstr ""
|
4752 |
|
4753 |
-
#: includes/core/class-builtin.php:
|
4754 |
msgid "Japanese"
|
4755 |
msgstr ""
|
4756 |
|
4757 |
-
#: includes/core/class-builtin.php:
|
4758 |
msgid "Javanese"
|
4759 |
msgstr ""
|
4760 |
|
4761 |
-
#: includes/core/class-builtin.php:
|
4762 |
msgid "Georgian"
|
4763 |
msgstr ""
|
4764 |
|
4765 |
-
#: includes/core/class-builtin.php:
|
4766 |
msgid "Kongo"
|
4767 |
msgstr ""
|
4768 |
|
4769 |
-
#: includes/core/class-builtin.php:
|
4770 |
msgid "Kikuyu"
|
4771 |
msgstr ""
|
4772 |
|
4773 |
-
#: includes/core/class-builtin.php:
|
4774 |
msgid "Kwanyama"
|
4775 |
msgstr ""
|
4776 |
|
4777 |
-
#: includes/core/class-builtin.php:
|
4778 |
msgid "Kazakh"
|
4779 |
msgstr ""
|
4780 |
|
4781 |
-
#: includes/core/class-builtin.php:
|
4782 |
msgid "Kalaallisut"
|
4783 |
msgstr ""
|
4784 |
|
4785 |
-
#: includes/core/class-builtin.php:
|
4786 |
msgid "Khmer"
|
4787 |
msgstr ""
|
4788 |
|
4789 |
-
#: includes/core/class-builtin.php:
|
4790 |
msgid "Kannada"
|
4791 |
msgstr ""
|
4792 |
|
4793 |
-
#: includes/core/class-builtin.php:
|
4794 |
msgid "Korean"
|
4795 |
msgstr ""
|
4796 |
|
4797 |
-
#: includes/core/class-builtin.php:
|
4798 |
msgid "Kanuri"
|
4799 |
msgstr ""
|
4800 |
|
4801 |
-
#: includes/core/class-builtin.php:
|
4802 |
msgid "Kashmiri"
|
4803 |
msgstr ""
|
4804 |
|
4805 |
-
#: includes/core/class-builtin.php:
|
4806 |
msgid "Kurdish"
|
4807 |
msgstr ""
|
4808 |
|
4809 |
-
#: includes/core/class-builtin.php:
|
4810 |
msgid "Komi"
|
4811 |
msgstr ""
|
4812 |
|
4813 |
-
#: includes/core/class-builtin.php:
|
4814 |
msgid "Cornish"
|
4815 |
msgstr ""
|
4816 |
|
4817 |
-
#: includes/core/class-builtin.php:
|
4818 |
msgid "Kirghiz"
|
4819 |
msgstr ""
|
4820 |
|
4821 |
-
#: includes/core/class-builtin.php:
|
4822 |
msgid "Latin"
|
4823 |
msgstr ""
|
4824 |
|
4825 |
-
#: includes/core/class-builtin.php:
|
4826 |
msgid "Luxembourgish"
|
4827 |
msgstr ""
|
4828 |
|
4829 |
-
#: includes/core/class-builtin.php:
|
4830 |
msgid "Ganda"
|
4831 |
msgstr ""
|
4832 |
|
4833 |
-
#: includes/core/class-builtin.php:
|
4834 |
msgid "Limburgish"
|
4835 |
msgstr ""
|
4836 |
|
4837 |
-
#: includes/core/class-builtin.php:
|
4838 |
msgid "Lingala"
|
4839 |
msgstr ""
|
4840 |
|
4841 |
-
#: includes/core/class-builtin.php:
|
4842 |
msgid "Lao"
|
4843 |
msgstr ""
|
4844 |
|
4845 |
-
#: includes/core/class-builtin.php:
|
4846 |
msgid "Lithuanian"
|
4847 |
msgstr ""
|
4848 |
|
4849 |
-
#: includes/core/class-builtin.php:
|
4850 |
msgid "Luba-Katanga"
|
4851 |
msgstr ""
|
4852 |
|
4853 |
-
#: includes/core/class-builtin.php:
|
4854 |
msgid "Latvian"
|
4855 |
msgstr ""
|
4856 |
|
4857 |
-
#: includes/core/class-builtin.php:
|
4858 |
msgid "Malagasy"
|
4859 |
msgstr ""
|
4860 |
|
4861 |
-
#: includes/core/class-builtin.php:
|
4862 |
msgid "Marshallese"
|
4863 |
msgstr ""
|
4864 |
|
4865 |
-
#: includes/core/class-builtin.php:
|
4866 |
msgid "Maori"
|
4867 |
msgstr ""
|
4868 |
|
4869 |
-
#: includes/core/class-builtin.php:
|
4870 |
msgid "Macedonian"
|
4871 |
msgstr ""
|
4872 |
|
4873 |
-
#: includes/core/class-builtin.php:
|
4874 |
msgid "Malayalam"
|
4875 |
msgstr ""
|
4876 |
|
4877 |
-
#: includes/core/class-builtin.php:
|
4878 |
msgid "Mongolian"
|
4879 |
msgstr ""
|
4880 |
|
4881 |
-
#: includes/core/class-builtin.php:
|
4882 |
msgid "Marathi"
|
4883 |
msgstr ""
|
4884 |
|
4885 |
-
#: includes/core/class-builtin.php:
|
4886 |
msgid "Malay"
|
4887 |
msgstr ""
|
4888 |
|
4889 |
-
#: includes/core/class-builtin.php:
|
4890 |
msgid "Maltese"
|
4891 |
msgstr ""
|
4892 |
|
4893 |
-
#: includes/core/class-builtin.php:
|
4894 |
msgid "Burmese"
|
4895 |
msgstr ""
|
4896 |
|
4897 |
-
#: includes/core/class-builtin.php:
|
4898 |
msgid "Nauru"
|
4899 |
msgstr ""
|
4900 |
|
4901 |
-
#: includes/core/class-builtin.php:
|
4902 |
msgid "Norwegian Bokmal"
|
4903 |
msgstr ""
|
4904 |
|
4905 |
-
#: includes/core/class-builtin.php:
|
4906 |
msgid "North Ndebele"
|
4907 |
msgstr ""
|
4908 |
|
4909 |
-
#: includes/core/class-builtin.php:
|
4910 |
msgid "Nepali"
|
4911 |
msgstr ""
|
4912 |
|
4913 |
-
#: includes/core/class-builtin.php:
|
4914 |
msgid "Ndonga"
|
4915 |
msgstr ""
|
4916 |
|
4917 |
-
#: includes/core/class-builtin.php:
|
4918 |
msgid "Dutch"
|
4919 |
msgstr ""
|
4920 |
|
4921 |
-
#: includes/core/class-builtin.php:
|
4922 |
msgid "Norwegian Nynorsk"
|
4923 |
msgstr ""
|
4924 |
|
4925 |
-
#: includes/core/class-builtin.php:
|
4926 |
msgid "Norwegian"
|
4927 |
msgstr ""
|
4928 |
|
4929 |
-
#: includes/core/class-builtin.php:
|
4930 |
msgid "South Ndebele"
|
4931 |
msgstr ""
|
4932 |
|
4933 |
-
#: includes/core/class-builtin.php:
|
4934 |
msgid "Navajo"
|
4935 |
msgstr ""
|
4936 |
|
4937 |
-
#: includes/core/class-builtin.php:
|
4938 |
msgid "Chichewa"
|
4939 |
msgstr ""
|
4940 |
|
4941 |
-
#: includes/core/class-builtin.php:
|
4942 |
msgid "Occitan"
|
4943 |
msgstr ""
|
4944 |
|
4945 |
-
#: includes/core/class-builtin.php:
|
4946 |
msgid "Ojibwa"
|
4947 |
msgstr ""
|
4948 |
|
4949 |
-
#: includes/core/class-builtin.php:
|
4950 |
msgid "Oromo"
|
4951 |
msgstr ""
|
4952 |
|
4953 |
-
#: includes/core/class-builtin.php:
|
4954 |
msgid "Oriya"
|
4955 |
msgstr ""
|
4956 |
|
4957 |
-
#: includes/core/class-builtin.php:
|
4958 |
msgid "Ossetian"
|
4959 |
msgstr ""
|
4960 |
|
4961 |
-
#: includes/core/class-builtin.php:
|
4962 |
msgid "Panjabi"
|
4963 |
msgstr ""
|
4964 |
|
4965 |
-
#: includes/core/class-builtin.php:
|
4966 |
msgid "Pali"
|
4967 |
msgstr ""
|
4968 |
|
4969 |
-
#: includes/core/class-builtin.php:
|
4970 |
msgid "Polish"
|
4971 |
msgstr ""
|
4972 |
|
4973 |
-
#: includes/core/class-builtin.php:
|
4974 |
msgid "Pashto"
|
4975 |
msgstr ""
|
4976 |
|
4977 |
-
#: includes/core/class-builtin.php:
|
4978 |
msgid "Portuguese"
|
4979 |
msgstr ""
|
4980 |
|
4981 |
-
#: includes/core/class-builtin.php:
|
4982 |
msgid "Quechua"
|
4983 |
msgstr ""
|
4984 |
|
4985 |
-
#: includes/core/class-builtin.php:
|
4986 |
msgid "Raeto-Romance"
|
4987 |
msgstr ""
|
4988 |
|
4989 |
-
#: includes/core/class-builtin.php:
|
4990 |
msgid "Kirundi"
|
4991 |
msgstr ""
|
4992 |
|
4993 |
-
#: includes/core/class-builtin.php:
|
4994 |
msgid "Romanian"
|
4995 |
msgstr ""
|
4996 |
|
4997 |
-
#: includes/core/class-builtin.php:
|
4998 |
msgid "Russian"
|
4999 |
msgstr ""
|
5000 |
|
5001 |
-
#: includes/core/class-builtin.php:
|
5002 |
msgid "Kinyarwanda"
|
5003 |
msgstr ""
|
5004 |
|
5005 |
-
#: includes/core/class-builtin.php:
|
5006 |
msgid "Sanskrit"
|
5007 |
msgstr ""
|
5008 |
|
5009 |
-
#: includes/core/class-builtin.php:
|
5010 |
msgid "Sardinian"
|
5011 |
msgstr ""
|
5012 |
|
5013 |
-
#: includes/core/class-builtin.php:
|
5014 |
msgid "Sindhi"
|
5015 |
msgstr ""
|
5016 |
|
5017 |
-
#: includes/core/class-builtin.php:
|
5018 |
msgid "Northern Sami"
|
5019 |
msgstr ""
|
5020 |
|
5021 |
-
#: includes/core/class-builtin.php:
|
5022 |
msgid "Sango"
|
5023 |
msgstr ""
|
5024 |
|
5025 |
-
#: includes/core/class-builtin.php:
|
5026 |
msgid "Sinhala"
|
5027 |
msgstr ""
|
5028 |
|
5029 |
-
#: includes/core/class-builtin.php:
|
5030 |
msgid "Slovak"
|
5031 |
msgstr ""
|
5032 |
|
5033 |
-
#: includes/core/class-builtin.php:
|
5034 |
msgid "Slovenian"
|
5035 |
msgstr ""
|
5036 |
|
5037 |
-
#: includes/core/class-builtin.php:
|
5038 |
msgid "Samoan"
|
5039 |
msgstr ""
|
5040 |
|
5041 |
-
#: includes/core/class-builtin.php:
|
5042 |
msgid "Shona"
|
5043 |
msgstr ""
|
5044 |
|
5045 |
-
#: includes/core/class-builtin.php:
|
5046 |
msgid "Somali"
|
5047 |
msgstr ""
|
5048 |
|
5049 |
-
#: includes/core/class-builtin.php:
|
5050 |
msgid "Albanian"
|
5051 |
msgstr ""
|
5052 |
|
5053 |
-
#: includes/core/class-builtin.php:
|
5054 |
msgid "Serbian"
|
5055 |
msgstr ""
|
5056 |
|
5057 |
-
#: includes/core/class-builtin.php:
|
5058 |
msgid "Swati"
|
5059 |
msgstr ""
|
5060 |
|
5061 |
-
#: includes/core/class-builtin.php:
|
5062 |
msgid "Southern Sotho"
|
5063 |
msgstr ""
|
5064 |
|
5065 |
-
#: includes/core/class-builtin.php:
|
5066 |
msgid "Sundanese"
|
5067 |
msgstr ""
|
5068 |
|
5069 |
-
#: includes/core/class-builtin.php:
|
5070 |
msgid "Swedish"
|
5071 |
msgstr ""
|
5072 |
|
5073 |
-
#: includes/core/class-builtin.php:
|
5074 |
msgid "Swahili"
|
5075 |
msgstr ""
|
5076 |
|
5077 |
-
#: includes/core/class-builtin.php:
|
5078 |
msgid "Tamil"
|
5079 |
msgstr ""
|
5080 |
|
5081 |
-
#: includes/core/class-builtin.php:
|
5082 |
msgid "Telugu"
|
5083 |
msgstr ""
|
5084 |
|
5085 |
-
#: includes/core/class-builtin.php:
|
5086 |
msgid "Tajik"
|
5087 |
msgstr ""
|
5088 |
|
5089 |
-
#: includes/core/class-builtin.php:
|
5090 |
msgid "Thai"
|
5091 |
msgstr ""
|
5092 |
|
5093 |
-
#: includes/core/class-builtin.php:
|
5094 |
msgid "Tigrinya"
|
5095 |
msgstr ""
|
5096 |
|
5097 |
-
#: includes/core/class-builtin.php:
|
5098 |
msgid "Turkmen"
|
5099 |
msgstr ""
|
5100 |
|
5101 |
-
#: includes/core/class-builtin.php:
|
5102 |
msgid "Tagalog"
|
5103 |
msgstr ""
|
5104 |
|
5105 |
-
#: includes/core/class-builtin.php:
|
5106 |
msgid "Tswana"
|
5107 |
msgstr ""
|
5108 |
|
5109 |
-
#: includes/core/class-builtin.php:
|
5110 |
msgid "Tonga"
|
5111 |
msgstr ""
|
5112 |
|
5113 |
-
#: includes/core/class-builtin.php:
|
5114 |
msgid "Turkish"
|
5115 |
msgstr ""
|
5116 |
|
5117 |
-
#: includes/core/class-builtin.php:
|
5118 |
msgid "Tsonga"
|
5119 |
msgstr ""
|
5120 |
|
5121 |
-
#: includes/core/class-builtin.php:
|
5122 |
msgid "Tatar"
|
5123 |
msgstr ""
|
5124 |
|
5125 |
-
#: includes/core/class-builtin.php:
|
5126 |
msgid "Twi"
|
5127 |
msgstr ""
|
5128 |
|
5129 |
-
#: includes/core/class-builtin.php:
|
5130 |
msgid "Tahitian"
|
5131 |
msgstr ""
|
5132 |
|
5133 |
-
#: includes/core/class-builtin.php:
|
5134 |
msgid "Uighur"
|
5135 |
msgstr ""
|
5136 |
|
5137 |
-
#: includes/core/class-builtin.php:
|
5138 |
msgid "Ukrainian"
|
5139 |
msgstr ""
|
5140 |
|
5141 |
-
#: includes/core/class-builtin.php:
|
5142 |
msgid "Urdu"
|
5143 |
msgstr ""
|
5144 |
|
5145 |
-
#: includes/core/class-builtin.php:
|
5146 |
msgid "Uzbek"
|
5147 |
msgstr ""
|
5148 |
|
5149 |
-
#: includes/core/class-builtin.php:
|
5150 |
msgid "Venda"
|
5151 |
msgstr ""
|
5152 |
|
5153 |
-
#: includes/core/class-builtin.php:
|
5154 |
msgid "Vietnamese"
|
5155 |
msgstr ""
|
5156 |
|
5157 |
-
#: includes/core/class-builtin.php:
|
5158 |
msgid "Volapuk"
|
5159 |
msgstr ""
|
5160 |
|
5161 |
-
#: includes/core/class-builtin.php:
|
5162 |
msgid "Walloon"
|
5163 |
msgstr ""
|
5164 |
|
5165 |
-
#: includes/core/class-builtin.php:
|
5166 |
msgid "Wolof"
|
5167 |
msgstr ""
|
5168 |
|
5169 |
-
#: includes/core/class-builtin.php:
|
5170 |
msgid "Xhosa"
|
5171 |
msgstr ""
|
5172 |
|
5173 |
-
#: includes/core/class-builtin.php:
|
5174 |
msgid "Yiddish"
|
5175 |
msgstr ""
|
5176 |
|
5177 |
-
#: includes/core/class-builtin.php:
|
5178 |
msgid "Yoruba"
|
5179 |
msgstr ""
|
5180 |
|
5181 |
-
#: includes/core/class-builtin.php:
|
5182 |
msgid "Zhuang"
|
5183 |
msgstr ""
|
5184 |
|
5185 |
-
#: includes/core/class-builtin.php:
|
5186 |
msgid "Chinese"
|
5187 |
msgstr ""
|
5188 |
|
5189 |
-
#: includes/core/class-builtin.php:
|
5190 |
msgid "Zulu"
|
5191 |
msgstr ""
|
5192 |
|
5193 |
-
#: includes/core/class-builtin.php:
|
5194 |
msgid "Afghanistan"
|
5195 |
msgstr ""
|
5196 |
|
5197 |
-
#: includes/core/class-builtin.php:
|
5198 |
msgid "Åland Islands"
|
5199 |
msgstr ""
|
5200 |
|
5201 |
-
#: includes/core/class-builtin.php:
|
5202 |
msgid "Albania"
|
5203 |
msgstr ""
|
5204 |
|
5205 |
-
#: includes/core/class-builtin.php:
|
5206 |
msgid "Algeria"
|
5207 |
msgstr ""
|
5208 |
|
5209 |
-
#: includes/core/class-builtin.php:
|
5210 |
msgid "American Samoa"
|
5211 |
msgstr ""
|
5212 |
|
5213 |
-
#: includes/core/class-builtin.php:
|
5214 |
msgid "Andorra"
|
5215 |
msgstr ""
|
5216 |
|
5217 |
-
#: includes/core/class-builtin.php:
|
5218 |
msgid "Angola"
|
5219 |
msgstr ""
|
5220 |
|
5221 |
-
#: includes/core/class-builtin.php:
|
5222 |
msgid "Anguilla"
|
5223 |
msgstr ""
|
5224 |
|
5225 |
-
#: includes/core/class-builtin.php:
|
5226 |
msgid "Antarctica"
|
5227 |
msgstr ""
|
5228 |
|
5229 |
-
#: includes/core/class-builtin.php:
|
5230 |
msgid "Antigua and Barbuda"
|
5231 |
msgstr ""
|
5232 |
|
5233 |
-
#: includes/core/class-builtin.php:
|
5234 |
msgid "Argentina"
|
5235 |
msgstr ""
|
5236 |
|
5237 |
-
#: includes/core/class-builtin.php:
|
5238 |
msgid "Armenia"
|
5239 |
msgstr ""
|
5240 |
|
5241 |
-
#: includes/core/class-builtin.php:
|
5242 |
msgid "Aruba"
|
5243 |
msgstr ""
|
5244 |
|
5245 |
-
#: includes/core/class-builtin.php:
|
5246 |
msgid "Australia"
|
5247 |
msgstr ""
|
5248 |
|
5249 |
-
#: includes/core/class-builtin.php:
|
5250 |
msgid "Austria"
|
5251 |
msgstr ""
|
5252 |
|
5253 |
-
#: includes/core/class-builtin.php:
|
5254 |
msgid "Azerbaijan"
|
5255 |
msgstr ""
|
5256 |
|
5257 |
-
#: includes/core/class-builtin.php:
|
5258 |
msgid "Bahamas"
|
5259 |
msgstr ""
|
5260 |
|
5261 |
-
#: includes/core/class-builtin.php:
|
5262 |
msgid "Bahrain"
|
5263 |
msgstr ""
|
5264 |
|
5265 |
-
#: includes/core/class-builtin.php:
|
5266 |
msgid "Bangladesh"
|
5267 |
msgstr ""
|
5268 |
|
5269 |
-
#: includes/core/class-builtin.php:
|
5270 |
msgid "Barbados"
|
5271 |
msgstr ""
|
5272 |
|
5273 |
-
#: includes/core/class-builtin.php:
|
5274 |
msgid "Belarus"
|
5275 |
msgstr ""
|
5276 |
|
5277 |
-
#: includes/core/class-builtin.php:
|
5278 |
msgid "Belgium"
|
5279 |
msgstr ""
|
5280 |
|
5281 |
-
#: includes/core/class-builtin.php:
|
5282 |
msgid "Belize"
|
5283 |
msgstr ""
|
5284 |
|
5285 |
-
#: includes/core/class-builtin.php:
|
5286 |
msgid "Benin"
|
5287 |
msgstr ""
|
5288 |
|
5289 |
-
#: includes/core/class-builtin.php:
|
5290 |
msgid "Bermuda"
|
5291 |
msgstr ""
|
5292 |
|
5293 |
-
#: includes/core/class-builtin.php:
|
5294 |
msgid "Bhutan"
|
5295 |
msgstr ""
|
5296 |
|
5297 |
-
#: includes/core/class-builtin.php:
|
5298 |
msgid "Bolivia, Plurinational State of"
|
5299 |
msgstr ""
|
5300 |
|
5301 |
-
#: includes/core/class-builtin.php:
|
5302 |
msgid "Bosnia and Herzegovina"
|
5303 |
msgstr ""
|
5304 |
|
5305 |
-
#: includes/core/class-builtin.php:
|
5306 |
msgid "Botswana"
|
5307 |
msgstr ""
|
5308 |
|
5309 |
-
#: includes/core/class-builtin.php:
|
5310 |
msgid "Bouvet Island"
|
5311 |
msgstr ""
|
5312 |
|
5313 |
-
#: includes/core/class-builtin.php:
|
5314 |
msgid "Brazil"
|
5315 |
msgstr ""
|
5316 |
|
5317 |
-
#: includes/core/class-builtin.php:
|
5318 |
msgid "British Indian Ocean Territory"
|
5319 |
msgstr ""
|
5320 |
|
5321 |
-
#: includes/core/class-builtin.php:
|
5322 |
msgid "Brunei Darussalam"
|
5323 |
msgstr ""
|
5324 |
|
5325 |
-
#: includes/core/class-builtin.php:
|
5326 |
msgid "Bulgaria"
|
5327 |
msgstr ""
|
5328 |
|
5329 |
-
#: includes/core/class-builtin.php:
|
5330 |
msgid "Burkina Faso"
|
5331 |
msgstr ""
|
5332 |
|
5333 |
-
#: includes/core/class-builtin.php:
|
5334 |
msgid "Burundi"
|
5335 |
msgstr ""
|
5336 |
|
5337 |
-
#: includes/core/class-builtin.php:
|
5338 |
msgid "Cambodia"
|
5339 |
msgstr ""
|
5340 |
|
5341 |
-
#: includes/core/class-builtin.php:
|
5342 |
msgid "Cameroon"
|
5343 |
msgstr ""
|
5344 |
|
5345 |
-
#: includes/core/class-builtin.php:
|
5346 |
msgid "Canada"
|
5347 |
msgstr ""
|
5348 |
|
5349 |
-
#: includes/core/class-builtin.php:
|
5350 |
msgid "Cape Verde"
|
5351 |
msgstr ""
|
5352 |
|
5353 |
-
#: includes/core/class-builtin.php:
|
5354 |
msgid "Cayman Islands"
|
5355 |
msgstr ""
|
5356 |
|
5357 |
-
#: includes/core/class-builtin.php:
|
5358 |
msgid "Central African Republic"
|
5359 |
msgstr ""
|
5360 |
|
5361 |
-
#: includes/core/class-builtin.php:
|
5362 |
msgid "Chad"
|
5363 |
msgstr ""
|
5364 |
|
5365 |
-
#: includes/core/class-builtin.php:
|
5366 |
msgid "Chile"
|
5367 |
msgstr ""
|
5368 |
|
5369 |
-
#: includes/core/class-builtin.php:
|
5370 |
msgid "China"
|
5371 |
msgstr ""
|
5372 |
|
5373 |
-
#: includes/core/class-builtin.php:
|
5374 |
msgid "Christmas Island"
|
5375 |
msgstr ""
|
5376 |
|
5377 |
-
#: includes/core/class-builtin.php:
|
5378 |
msgid "Cocos (Keeling) Islands"
|
5379 |
msgstr ""
|
5380 |
|
5381 |
-
#: includes/core/class-builtin.php:
|
5382 |
msgid "Colombia"
|
5383 |
msgstr ""
|
5384 |
|
5385 |
-
#: includes/core/class-builtin.php:
|
5386 |
msgid "Comoros"
|
5387 |
msgstr ""
|
5388 |
|
5389 |
-
#: includes/core/class-builtin.php:
|
5390 |
msgid "Congo"
|
5391 |
msgstr ""
|
5392 |
|
5393 |
-
#: includes/core/class-builtin.php:
|
5394 |
msgid "Congo, the Democratic Republic of the"
|
5395 |
msgstr ""
|
5396 |
|
5397 |
-
#: includes/core/class-builtin.php:
|
5398 |
msgid "Cook Islands"
|
5399 |
msgstr ""
|
5400 |
|
5401 |
-
#: includes/core/class-builtin.php:
|
5402 |
msgid "Costa Rica"
|
5403 |
msgstr ""
|
5404 |
|
5405 |
-
#: includes/core/class-builtin.php:
|
5406 |
msgid "Côte d'Ivoire"
|
5407 |
msgstr ""
|
5408 |
|
5409 |
-
#: includes/core/class-builtin.php:
|
5410 |
msgid "Croatia"
|
5411 |
msgstr ""
|
5412 |
|
5413 |
-
#: includes/core/class-builtin.php:
|
5414 |
msgid "Cuba"
|
5415 |
msgstr ""
|
5416 |
|
5417 |
-
#: includes/core/class-builtin.php:
|
5418 |
msgid "Cyprus"
|
5419 |
msgstr ""
|
5420 |
|
5421 |
-
#: includes/core/class-builtin.php:
|
5422 |
msgid "Czech Republic"
|
5423 |
msgstr ""
|
5424 |
|
5425 |
-
#: includes/core/class-builtin.php:
|
5426 |
msgid "Denmark"
|
5427 |
msgstr ""
|
5428 |
|
5429 |
-
#: includes/core/class-builtin.php:
|
5430 |
msgid "Djibouti"
|
5431 |
msgstr ""
|
5432 |
|
5433 |
-
#: includes/core/class-builtin.php:
|
5434 |
msgid "Dominica"
|
5435 |
msgstr ""
|
5436 |
|
5437 |
-
#: includes/core/class-builtin.php:
|
5438 |
msgid "Dominican Republic"
|
5439 |
msgstr ""
|
5440 |
|
5441 |
-
#: includes/core/class-builtin.php:
|
5442 |
msgid "Ecuador"
|
5443 |
msgstr ""
|
5444 |
|
5445 |
-
#: includes/core/class-builtin.php:
|
5446 |
msgid "Egypt"
|
5447 |
msgstr ""
|
5448 |
|
5449 |
-
#: includes/core/class-builtin.php:
|
5450 |
msgid "El Salvador"
|
5451 |
msgstr ""
|
5452 |
|
5453 |
-
#: includes/core/class-builtin.php:
|
5454 |
msgid "Equatorial Guinea"
|
5455 |
msgstr ""
|
5456 |
|
5457 |
-
#: includes/core/class-builtin.php:
|
5458 |
msgid "Eritrea"
|
5459 |
msgstr ""
|
5460 |
|
5461 |
-
#: includes/core/class-builtin.php:
|
5462 |
msgid "Estonia"
|
5463 |
msgstr ""
|
5464 |
|
5465 |
-
#: includes/core/class-builtin.php:
|
5466 |
msgid "Ethiopia"
|
5467 |
msgstr ""
|
5468 |
|
5469 |
-
#: includes/core/class-builtin.php:
|
5470 |
msgid "Falkland Islands (Malvinas)"
|
5471 |
msgstr ""
|
5472 |
|
5473 |
-
#: includes/core/class-builtin.php:
|
5474 |
msgid "Faroe Islands"
|
5475 |
msgstr ""
|
5476 |
|
5477 |
-
#: includes/core/class-builtin.php:
|
5478 |
msgid "Fiji"
|
5479 |
msgstr ""
|
5480 |
|
5481 |
-
#: includes/core/class-builtin.php:
|
5482 |
msgid "Finland"
|
5483 |
msgstr ""
|
5484 |
|
5485 |
-
#: includes/core/class-builtin.php:
|
5486 |
msgid "France"
|
5487 |
msgstr ""
|
5488 |
|
5489 |
-
#: includes/core/class-builtin.php:
|
5490 |
msgid "French Guiana"
|
5491 |
msgstr ""
|
5492 |
|
5493 |
-
#: includes/core/class-builtin.php:
|
5494 |
msgid "French Polynesia"
|
5495 |
msgstr ""
|
5496 |
|
5497 |
-
#: includes/core/class-builtin.php:
|
5498 |
msgid "French Southern Territories"
|
5499 |
msgstr ""
|
5500 |
|
5501 |
-
#: includes/core/class-builtin.php:
|
5502 |
msgid "Gabon"
|
5503 |
msgstr ""
|
5504 |
|
5505 |
-
#: includes/core/class-builtin.php:
|
5506 |
msgid "Gambia"
|
5507 |
msgstr ""
|
5508 |
|
5509 |
-
#: includes/core/class-builtin.php:
|
5510 |
msgid "Georgia"
|
5511 |
msgstr ""
|
5512 |
|
5513 |
-
#: includes/core/class-builtin.php:
|
5514 |
msgid "Germany"
|
5515 |
msgstr ""
|
5516 |
|
5517 |
-
#: includes/core/class-builtin.php:
|
5518 |
msgid "Ghana"
|
5519 |
msgstr ""
|
5520 |
|
5521 |
-
#: includes/core/class-builtin.php:
|
5522 |
msgid "Gibraltar"
|
5523 |
msgstr ""
|
5524 |
|
5525 |
-
#: includes/core/class-builtin.php:
|
5526 |
msgid "Greece"
|
5527 |
msgstr ""
|
5528 |
|
5529 |
-
#: includes/core/class-builtin.php:
|
5530 |
msgid "Greenland"
|
5531 |
msgstr ""
|
5532 |
|
5533 |
-
#: includes/core/class-builtin.php:
|
5534 |
msgid "Grenada"
|
5535 |
msgstr ""
|
5536 |
|
5537 |
-
#: includes/core/class-builtin.php:
|
5538 |
msgid "Guadeloupe"
|
5539 |
msgstr ""
|
5540 |
|
5541 |
-
#: includes/core/class-builtin.php:
|
5542 |
msgid "Guam"
|
5543 |
msgstr ""
|
5544 |
|
5545 |
-
#: includes/core/class-builtin.php:
|
5546 |
msgid "Guatemala"
|
5547 |
msgstr ""
|
5548 |
|
5549 |
-
#: includes/core/class-builtin.php:
|
5550 |
msgid "Guernsey"
|
5551 |
msgstr ""
|
5552 |
|
5553 |
-
#: includes/core/class-builtin.php:
|
5554 |
msgid "Guinea"
|
5555 |
msgstr ""
|
5556 |
|
5557 |
-
#: includes/core/class-builtin.php:
|
5558 |
msgid "Guinea-Bissau"
|
5559 |
msgstr ""
|
5560 |
|
5561 |
-
#: includes/core/class-builtin.php:
|
5562 |
msgid "Guyana"
|
5563 |
msgstr ""
|
5564 |
|
5565 |
-
#: includes/core/class-builtin.php:
|
5566 |
msgid "Haiti"
|
5567 |
msgstr ""
|
5568 |
|
5569 |
-
#: includes/core/class-builtin.php:
|
5570 |
msgid "Heard Island and McDonald Islands"
|
5571 |
msgstr ""
|
5572 |
|
5573 |
-
#: includes/core/class-builtin.php:
|
5574 |
msgid "Holy See (Vatican City State)"
|
5575 |
msgstr ""
|
5576 |
|
5577 |
-
#: includes/core/class-builtin.php:
|
5578 |
msgid "Honduras"
|
5579 |
msgstr ""
|
5580 |
|
5581 |
-
#: includes/core/class-builtin.php:
|
5582 |
msgid "Hong Kong"
|
5583 |
msgstr ""
|
5584 |
|
5585 |
-
#: includes/core/class-builtin.php:
|
5586 |
msgid "Hungary"
|
5587 |
msgstr ""
|
5588 |
|
5589 |
-
#: includes/core/class-builtin.php:
|
5590 |
msgid "Iceland"
|
5591 |
msgstr ""
|
5592 |
|
5593 |
-
#: includes/core/class-builtin.php:
|
5594 |
msgid "India"
|
5595 |
msgstr ""
|
5596 |
|
5597 |
-
#: includes/core/class-builtin.php:
|
5598 |
msgid "Indonesia"
|
5599 |
msgstr ""
|
5600 |
|
5601 |
-
#: includes/core/class-builtin.php:
|
5602 |
msgid "Iran, Islamic Republic of"
|
5603 |
msgstr ""
|
5604 |
|
5605 |
-
#: includes/core/class-builtin.php:
|
5606 |
msgid "Iraq"
|
5607 |
msgstr ""
|
5608 |
|
5609 |
-
#: includes/core/class-builtin.php:
|
5610 |
msgid "Ireland"
|
5611 |
msgstr ""
|
5612 |
|
5613 |
-
#: includes/core/class-builtin.php:
|
5614 |
msgid "Isle of Man"
|
5615 |
msgstr ""
|
5616 |
|
5617 |
-
#: includes/core/class-builtin.php:
|
5618 |
msgid "Israel"
|
5619 |
msgstr ""
|
5620 |
|
5621 |
-
#: includes/core/class-builtin.php:
|
5622 |
msgid "Italy"
|
5623 |
msgstr ""
|
5624 |
|
5625 |
-
#: includes/core/class-builtin.php:
|
5626 |
msgid "Jamaica"
|
5627 |
msgstr ""
|
5628 |
|
5629 |
-
#: includes/core/class-builtin.php:
|
5630 |
msgid "Japan"
|
5631 |
msgstr ""
|
5632 |
|
5633 |
-
#: includes/core/class-builtin.php:
|
5634 |
msgid "Jersey"
|
5635 |
msgstr ""
|
5636 |
|
5637 |
-
#: includes/core/class-builtin.php:
|
5638 |
msgid "Jordan"
|
5639 |
msgstr ""
|
5640 |
|
5641 |
-
#: includes/core/class-builtin.php:
|
5642 |
msgid "Kazakhstan"
|
5643 |
msgstr ""
|
5644 |
|
5645 |
-
#: includes/core/class-builtin.php:
|
5646 |
msgid "Kenya"
|
5647 |
msgstr ""
|
5648 |
|
5649 |
-
#: includes/core/class-builtin.php:
|
5650 |
msgid "Kiribati"
|
5651 |
msgstr ""
|
5652 |
|
5653 |
-
#: includes/core/class-builtin.php:
|
5654 |
msgid "Korea, Democratic People's Republic of"
|
5655 |
msgstr ""
|
5656 |
|
5657 |
-
#: includes/core/class-builtin.php:
|
5658 |
msgid "Korea, Republic of"
|
5659 |
msgstr ""
|
5660 |
|
5661 |
-
#: includes/core/class-builtin.php:
|
5662 |
msgid "Kuwait"
|
5663 |
msgstr ""
|
5664 |
|
5665 |
-
#: includes/core/class-builtin.php:
|
5666 |
msgid "Kyrgyzstan"
|
5667 |
msgstr ""
|
5668 |
|
5669 |
-
#: includes/core/class-builtin.php:
|
5670 |
msgid "Lao People's Democratic Republic"
|
5671 |
msgstr ""
|
5672 |
|
5673 |
-
#: includes/core/class-builtin.php:
|
5674 |
msgid "Latvia"
|
5675 |
msgstr ""
|
5676 |
|
5677 |
-
#: includes/core/class-builtin.php:
|
5678 |
msgid "Lebanon"
|
5679 |
msgstr ""
|
5680 |
|
5681 |
-
#: includes/core/class-builtin.php:
|
5682 |
msgid "Lesotho"
|
5683 |
msgstr ""
|
5684 |
|
5685 |
-
#: includes/core/class-builtin.php:
|
5686 |
msgid "Liberia"
|
5687 |
msgstr ""
|
5688 |
|
5689 |
-
#: includes/core/class-builtin.php:
|
5690 |
msgid "Libyan Arab Jamahiriya"
|
5691 |
msgstr ""
|
5692 |
|
5693 |
-
#: includes/core/class-builtin.php:
|
5694 |
msgid "Liechtenstein"
|
5695 |
msgstr ""
|
5696 |
|
5697 |
-
#: includes/core/class-builtin.php:
|
5698 |
msgid "Lithuania"
|
5699 |
msgstr ""
|
5700 |
|
5701 |
-
#: includes/core/class-builtin.php:
|
5702 |
msgid "Luxembourg"
|
5703 |
msgstr ""
|
5704 |
|
5705 |
-
#: includes/core/class-builtin.php:
|
5706 |
msgid "Macao"
|
5707 |
msgstr ""
|
5708 |
|
5709 |
-
#: includes/core/class-builtin.php:
|
5710 |
msgid "Macedonia, the former Yugoslav Republic of"
|
5711 |
msgstr ""
|
5712 |
|
5713 |
-
#: includes/core/class-builtin.php:
|
5714 |
msgid "Madagascar"
|
5715 |
msgstr ""
|
5716 |
|
5717 |
-
#: includes/core/class-builtin.php:
|
5718 |
msgid "Malawi"
|
5719 |
msgstr ""
|
5720 |
|
5721 |
-
#: includes/core/class-builtin.php:
|
5722 |
msgid "Malaysia"
|
5723 |
msgstr ""
|
5724 |
|
5725 |
-
#: includes/core/class-builtin.php:
|
5726 |
msgid "Maldives"
|
5727 |
msgstr ""
|
5728 |
|
5729 |
-
#: includes/core/class-builtin.php:
|
5730 |
msgid "Mali"
|
5731 |
msgstr ""
|
5732 |
|
5733 |
-
#: includes/core/class-builtin.php:
|
5734 |
msgid "Malta"
|
5735 |
msgstr ""
|
5736 |
|
5737 |
-
#: includes/core/class-builtin.php:
|
5738 |
msgid "Marshall Islands"
|
5739 |
msgstr ""
|
5740 |
|
5741 |
-
#: includes/core/class-builtin.php:
|
5742 |
msgid "Martinique"
|
5743 |
msgstr ""
|
5744 |
|
5745 |
-
#: includes/core/class-builtin.php:
|
5746 |
msgid "Mauritania"
|
5747 |
msgstr ""
|
5748 |
|
5749 |
-
#: includes/core/class-builtin.php:
|
5750 |
msgid "Mauritius"
|
5751 |
msgstr ""
|
5752 |
|
5753 |
-
#: includes/core/class-builtin.php:
|
5754 |
msgid "Mayotte"
|
5755 |
msgstr ""
|
5756 |
|
5757 |
-
#: includes/core/class-builtin.php:
|
5758 |
msgid "Mexico"
|
5759 |
msgstr ""
|
5760 |
|
5761 |
-
#: includes/core/class-builtin.php:
|
5762 |
msgid "Micronesia, Federated States of"
|
5763 |
msgstr ""
|
5764 |
|
5765 |
-
#: includes/core/class-builtin.php:
|
5766 |
msgid "Moldova, Republic of"
|
5767 |
msgstr ""
|
5768 |
|
5769 |
-
#: includes/core/class-builtin.php:
|
5770 |
msgid "Monaco"
|
5771 |
msgstr ""
|
5772 |
|
5773 |
-
#: includes/core/class-builtin.php:
|
5774 |
msgid "Mongolia"
|
5775 |
msgstr ""
|
5776 |
|
5777 |
-
#: includes/core/class-builtin.php:
|
5778 |
msgid "Montenegro"
|
5779 |
msgstr ""
|
5780 |
|
5781 |
-
#: includes/core/class-builtin.php:
|
5782 |
msgid "Montserrat"
|
5783 |
msgstr ""
|
5784 |
|
5785 |
-
#: includes/core/class-builtin.php:
|
5786 |
msgid "Morocco"
|
5787 |
msgstr ""
|
5788 |
|
5789 |
-
#: includes/core/class-builtin.php:
|
5790 |
msgid "Mozambique"
|
5791 |
msgstr ""
|
5792 |
|
5793 |
-
#: includes/core/class-builtin.php:
|
5794 |
msgid "Myanmar"
|
5795 |
msgstr ""
|
5796 |
|
5797 |
-
#: includes/core/class-builtin.php:
|
5798 |
msgid "Namibia"
|
5799 |
msgstr ""
|
5800 |
|
5801 |
-
#: includes/core/class-builtin.php:
|
5802 |
msgid "Nepal"
|
5803 |
msgstr ""
|
5804 |
|
5805 |
-
#: includes/core/class-builtin.php:
|
5806 |
msgid "Netherlands"
|
5807 |
msgstr ""
|
5808 |
|
5809 |
-
#: includes/core/class-builtin.php:
|
5810 |
msgid "Netherlands Antilles"
|
5811 |
msgstr ""
|
5812 |
|
5813 |
-
#: includes/core/class-builtin.php:
|
5814 |
msgid "New Caledonia"
|
5815 |
msgstr ""
|
5816 |
|
5817 |
-
#: includes/core/class-builtin.php:
|
5818 |
msgid "New Zealand"
|
5819 |
msgstr ""
|
5820 |
|
5821 |
-
#: includes/core/class-builtin.php:
|
5822 |
msgid "Nicaragua"
|
5823 |
msgstr ""
|
5824 |
|
5825 |
-
#: includes/core/class-builtin.php:
|
5826 |
msgid "Niger"
|
5827 |
msgstr ""
|
5828 |
|
5829 |
-
#: includes/core/class-builtin.php:
|
5830 |
msgid "Nigeria"
|
5831 |
msgstr ""
|
5832 |
|
5833 |
-
#: includes/core/class-builtin.php:
|
5834 |
msgid "Niue"
|
5835 |
msgstr ""
|
5836 |
|
5837 |
-
#: includes/core/class-builtin.php:
|
5838 |
msgid "Norfolk Island"
|
5839 |
msgstr ""
|
5840 |
|
5841 |
-
#: includes/core/class-builtin.php:
|
5842 |
msgid "Northern Mariana Islands"
|
5843 |
msgstr ""
|
5844 |
|
5845 |
-
#: includes/core/class-builtin.php:
|
5846 |
msgid "Norway"
|
5847 |
msgstr ""
|
5848 |
|
5849 |
-
#: includes/core/class-builtin.php:
|
5850 |
msgid "Oman"
|
5851 |
msgstr ""
|
5852 |
|
5853 |
-
#: includes/core/class-builtin.php:
|
5854 |
msgid "Pakistan"
|
5855 |
msgstr ""
|
5856 |
|
5857 |
-
#: includes/core/class-builtin.php:
|
5858 |
msgid "Palau"
|
5859 |
msgstr ""
|
5860 |
|
5861 |
-
#: includes/core/class-builtin.php:
|
5862 |
msgid "Palestine"
|
5863 |
msgstr ""
|
5864 |
|
5865 |
-
#: includes/core/class-builtin.php:
|
5866 |
msgid "Panama"
|
5867 |
msgstr ""
|
5868 |
|
5869 |
-
#: includes/core/class-builtin.php:
|
5870 |
msgid "Papua New Guinea"
|
5871 |
msgstr ""
|
5872 |
|
5873 |
-
#: includes/core/class-builtin.php:
|
5874 |
msgid "Paraguay"
|
5875 |
msgstr ""
|
5876 |
|
5877 |
-
#: includes/core/class-builtin.php:
|
5878 |
msgid "Peru"
|
5879 |
msgstr ""
|
5880 |
|
5881 |
-
#: includes/core/class-builtin.php:
|
5882 |
msgid "Philippines"
|
5883 |
msgstr ""
|
5884 |
|
5885 |
-
#: includes/core/class-builtin.php:
|
5886 |
msgid "Pitcairn"
|
5887 |
msgstr ""
|
5888 |
|
5889 |
-
#: includes/core/class-builtin.php:
|
5890 |
msgid "Poland"
|
5891 |
msgstr ""
|
5892 |
|
5893 |
-
#: includes/core/class-builtin.php:
|
5894 |
msgid "Portugal"
|
5895 |
msgstr ""
|
5896 |
|
5897 |
-
#: includes/core/class-builtin.php:
|
5898 |
msgid "Puerto Rico"
|
5899 |
msgstr ""
|
5900 |
|
5901 |
-
#: includes/core/class-builtin.php:
|
5902 |
msgid "Qatar"
|
5903 |
msgstr ""
|
5904 |
|
5905 |
-
#: includes/core/class-builtin.php:
|
5906 |
msgid "Réunion"
|
5907 |
msgstr ""
|
5908 |
|
5909 |
-
#: includes/core/class-builtin.php:
|
5910 |
msgid "Romania"
|
5911 |
msgstr ""
|
5912 |
|
5913 |
-
#: includes/core/class-builtin.php:
|
5914 |
msgid "Russian Federation"
|
5915 |
msgstr ""
|
5916 |
|
5917 |
-
#: includes/core/class-builtin.php:
|
5918 |
msgid "Rwanda"
|
5919 |
msgstr ""
|
5920 |
|
5921 |
-
#: includes/core/class-builtin.php:
|
5922 |
msgid "Saint Barthélemy"
|
5923 |
msgstr ""
|
5924 |
|
5925 |
-
#: includes/core/class-builtin.php:
|
5926 |
msgid "Saint Helena"
|
5927 |
msgstr ""
|
5928 |
|
5929 |
-
#: includes/core/class-builtin.php:
|
5930 |
msgid "Saint Kitts and Nevis"
|
5931 |
msgstr ""
|
5932 |
|
5933 |
-
#: includes/core/class-builtin.php:
|
5934 |
msgid "Saint Lucia"
|
5935 |
msgstr ""
|
5936 |
|
5937 |
-
#: includes/core/class-builtin.php:
|
5938 |
msgid "Saint Martin (French part)"
|
5939 |
msgstr ""
|
5940 |
|
5941 |
-
#: includes/core/class-builtin.php:
|
5942 |
msgid "Saint Pierre and Miquelon"
|
5943 |
msgstr ""
|
5944 |
|
5945 |
-
#: includes/core/class-builtin.php:
|
5946 |
msgid "Saint Vincent and the Grenadines"
|
5947 |
msgstr ""
|
5948 |
|
5949 |
-
#: includes/core/class-builtin.php:
|
5950 |
msgid "Samoa"
|
5951 |
msgstr ""
|
5952 |
|
5953 |
-
#: includes/core/class-builtin.php:
|
5954 |
msgid "San Marino"
|
5955 |
msgstr ""
|
5956 |
|
5957 |
-
#: includes/core/class-builtin.php:
|
5958 |
msgid "Sao Tome and Principe"
|
5959 |
msgstr ""
|
5960 |
|
5961 |
-
#: includes/core/class-builtin.php:
|
5962 |
msgid "Saudi Arabia"
|
5963 |
msgstr ""
|
5964 |
|
5965 |
-
#: includes/core/class-builtin.php:
|
5966 |
msgid "Senegal"
|
5967 |
msgstr ""
|
5968 |
|
5969 |
-
#: includes/core/class-builtin.php:
|
5970 |
msgid "Serbia"
|
5971 |
msgstr ""
|
5972 |
|
5973 |
-
#: includes/core/class-builtin.php:
|
5974 |
msgid "Seychelles"
|
5975 |
msgstr ""
|
5976 |
|
5977 |
-
#: includes/core/class-builtin.php:
|
5978 |
msgid "Sierra Leone"
|
5979 |
msgstr ""
|
5980 |
|
5981 |
-
#: includes/core/class-builtin.php:
|
5982 |
msgid "Singapore"
|
5983 |
msgstr ""
|
5984 |
|
5985 |
-
#: includes/core/class-builtin.php:
|
5986 |
msgid "Slovakia"
|
5987 |
msgstr ""
|
5988 |
|
5989 |
-
#: includes/core/class-builtin.php:
|
5990 |
msgid "Slovenia"
|
5991 |
msgstr ""
|
5992 |
|
5993 |
-
#: includes/core/class-builtin.php:
|
5994 |
msgid "Solomon Islands"
|
5995 |
msgstr ""
|
5996 |
|
5997 |
-
#: includes/core/class-builtin.php:
|
5998 |
msgid "Somalia"
|
5999 |
msgstr ""
|
6000 |
|
6001 |
-
#: includes/core/class-builtin.php:
|
6002 |
msgid "South Africa"
|
6003 |
msgstr ""
|
6004 |
|
6005 |
-
#: includes/core/class-builtin.php:
|
6006 |
msgid "South Georgia and the South Sandwich Islands"
|
6007 |
msgstr ""
|
6008 |
|
6009 |
-
#: includes/core/class-builtin.php:
|
6010 |
msgid "South Sudan"
|
6011 |
msgstr ""
|
6012 |
|
6013 |
-
#: includes/core/class-builtin.php:
|
6014 |
msgid "Spain"
|
6015 |
msgstr ""
|
6016 |
|
6017 |
-
#: includes/core/class-builtin.php:
|
6018 |
msgid "Sri Lanka"
|
6019 |
msgstr ""
|
6020 |
|
6021 |
-
#: includes/core/class-builtin.php:
|
6022 |
msgid "Sudan"
|
6023 |
msgstr ""
|
6024 |
|
6025 |
-
#: includes/core/class-builtin.php:
|
6026 |
msgid "Suriname"
|
6027 |
msgstr ""
|
6028 |
|
6029 |
-
#: includes/core/class-builtin.php:
|
6030 |
msgid "Svalbard and Jan Mayen"
|
6031 |
msgstr ""
|
6032 |
|
6033 |
-
#: includes/core/class-builtin.php:
|
6034 |
msgid "Swaziland"
|
6035 |
msgstr ""
|
6036 |
|
6037 |
-
#: includes/core/class-builtin.php:
|
6038 |
msgid "Sweden"
|
6039 |
msgstr ""
|
6040 |
|
6041 |
-
#: includes/core/class-builtin.php:
|
6042 |
msgid "Switzerland"
|
6043 |
msgstr ""
|
6044 |
|
6045 |
-
#: includes/core/class-builtin.php:
|
6046 |
msgid "Syrian Arab Republic"
|
6047 |
msgstr ""
|
6048 |
|
6049 |
-
#: includes/core/class-builtin.php:
|
6050 |
msgid "Taiwan, Province of China"
|
6051 |
msgstr ""
|
6052 |
|
6053 |
-
#: includes/core/class-builtin.php:
|
6054 |
msgid "Tajikistan"
|
6055 |
msgstr ""
|
6056 |
|
6057 |
-
#: includes/core/class-builtin.php:
|
6058 |
msgid "Tanzania, United Republic of"
|
6059 |
msgstr ""
|
6060 |
|
6061 |
-
#: includes/core/class-builtin.php:
|
6062 |
msgid "Thailand"
|
6063 |
msgstr ""
|
6064 |
|
6065 |
-
#: includes/core/class-builtin.php:
|
6066 |
msgid "Timor-Leste"
|
6067 |
msgstr ""
|
6068 |
|
6069 |
-
#: includes/core/class-builtin.php:
|
6070 |
msgid "Togo"
|
6071 |
msgstr ""
|
6072 |
|
6073 |
-
#: includes/core/class-builtin.php:
|
6074 |
msgid "Tokelau"
|
6075 |
msgstr ""
|
6076 |
|
6077 |
-
#: includes/core/class-builtin.php:
|
6078 |
msgid "Trinidad and Tobago"
|
6079 |
msgstr ""
|
6080 |
|
6081 |
-
#: includes/core/class-builtin.php:
|
6082 |
msgid "Tunisia"
|
6083 |
msgstr ""
|
6084 |
|
6085 |
-
#: includes/core/class-builtin.php:
|
6086 |
msgid "Turkey"
|
6087 |
msgstr ""
|
6088 |
|
6089 |
-
#: includes/core/class-builtin.php:
|
6090 |
msgid "Turkmenistan"
|
6091 |
msgstr ""
|
6092 |
|
6093 |
-
#: includes/core/class-builtin.php:
|
6094 |
msgid "Turks and Caicos Islands"
|
6095 |
msgstr ""
|
6096 |
|
6097 |
-
#: includes/core/class-builtin.php:
|
6098 |
msgid "Tuvalu"
|
6099 |
msgstr ""
|
6100 |
|
6101 |
-
#: includes/core/class-builtin.php:
|
6102 |
msgid "Uganda"
|
6103 |
msgstr ""
|
6104 |
|
6105 |
-
#: includes/core/class-builtin.php:
|
6106 |
msgid "Ukraine"
|
6107 |
msgstr ""
|
6108 |
|
6109 |
-
#: includes/core/class-builtin.php:
|
6110 |
msgid "United Arab Emirates"
|
6111 |
msgstr ""
|
6112 |
|
6113 |
-
#: includes/core/class-builtin.php:
|
6114 |
msgid "United Kingdom"
|
6115 |
msgstr ""
|
6116 |
|
6117 |
-
#: includes/core/class-builtin.php:
|
6118 |
msgid "United States"
|
6119 |
msgstr ""
|
6120 |
|
6121 |
-
#: includes/core/class-builtin.php:
|
6122 |
msgid "United States Minor Outlying Islands"
|
6123 |
msgstr ""
|
6124 |
|
6125 |
-
#: includes/core/class-builtin.php:
|
6126 |
msgid "Uruguay"
|
6127 |
msgstr ""
|
6128 |
|
6129 |
-
#: includes/core/class-builtin.php:
|
6130 |
msgid "Uzbekistan"
|
6131 |
msgstr ""
|
6132 |
|
6133 |
-
#: includes/core/class-builtin.php:
|
6134 |
msgid "Vanuatu"
|
6135 |
msgstr ""
|
6136 |
|
6137 |
-
#: includes/core/class-builtin.php:
|
6138 |
msgid "Venezuela, Bolivarian Republic of"
|
6139 |
msgstr ""
|
6140 |
|
6141 |
-
#: includes/core/class-builtin.php:
|
6142 |
msgid "Viet Nam"
|
6143 |
msgstr ""
|
6144 |
|
6145 |
-
#: includes/core/class-builtin.php:
|
6146 |
msgid "Virgin Islands, British"
|
6147 |
msgstr ""
|
6148 |
|
6149 |
-
#: includes/core/class-builtin.php:
|
6150 |
msgid "Virgin Islands, U.S."
|
6151 |
msgstr ""
|
6152 |
|
6153 |
-
#: includes/core/class-builtin.php:
|
6154 |
msgid "Wallis and Futuna"
|
6155 |
msgstr ""
|
6156 |
|
6157 |
-
#: includes/core/class-builtin.php:
|
6158 |
msgid "Western Sahara"
|
6159 |
msgstr ""
|
6160 |
|
6161 |
-
#: includes/core/class-builtin.php:
|
6162 |
msgid "Yemen"
|
6163 |
msgstr ""
|
6164 |
|
6165 |
-
#: includes/core/class-builtin.php:
|
6166 |
msgid "Zambia"
|
6167 |
msgstr ""
|
6168 |
|
6169 |
-
#: includes/core/class-builtin.php:
|
6170 |
msgid "Zimbabwe"
|
6171 |
msgstr ""
|
6172 |
|
@@ -6257,99 +6308,99 @@ msgstr ""
|
|
6257 |
msgid "Less than 1 year old"
|
6258 |
msgstr ""
|
6259 |
|
6260 |
-
#: includes/core/class-external-integrations.php:
|
6261 |
#, php-format
|
6262 |
msgid "Edit the %s translation"
|
6263 |
msgstr ""
|
6264 |
|
6265 |
-
#: includes/core/class-external-integrations.php:
|
6266 |
#, php-format
|
6267 |
msgid "Add translation to %s"
|
6268 |
msgstr ""
|
6269 |
|
6270 |
-
#: includes/core/class-fields.php:
|
6271 |
#, php-format
|
6272 |
msgid "%s"
|
6273 |
msgstr ""
|
6274 |
|
6275 |
-
#: includes/core/class-fields.php:
|
6276 |
msgid "Custom Field"
|
6277 |
msgstr ""
|
6278 |
|
6279 |
-
#: includes/core/class-fields.php:
|
6280 |
msgid "Please upload a valid image!"
|
6281 |
msgstr ""
|
6282 |
|
6283 |
-
#: includes/core/class-fields.php:
|
6284 |
msgid "Upload"
|
6285 |
msgstr ""
|
6286 |
|
6287 |
-
#: includes/core/class-fields.php:
|
6288 |
msgid "Sorry this is not a valid image."
|
6289 |
msgstr ""
|
6290 |
|
6291 |
-
#: includes/core/class-fields.php:
|
6292 |
msgid "This image is too large!"
|
6293 |
msgstr ""
|
6294 |
|
6295 |
-
#: includes/core/class-fields.php:
|
6296 |
msgid "This image is too small!"
|
6297 |
msgstr ""
|
6298 |
|
6299 |
-
#: includes/core/class-fields.php:
|
6300 |
msgid "You can only upload one image"
|
6301 |
msgstr ""
|
6302 |
|
6303 |
-
#: includes/core/class-fields.php:
|
6304 |
msgid "Current Password"
|
6305 |
msgstr ""
|
6306 |
|
6307 |
-
#: includes/core/class-fields.php:
|
6308 |
msgid "New Password"
|
6309 |
msgstr ""
|
6310 |
|
6311 |
-
#: includes/core/class-fields.php:
|
6312 |
#, php-format
|
6313 |
msgid "Confirm %s"
|
6314 |
msgstr ""
|
6315 |
|
6316 |
-
#: includes/core/class-fields.php:
|
6317 |
msgid "Upload Photo"
|
6318 |
msgstr ""
|
6319 |
|
6320 |
-
#: includes/core/class-fields.php:
|
6321 |
#: includes/core/um-actions-profile.php:727
|
6322 |
msgid "Change photo"
|
6323 |
msgstr ""
|
6324 |
|
6325 |
-
#: includes/core/class-fields.php:
|
6326 |
msgid "Processing..."
|
6327 |
msgstr ""
|
6328 |
|
6329 |
-
#: includes/core/class-fields.php:
|
6330 |
msgid "Upload File"
|
6331 |
msgstr ""
|
6332 |
|
6333 |
-
#: includes/core/class-fields.php:
|
6334 |
msgid "This file has been removed."
|
6335 |
msgstr ""
|
6336 |
|
6337 |
-
#: includes/core/class-fields.php:
|
6338 |
msgid "Change file"
|
6339 |
msgstr ""
|
6340 |
|
6341 |
-
#: includes/core/class-fields.php:
|
6342 |
msgid "Save"
|
6343 |
msgstr ""
|
6344 |
|
6345 |
-
#: includes/core/class-fields.php:
|
6346 |
#, php-format
|
6347 |
msgid ""
|
6348 |
"Your profile is looking a little empty. Why not <a href=\"%s\">add</a> some "
|
6349 |
"information!"
|
6350 |
msgstr ""
|
6351 |
|
6352 |
-
#: includes/core/class-fields.php:
|
6353 |
msgid "This user has not added any information to their profile yet."
|
6354 |
msgstr ""
|
6355 |
|
@@ -6390,53 +6441,58 @@ msgstr ""
|
|
6390 |
msgid "You can not edit this user"
|
6391 |
msgstr ""
|
6392 |
|
6393 |
-
#: includes/core/class-password.php:
|
|
|
|
|
|
|
|
|
|
|
6394 |
msgid "Please provide your username or email"
|
6395 |
msgstr ""
|
6396 |
|
6397 |
-
#: includes/core/class-password.php:
|
6398 |
msgid "We can't find an account registered with that address or username"
|
6399 |
msgstr ""
|
6400 |
|
6401 |
-
#: includes/core/class-password.php:
|
6402 |
msgid ""
|
6403 |
"You have reached the limit for requesting password change for this user "
|
6404 |
"already. Contact support if you cannot open the email"
|
6405 |
msgstr ""
|
6406 |
|
6407 |
-
#: includes/core/class-password.php:
|
6408 |
msgid "You must enter a new password"
|
6409 |
msgstr ""
|
6410 |
|
6411 |
-
#: includes/core/class-password.php:
|
6412 |
msgid "Your password must contain at least 8 characters"
|
6413 |
msgstr ""
|
6414 |
|
6415 |
-
#: includes/core/class-password.php:
|
6416 |
msgid "Your password must contain less than 30 characters"
|
6417 |
msgstr ""
|
6418 |
|
6419 |
-
#: includes/core/class-password.php:
|
6420 |
#: includes/core/um-actions-form.php:476
|
6421 |
msgid ""
|
6422 |
"Your password must contain at least one lowercase letter, one capital letter "
|
6423 |
"and one number"
|
6424 |
msgstr ""
|
6425 |
|
6426 |
-
#: includes/core/class-password.php:
|
6427 |
msgid "You must confirm your new password"
|
6428 |
msgstr ""
|
6429 |
|
6430 |
-
#: includes/core/class-password.php:
|
6431 |
msgid "Your passwords do not match"
|
6432 |
msgstr ""
|
6433 |
|
6434 |
-
#: includes/core/class-permalinks.php:
|
6435 |
msgid "This activation link is expired or have already been used."
|
6436 |
msgstr ""
|
6437 |
|
6438 |
#. translators: %s: support forums URL
|
6439 |
-
#: includes/core/class-plugin-updater.php:
|
6440 |
#, php-format
|
6441 |
msgid ""
|
6442 |
"An unexpected error occurred. Something may be wrong with https://"
|
@@ -6444,7 +6500,7 @@ msgid ""
|
|
6444 |
"have problems, please try the <a href=\"%s\">support forums</a>."
|
6445 |
msgstr ""
|
6446 |
|
6447 |
-
#: includes/core/class-plugin-updater.php:
|
6448 |
msgid "https://wordpress.org/support/"
|
6449 |
msgstr ""
|
6450 |
|
@@ -6460,75 +6516,6 @@ msgstr ""
|
|
6460 |
msgid "Comments"
|
6461 |
msgstr ""
|
6462 |
|
6463 |
-
#: includes/core/class-rest-api.php:217
|
6464 |
-
msgid "You must specify both a token and API key!"
|
6465 |
-
msgstr ""
|
6466 |
-
|
6467 |
-
#: includes/core/class-rest-api.php:229
|
6468 |
-
msgid "Your request could not be authenticated"
|
6469 |
-
msgstr ""
|
6470 |
-
|
6471 |
-
#: includes/core/class-rest-api.php:241
|
6472 |
-
msgid "Invalid API key"
|
6473 |
-
msgstr ""
|
6474 |
-
|
6475 |
-
#: includes/core/class-rest-api.php:420 includes/core/class-rest-api.php:579
|
6476 |
-
#: includes/core/class-rest-api.php:612
|
6477 |
-
msgid "You must provide a user ID"
|
6478 |
-
msgstr ""
|
6479 |
-
|
6480 |
-
#: includes/core/class-rest-api.php:425
|
6481 |
-
msgid "You need to provide data to update"
|
6482 |
-
msgstr ""
|
6483 |
-
|
6484 |
-
#: includes/core/class-rest-api.php:434
|
6485 |
-
msgid "User status has been changed."
|
6486 |
-
msgstr ""
|
6487 |
-
|
6488 |
-
#: includes/core/class-rest-api.php:463
|
6489 |
-
msgid "User role has been changed."
|
6490 |
-
msgstr ""
|
6491 |
-
|
6492 |
-
#: includes/core/class-rest-api.php:467
|
6493 |
-
msgid "User meta has been changed."
|
6494 |
-
msgstr ""
|
6495 |
-
|
6496 |
-
#: includes/core/class-rest-api.php:585 includes/core/class-rest-api.php:618
|
6497 |
-
msgid "Invalid user specified"
|
6498 |
-
msgstr ""
|
6499 |
-
|
6500 |
-
#: includes/core/class-rest-api.php:592
|
6501 |
-
msgid "User has been successfully deleted."
|
6502 |
-
msgstr ""
|
6503 |
-
|
6504 |
-
#: includes/core/class-rest-api.php:798
|
6505 |
-
msgid "Invalid query!"
|
6506 |
-
msgstr ""
|
6507 |
-
|
6508 |
-
#: includes/core/class-rest-api.php:1005
|
6509 |
-
msgid "Ultimate Member REST API"
|
6510 |
-
msgstr ""
|
6511 |
-
|
6512 |
-
#: includes/core/class-rest-api.php:1010
|
6513 |
-
msgid "Generate API Key"
|
6514 |
-
msgstr ""
|
6515 |
-
|
6516 |
-
#: includes/core/class-rest-api.php:1013
|
6517 |
-
msgid "Public key:"
|
6518 |
-
msgstr ""
|
6519 |
-
|
6520 |
-
#: includes/core/class-rest-api.php:1014
|
6521 |
-
msgid "Secret key:"
|
6522 |
-
msgstr ""
|
6523 |
-
|
6524 |
-
#: includes/core/class-rest-api.php:1015
|
6525 |
-
msgid "Token:"
|
6526 |
-
msgstr ""
|
6527 |
-
|
6528 |
-
#: includes/core/class-rest-api.php:1018
|
6529 |
-
msgid "Revoke API Keys"
|
6530 |
-
msgstr ""
|
6531 |
-
|
6532 |
#: includes/core/class-shortcodes.php:360
|
6533 |
msgid ""
|
6534 |
"This content has been restricted to logged in users only. Please <a href="
|
@@ -6585,6 +6572,63 @@ msgstr ""
|
|
6585 |
msgid "Membership Inactive"
|
6586 |
msgstr ""
|
6587 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6588 |
#: includes/core/um-actions-account.php:17
|
6589 |
msgid "Are you hacking? Please try again!"
|
6590 |
msgstr ""
|
@@ -6637,12 +6681,12 @@ msgid "Super administrators can not be modified."
|
|
6637 |
msgstr ""
|
6638 |
|
6639 |
#: includes/core/um-actions-core.php:89 includes/core/um-actions-core.php:100
|
6640 |
-
#: includes/core/um-actions-core.php:
|
6641 |
-
#: includes/core/um-actions-core.php:
|
6642 |
msgid "You do not have permission to make this action."
|
6643 |
msgstr ""
|
6644 |
|
6645 |
-
#: includes/core/um-actions-core.php:
|
6646 |
msgid "You do not have permission to delete this user."
|
6647 |
msgstr ""
|
6648 |
|
@@ -6982,11 +7026,11 @@ msgstr ""
|
|
6982 |
msgid "Login as this user"
|
6983 |
msgstr ""
|
6984 |
|
6985 |
-
#: includes/um-short-functions.php:
|
6986 |
msgid "date submitted"
|
6987 |
msgstr ""
|
6988 |
|
6989 |
-
#: includes/um-short-functions.php:
|
6990 |
msgid "(empty)"
|
6991 |
msgstr ""
|
6992 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Ultimate Member\n"
|
4 |
+
"POT-Creation-Date: 2019-05-08 11:05+0300\n"
|
5 |
+
"PO-Revision-Date: 2019-05-08 11:05+0300\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: en_US\n"
|
35 |
msgstr ""
|
36 |
|
37 |
#: includes/admin/class-admin.php:308
|
38 |
+
#: includes/admin/core/class-admin-settings.php:1178
|
39 |
msgid "Settings"
|
40 |
msgstr ""
|
41 |
|
103 |
#: includes/admin/core/class-admin-builder.php:767
|
104 |
#: includes/admin/core/class-admin-dragdrop.php:32
|
105 |
#: includes/admin/core/class-admin-menu.php:104
|
106 |
+
#: includes/core/class-fields.php:4118
|
107 |
msgid "Please login as administrator"
|
108 |
msgstr ""
|
109 |
|
139 |
msgstr ""
|
140 |
|
141 |
#: includes/admin/core/class-admin-builder.php:880
|
142 |
+
#: includes/core/class-builtin.php:1311
|
143 |
msgid "None"
|
144 |
msgstr ""
|
145 |
|
158 |
|
159 |
#: includes/admin/core/class-admin-builder.php:1143
|
160 |
#: includes/core/class-form.php:155 includes/core/class-form.php:328
|
161 |
+
#: includes/core/class-password.php:533
|
162 |
msgid "This is not possible for security reasons."
|
163 |
msgstr ""
|
164 |
|
196 |
|
197 |
#: includes/admin/core/class-admin-columns.php:134
|
198 |
#: includes/admin/core/class-admin-columns.php:153
|
199 |
+
#: includes/admin/core/class-admin-metabox.php:821
|
200 |
+
#: includes/admin/core/class-admin-metabox.php:982
|
201 |
msgid "Shortcode"
|
202 |
msgstr ""
|
203 |
|
224 |
#: includes/admin/templates/form/register_customize.php:20
|
225 |
#: includes/admin/templates/form/register_customize.php:76
|
226 |
#: includes/admin/templates/form/register_gdpr.php:23
|
227 |
+
#: includes/core/class-builtin.php:1135 includes/core/class-builtin.php:1149
|
228 |
+
#: includes/core/class-builtin.php:1150
|
229 |
#: includes/core/um-actions-account.php:271
|
230 |
msgid "No"
|
231 |
msgstr ""
|
248 |
#: includes/admin/templates/form/register_customize.php:21
|
249 |
#: includes/admin/templates/form/register_customize.php:77
|
250 |
#: includes/admin/templates/form/register_gdpr.php:24
|
251 |
+
#: includes/core/class-builtin.php:1135 includes/core/class-builtin.php:1150
|
252 |
#: includes/core/um-filters-members.php:69
|
253 |
msgid "Yes"
|
254 |
msgstr ""
|
255 |
|
256 |
+
#: includes/admin/core/class-admin-enqueue.php:184
|
257 |
msgid "e.g. Member Directory"
|
258 |
msgstr ""
|
259 |
|
260 |
+
#: includes/admin/core/class-admin-enqueue.php:186
|
261 |
msgid "e.g. New Registration Form"
|
262 |
msgstr ""
|
263 |
|
264 |
+
#: includes/admin/core/class-admin-enqueue.php:231
|
265 |
+
#: includes/admin/core/class-admin-enqueue.php:262
|
266 |
#: includes/admin/core/class-admin-forms.php:832
|
267 |
#: includes/admin/core/class-admin-forms.php:846
|
268 |
#: includes/admin/core/class-admin-forms.php:951
|
272 |
msgid "Remove"
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: includes/admin/core/class-admin-enqueue.php:232
|
276 |
+
#: includes/admin/core/class-admin-enqueue.php:263
|
277 |
#: includes/admin/core/class-admin-forms.php:1028
|
278 |
msgid "Select"
|
279 |
msgstr ""
|
280 |
|
281 |
+
#: includes/admin/core/class-admin-enqueue.php:260
|
282 |
msgid "Are sure, maybe some settings not saved"
|
283 |
msgstr ""
|
284 |
|
285 |
+
#: includes/admin/core/class-admin-enqueue.php:486
|
286 |
+
#: includes/core/class-builtin.php:698 includes/core/class-builtin.php:701
|
287 |
+
#: includes/core/class-builtin.php:1155 includes/core/class-builtin.php:1158
|
288 |
msgid "Password"
|
289 |
msgstr ""
|
290 |
|
291 |
+
#: includes/admin/core/class-admin-enqueue.php:490
|
292 |
#: includes/core/class-account.php:104
|
293 |
msgid "Privacy"
|
294 |
msgstr ""
|
295 |
|
296 |
+
#: includes/admin/core/class-admin-enqueue.php:494
|
297 |
#: includes/core/class-account.php:110
|
298 |
msgid "Notifications"
|
299 |
msgstr ""
|
300 |
|
301 |
+
#: includes/admin/core/class-admin-enqueue.php:498
|
302 |
#: includes/admin/core/list-tables/roles-list-table.php:338
|
303 |
#: includes/admin/core/list-tables/roles-list-table.php:406
|
304 |
msgid "Delete"
|
305 |
msgstr ""
|
306 |
|
307 |
+
#: includes/admin/core/class-admin-enqueue.php:548
|
308 |
msgid "Ultimate Member Blocks"
|
309 |
msgstr ""
|
310 |
|
483 |
msgid "Upgrade's Manual Request"
|
484 |
msgstr ""
|
485 |
|
486 |
+
#: includes/admin/core/class-admin-metabox.php:262
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
487 |
msgid "UM Content Restriction"
|
488 |
msgstr ""
|
489 |
|
490 |
+
#: includes/admin/core/class-admin-metabox.php:418
|
491 |
+
#: includes/admin/core/class-admin-metabox.php:568
|
492 |
#: includes/admin/templates/access/restrict_content.php:47
|
493 |
msgid "Restrict access to this content?"
|
494 |
msgstr ""
|
495 |
|
496 |
+
#: includes/admin/core/class-admin-metabox.php:419
|
497 |
+
#: includes/admin/core/class-admin-metabox.php:426
|
498 |
+
#: includes/admin/core/class-admin-metabox.php:439
|
499 |
+
#: includes/admin/core/class-admin-metabox.php:569
|
500 |
+
#: includes/admin/core/class-admin-metabox.php:577
|
501 |
+
#: includes/admin/core/class-admin-metabox.php:591
|
502 |
#: includes/admin/templates/access/restrict_content.php:48
|
503 |
#: includes/admin/templates/access/restrict_content.php:55
|
504 |
#: includes/admin/templates/access/restrict_content.php:68
|
505 |
msgid "Activate content restriction for this post"
|
506 |
msgstr ""
|
507 |
|
508 |
+
#: includes/admin/core/class-admin-metabox.php:425
|
509 |
+
#: includes/admin/core/class-admin-metabox.php:576
|
510 |
#: includes/admin/templates/access/restrict_content.php:54
|
511 |
msgid "Who can access this content?"
|
512 |
msgstr ""
|
513 |
|
514 |
+
#: includes/admin/core/class-admin-metabox.php:429
|
515 |
+
#: includes/admin/core/class-admin-metabox.php:580
|
516 |
#: includes/admin/core/class-admin-navmenu.php:141
|
517 |
#: includes/admin/templates/access/restrict_content.php:58
|
518 |
#: includes/core/class-builtin.php:662
|
519 |
msgid "Everyone"
|
520 |
msgstr ""
|
521 |
|
522 |
+
#: includes/admin/core/class-admin-metabox.php:430
|
523 |
+
#: includes/admin/core/class-admin-metabox.php:581
|
524 |
#: includes/admin/templates/access/restrict_content.php:59
|
525 |
msgid "Logged out users"
|
526 |
msgstr ""
|
527 |
|
528 |
+
#: includes/admin/core/class-admin-metabox.php:431
|
529 |
+
#: includes/admin/core/class-admin-metabox.php:582
|
530 |
#: includes/admin/templates/access/restrict_content.php:60
|
531 |
msgid "Logged in users"
|
532 |
msgstr ""
|
533 |
|
534 |
+
#: includes/admin/core/class-admin-metabox.php:438
|
535 |
+
#: includes/admin/core/class-admin-metabox.php:590
|
536 |
#: includes/admin/templates/access/restrict_content.php:67
|
537 |
msgid "Select which roles can access this content"
|
538 |
msgstr ""
|
539 |
|
540 |
+
#: includes/admin/core/class-admin-metabox.php:447
|
541 |
+
#: includes/admin/core/class-admin-metabox.php:601
|
542 |
#: includes/admin/templates/access/restrict_content.php:77
|
543 |
msgid "What happens when users without access tries to view the content?"
|
544 |
msgstr ""
|
545 |
|
546 |
+
#: includes/admin/core/class-admin-metabox.php:448
|
547 |
+
#: includes/admin/core/class-admin-metabox.php:460
|
548 |
+
#: includes/admin/core/class-admin-metabox.php:602
|
549 |
+
#: includes/admin/core/class-admin-metabox.php:615
|
550 |
#: includes/admin/templates/access/restrict_content.php:78
|
551 |
#: includes/admin/templates/access/restrict_content.php:90
|
552 |
msgid "Action when users without access tries to view the content"
|
553 |
msgstr ""
|
554 |
|
555 |
+
#: includes/admin/core/class-admin-metabox.php:451
|
556 |
+
#: includes/admin/core/class-admin-metabox.php:605
|
557 |
#: includes/admin/templates/access/restrict_content.php:81
|
558 |
msgid "Show access restricted message"
|
559 |
msgstr ""
|
560 |
|
561 |
+
#: includes/admin/core/class-admin-metabox.php:452
|
562 |
+
#: includes/admin/core/class-admin-metabox.php:606
|
563 |
#: includes/admin/templates/access/restrict_content.php:82
|
564 |
msgid "Redirect user"
|
565 |
msgstr ""
|
566 |
|
567 |
+
#: includes/admin/core/class-admin-metabox.php:459
|
568 |
+
#: includes/admin/core/class-admin-metabox.php:614
|
569 |
#: includes/admin/templates/access/restrict_content.php:89
|
570 |
msgid ""
|
571 |
"Would you like to use the global default message or apply a custom message "
|
572 |
"to this content?"
|
573 |
msgstr ""
|
574 |
|
575 |
+
#: includes/admin/core/class-admin-metabox.php:463
|
576 |
+
#: includes/admin/core/class-admin-metabox.php:618
|
577 |
#: includes/admin/templates/access/restrict_content.php:93
|
578 |
msgid "Global default message (default)"
|
579 |
msgstr ""
|
580 |
|
581 |
+
#: includes/admin/core/class-admin-metabox.php:464
|
582 |
+
#: includes/admin/core/class-admin-metabox.php:619
|
583 |
#: includes/admin/templates/access/restrict_content.php:94
|
584 |
msgid "Custom message"
|
585 |
msgstr ""
|
586 |
|
587 |
+
#: includes/admin/core/class-admin-metabox.php:471
|
588 |
+
#: includes/admin/core/class-admin-metabox.php:627
|
589 |
#: includes/admin/templates/access/restrict_content.php:101
|
590 |
msgid "Custom Restrict Content message"
|
591 |
msgstr ""
|
592 |
|
593 |
+
#: includes/admin/core/class-admin-metabox.php:472
|
594 |
+
#: includes/admin/core/class-admin-metabox.php:492
|
595 |
+
#: includes/admin/core/class-admin-metabox.php:628
|
596 |
+
#: includes/admin/core/class-admin-metabox.php:650
|
597 |
#: includes/admin/templates/access/restrict_content.php:102
|
598 |
#: includes/admin/templates/access/restrict_content.php:122
|
599 |
msgid "Changed global restrict message"
|
600 |
msgstr ""
|
601 |
|
602 |
+
#: includes/admin/core/class-admin-metabox.php:479
|
603 |
+
#: includes/admin/core/class-admin-metabox.php:636
|
604 |
#: includes/admin/templates/access/restrict_content.php:109
|
605 |
msgid "Where should users be redirected to?"
|
606 |
msgstr ""
|
607 |
|
608 |
+
#: includes/admin/core/class-admin-metabox.php:480
|
609 |
+
#: includes/admin/core/class-admin-metabox.php:637
|
610 |
#: includes/admin/templates/access/restrict_content.php:110
|
611 |
msgid "Select redirect to page when user hasn't access to content"
|
612 |
msgstr ""
|
613 |
|
614 |
+
#: includes/admin/core/class-admin-metabox.php:484
|
615 |
+
#: includes/admin/core/class-admin-metabox.php:641
|
616 |
#: includes/admin/templates/access/restrict_content.php:114
|
617 |
msgid "Login page"
|
618 |
msgstr ""
|
619 |
|
620 |
+
#: includes/admin/core/class-admin-metabox.php:485
|
621 |
+
#: includes/admin/core/class-admin-metabox.php:642
|
622 |
#: includes/admin/templates/access/restrict_content.php:115
|
623 |
msgid "Custom URL"
|
624 |
msgstr ""
|
625 |
|
626 |
+
#: includes/admin/core/class-admin-metabox.php:491
|
627 |
+
#: includes/admin/core/class-admin-metabox.php:649
|
628 |
#: includes/admin/templates/access/restrict_content.php:121
|
629 |
msgid "Redirect URL"
|
630 |
msgstr ""
|
631 |
|
632 |
+
#: includes/admin/core/class-admin-metabox.php:499
|
633 |
+
#: includes/admin/core/class-admin-metabox.php:658
|
634 |
#: includes/admin/templates/access/restrict_content.php:129
|
635 |
msgid "Hide from queries"
|
636 |
msgstr ""
|
637 |
|
638 |
+
#: includes/admin/core/class-admin-metabox.php:500
|
639 |
+
#: includes/admin/core/class-admin-metabox.php:659
|
640 |
#: includes/admin/templates/access/restrict_content.php:130
|
641 |
msgid ""
|
642 |
"Hide this content from archives, RSS feeds etc for users who do not have "
|
643 |
"permission to view this content"
|
644 |
msgstr ""
|
645 |
|
646 |
+
#: includes/admin/core/class-admin-metabox.php:817
|
647 |
msgid "General Options"
|
648 |
msgstr ""
|
649 |
|
650 |
+
#: includes/admin/core/class-admin-metabox.php:818
|
651 |
msgid "Profile Card"
|
652 |
msgstr ""
|
653 |
|
654 |
+
#: includes/admin/core/class-admin-metabox.php:819
|
655 |
msgid "Search Options"
|
656 |
msgstr ""
|
657 |
|
658 |
+
#: includes/admin/core/class-admin-metabox.php:820
|
659 |
msgid "Results & Pagination"
|
660 |
msgstr ""
|
661 |
|
662 |
+
#: includes/admin/core/class-admin-metabox.php:822
|
663 |
msgid "Styling: General"
|
664 |
msgstr ""
|
665 |
|
666 |
+
#: includes/admin/core/class-admin-metabox.php:835
|
667 |
msgid "Administrative Permissions"
|
668 |
msgstr ""
|
669 |
|
670 |
+
#: includes/admin/core/class-admin-metabox.php:843
|
671 |
msgid "General Permissions"
|
672 |
msgstr ""
|
673 |
|
674 |
+
#: includes/admin/core/class-admin-metabox.php:851
|
675 |
msgid "Profile Access"
|
676 |
msgstr ""
|
677 |
|
678 |
+
#: includes/admin/core/class-admin-metabox.php:862
|
679 |
msgid "Homepage Options"
|
680 |
msgstr ""
|
681 |
|
682 |
+
#: includes/admin/core/class-admin-metabox.php:873
|
683 |
msgid "Registration Options"
|
684 |
msgstr ""
|
685 |
|
686 |
+
#: includes/admin/core/class-admin-metabox.php:881
|
687 |
msgid "Login Options"
|
688 |
msgstr ""
|
689 |
|
690 |
+
#: includes/admin/core/class-admin-metabox.php:889
|
691 |
msgid "Logout Options"
|
692 |
msgstr ""
|
693 |
|
694 |
+
#: includes/admin/core/class-admin-metabox.php:897
|
695 |
msgid "Delete Options"
|
696 |
msgstr ""
|
697 |
|
698 |
+
#: includes/admin/core/class-admin-metabox.php:905
|
699 |
msgid "Publish"
|
700 |
msgstr ""
|
701 |
|
702 |
+
#: includes/admin/core/class-admin-metabox.php:953
|
703 |
msgid "WP Capabilities"
|
704 |
msgstr ""
|
705 |
|
706 |
+
#: includes/admin/core/class-admin-metabox.php:980
|
707 |
msgid "Select Form Type"
|
708 |
msgstr ""
|
709 |
|
710 |
+
#: includes/admin/core/class-admin-metabox.php:981
|
711 |
msgid "Form Builder"
|
712 |
msgstr ""
|
713 |
|
714 |
+
#: includes/admin/core/class-admin-metabox.php:984
|
715 |
+
#: includes/admin/core/class-admin-metabox.php:1005
|
716 |
+
#: includes/admin/core/class-admin-metabox.php:1027
|
717 |
msgid "Customize this form"
|
718 |
msgstr ""
|
719 |
|
720 |
+
#: includes/admin/core/class-admin-metabox.php:1006
|
721 |
msgid "User Meta"
|
722 |
msgstr ""
|
723 |
|
724 |
+
#: includes/admin/core/class-admin-metabox.php:1028
|
725 |
msgid "Options"
|
726 |
msgstr ""
|
727 |
|
728 |
+
#: includes/admin/core/class-admin-metabox.php:1239
|
729 |
msgid ""
|
730 |
"Select where this field should appear. This option should only be changed on "
|
731 |
"the profile form and allows you to show a field in one mode only (edit or "
|
732 |
"view) or in both modes."
|
733 |
msgstr ""
|
734 |
|
735 |
+
#: includes/admin/core/class-admin-metabox.php:1273
|
736 |
msgid "If"
|
737 |
msgstr ""
|
738 |
|
739 |
+
#: includes/admin/core/class-admin-metabox.php:1350
|
740 |
msgid "Value"
|
741 |
msgstr ""
|
742 |
|
743 |
+
#: includes/admin/core/class-admin-metabox.php:1359
|
744 |
msgid "Does this field require a special validation"
|
745 |
msgstr ""
|
746 |
|
747 |
+
#: includes/admin/core/class-admin-metabox.php:1404
|
748 |
msgid ""
|
749 |
"If you want to apply your custom validation, you can use action hooks to add "
|
750 |
"custom validation. Please refer to documentation for further details."
|
751 |
msgstr ""
|
752 |
|
753 |
+
#: includes/admin/core/class-admin-metabox.php:1418
|
754 |
+
#: includes/admin/core/class-admin-metabox.php:1446
|
755 |
msgid ""
|
756 |
"Select an icon to appear in the field. Leave blank if you do not want an "
|
757 |
"icon to show in the field."
|
758 |
msgstr ""
|
759 |
|
760 |
+
#: includes/admin/core/class-admin-metabox.php:1473
|
761 |
msgid "Specify a custom CSS class to be applied to this element"
|
762 |
msgstr ""
|
763 |
|
764 |
+
#: includes/admin/core/class-admin-metabox.php:1483
|
765 |
msgid "This is the width in pixels, e.g. 4 or 2, etc"
|
766 |
msgstr ""
|
767 |
|
768 |
+
#: includes/admin/core/class-admin-metabox.php:1493
|
769 |
msgid "Optional text to include with the divider"
|
770 |
msgstr ""
|
771 |
|
772 |
+
#: includes/admin/core/class-admin-metabox.php:1503
|
773 |
msgid "Set padding for this section"
|
774 |
msgstr ""
|
775 |
|
776 |
+
#: includes/admin/core/class-admin-metabox.php:1513
|
777 |
msgid "Set margin for this section"
|
778 |
msgstr ""
|
779 |
|
780 |
+
#: includes/admin/core/class-admin-metabox.php:1523
|
781 |
msgid "Set border for this section"
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: includes/admin/core/class-admin-metabox.php:1533
|
785 |
msgid "Choose the border style"
|
786 |
msgstr ""
|
787 |
|
788 |
+
#: includes/admin/core/class-admin-metabox.php:1548
|
789 |
msgid "Rounded corners can be applied by setting a pixels value here. e.g. 5px"
|
790 |
msgstr ""
|
791 |
|
792 |
+
#: includes/admin/core/class-admin-metabox.php:1558
|
793 |
msgid "Give a color to this border"
|
794 |
msgstr ""
|
795 |
|
796 |
+
#: includes/admin/core/class-admin-metabox.php:1568
|
797 |
msgid "Enable Row Heading"
|
798 |
msgstr ""
|
799 |
|
800 |
+
#: includes/admin/core/class-admin-metabox.php:1568
|
801 |
msgid "Whether to enable a heading for this row"
|
802 |
msgstr ""
|
803 |
|
804 |
+
#: includes/admin/core/class-admin-metabox.php:1578
|
805 |
msgid "Enter the row heading text here"
|
806 |
msgstr ""
|
807 |
|
808 |
+
#: includes/admin/core/class-admin-metabox.php:1588
|
809 |
msgid "This will be the background of entire section"
|
810 |
msgstr ""
|
811 |
|
812 |
+
#: includes/admin/core/class-admin-metabox.php:1598
|
813 |
msgid "This will be the background of the heading section"
|
814 |
msgstr ""
|
815 |
|
816 |
+
#: includes/admin/core/class-admin-metabox.php:1608
|
817 |
msgid "This will be the text color of heading part only"
|
818 |
msgstr ""
|
819 |
|
820 |
+
#: includes/admin/core/class-admin-metabox.php:1618
|
821 |
msgid "This will be the text color of entire section"
|
822 |
msgstr ""
|
823 |
|
824 |
+
#: includes/admin/core/class-admin-metabox.php:1628
|
825 |
msgid ""
|
826 |
"This will be the color of selected icon. By default It will be the same "
|
827 |
"color as heading text color"
|
828 |
msgstr ""
|
829 |
|
830 |
+
#: includes/admin/core/class-admin-metabox.php:1638
|
831 |
msgid "Select a color for this divider"
|
832 |
msgstr ""
|
833 |
|
834 |
+
#: includes/admin/core/class-admin-metabox.php:1648
|
835 |
msgid "Entering custom text here will replace the url with a text link"
|
836 |
msgstr ""
|
837 |
|
838 |
+
#: includes/admin/core/class-admin-metabox.php:1658
|
839 |
msgid "Choose whether to open this link in same window or in a new window"
|
840 |
msgstr ""
|
841 |
|
842 |
+
#: includes/admin/core/class-admin-metabox.php:1671
|
843 |
msgid "Whether to follow or nofollow this link by search engines"
|
844 |
msgstr ""
|
845 |
|
846 |
+
#: includes/admin/core/class-admin-metabox.php:1684
|
847 |
msgid ""
|
848 |
"Turn on to force users to create a strong password (A combination of one "
|
849 |
"lowercase letter, one uppercase letter, and one number). If turned on this "
|
850 |
"option is only applied to register forms and not to login forms."
|
851 |
msgstr ""
|
852 |
|
853 |
+
#: includes/admin/core/class-admin-metabox.php:1694
|
854 |
msgid ""
|
855 |
"Turn on to add a confirm password field. If turned on the confirm password "
|
856 |
"field will only show on register forms and not on login forms."
|
857 |
msgstr ""
|
858 |
|
859 |
+
#: includes/admin/core/class-admin-metabox.php:1704
|
860 |
msgid "This is the line-style of divider"
|
861 |
msgstr ""
|
862 |
|
863 |
+
#: includes/admin/core/class-admin-metabox.php:1720
|
864 |
msgid "Choose the minutes interval between each time in the time picker."
|
865 |
msgstr ""
|
866 |
|
867 |
+
#: includes/admin/core/class-admin-metabox.php:1733
|
868 |
msgid "The display format of the date which is visible to user."
|
869 |
msgstr ""
|
870 |
|
871 |
+
#: includes/admin/core/class-admin-metabox.php:1744
|
872 |
msgid "Choose the displayed time-format for this field"
|
873 |
msgstr ""
|
874 |
|
875 |
+
#: includes/admin/core/class-admin-metabox.php:1759
|
876 |
msgid ""
|
877 |
"Whether you wish to show the date in full or only show the years e.g. 25 "
|
878 |
"Years"
|
879 |
msgstr ""
|
880 |
|
881 |
+
#: includes/admin/core/class-admin-metabox.php:1778
|
882 |
msgid ""
|
883 |
"Disable specific week days from being available for selection in this date "
|
884 |
"picker"
|
885 |
msgstr ""
|
886 |
|
887 |
+
#: includes/admin/core/class-admin-metabox.php:1796
|
888 |
msgid ""
|
889 |
"Number of years available for the date selection. Default to last 50 years"
|
890 |
msgstr ""
|
891 |
|
892 |
+
#: includes/admin/core/class-admin-metabox.php:1806
|
893 |
msgid "This decides which years should be shown relative to today date"
|
894 |
msgstr ""
|
895 |
|
896 |
+
#: includes/admin/core/class-admin-metabox.php:1820
|
897 |
msgid "Set the minimum date/day in range in the format YYYY/MM/DD"
|
898 |
msgstr ""
|
899 |
|
900 |
+
#: includes/admin/core/class-admin-metabox.php:1830
|
901 |
msgid "Set the maximum date/day in range in the format YYYY/MM/DD"
|
902 |
msgstr ""
|
903 |
|
904 |
+
#: includes/admin/core/class-admin-metabox.php:1840
|
905 |
msgid ""
|
906 |
"Whether to show a specific number of years or specify a date range to be "
|
907 |
"available for the date picker."
|
908 |
msgstr ""
|
909 |
|
910 |
+
#: includes/admin/core/class-admin-metabox.php:1856
|
911 |
msgid ""
|
912 |
"Enter the shortcode in the following textarea and it will be displayed on "
|
913 |
"the fields"
|
914 |
msgstr ""
|
915 |
|
916 |
+
#: includes/admin/core/class-admin-metabox.php:1866
|
917 |
msgid "Edit the content of this field here"
|
918 |
msgstr ""
|
919 |
|
920 |
+
#: includes/admin/core/class-admin-metabox.php:1879
|
921 |
msgid "Enable/disable crop feature for this image upload and define ratio"
|
922 |
msgstr ""
|
923 |
|
924 |
+
#: includes/admin/core/class-admin-metabox.php:1901
|
925 |
+
#: includes/admin/core/class-admin-metabox.php:1921
|
926 |
msgid ""
|
927 |
"Select the image types that you want to allow to be uploaded via this field."
|
928 |
msgstr ""
|
929 |
|
930 |
+
#: includes/admin/core/class-admin-metabox.php:1942
|
931 |
msgid "This is the headline that appears in the upload box for this field"
|
932 |
msgstr ""
|
933 |
|
934 |
+
#: includes/admin/core/class-admin-metabox.php:1952
|
935 |
msgid ""
|
936 |
"If you need to add information or secondary line below the headline of "
|
937 |
"upload box, enter it here"
|
938 |
msgstr ""
|
939 |
|
940 |
+
#: includes/admin/core/class-admin-metabox.php:1962
|
941 |
msgid "The text that appears on the button. e.g. Upload"
|
942 |
msgstr ""
|
943 |
|
944 |
+
#: includes/admin/core/class-admin-metabox.php:1972
|
945 |
msgid ""
|
946 |
"The maximum size for image that can be uploaded through this field. Leave "
|
947 |
"empty for unlimited size."
|
948 |
msgstr ""
|
949 |
|
950 |
+
#: includes/admin/core/class-admin-metabox.php:1982
|
951 |
msgid "The height of textarea in pixels. Default is 100 pixels"
|
952 |
msgstr ""
|
953 |
|
954 |
+
#: includes/admin/core/class-admin-metabox.php:1992
|
955 |
msgid "This is the required spacing in pixels. e.g. 20px"
|
956 |
msgstr ""
|
957 |
|
958 |
+
#: includes/admin/core/class-admin-metabox.php:2002
|
959 |
msgid "Enable/disable multiple selections for this field"
|
960 |
msgstr ""
|
961 |
|
962 |
+
#: includes/admin/core/class-admin-metabox.php:2012
|
963 |
msgid ""
|
964 |
"Enter a number here to force a maximum number of selections by user for this "
|
965 |
"field"
|
966 |
msgstr ""
|
967 |
|
968 |
+
#: includes/admin/core/class-admin-metabox.php:2022
|
969 |
msgid ""
|
970 |
"Enter a number here to force a minimum number of selections by user for this "
|
971 |
"field"
|
972 |
msgstr ""
|
973 |
|
974 |
+
#: includes/admin/core/class-admin-metabox.php:2032
|
975 |
msgid "This is the max number of entries the user can add via field group."
|
976 |
msgstr ""
|
977 |
|
978 |
+
#: includes/admin/core/class-admin-metabox.php:2042
|
979 |
msgid ""
|
980 |
"If you want to enable a maximum number of words to be input in this "
|
981 |
"textarea. Leave empty to disable this setting"
|
982 |
msgstr ""
|
983 |
|
984 |
+
#: includes/admin/core/class-admin-metabox.php:2052
|
985 |
msgid "Minimum number that can be entered in this field"
|
986 |
msgstr ""
|
987 |
|
988 |
+
#: includes/admin/core/class-admin-metabox.php:2062
|
989 |
msgid "Maximum number that can be entered in this field"
|
990 |
msgstr ""
|
991 |
|
992 |
+
#: includes/admin/core/class-admin-metabox.php:2072
|
993 |
msgid ""
|
994 |
"If you want to enable a minimum number of characters to be input in this "
|
995 |
"field. Leave empty to disable this setting"
|
996 |
msgstr ""
|
997 |
|
998 |
+
#: includes/admin/core/class-admin-metabox.php:2082
|
999 |
msgid ""
|
1000 |
"If you want to enable a maximum number of characters to be input in this "
|
1001 |
"field. Leave empty to disable this setting"
|
1002 |
msgstr ""
|
1003 |
|
1004 |
+
#: includes/admin/core/class-admin-metabox.php:2092
|
1005 |
msgid "Turn on/off HTML tags for this textarea"
|
1006 |
msgstr ""
|
1007 |
|
1008 |
+
#: includes/admin/core/class-admin-metabox.php:2111
|
1009 |
msgid ""
|
1010 |
"Enter one choice per line. This will represent the available choices or "
|
1011 |
"selections available for user."
|
1012 |
msgstr ""
|
1013 |
|
1014 |
+
#: includes/admin/core/class-admin-metabox.php:2121
|
1015 |
msgid ""
|
1016 |
"This is the title of the field for your reference in the backend. The title "
|
1017 |
"will not appear on the front-end of your website."
|
1018 |
msgstr ""
|
1019 |
|
1020 |
+
#: includes/admin/core/class-admin-metabox.php:2146
|
1021 |
msgid ""
|
1022 |
"The meta key cannot be changed for duplicated fields or when editing an "
|
1023 |
"existing field. If you require a different meta key please create a new "
|
1024 |
"field."
|
1025 |
msgstr ""
|
1026 |
|
1027 |
+
#: includes/admin/core/class-admin-metabox.php:2152
|
1028 |
msgid ""
|
1029 |
"A meta key is required to store the entered info in this field in the "
|
1030 |
"database. The meta key should be unique to this field and be written in "
|
1032 |
"job_title"
|
1033 |
msgstr ""
|
1034 |
|
1035 |
+
#: includes/admin/core/class-admin-metabox.php:2165
|
1036 |
msgid ""
|
1037 |
"This is the text that appears in a tooltip when a user hovers over the info "
|
1038 |
"icon. Help text is useful for providing users with more information about "
|
1040 |
"for field."
|
1041 |
msgstr ""
|
1042 |
|
1043 |
+
#: includes/admin/core/class-admin-metabox.php:2177
|
1044 |
+
msgid "Default Text"
|
1045 |
+
msgstr ""
|
1046 |
+
|
1047 |
+
#: includes/admin/core/class-admin-metabox.php:2177
|
1048 |
msgid "Text to display by default in this field"
|
1049 |
msgstr ""
|
1050 |
|
1051 |
+
#: includes/admin/core/class-admin-metabox.php:2183
|
1052 |
+
msgid "Default Date"
|
1053 |
+
msgstr ""
|
1054 |
+
|
1055 |
+
#: includes/admin/core/class-admin-metabox.php:2183
|
1056 |
+
#: includes/admin/core/class-admin-metabox.php:2189
|
1057 |
+
msgid ""
|
1058 |
+
"You may use all PHP compatible date formats such as: 2020-02-02, 02/02/2020, "
|
1059 |
+
"yesterday, today, tomorrow, next monday, first day of next month, +3 day"
|
1060 |
+
msgstr ""
|
1061 |
+
|
1062 |
+
#: includes/admin/core/class-admin-metabox.php:2189
|
1063 |
+
msgid "Default Time"
|
1064 |
+
msgstr ""
|
1065 |
+
|
1066 |
+
#: includes/admin/core/class-admin-metabox.php:2195
|
1067 |
+
msgid "Default Rating"
|
1068 |
+
msgstr ""
|
1069 |
+
|
1070 |
+
#: includes/admin/core/class-admin-metabox.php:2195
|
1071 |
msgid ""
|
1072 |
"If you wish the rating field to be prefilled with a number of stars, enter "
|
1073 |
"it here."
|
1074 |
msgstr ""
|
1075 |
|
1076 |
+
#: includes/admin/core/class-admin-metabox.php:2201
|
1077 |
+
msgid "Default Value"
|
1078 |
+
msgstr ""
|
1079 |
+
|
1080 |
+
#: includes/admin/core/class-admin-metabox.php:2201
|
1081 |
msgid ""
|
1082 |
"This option allows you to pre-fill the field with a default value prior to "
|
1083 |
"the user entering a value in the field. Leave blank to have no default value"
|
1084 |
msgstr ""
|
1085 |
|
1086 |
+
#: includes/admin/core/class-admin-metabox.php:2213
|
1087 |
msgid ""
|
1088 |
"The field label is the text that appears above the field on your front-end "
|
1089 |
"form. Leave blank to not show a label above field."
|
1090 |
msgstr ""
|
1091 |
|
1092 |
+
#: includes/admin/core/class-admin-metabox.php:2223
|
1093 |
msgid ""
|
1094 |
"This is the text that appears within the field e.g please enter your email "
|
1095 |
"address. Leave blank to not show any placeholder text."
|
1096 |
msgstr ""
|
1097 |
|
1098 |
+
#: includes/admin/core/class-admin-metabox.php:2233
|
1099 |
msgid ""
|
1100 |
"Field privacy allows you to select who can view this field on the front-end. "
|
1101 |
"The site admin can view all fields regardless of the option set here."
|
1102 |
msgstr ""
|
1103 |
|
1104 |
+
#: includes/admin/core/class-admin-metabox.php:2256
|
1105 |
msgid "Select the member roles that can view this field on the front-end."
|
1106 |
msgstr ""
|
1107 |
|
1108 |
+
#: includes/admin/core/class-admin-metabox.php:2282
|
1109 |
msgid ""
|
1110 |
"This option allows you to set whether the field must be filled in before the "
|
1111 |
"form can be processed."
|
1112 |
msgstr ""
|
1113 |
|
1114 |
+
#: includes/admin/core/class-admin-metabox.php:2296
|
1115 |
msgid ""
|
1116 |
"This option allows you to set whether or not the user can edit the "
|
1117 |
"information in this field."
|
1118 |
msgstr ""
|
1119 |
|
1120 |
+
#: includes/admin/core/class-admin-metabox.php:2309
|
1121 |
msgid "Choose whether you want a 5-stars or 10-stars ratings based here."
|
1122 |
msgstr ""
|
1123 |
|
1124 |
+
#: includes/admin/core/class-admin-metabox.php:2322
|
1125 |
msgid "Add a callback source to retrieve choices."
|
1126 |
msgstr ""
|
1127 |
|
1128 |
+
#: includes/admin/core/class-admin-metabox.php:2333
|
1129 |
msgid "Parent Option"
|
1130 |
msgstr ""
|
1131 |
|
1132 |
+
#: includes/admin/core/class-admin-metabox.php:2333
|
1133 |
msgid "Dynamically populates the option based from selected parent option."
|
1134 |
msgstr ""
|
1135 |
|
1136 |
+
#: includes/admin/core/class-admin-metabox.php:2335
|
1137 |
msgid "No Selected"
|
1138 |
msgstr ""
|
1139 |
|
1542 |
|
1543 |
#: includes/admin/core/class-admin-settings.php:350
|
1544 |
#: includes/admin/core/class-admin-settings.php:367
|
1545 |
+
#: includes/core/class-builtin.php:674 includes/core/class-builtin.php:677
|
1546 |
msgid "Username"
|
1547 |
msgstr ""
|
1548 |
|
1582 |
msgstr ""
|
1583 |
|
1584 |
#: includes/admin/core/class-admin-settings.php:366
|
1585 |
+
#: includes/core/class-builtin.php:732 includes/core/class-builtin.php:735
|
1586 |
msgid "Nickname"
|
1587 |
msgstr ""
|
1588 |
|
1706 |
msgstr ""
|
1707 |
|
1708 |
#: includes/admin/core/class-admin-settings.php:436
|
1709 |
+
#: includes/class-config.php:134 includes/class-config.php:746
|
1710 |
#: includes/core/class-account.php:92
|
1711 |
msgid "Account"
|
1712 |
msgstr ""
|
2406 |
msgstr ""
|
2407 |
|
2408 |
#: includes/admin/core/class-admin-settings.php:1079
|
2409 |
+
msgid "REST API version"
|
2410 |
msgstr ""
|
2411 |
|
2412 |
#: includes/admin/core/class-admin-settings.php:1080
|
2413 |
msgid ""
|
2414 |
+
"This controls the REST API version, we recommend to use the last version"
|
2415 |
+
msgstr ""
|
2416 |
+
|
2417 |
+
#: includes/admin/core/class-admin-settings.php:1082
|
2418 |
+
msgid "1.0 version"
|
2419 |
+
msgstr ""
|
2420 |
+
|
2421 |
+
#: includes/admin/core/class-admin-settings.php:1083
|
2422 |
+
msgid "2.0 version"
|
2423 |
+
msgstr ""
|
2424 |
+
|
2425 |
+
#: includes/admin/core/class-admin-settings.php:1089
|
2426 |
+
msgid "Remove Data on Uninstall?"
|
2427 |
+
msgstr ""
|
2428 |
+
|
2429 |
+
#: includes/admin/core/class-admin-settings.php:1090
|
2430 |
+
msgid ""
|
2431 |
"Check this box if you would like Ultimate Member to completely remove all of "
|
2432 |
"its data when the plugin/extensions are deleted."
|
2433 |
msgstr ""
|
2434 |
|
2435 |
+
#: includes/admin/core/class-admin-settings.php:1095
|
2436 |
msgid "Install Info"
|
2437 |
msgstr ""
|
2438 |
|
2439 |
+
#: includes/admin/core/class-admin-settings.php:1209
|
2440 |
msgid "Ultimate Member - Settings"
|
2441 |
msgstr ""
|
2442 |
|
2443 |
+
#: includes/admin/core/class-admin-settings.php:1348
|
2444 |
msgid "Save Changes"
|
2445 |
msgstr ""
|
2446 |
|
2447 |
+
#: includes/admin/core/class-admin-settings.php:1792
|
2448 |
msgid "Subject Line"
|
2449 |
msgstr ""
|
2450 |
|
2451 |
+
#: includes/admin/core/class-admin-settings.php:1794
|
2452 |
msgid "This is the subject line of the e-mail"
|
2453 |
msgstr ""
|
2454 |
|
2455 |
+
#: includes/admin/core/class-admin-settings.php:1799
|
2456 |
msgid "Message Body"
|
2457 |
msgstr ""
|
2458 |
|
2459 |
+
#: includes/admin/core/class-admin-settings.php:1801
|
2460 |
msgid "This is the content of the e-mail"
|
2461 |
msgstr ""
|
2462 |
|
2463 |
+
#: includes/admin/core/class-admin-settings.php:1851
|
2464 |
+
#: includes/admin/core/class-admin-settings.php:1949
|
2465 |
#, php-format
|
2466 |
msgid ""
|
2467 |
"Your license key expired on %s. Please <a href=\"%s\" target=\"_blank"
|
2468 |
"\">renew your license key</a>."
|
2469 |
msgstr ""
|
2470 |
|
2471 |
+
#: includes/admin/core/class-admin-settings.php:1864
|
2472 |
+
#: includes/admin/core/class-admin-settings.php:1962
|
2473 |
#, php-format
|
2474 |
msgid ""
|
2475 |
"Your license key has been disabled. Please <a href=\"%s\" target=\"_blank"
|
2476 |
"\">contact support</a> for more information."
|
2477 |
msgstr ""
|
2478 |
|
2479 |
+
#: includes/admin/core/class-admin-settings.php:1876
|
2480 |
+
#: includes/admin/core/class-admin-settings.php:1974
|
2481 |
#, php-format
|
2482 |
msgid ""
|
2483 |
"Invalid license. Please <a href=\"%s\" target=\"_blank\">visit your account "
|
2484 |
"page</a> and verify it."
|
2485 |
msgstr ""
|
2486 |
|
2487 |
+
#: includes/admin/core/class-admin-settings.php:1889
|
2488 |
+
#: includes/admin/core/class-admin-settings.php:1987
|
2489 |
#, php-format
|
2490 |
msgid ""
|
2491 |
"Your %s is not active for this URL. Please <a href=\"%s\" target=\"_blank"
|
2492 |
"\">visit your account page</a> to manage your license key URLs."
|
2493 |
msgstr ""
|
2494 |
|
2495 |
+
#: includes/admin/core/class-admin-settings.php:1901
|
2496 |
+
#: includes/admin/core/class-admin-settings.php:1999
|
2497 |
#, php-format
|
2498 |
msgid "This appears to be an invalid license key for %s."
|
2499 |
msgstr ""
|
2500 |
|
2501 |
+
#: includes/admin/core/class-admin-settings.php:1910
|
2502 |
+
#: includes/admin/core/class-admin-settings.php:2008
|
2503 |
#, php-format
|
2504 |
msgid ""
|
2505 |
"Your license key has reached its activation limit. <a href=\"%s\">View "
|
2506 |
"possible upgrades</a> now."
|
2507 |
msgstr ""
|
2508 |
|
2509 |
+
#: includes/admin/core/class-admin-settings.php:1919
|
2510 |
+
#: includes/admin/core/class-admin-settings.php:2017
|
2511 |
msgid ""
|
2512 |
"The key you entered belongs to a bundle, please use the product specific "
|
2513 |
"license key."
|
2514 |
msgstr ""
|
2515 |
|
2516 |
+
#: includes/admin/core/class-admin-settings.php:1927
|
2517 |
+
#: includes/admin/core/class-admin-settings.php:1935
|
2518 |
msgid "unknown_error"
|
2519 |
msgstr ""
|
2520 |
|
2521 |
+
#: includes/admin/core/class-admin-settings.php:1928
|
2522 |
+
#: includes/admin/core/class-admin-settings.php:1936
|
2523 |
#, php-format
|
2524 |
msgid ""
|
2525 |
"There was an error with this license key: %s. Please <a href=\"%s\">contact "
|
2526 |
"our support team</a>."
|
2527 |
msgstr ""
|
2528 |
|
2529 |
+
#: includes/admin/core/class-admin-settings.php:2032
|
2530 |
msgid "License key never expires."
|
2531 |
msgstr ""
|
2532 |
|
2533 |
+
#: includes/admin/core/class-admin-settings.php:2039
|
2534 |
#, php-format
|
2535 |
msgid ""
|
2536 |
"Your license key expires soon! It expires on %s. <a href=\"%s\" target="
|
2537 |
"\"_blank\">Renew your license key</a>."
|
2538 |
msgstr ""
|
2539 |
|
2540 |
+
#: includes/admin/core/class-admin-settings.php:2049
|
2541 |
#, php-format
|
2542 |
msgid "Your license key expires on %s."
|
2543 |
msgstr ""
|
2544 |
|
2545 |
+
#: includes/admin/core/class-admin-settings.php:2067
|
2546 |
#, php-format
|
2547 |
msgid "To receive updates, please enter your valid %s license key."
|
2548 |
msgstr ""
|
2549 |
|
2550 |
+
#: includes/admin/core/class-admin-settings.php:2091
|
2551 |
msgid "Clear License"
|
2552 |
msgstr ""
|
2553 |
|
2554 |
+
#: includes/admin/core/class-admin-settings.php:2093
|
2555 |
msgid "Activate"
|
2556 |
msgstr ""
|
2557 |
|
2558 |
+
#: includes/admin/core/class-admin-settings.php:2095
|
2559 |
msgid "Re-Activate"
|
2560 |
msgstr ""
|
2561 |
|
2562 |
+
#: includes/admin/core/class-admin-settings.php:2147
|
2563 |
msgid ""
|
2564 |
"To copy the Install info, click below then press Ctrl + C (PC) or Cmd + C "
|
2565 |
"(Mac)."
|
2624 |
msgid "Run"
|
2625 |
msgstr ""
|
2626 |
|
2627 |
+
#: includes/admin/core/class-admin-users.php:116
|
2628 |
+
#: includes/admin/core/class-admin-users.php:119
|
2629 |
msgid "UM Action"
|
2630 |
msgstr ""
|
2631 |
|
2632 |
+
#: includes/admin/core/class-admin-users.php:123
|
2633 |
+
#: includes/core/class-fields.php:2332
|
2634 |
msgid "Apply"
|
2635 |
msgstr ""
|
2636 |
|
2637 |
+
#: includes/admin/core/class-admin-users.php:165
|
2638 |
#: includes/core/um-filters-user.php:20 includes/core/um-filters-user.php:25
|
2639 |
msgid "Approve Membership"
|
2640 |
msgstr ""
|
2641 |
|
2642 |
+
#: includes/admin/core/class-admin-users.php:168
|
2643 |
#: includes/core/um-filters-user.php:21
|
2644 |
msgid "Reject Membership"
|
2645 |
msgstr ""
|
2646 |
|
2647 |
+
#: includes/admin/core/class-admin-users.php:171
|
2648 |
#: includes/core/um-filters-user.php:29
|
2649 |
msgid "Put as Pending Review"
|
2650 |
msgstr ""
|
2651 |
|
2652 |
+
#: includes/admin/core/class-admin-users.php:174
|
2653 |
#: includes/core/um-filters-user.php:33
|
2654 |
msgid "Resend Activation E-mail"
|
2655 |
msgstr ""
|
2656 |
|
2657 |
+
#: includes/admin/core/class-admin-users.php:177
|
2658 |
msgid "Deactivate"
|
2659 |
msgstr ""
|
2660 |
|
2661 |
+
#: includes/admin/core/class-admin-users.php:180
|
2662 |
msgid "Reactivate"
|
2663 |
msgstr ""
|
2664 |
|
2665 |
+
#: includes/admin/core/class-admin-users.php:203 templates/account.php:38
|
2666 |
#: templates/account.php:62
|
2667 |
msgid "View profile"
|
2668 |
msgstr ""
|
2669 |
|
2670 |
+
#: includes/admin/core/class-admin-users.php:207
|
2671 |
msgid "Info"
|
2672 |
msgstr ""
|
2673 |
|
2674 |
+
#: includes/admin/core/class-admin-users.php:312
|
2675 |
#: includes/admin/templates/dashboard/users.php:11
|
2676 |
#: includes/core/class-user.php:819
|
2677 |
msgid "Approved"
|
2678 |
msgstr ""
|
2679 |
|
2680 |
+
#: includes/admin/core/class-admin-users.php:313
|
2681 |
msgid "Pending review"
|
2682 |
msgstr ""
|
2683 |
|
2684 |
+
#: includes/admin/core/class-admin-users.php:314
|
2685 |
msgid "Waiting e-mail confirmation"
|
2686 |
msgstr ""
|
2687 |
|
2688 |
+
#: includes/admin/core/class-admin-users.php:315
|
2689 |
#: includes/admin/templates/dashboard/users.php:37
|
2690 |
msgid "Inactive"
|
2691 |
msgstr ""
|
2692 |
|
2693 |
+
#: includes/admin/core/class-admin-users.php:316
|
2694 |
#: includes/admin/templates/dashboard/users.php:16
|
2695 |
msgid "Rejected"
|
2696 |
msgstr ""
|
2697 |
|
2698 |
+
#: includes/admin/core/class-admin-users.php:376
|
2699 |
msgid "You do not have enough permissions to do that."
|
2700 |
msgstr ""
|
2701 |
|
2702 |
+
#: includes/admin/core/list-tables/emails-list-table.php:70
|
2703 |
#: includes/admin/core/list-tables/roles-list-table.php:172
|
2704 |
msgid "item"
|
2705 |
msgstr ""
|
2706 |
|
2707 |
+
#: includes/admin/core/list-tables/emails-list-table.php:71
|
2708 |
#: includes/admin/core/list-tables/roles-list-table.php:173
|
2709 |
msgid "items"
|
2710 |
msgstr ""
|
2711 |
|
2712 |
+
#: includes/admin/core/list-tables/emails-list-table.php:75
|
2713 |
#: includes/admin/core/list-tables/roles-list-table.php:177
|
2714 |
msgid "not found."
|
2715 |
msgstr ""
|
2716 |
|
2717 |
+
#: includes/admin/core/list-tables/emails-list-table.php:237
|
2718 |
msgid "Member"
|
2719 |
msgstr ""
|
2720 |
|
2730 |
msgid "Recipient(s)"
|
2731 |
msgstr ""
|
2732 |
|
2733 |
+
#: includes/admin/core/list-tables/emails-list-table.php:314
|
2734 |
+
#, php-format
|
2735 |
+
msgid ""
|
2736 |
+
"You may get more details about email notifications customization <a href=\"%s"
|
2737 |
+
"\">here</a>"
|
2738 |
+
msgstr ""
|
2739 |
+
|
2740 |
#: includes/admin/core/list-tables/roles-list-table.php:23
|
2741 |
#: includes/admin/core/list-tables/roles-list-table.php:88
|
2742 |
#: includes/admin/core/list-tables/roles-list-table.php:398
|
2969 |
msgid "Purge temp files dir..."
|
2970 |
msgstr ""
|
2971 |
|
2972 |
+
#: includes/admin/core/packages/2.0.44/functions.php:13
|
2973 |
+
msgid "Field was upgraded successfully"
|
2974 |
+
msgstr ""
|
2975 |
+
|
2976 |
+
#: includes/admin/core/packages/2.0.44/init.php:7
|
2977 |
+
msgid "Upgrade predefined metafields..."
|
2978 |
+
msgstr ""
|
2979 |
+
|
2980 |
#: includes/admin/templates/dashboard/cache.php:9
|
2981 |
msgid "Run this task from time to time to keep your DB clean."
|
2982 |
msgstr ""
|
3051 |
msgstr ""
|
3052 |
|
3053 |
#: includes/admin/templates/directory/general.php:50
|
3054 |
+
#: includes/core/class-builtin.php:712 includes/core/class-builtin.php:715
|
3055 |
msgid "First Name"
|
3056 |
msgstr ""
|
3057 |
|
3058 |
#: includes/admin/templates/directory/general.php:51
|
3059 |
+
#: includes/core/class-builtin.php:722 includes/core/class-builtin.php:725
|
3060 |
msgid "Last Name"
|
3061 |
msgstr ""
|
3062 |
|
3614 |
#: includes/admin/templates/modal/dynamic_new_group.php:15
|
3615 |
#: includes/admin/templates/modal/fonticons.php:11
|
3616 |
#: includes/admin/templates/role/publish.php:24
|
3617 |
+
#: includes/core/class-fields.php:2333 includes/core/class-fields.php:2430
|
3618 |
#: includes/core/um-actions-profile.php:557
|
3619 |
#: includes/core/um-actions-profile.php:696
|
3620 |
#: includes/core/um-actions-profile.php:729
|
3963 |
msgid "Check All"
|
3964 |
msgstr ""
|
3965 |
|
3966 |
+
#: includes/class-config.php:129 includes/class-config.php:741
|
3967 |
msgid "User"
|
3968 |
msgstr ""
|
3969 |
|
3970 |
#: includes/class-config.php:130 includes/class-config.php:235
|
3971 |
+
#: includes/class-config.php:241 includes/class-config.php:742
|
3972 |
msgid "Login"
|
3973 |
msgstr ""
|
3974 |
|
3975 |
#: includes/class-config.php:131 includes/class-config.php:233
|
3976 |
+
#: includes/class-config.php:245 includes/class-config.php:743
|
3977 |
msgid "Register"
|
3978 |
msgstr ""
|
3979 |
|
3980 |
+
#: includes/class-config.php:132 includes/class-config.php:744
|
3981 |
msgid "Members"
|
3982 |
msgstr ""
|
3983 |
|
3984 |
+
#: includes/class-config.php:133 includes/class-config.php:745
|
3985 |
#: includes/core/um-actions-profile.php:1080
|
3986 |
#: includes/core/um-actions-user.php:15
|
3987 |
msgid "Logout"
|
3988 |
msgstr ""
|
3989 |
|
3990 |
+
#: includes/class-config.php:135 includes/class-config.php:747
|
3991 |
msgid "Password Reset"
|
3992 |
msgstr ""
|
3993 |
|
4107 |
"account data from the site. To delete your account enter your password below"
|
4108 |
msgstr ""
|
4109 |
|
4110 |
+
#: includes/class-dependencies.php:167
|
4111 |
#, php-format
|
4112 |
msgid ""
|
4113 |
"This version of <strong>\"%s\"</strong> requires the core <strong>%s</"
|
4114 |
"strong> plugin to be <strong>%s</strong> or higher."
|
4115 |
msgstr ""
|
4116 |
|
4117 |
+
#: includes/class-dependencies.php:169
|
4118 |
#, php-format
|
4119 |
msgid "Please update <strong>%s</strong> to the latest version."
|
4120 |
msgstr ""
|
4121 |
|
4122 |
+
#: includes/class-dependencies.php:171
|
4123 |
#, php-format
|
4124 |
msgid ""
|
4125 |
"Sorry, but this version of <strong>%s</strong> does not work with extension "
|
4126 |
"<strong>\"%s\" %s</strong> version."
|
4127 |
msgstr ""
|
4128 |
|
4129 |
+
#: includes/class-dependencies.php:173
|
4130 |
#, php-format
|
4131 |
msgid "Please update extension <strong>\"%s\"</strong> to the latest version."
|
4132 |
msgstr ""
|
4133 |
|
4134 |
+
#: includes/class-dependencies.php:182
|
4135 |
#, php-format
|
4136 |
msgid "Please check <strong>\"%s\" %s</strong> extension's folder name."
|
4137 |
msgstr ""
|
4138 |
|
4139 |
+
#: includes/class-dependencies.php:184
|
4140 |
#, php-format
|
4141 |
msgid "Correct folder name is <strong>\"%s\"</strong>"
|
4142 |
msgstr ""
|
4146 |
msgid "%s License Key"
|
4147 |
msgstr ""
|
4148 |
|
4149 |
+
#: includes/class-init.php:155 includes/class-init.php:164
|
4150 |
msgid "Cheatin’ huh?"
|
4151 |
msgstr ""
|
4152 |
|
4171 |
msgstr ""
|
4172 |
|
4173 |
#: includes/core/class-account.php:119 includes/core/class-account.php:120
|
4174 |
+
#: includes/core/class-builtin.php:1141 includes/core/class-builtin.php:1144
|
4175 |
msgid "Delete Account"
|
4176 |
msgstr ""
|
4177 |
|
4250 |
msgid "You must add a shortcode to the content area"
|
4251 |
msgstr ""
|
4252 |
|
4253 |
+
#: includes/core/class-builtin.php:663 includes/core/class-user.php:1544
|
4254 |
msgid "Only me"
|
4255 |
msgstr ""
|
4256 |
|
4257 |
+
#: includes/core/class-builtin.php:687 includes/core/class-builtin.php:690
|
4258 |
+
#: includes/core/class-builtin.php:1097
|
4259 |
msgid "Username or E-mail"
|
4260 |
msgstr ""
|
4261 |
|
4262 |
+
#: includes/core/class-builtin.php:742 includes/core/class-builtin.php:745
|
4263 |
+
#: includes/core/class-builtin.php:1330
|
4264 |
msgid "Website URL"
|
4265 |
msgstr ""
|
4266 |
|
4267 |
+
#: includes/core/class-builtin.php:753 includes/core/class-builtin.php:756
|
4268 |
msgid "Registration Date"
|
4269 |
msgstr ""
|
4270 |
|
4271 |
+
#: includes/core/class-builtin.php:764 includes/core/class-builtin.php:767
|
4272 |
msgid "Last Login"
|
4273 |
msgstr ""
|
4274 |
|
4275 |
+
#: includes/core/class-builtin.php:775 includes/core/class-builtin.php:778
|
4276 |
msgid "E-mail Address"
|
4277 |
msgstr ""
|
4278 |
|
4279 |
+
#: includes/core/class-builtin.php:786 includes/core/class-builtin.php:789
|
4280 |
msgid "Secondary E-mail Address"
|
4281 |
msgstr ""
|
4282 |
|
4283 |
+
#: includes/core/class-builtin.php:798 includes/core/class-builtin.php:801
|
4284 |
msgid "Biography"
|
4285 |
msgstr ""
|
4286 |
|
4287 |
+
#: includes/core/class-builtin.php:807
|
4288 |
msgid "Enter a bit about yourself..."
|
4289 |
msgstr ""
|
4290 |
|
4291 |
+
#: includes/core/class-builtin.php:811 includes/core/class-builtin.php:814
|
4292 |
msgid "Birth Date"
|
4293 |
msgstr ""
|
4294 |
|
4295 |
+
#: includes/core/class-builtin.php:825 includes/core/class-builtin.php:828
|
4296 |
msgid "Gender"
|
4297 |
msgstr ""
|
4298 |
|
4299 |
+
#: includes/core/class-builtin.php:832
|
4300 |
msgid "Male"
|
4301 |
msgstr ""
|
4302 |
|
4303 |
+
#: includes/core/class-builtin.php:832
|
4304 |
msgid "Female"
|
4305 |
msgstr ""
|
4306 |
|
4307 |
+
#: includes/core/class-builtin.php:836 includes/core/class-builtin.php:839
|
4308 |
msgid "Country"
|
4309 |
msgstr ""
|
4310 |
|
4311 |
+
#: includes/core/class-builtin.php:840
|
4312 |
msgid "Choose a Country"
|
4313 |
msgstr ""
|
4314 |
|
4315 |
+
#: includes/core/class-builtin.php:848 includes/core/class-builtin.php:851
|
4316 |
msgid "Facebook"
|
4317 |
msgstr ""
|
4318 |
|
4319 |
+
#: includes/core/class-builtin.php:866 includes/core/class-builtin.php:869
|
4320 |
msgid "Twitter"
|
4321 |
msgstr ""
|
4322 |
|
4323 |
+
#: includes/core/class-builtin.php:884 includes/core/class-builtin.php:887
|
4324 |
msgid "LinkedIn"
|
4325 |
msgstr ""
|
4326 |
|
4327 |
+
#: includes/core/class-builtin.php:902 includes/core/class-builtin.php:905
|
4328 |
msgid "Google+"
|
4329 |
msgstr ""
|
4330 |
|
4331 |
+
#: includes/core/class-builtin.php:920 includes/core/class-builtin.php:923
|
4332 |
msgid "Instagram"
|
4333 |
msgstr ""
|
4334 |
|
4335 |
+
#: includes/core/class-builtin.php:938 includes/core/class-builtin.php:941
|
4336 |
+
#: includes/core/class-builtin.php:1323
|
4337 |
msgid "Skype ID"
|
4338 |
msgstr ""
|
4339 |
|
4340 |
+
#: includes/core/class-builtin.php:953 includes/core/class-builtin.php:956
|
4341 |
msgid "YouTube"
|
4342 |
msgstr ""
|
4343 |
|
4344 |
+
#: includes/core/class-builtin.php:971 includes/core/class-builtin.php:974
|
4345 |
msgid "SoundCloud"
|
4346 |
msgstr ""
|
4347 |
|
4348 |
+
#: includes/core/class-builtin.php:989 includes/core/class-builtin.php:992
|
4349 |
msgid "VKontakte"
|
4350 |
msgstr ""
|
4351 |
|
4352 |
+
#: includes/core/class-builtin.php:1007
|
4353 |
msgid "Roles (Dropdown)"
|
4354 |
msgstr ""
|
4355 |
|
4356 |
+
#: includes/core/class-builtin.php:1010 includes/core/class-builtin.php:1022
|
4357 |
msgid "Account Type"
|
4358 |
msgstr ""
|
4359 |
|
4360 |
+
#: includes/core/class-builtin.php:1019
|
4361 |
msgid "Roles (Radio)"
|
4362 |
msgstr ""
|
4363 |
|
4364 |
+
#: includes/core/class-builtin.php:1030
|
4365 |
msgid "Languages"
|
4366 |
msgstr ""
|
4367 |
|
4368 |
+
#: includes/core/class-builtin.php:1033
|
4369 |
msgid "Languages Spoken"
|
4370 |
msgstr ""
|
4371 |
|
4372 |
+
#: includes/core/class-builtin.php:1034
|
4373 |
msgid "Select languages"
|
4374 |
msgstr ""
|
4375 |
|
4376 |
+
#: includes/core/class-builtin.php:1042 includes/core/class-builtin.php:1045
|
4377 |
+
#: includes/core/class-builtin.php:1322
|
4378 |
msgid "Phone Number"
|
4379 |
msgstr ""
|
4380 |
|
4381 |
+
#: includes/core/class-builtin.php:1054 includes/core/class-builtin.php:1057
|
4382 |
msgid "Mobile Number"
|
4383 |
msgstr ""
|
4384 |
|
4385 |
+
#: includes/core/class-builtin.php:1068
|
4386 |
msgid "Profile Photo"
|
4387 |
msgstr ""
|
4388 |
|
4389 |
+
#: includes/core/class-builtin.php:1071
|
4390 |
msgid "Change your profile photo"
|
4391 |
msgstr ""
|
4392 |
|
4393 |
+
#: includes/core/class-builtin.php:1072
|
4394 |
msgid "Upload your photo here"
|
4395 |
msgstr ""
|
4396 |
|
4397 |
+
#: includes/core/class-builtin.php:1082
|
4398 |
msgid "Cover Photo"
|
4399 |
msgstr ""
|
4400 |
|
4401 |
+
#: includes/core/class-builtin.php:1085
|
4402 |
#: includes/core/um-actions-profile.php:519
|
4403 |
msgid "Change your cover photo"
|
4404 |
msgstr ""
|
4405 |
|
4406 |
+
#: includes/core/class-builtin.php:1086
|
4407 |
msgid "Upload profile cover here"
|
4408 |
msgstr ""
|
4409 |
|
4410 |
+
#: includes/core/class-builtin.php:1100
|
4411 |
msgid "Enter your username or email"
|
4412 |
msgstr ""
|
4413 |
|
4414 |
+
#: includes/core/class-builtin.php:1110 includes/core/class-builtin.php:1113
|
4415 |
msgid "Profile Privacy"
|
4416 |
msgstr ""
|
4417 |
|
4418 |
+
#: includes/core/class-builtin.php:1114
|
4419 |
msgid "Who can see your public profile?"
|
4420 |
msgstr ""
|
4421 |
|
4422 |
+
#: includes/core/class-builtin.php:1126 includes/core/class-builtin.php:1129
|
4423 |
msgid "Hide my profile from directory"
|
4424 |
msgstr ""
|
4425 |
|
4426 |
+
#: includes/core/class-builtin.php:1130
|
4427 |
msgid "Here you can hide yourself from appearing in public directory"
|
4428 |
msgstr ""
|
4429 |
|
4430 |
+
#: includes/core/class-builtin.php:1145
|
4431 |
msgid ""
|
4432 |
"If you confirm, everything related to your profile will be deleted "
|
4433 |
"permanently from the site"
|
4434 |
msgstr ""
|
4435 |
|
4436 |
+
#: includes/core/class-builtin.php:1312
|
4437 |
msgid "Alphabetic value only"
|
4438 |
msgstr ""
|
4439 |
|
4440 |
+
#: includes/core/class-builtin.php:1313
|
4441 |
msgid "Alpha-numeric value"
|
4442 |
msgstr ""
|
4443 |
|
4444 |
+
#: includes/core/class-builtin.php:1314
|
4445 |
msgid "English letters only"
|
4446 |
msgstr ""
|
4447 |
|
4448 |
+
#: includes/core/class-builtin.php:1315
|
4449 |
msgid "Facebook URL"
|
4450 |
msgstr ""
|
4451 |
|
4452 |
+
#: includes/core/class-builtin.php:1316
|
4453 |
msgid "Google+ URL"
|
4454 |
msgstr ""
|
4455 |
|
4456 |
+
#: includes/core/class-builtin.php:1317
|
4457 |
msgid "Instagram URL"
|
4458 |
msgstr ""
|
4459 |
|
4460 |
+
#: includes/core/class-builtin.php:1318
|
4461 |
msgid "LinkedIn URL"
|
4462 |
msgstr ""
|
4463 |
|
4464 |
+
#: includes/core/class-builtin.php:1319
|
4465 |
msgid "VKontakte URL"
|
4466 |
msgstr ""
|
4467 |
|
4468 |
+
#: includes/core/class-builtin.php:1320
|
4469 |
msgid "Lowercase only"
|
4470 |
msgstr ""
|
4471 |
|
4472 |
+
#: includes/core/class-builtin.php:1321
|
4473 |
msgid "Numeric value only"
|
4474 |
msgstr ""
|
4475 |
|
4476 |
+
#: includes/core/class-builtin.php:1324
|
4477 |
msgid "SoundCloud Profile"
|
4478 |
msgstr ""
|
4479 |
|
4480 |
+
#: includes/core/class-builtin.php:1325
|
4481 |
msgid "Twitter URL"
|
4482 |
msgstr ""
|
4483 |
|
4484 |
+
#: includes/core/class-builtin.php:1326
|
4485 |
msgid "Unique E-mail"
|
4486 |
msgstr ""
|
4487 |
|
4488 |
+
#: includes/core/class-builtin.php:1327
|
4489 |
msgid "Unique Metakey value"
|
4490 |
msgstr ""
|
4491 |
|
4492 |
+
#: includes/core/class-builtin.php:1328
|
4493 |
msgid "Unique Username"
|
4494 |
msgstr ""
|
4495 |
|
4496 |
+
#: includes/core/class-builtin.php:1329
|
4497 |
msgid "Unique Username/E-mail"
|
4498 |
msgstr ""
|
4499 |
|
4500 |
+
#: includes/core/class-builtin.php:1331
|
4501 |
msgid "YouTube Profile"
|
4502 |
msgstr ""
|
4503 |
|
4504 |
+
#: includes/core/class-builtin.php:1332
|
4505 |
msgid "Custom Validation"
|
4506 |
msgstr ""
|
4507 |
|
4508 |
+
#: includes/core/class-builtin.php:1371
|
4509 |
msgid "Afar"
|
4510 |
msgstr ""
|
4511 |
|
4512 |
+
#: includes/core/class-builtin.php:1372
|
4513 |
msgid "Abkhazian"
|
4514 |
msgstr ""
|
4515 |
|
4516 |
+
#: includes/core/class-builtin.php:1373
|
4517 |
msgid "Avestan"
|
4518 |
msgstr ""
|
4519 |
|
4520 |
+
#: includes/core/class-builtin.php:1374
|
4521 |
msgid "Afrikaans"
|
4522 |
msgstr ""
|
4523 |
|
4524 |
+
#: includes/core/class-builtin.php:1375
|
4525 |
msgid "Akan"
|
4526 |
msgstr ""
|
4527 |
|
4528 |
+
#: includes/core/class-builtin.php:1376
|
4529 |
msgid "Amharic"
|
4530 |
msgstr ""
|
4531 |
|
4532 |
+
#: includes/core/class-builtin.php:1377
|
4533 |
msgid "Aragonese"
|
4534 |
msgstr ""
|
4535 |
|
4536 |
+
#: includes/core/class-builtin.php:1378
|
4537 |
msgid "Arabic"
|
4538 |
msgstr ""
|
4539 |
|
4540 |
+
#: includes/core/class-builtin.php:1379
|
4541 |
msgid "Assamese"
|
4542 |
msgstr ""
|
4543 |
|
4544 |
+
#: includes/core/class-builtin.php:1380
|
4545 |
msgid "Avaric"
|
4546 |
msgstr ""
|
4547 |
|
4548 |
+
#: includes/core/class-builtin.php:1381
|
4549 |
msgid "Aymara"
|
4550 |
msgstr ""
|
4551 |
|
4552 |
+
#: includes/core/class-builtin.php:1382
|
4553 |
msgid "Azerbaijani"
|
4554 |
msgstr ""
|
4555 |
|
4556 |
+
#: includes/core/class-builtin.php:1383
|
4557 |
msgid "Bashkir"
|
4558 |
msgstr ""
|
4559 |
|
4560 |
+
#: includes/core/class-builtin.php:1384
|
4561 |
msgid "Belarusian"
|
4562 |
msgstr ""
|
4563 |
|
4564 |
+
#: includes/core/class-builtin.php:1385
|
4565 |
msgid "Bulgarian"
|
4566 |
msgstr ""
|
4567 |
|
4568 |
+
#: includes/core/class-builtin.php:1386
|
4569 |
msgid "Bihari"
|
4570 |
msgstr ""
|
4571 |
|
4572 |
+
#: includes/core/class-builtin.php:1387
|
4573 |
msgid "Bislama"
|
4574 |
msgstr ""
|
4575 |
|
4576 |
+
#: includes/core/class-builtin.php:1388
|
4577 |
msgid "Bambara"
|
4578 |
msgstr ""
|
4579 |
|
4580 |
+
#: includes/core/class-builtin.php:1389
|
4581 |
msgid "Bengali"
|
4582 |
msgstr ""
|
4583 |
|
4584 |
+
#: includes/core/class-builtin.php:1390
|
4585 |
msgid "Tibetan"
|
4586 |
msgstr ""
|
4587 |
|
4588 |
+
#: includes/core/class-builtin.php:1391
|
4589 |
msgid "Breton"
|
4590 |
msgstr ""
|
4591 |
|
4592 |
+
#: includes/core/class-builtin.php:1392
|
4593 |
msgid "Bosnian"
|
4594 |
msgstr ""
|
4595 |
|
4596 |
+
#: includes/core/class-builtin.php:1393
|
4597 |
msgid "Catalan"
|
4598 |
msgstr ""
|
4599 |
|
4600 |
+
#: includes/core/class-builtin.php:1394
|
4601 |
msgid "Chechen"
|
4602 |
msgstr ""
|
4603 |
|
4604 |
+
#: includes/core/class-builtin.php:1395
|
4605 |
msgid "Chamorro"
|
4606 |
msgstr ""
|
4607 |
|
4608 |
+
#: includes/core/class-builtin.php:1396
|
4609 |
msgid "Corsican"
|
4610 |
msgstr ""
|
4611 |
|
4612 |
+
#: includes/core/class-builtin.php:1397
|
4613 |
msgid "Cree"
|
4614 |
msgstr ""
|
4615 |
|
4616 |
+
#: includes/core/class-builtin.php:1398
|
4617 |
msgid "Czech"
|
4618 |
msgstr ""
|
4619 |
|
4620 |
+
#: includes/core/class-builtin.php:1399
|
4621 |
msgid "Church Slavic"
|
4622 |
msgstr ""
|
4623 |
|
4624 |
+
#: includes/core/class-builtin.php:1400
|
4625 |
msgid "Chuvash"
|
4626 |
msgstr ""
|
4627 |
|
4628 |
+
#: includes/core/class-builtin.php:1401
|
4629 |
msgid "Welsh"
|
4630 |
msgstr ""
|
4631 |
|
4632 |
+
#: includes/core/class-builtin.php:1402
|
4633 |
msgid "Danish"
|
4634 |
msgstr ""
|
4635 |
|
4636 |
+
#: includes/core/class-builtin.php:1403
|
4637 |
msgid "German"
|
4638 |
msgstr ""
|
4639 |
|
4640 |
+
#: includes/core/class-builtin.php:1404
|
4641 |
msgid "Divehi"
|
4642 |
msgstr ""
|
4643 |
|
4644 |
+
#: includes/core/class-builtin.php:1405
|
4645 |
msgid "Dzongkha"
|
4646 |
msgstr ""
|
4647 |
|
4648 |
+
#: includes/core/class-builtin.php:1406
|
4649 |
msgid "Ewe"
|
4650 |
msgstr ""
|
4651 |
|
4652 |
+
#: includes/core/class-builtin.php:1407
|
4653 |
msgid "Greek"
|
4654 |
msgstr ""
|
4655 |
|
4656 |
+
#: includes/core/class-builtin.php:1408
|
4657 |
msgid "English"
|
4658 |
msgstr ""
|
4659 |
|
4660 |
+
#: includes/core/class-builtin.php:1409
|
4661 |
msgid "Esperanto"
|
4662 |
msgstr ""
|
4663 |
|
4664 |
+
#: includes/core/class-builtin.php:1410
|
4665 |
msgid "Spanish"
|
4666 |
msgstr ""
|
4667 |
|
4668 |
+
#: includes/core/class-builtin.php:1411
|
4669 |
msgid "Estonian"
|
4670 |
msgstr ""
|
4671 |
|
4672 |
+
#: includes/core/class-builtin.php:1412
|
4673 |
msgid "Basque"
|
4674 |
msgstr ""
|
4675 |
|
4676 |
+
#: includes/core/class-builtin.php:1413
|
4677 |
msgid "Persian"
|
4678 |
msgstr ""
|
4679 |
|
4680 |
+
#: includes/core/class-builtin.php:1414
|
4681 |
msgid "Fulah"
|
4682 |
msgstr ""
|
4683 |
|
4684 |
+
#: includes/core/class-builtin.php:1415
|
4685 |
msgid "Finnish"
|
4686 |
msgstr ""
|
4687 |
|
4688 |
+
#: includes/core/class-builtin.php:1416
|
4689 |
msgid "Fijian"
|
4690 |
msgstr ""
|
4691 |
|
4692 |
+
#: includes/core/class-builtin.php:1417
|
4693 |
msgid "Faroese"
|
4694 |
msgstr ""
|
4695 |
|
4696 |
+
#: includes/core/class-builtin.php:1418
|
4697 |
msgid "French"
|
4698 |
msgstr ""
|
4699 |
|
4700 |
+
#: includes/core/class-builtin.php:1419
|
4701 |
msgid "Western Frisian"
|
4702 |
msgstr ""
|
4703 |
|
4704 |
+
#: includes/core/class-builtin.php:1420
|
4705 |
msgid "Irish"
|
4706 |
msgstr ""
|
4707 |
|
4708 |
+
#: includes/core/class-builtin.php:1421
|
4709 |
msgid "Scottish Gaelic"
|
4710 |
msgstr ""
|
4711 |
|
4712 |
+
#: includes/core/class-builtin.php:1422
|
4713 |
msgid "Galician"
|
4714 |
msgstr ""
|
4715 |
|
4716 |
+
#: includes/core/class-builtin.php:1423
|
4717 |
msgid "Guarani"
|
4718 |
msgstr ""
|
4719 |
|
4720 |
+
#: includes/core/class-builtin.php:1424
|
4721 |
msgid "Gujarati"
|
4722 |
msgstr ""
|
4723 |
|
4724 |
+
#: includes/core/class-builtin.php:1425
|
4725 |
msgid "Manx"
|
4726 |
msgstr ""
|
4727 |
|
4728 |
+
#: includes/core/class-builtin.php:1426
|
4729 |
msgid "Hausa"
|
4730 |
msgstr ""
|
4731 |
|
4732 |
+
#: includes/core/class-builtin.php:1427
|
4733 |
msgid "Hebrew"
|
4734 |
msgstr ""
|
4735 |
|
4736 |
+
#: includes/core/class-builtin.php:1428
|
4737 |
msgid "Hindi"
|
4738 |
msgstr ""
|
4739 |
|
4740 |
+
#: includes/core/class-builtin.php:1429
|
4741 |
msgid "Hiri Motu"
|
4742 |
msgstr ""
|
4743 |
|
4744 |
+
#: includes/core/class-builtin.php:1430
|
4745 |
msgid "Croatian"
|
4746 |
msgstr ""
|
4747 |
|
4748 |
+
#: includes/core/class-builtin.php:1431
|
4749 |
msgid "Haitian"
|
4750 |
msgstr ""
|
4751 |
|
4752 |
+
#: includes/core/class-builtin.php:1432
|
4753 |
msgid "Hungarian"
|
4754 |
msgstr ""
|
4755 |
|
4756 |
+
#: includes/core/class-builtin.php:1433
|
4757 |
msgid "Armenian"
|
4758 |
msgstr ""
|
4759 |
|
4760 |
+
#: includes/core/class-builtin.php:1434
|
4761 |
msgid "Herero"
|
4762 |
msgstr ""
|
4763 |
|
4764 |
+
#: includes/core/class-builtin.php:1435
|
4765 |
msgid "Interlingua (International Auxiliary Language Association)"
|
4766 |
msgstr ""
|
4767 |
|
4768 |
+
#: includes/core/class-builtin.php:1436
|
4769 |
msgid "Indonesian"
|
4770 |
msgstr ""
|
4771 |
|
4772 |
+
#: includes/core/class-builtin.php:1437
|
4773 |
msgid "Interlingue"
|
4774 |
msgstr ""
|
4775 |
|
4776 |
+
#: includes/core/class-builtin.php:1438
|
4777 |
msgid "Igbo"
|
4778 |
msgstr ""
|
4779 |
|
4780 |
+
#: includes/core/class-builtin.php:1439
|
4781 |
msgid "Sichuan Yi"
|
4782 |
msgstr ""
|
4783 |
|
4784 |
+
#: includes/core/class-builtin.php:1440
|
4785 |
msgid "Inupiaq"
|
4786 |
msgstr ""
|
4787 |
|
4788 |
+
#: includes/core/class-builtin.php:1441
|
4789 |
msgid "Ido"
|
4790 |
msgstr ""
|
4791 |
|
4792 |
+
#: includes/core/class-builtin.php:1442
|
4793 |
msgid "Icelandic"
|
4794 |
msgstr ""
|
4795 |
|
4796 |
+
#: includes/core/class-builtin.php:1443
|
4797 |
msgid "Italian"
|
4798 |
msgstr ""
|
4799 |
|
4800 |
+
#: includes/core/class-builtin.php:1444
|
4801 |
msgid "Inuktitut"
|
4802 |
msgstr ""
|
4803 |
|
4804 |
+
#: includes/core/class-builtin.php:1445
|
4805 |
msgid "Japanese"
|
4806 |
msgstr ""
|
4807 |
|
4808 |
+
#: includes/core/class-builtin.php:1446
|
4809 |
msgid "Javanese"
|
4810 |
msgstr ""
|
4811 |
|
4812 |
+
#: includes/core/class-builtin.php:1447
|
4813 |
msgid "Georgian"
|
4814 |
msgstr ""
|
4815 |
|
4816 |
+
#: includes/core/class-builtin.php:1448
|
4817 |
msgid "Kongo"
|
4818 |
msgstr ""
|
4819 |
|
4820 |
+
#: includes/core/class-builtin.php:1449
|
4821 |
msgid "Kikuyu"
|
4822 |
msgstr ""
|
4823 |
|
4824 |
+
#: includes/core/class-builtin.php:1450
|
4825 |
msgid "Kwanyama"
|
4826 |
msgstr ""
|
4827 |
|
4828 |
+
#: includes/core/class-builtin.php:1451
|
4829 |
msgid "Kazakh"
|
4830 |
msgstr ""
|
4831 |
|
4832 |
+
#: includes/core/class-builtin.php:1452
|
4833 |
msgid "Kalaallisut"
|
4834 |
msgstr ""
|
4835 |
|
4836 |
+
#: includes/core/class-builtin.php:1453
|
4837 |
msgid "Khmer"
|
4838 |
msgstr ""
|
4839 |
|
4840 |
+
#: includes/core/class-builtin.php:1454
|
4841 |
msgid "Kannada"
|
4842 |
msgstr ""
|
4843 |
|
4844 |
+
#: includes/core/class-builtin.php:1455
|
4845 |
msgid "Korean"
|
4846 |
msgstr ""
|
4847 |
|
4848 |
+
#: includes/core/class-builtin.php:1456
|
4849 |
msgid "Kanuri"
|
4850 |
msgstr ""
|
4851 |
|
4852 |
+
#: includes/core/class-builtin.php:1457
|
4853 |
msgid "Kashmiri"
|
4854 |
msgstr ""
|
4855 |
|
4856 |
+
#: includes/core/class-builtin.php:1458
|
4857 |
msgid "Kurdish"
|
4858 |
msgstr ""
|
4859 |
|
4860 |
+
#: includes/core/class-builtin.php:1459
|
4861 |
msgid "Komi"
|
4862 |
msgstr ""
|
4863 |
|
4864 |
+
#: includes/core/class-builtin.php:1460
|
4865 |
msgid "Cornish"
|
4866 |
msgstr ""
|
4867 |
|
4868 |
+
#: includes/core/class-builtin.php:1461
|
4869 |
msgid "Kirghiz"
|
4870 |
msgstr ""
|
4871 |
|
4872 |
+
#: includes/core/class-builtin.php:1462
|
4873 |
msgid "Latin"
|
4874 |
msgstr ""
|
4875 |
|
4876 |
+
#: includes/core/class-builtin.php:1463
|
4877 |
msgid "Luxembourgish"
|
4878 |
msgstr ""
|
4879 |
|
4880 |
+
#: includes/core/class-builtin.php:1464
|
4881 |
msgid "Ganda"
|
4882 |
msgstr ""
|
4883 |
|
4884 |
+
#: includes/core/class-builtin.php:1465
|
4885 |
msgid "Limburgish"
|
4886 |
msgstr ""
|
4887 |
|
4888 |
+
#: includes/core/class-builtin.php:1466
|
4889 |
msgid "Lingala"
|
4890 |
msgstr ""
|
4891 |
|
4892 |
+
#: includes/core/class-builtin.php:1467
|
4893 |
msgid "Lao"
|
4894 |
msgstr ""
|
4895 |
|
4896 |
+
#: includes/core/class-builtin.php:1468
|
4897 |
msgid "Lithuanian"
|
4898 |
msgstr ""
|
4899 |
|
4900 |
+
#: includes/core/class-builtin.php:1469
|
4901 |
msgid "Luba-Katanga"
|
4902 |
msgstr ""
|
4903 |
|
4904 |
+
#: includes/core/class-builtin.php:1470
|
4905 |
msgid "Latvian"
|
4906 |
msgstr ""
|
4907 |
|
4908 |
+
#: includes/core/class-builtin.php:1471
|
4909 |
msgid "Malagasy"
|
4910 |
msgstr ""
|
4911 |
|
4912 |
+
#: includes/core/class-builtin.php:1472
|
4913 |
msgid "Marshallese"
|
4914 |
msgstr ""
|
4915 |
|
4916 |
+
#: includes/core/class-builtin.php:1473
|
4917 |
msgid "Maori"
|
4918 |
msgstr ""
|
4919 |
|
4920 |
+
#: includes/core/class-builtin.php:1474
|
4921 |
msgid "Macedonian"
|
4922 |
msgstr ""
|
4923 |
|
4924 |
+
#: includes/core/class-builtin.php:1475
|
4925 |
msgid "Malayalam"
|
4926 |
msgstr ""
|
4927 |
|
4928 |
+
#: includes/core/class-builtin.php:1476
|
4929 |
msgid "Mongolian"
|
4930 |
msgstr ""
|
4931 |
|
4932 |
+
#: includes/core/class-builtin.php:1477
|
4933 |
msgid "Marathi"
|
4934 |
msgstr ""
|
4935 |
|
4936 |
+
#: includes/core/class-builtin.php:1478
|
4937 |
msgid "Malay"
|
4938 |
msgstr ""
|
4939 |
|
4940 |
+
#: includes/core/class-builtin.php:1479
|
4941 |
msgid "Maltese"
|
4942 |
msgstr ""
|
4943 |
|
4944 |
+
#: includes/core/class-builtin.php:1480
|
4945 |
msgid "Burmese"
|
4946 |
msgstr ""
|
4947 |
|
4948 |
+
#: includes/core/class-builtin.php:1481 includes/core/class-builtin.php:1712
|
4949 |
msgid "Nauru"
|
4950 |
msgstr ""
|
4951 |
|
4952 |
+
#: includes/core/class-builtin.php:1482
|
4953 |
msgid "Norwegian Bokmal"
|
4954 |
msgstr ""
|
4955 |
|
4956 |
+
#: includes/core/class-builtin.php:1483
|
4957 |
msgid "North Ndebele"
|
4958 |
msgstr ""
|
4959 |
|
4960 |
+
#: includes/core/class-builtin.php:1484
|
4961 |
msgid "Nepali"
|
4962 |
msgstr ""
|
4963 |
|
4964 |
+
#: includes/core/class-builtin.php:1485
|
4965 |
msgid "Ndonga"
|
4966 |
msgstr ""
|
4967 |
|
4968 |
+
#: includes/core/class-builtin.php:1486
|
4969 |
msgid "Dutch"
|
4970 |
msgstr ""
|
4971 |
|
4972 |
+
#: includes/core/class-builtin.php:1487
|
4973 |
msgid "Norwegian Nynorsk"
|
4974 |
msgstr ""
|
4975 |
|
4976 |
+
#: includes/core/class-builtin.php:1488
|
4977 |
msgid "Norwegian"
|
4978 |
msgstr ""
|
4979 |
|
4980 |
+
#: includes/core/class-builtin.php:1489
|
4981 |
msgid "South Ndebele"
|
4982 |
msgstr ""
|
4983 |
|
4984 |
+
#: includes/core/class-builtin.php:1490
|
4985 |
msgid "Navajo"
|
4986 |
msgstr ""
|
4987 |
|
4988 |
+
#: includes/core/class-builtin.php:1491
|
4989 |
msgid "Chichewa"
|
4990 |
msgstr ""
|
4991 |
|
4992 |
+
#: includes/core/class-builtin.php:1492
|
4993 |
msgid "Occitan"
|
4994 |
msgstr ""
|
4995 |
|
4996 |
+
#: includes/core/class-builtin.php:1493
|
4997 |
msgid "Ojibwa"
|
4998 |
msgstr ""
|
4999 |
|
5000 |
+
#: includes/core/class-builtin.php:1494
|
5001 |
msgid "Oromo"
|
5002 |
msgstr ""
|
5003 |
|
5004 |
+
#: includes/core/class-builtin.php:1495
|
5005 |
msgid "Oriya"
|
5006 |
msgstr ""
|
5007 |
|
5008 |
+
#: includes/core/class-builtin.php:1496
|
5009 |
msgid "Ossetian"
|
5010 |
msgstr ""
|
5011 |
|
5012 |
+
#: includes/core/class-builtin.php:1497
|
5013 |
msgid "Panjabi"
|
5014 |
msgstr ""
|
5015 |
|
5016 |
+
#: includes/core/class-builtin.php:1498
|
5017 |
msgid "Pali"
|
5018 |
msgstr ""
|
5019 |
|
5020 |
+
#: includes/core/class-builtin.php:1499
|
5021 |
msgid "Polish"
|
5022 |
msgstr ""
|
5023 |
|
5024 |
+
#: includes/core/class-builtin.php:1500
|
5025 |
msgid "Pashto"
|
5026 |
msgstr ""
|
5027 |
|
5028 |
+
#: includes/core/class-builtin.php:1501
|
5029 |
msgid "Portuguese"
|
5030 |
msgstr ""
|
5031 |
|
5032 |
+
#: includes/core/class-builtin.php:1502
|
5033 |
msgid "Quechua"
|
5034 |
msgstr ""
|
5035 |
|
5036 |
+
#: includes/core/class-builtin.php:1503
|
5037 |
msgid "Raeto-Romance"
|
5038 |
msgstr ""
|
5039 |
|
5040 |
+
#: includes/core/class-builtin.php:1504
|
5041 |
msgid "Kirundi"
|
5042 |
msgstr ""
|
5043 |
|
5044 |
+
#: includes/core/class-builtin.php:1505
|
5045 |
msgid "Romanian"
|
5046 |
msgstr ""
|
5047 |
|
5048 |
+
#: includes/core/class-builtin.php:1506
|
5049 |
msgid "Russian"
|
5050 |
msgstr ""
|
5051 |
|
5052 |
+
#: includes/core/class-builtin.php:1507
|
5053 |
msgid "Kinyarwanda"
|
5054 |
msgstr ""
|
5055 |
|
5056 |
+
#: includes/core/class-builtin.php:1508
|
5057 |
msgid "Sanskrit"
|
5058 |
msgstr ""
|
5059 |
|
5060 |
+
#: includes/core/class-builtin.php:1509
|
5061 |
msgid "Sardinian"
|
5062 |
msgstr ""
|
5063 |
|
5064 |
+
#: includes/core/class-builtin.php:1510
|
5065 |
msgid "Sindhi"
|
5066 |
msgstr ""
|
5067 |
|
5068 |
+
#: includes/core/class-builtin.php:1511
|
5069 |
msgid "Northern Sami"
|
5070 |
msgstr ""
|
5071 |
|
5072 |
+
#: includes/core/class-builtin.php:1512
|
5073 |
msgid "Sango"
|
5074 |
msgstr ""
|
5075 |
|
5076 |
+
#: includes/core/class-builtin.php:1513
|
5077 |
msgid "Sinhala"
|
5078 |
msgstr ""
|
5079 |
|
5080 |
+
#: includes/core/class-builtin.php:1514
|
5081 |
msgid "Slovak"
|
5082 |
msgstr ""
|
5083 |
|
5084 |
+
#: includes/core/class-builtin.php:1515
|
5085 |
msgid "Slovenian"
|
5086 |
msgstr ""
|
5087 |
|
5088 |
+
#: includes/core/class-builtin.php:1516
|
5089 |
msgid "Samoan"
|
5090 |
msgstr ""
|
5091 |
|
5092 |
+
#: includes/core/class-builtin.php:1517
|
5093 |
msgid "Shona"
|
5094 |
msgstr ""
|
5095 |
|
5096 |
+
#: includes/core/class-builtin.php:1518
|
5097 |
msgid "Somali"
|
5098 |
msgstr ""
|
5099 |
|
5100 |
+
#: includes/core/class-builtin.php:1519
|
5101 |
msgid "Albanian"
|
5102 |
msgstr ""
|
5103 |
|
5104 |
+
#: includes/core/class-builtin.php:1520
|
5105 |
msgid "Serbian"
|
5106 |
msgstr ""
|
5107 |
|
5108 |
+
#: includes/core/class-builtin.php:1521
|
5109 |
msgid "Swati"
|
5110 |
msgstr ""
|
5111 |
|
5112 |
+
#: includes/core/class-builtin.php:1522
|
5113 |
msgid "Southern Sotho"
|
5114 |
msgstr ""
|
5115 |
|
5116 |
+
#: includes/core/class-builtin.php:1523
|
5117 |
msgid "Sundanese"
|
5118 |
msgstr ""
|
5119 |
|
5120 |
+
#: includes/core/class-builtin.php:1524
|
5121 |
msgid "Swedish"
|
5122 |
msgstr ""
|
5123 |
|
5124 |
+
#: includes/core/class-builtin.php:1525
|
5125 |
msgid "Swahili"
|
5126 |
msgstr ""
|
5127 |
|
5128 |
+
#: includes/core/class-builtin.php:1526
|
5129 |
msgid "Tamil"
|
5130 |
msgstr ""
|
5131 |
|
5132 |
+
#: includes/core/class-builtin.php:1527
|
5133 |
msgid "Telugu"
|
5134 |
msgstr ""
|
5135 |
|
5136 |
+
#: includes/core/class-builtin.php:1528
|
5137 |
msgid "Tajik"
|
5138 |
msgstr ""
|
5139 |
|
5140 |
+
#: includes/core/class-builtin.php:1529
|
5141 |
msgid "Thai"
|
5142 |
msgstr ""
|
5143 |
|
5144 |
+
#: includes/core/class-builtin.php:1530
|
5145 |
msgid "Tigrinya"
|
5146 |
msgstr ""
|
5147 |
|
5148 |
+
#: includes/core/class-builtin.php:1531
|
5149 |
msgid "Turkmen"
|
5150 |
msgstr ""
|
5151 |
|
5152 |
+
#: includes/core/class-builtin.php:1532
|
5153 |
msgid "Tagalog"
|
5154 |
msgstr ""
|
5155 |
|
5156 |
+
#: includes/core/class-builtin.php:1533
|
5157 |
msgid "Tswana"
|
5158 |
msgstr ""
|
5159 |
|
5160 |
+
#: includes/core/class-builtin.php:1534 includes/core/class-builtin.php:1782
|
5161 |
msgid "Tonga"
|
5162 |
msgstr ""
|
5163 |
|
5164 |
+
#: includes/core/class-builtin.php:1535
|
5165 |
msgid "Turkish"
|
5166 |
msgstr ""
|
5167 |
|
5168 |
+
#: includes/core/class-builtin.php:1536
|
5169 |
msgid "Tsonga"
|
5170 |
msgstr ""
|
5171 |
|
5172 |
+
#: includes/core/class-builtin.php:1537
|
5173 |
msgid "Tatar"
|
5174 |
msgstr ""
|
5175 |
|
5176 |
+
#: includes/core/class-builtin.php:1538
|
5177 |
msgid "Twi"
|
5178 |
msgstr ""
|
5179 |
|
5180 |
+
#: includes/core/class-builtin.php:1539
|
5181 |
msgid "Tahitian"
|
5182 |
msgstr ""
|
5183 |
|
5184 |
+
#: includes/core/class-builtin.php:1540
|
5185 |
msgid "Uighur"
|
5186 |
msgstr ""
|
5187 |
|
5188 |
+
#: includes/core/class-builtin.php:1541
|
5189 |
msgid "Ukrainian"
|
5190 |
msgstr ""
|
5191 |
|
5192 |
+
#: includes/core/class-builtin.php:1542
|
5193 |
msgid "Urdu"
|
5194 |
msgstr ""
|
5195 |
|
5196 |
+
#: includes/core/class-builtin.php:1543
|
5197 |
msgid "Uzbek"
|
5198 |
msgstr ""
|
5199 |
|
5200 |
+
#: includes/core/class-builtin.php:1544
|
5201 |
msgid "Venda"
|
5202 |
msgstr ""
|
5203 |
|
5204 |
+
#: includes/core/class-builtin.php:1545
|
5205 |
msgid "Vietnamese"
|
5206 |
msgstr ""
|
5207 |
|
5208 |
+
#: includes/core/class-builtin.php:1546
|
5209 |
msgid "Volapuk"
|
5210 |
msgstr ""
|
5211 |
|
5212 |
+
#: includes/core/class-builtin.php:1547
|
5213 |
msgid "Walloon"
|
5214 |
msgstr ""
|
5215 |
|
5216 |
+
#: includes/core/class-builtin.php:1548
|
5217 |
msgid "Wolof"
|
5218 |
msgstr ""
|
5219 |
|
5220 |
+
#: includes/core/class-builtin.php:1549
|
5221 |
msgid "Xhosa"
|
5222 |
msgstr ""
|
5223 |
|
5224 |
+
#: includes/core/class-builtin.php:1550
|
5225 |
msgid "Yiddish"
|
5226 |
msgstr ""
|
5227 |
|
5228 |
+
#: includes/core/class-builtin.php:1551
|
5229 |
msgid "Yoruba"
|
5230 |
msgstr ""
|
5231 |
|
5232 |
+
#: includes/core/class-builtin.php:1552
|
5233 |
msgid "Zhuang"
|
5234 |
msgstr ""
|
5235 |
|
5236 |
+
#: includes/core/class-builtin.php:1553
|
5237 |
msgid "Chinese"
|
5238 |
msgstr ""
|
5239 |
|
5240 |
+
#: includes/core/class-builtin.php:1554
|
5241 |
msgid "Zulu"
|
5242 |
msgstr ""
|
5243 |
|
5244 |
+
#: includes/core/class-builtin.php:1560
|
5245 |
msgid "Afghanistan"
|
5246 |
msgstr ""
|
5247 |
|
5248 |
+
#: includes/core/class-builtin.php:1561
|
5249 |
msgid "Åland Islands"
|
5250 |
msgstr ""
|
5251 |
|
5252 |
+
#: includes/core/class-builtin.php:1562
|
5253 |
msgid "Albania"
|
5254 |
msgstr ""
|
5255 |
|
5256 |
+
#: includes/core/class-builtin.php:1563
|
5257 |
msgid "Algeria"
|
5258 |
msgstr ""
|
5259 |
|
5260 |
+
#: includes/core/class-builtin.php:1564
|
5261 |
msgid "American Samoa"
|
5262 |
msgstr ""
|
5263 |
|
5264 |
+
#: includes/core/class-builtin.php:1565
|
5265 |
msgid "Andorra"
|
5266 |
msgstr ""
|
5267 |
|
5268 |
+
#: includes/core/class-builtin.php:1566
|
5269 |
msgid "Angola"
|
5270 |
msgstr ""
|
5271 |
|
5272 |
+
#: includes/core/class-builtin.php:1567
|
5273 |
msgid "Anguilla"
|
5274 |
msgstr ""
|
5275 |
|
5276 |
+
#: includes/core/class-builtin.php:1568
|
5277 |
msgid "Antarctica"
|
5278 |
msgstr ""
|
5279 |
|
5280 |
+
#: includes/core/class-builtin.php:1569
|
5281 |
msgid "Antigua and Barbuda"
|
5282 |
msgstr ""
|
5283 |
|
5284 |
+
#: includes/core/class-builtin.php:1570
|
5285 |
msgid "Argentina"
|
5286 |
msgstr ""
|
5287 |
|
5288 |
+
#: includes/core/class-builtin.php:1571
|
5289 |
msgid "Armenia"
|
5290 |
msgstr ""
|
5291 |
|
5292 |
+
#: includes/core/class-builtin.php:1572
|
5293 |
msgid "Aruba"
|
5294 |
msgstr ""
|
5295 |
|
5296 |
+
#: includes/core/class-builtin.php:1573
|
5297 |
msgid "Australia"
|
5298 |
msgstr ""
|
5299 |
|
5300 |
+
#: includes/core/class-builtin.php:1574
|
5301 |
msgid "Austria"
|
5302 |
msgstr ""
|
5303 |
|
5304 |
+
#: includes/core/class-builtin.php:1575
|
5305 |
msgid "Azerbaijan"
|
5306 |
msgstr ""
|
5307 |
|
5308 |
+
#: includes/core/class-builtin.php:1576
|
5309 |
msgid "Bahamas"
|
5310 |
msgstr ""
|
5311 |
|
5312 |
+
#: includes/core/class-builtin.php:1577
|
5313 |
msgid "Bahrain"
|
5314 |
msgstr ""
|
5315 |
|
5316 |
+
#: includes/core/class-builtin.php:1578
|
5317 |
msgid "Bangladesh"
|
5318 |
msgstr ""
|
5319 |
|
5320 |
+
#: includes/core/class-builtin.php:1579
|
5321 |
msgid "Barbados"
|
5322 |
msgstr ""
|
5323 |
|
5324 |
+
#: includes/core/class-builtin.php:1580
|
5325 |
msgid "Belarus"
|
5326 |
msgstr ""
|
5327 |
|
5328 |
+
#: includes/core/class-builtin.php:1581
|
5329 |
msgid "Belgium"
|
5330 |
msgstr ""
|
5331 |
|
5332 |
+
#: includes/core/class-builtin.php:1582
|
5333 |
msgid "Belize"
|
5334 |
msgstr ""
|
5335 |
|
5336 |
+
#: includes/core/class-builtin.php:1583
|
5337 |
msgid "Benin"
|
5338 |
msgstr ""
|
5339 |
|
5340 |
+
#: includes/core/class-builtin.php:1584
|
5341 |
msgid "Bermuda"
|
5342 |
msgstr ""
|
5343 |
|
5344 |
+
#: includes/core/class-builtin.php:1585
|
5345 |
msgid "Bhutan"
|
5346 |
msgstr ""
|
5347 |
|
5348 |
+
#: includes/core/class-builtin.php:1586
|
5349 |
msgid "Bolivia, Plurinational State of"
|
5350 |
msgstr ""
|
5351 |
|
5352 |
+
#: includes/core/class-builtin.php:1587
|
5353 |
msgid "Bosnia and Herzegovina"
|
5354 |
msgstr ""
|
5355 |
|
5356 |
+
#: includes/core/class-builtin.php:1588
|
5357 |
msgid "Botswana"
|
5358 |
msgstr ""
|
5359 |
|
5360 |
+
#: includes/core/class-builtin.php:1589
|
5361 |
msgid "Bouvet Island"
|
5362 |
msgstr ""
|
5363 |
|
5364 |
+
#: includes/core/class-builtin.php:1590
|
5365 |
msgid "Brazil"
|
5366 |
msgstr ""
|
5367 |
|
5368 |
+
#: includes/core/class-builtin.php:1591
|
5369 |
msgid "British Indian Ocean Territory"
|
5370 |
msgstr ""
|
5371 |
|
5372 |
+
#: includes/core/class-builtin.php:1592
|
5373 |
msgid "Brunei Darussalam"
|
5374 |
msgstr ""
|
5375 |
|
5376 |
+
#: includes/core/class-builtin.php:1593
|
5377 |
msgid "Bulgaria"
|
5378 |
msgstr ""
|
5379 |
|
5380 |
+
#: includes/core/class-builtin.php:1594
|
5381 |
msgid "Burkina Faso"
|
5382 |
msgstr ""
|
5383 |
|
5384 |
+
#: includes/core/class-builtin.php:1595
|
5385 |
msgid "Burundi"
|
5386 |
msgstr ""
|
5387 |
|
5388 |
+
#: includes/core/class-builtin.php:1596
|
5389 |
msgid "Cambodia"
|
5390 |
msgstr ""
|
5391 |
|
5392 |
+
#: includes/core/class-builtin.php:1597
|
5393 |
msgid "Cameroon"
|
5394 |
msgstr ""
|
5395 |
|
5396 |
+
#: includes/core/class-builtin.php:1598
|
5397 |
msgid "Canada"
|
5398 |
msgstr ""
|
5399 |
|
5400 |
+
#: includes/core/class-builtin.php:1599
|
5401 |
msgid "Cape Verde"
|
5402 |
msgstr ""
|
5403 |
|
5404 |
+
#: includes/core/class-builtin.php:1600
|
5405 |
msgid "Cayman Islands"
|
5406 |
msgstr ""
|
5407 |
|
5408 |
+
#: includes/core/class-builtin.php:1601
|
5409 |
msgid "Central African Republic"
|
5410 |
msgstr ""
|
5411 |
|
5412 |
+
#: includes/core/class-builtin.php:1602
|
5413 |
msgid "Chad"
|
5414 |
msgstr ""
|
5415 |
|
5416 |
+
#: includes/core/class-builtin.php:1603
|
5417 |
msgid "Chile"
|
5418 |
msgstr ""
|
5419 |
|
5420 |
+
#: includes/core/class-builtin.php:1604
|
5421 |
msgid "China"
|
5422 |
msgstr ""
|
5423 |
|
5424 |
+
#: includes/core/class-builtin.php:1605
|
5425 |
msgid "Christmas Island"
|
5426 |
msgstr ""
|
5427 |
|
5428 |
+
#: includes/core/class-builtin.php:1606
|
5429 |
msgid "Cocos (Keeling) Islands"
|
5430 |
msgstr ""
|
5431 |
|
5432 |
+
#: includes/core/class-builtin.php:1607
|
5433 |
msgid "Colombia"
|
5434 |
msgstr ""
|
5435 |
|
5436 |
+
#: includes/core/class-builtin.php:1608
|
5437 |
msgid "Comoros"
|
5438 |
msgstr ""
|
5439 |
|
5440 |
+
#: includes/core/class-builtin.php:1609
|
5441 |
msgid "Congo"
|
5442 |
msgstr ""
|
5443 |
|
5444 |
+
#: includes/core/class-builtin.php:1610
|
5445 |
msgid "Congo, the Democratic Republic of the"
|
5446 |
msgstr ""
|
5447 |
|
5448 |
+
#: includes/core/class-builtin.php:1611
|
5449 |
msgid "Cook Islands"
|
5450 |
msgstr ""
|
5451 |
|
5452 |
+
#: includes/core/class-builtin.php:1612
|
5453 |
msgid "Costa Rica"
|
5454 |
msgstr ""
|
5455 |
|
5456 |
+
#: includes/core/class-builtin.php:1613
|
5457 |
msgid "Côte d'Ivoire"
|
5458 |
msgstr ""
|
5459 |
|
5460 |
+
#: includes/core/class-builtin.php:1614
|
5461 |
msgid "Croatia"
|
5462 |
msgstr ""
|
5463 |
|
5464 |
+
#: includes/core/class-builtin.php:1615
|
5465 |
msgid "Cuba"
|
5466 |
msgstr ""
|
5467 |
|
5468 |
+
#: includes/core/class-builtin.php:1616
|
5469 |
msgid "Cyprus"
|
5470 |
msgstr ""
|
5471 |
|
5472 |
+
#: includes/core/class-builtin.php:1617
|
5473 |
msgid "Czech Republic"
|
5474 |
msgstr ""
|
5475 |
|
5476 |
+
#: includes/core/class-builtin.php:1618
|
5477 |
msgid "Denmark"
|
5478 |
msgstr ""
|
5479 |
|
5480 |
+
#: includes/core/class-builtin.php:1619
|
5481 |
msgid "Djibouti"
|
5482 |
msgstr ""
|
5483 |
|
5484 |
+
#: includes/core/class-builtin.php:1620
|
5485 |
msgid "Dominica"
|
5486 |
msgstr ""
|
5487 |
|
5488 |
+
#: includes/core/class-builtin.php:1621
|
5489 |
msgid "Dominican Republic"
|
5490 |
msgstr ""
|
5491 |
|
5492 |
+
#: includes/core/class-builtin.php:1622
|
5493 |
msgid "Ecuador"
|
5494 |
msgstr ""
|
5495 |
|
5496 |
+
#: includes/core/class-builtin.php:1623
|
5497 |
msgid "Egypt"
|
5498 |
msgstr ""
|
5499 |
|
5500 |
+
#: includes/core/class-builtin.php:1624
|
5501 |
msgid "El Salvador"
|
5502 |
msgstr ""
|
5503 |
|
5504 |
+
#: includes/core/class-builtin.php:1625
|
5505 |
msgid "Equatorial Guinea"
|
5506 |
msgstr ""
|
5507 |
|
5508 |
+
#: includes/core/class-builtin.php:1626
|
5509 |
msgid "Eritrea"
|
5510 |
msgstr ""
|
5511 |
|
5512 |
+
#: includes/core/class-builtin.php:1627
|
5513 |
msgid "Estonia"
|
5514 |
msgstr ""
|
5515 |
|
5516 |
+
#: includes/core/class-builtin.php:1628
|
5517 |
msgid "Ethiopia"
|
5518 |
msgstr ""
|
5519 |
|
5520 |
+
#: includes/core/class-builtin.php:1629
|
5521 |
msgid "Falkland Islands (Malvinas)"
|
5522 |
msgstr ""
|
5523 |
|
5524 |
+
#: includes/core/class-builtin.php:1630
|
5525 |
msgid "Faroe Islands"
|
5526 |
msgstr ""
|
5527 |
|
5528 |
+
#: includes/core/class-builtin.php:1631
|
5529 |
msgid "Fiji"
|
5530 |
msgstr ""
|
5531 |
|
5532 |
+
#: includes/core/class-builtin.php:1632
|
5533 |
msgid "Finland"
|
5534 |
msgstr ""
|
5535 |
|
5536 |
+
#: includes/core/class-builtin.php:1633
|
5537 |
msgid "France"
|
5538 |
msgstr ""
|
5539 |
|
5540 |
+
#: includes/core/class-builtin.php:1634
|
5541 |
msgid "French Guiana"
|
5542 |
msgstr ""
|
5543 |
|
5544 |
+
#: includes/core/class-builtin.php:1635
|
5545 |
msgid "French Polynesia"
|
5546 |
msgstr ""
|
5547 |
|
5548 |
+
#: includes/core/class-builtin.php:1636
|
5549 |
msgid "French Southern Territories"
|
5550 |
msgstr ""
|
5551 |
|
5552 |
+
#: includes/core/class-builtin.php:1637
|
5553 |
msgid "Gabon"
|
5554 |
msgstr ""
|
5555 |
|
5556 |
+
#: includes/core/class-builtin.php:1638
|
5557 |
msgid "Gambia"
|
5558 |
msgstr ""
|
5559 |
|
5560 |
+
#: includes/core/class-builtin.php:1639
|
5561 |
msgid "Georgia"
|
5562 |
msgstr ""
|
5563 |
|
5564 |
+
#: includes/core/class-builtin.php:1640
|
5565 |
msgid "Germany"
|
5566 |
msgstr ""
|
5567 |
|
5568 |
+
#: includes/core/class-builtin.php:1641
|
5569 |
msgid "Ghana"
|
5570 |
msgstr ""
|
5571 |
|
5572 |
+
#: includes/core/class-builtin.php:1642
|
5573 |
msgid "Gibraltar"
|
5574 |
msgstr ""
|
5575 |
|
5576 |
+
#: includes/core/class-builtin.php:1643
|
5577 |
msgid "Greece"
|
5578 |
msgstr ""
|
5579 |
|
5580 |
+
#: includes/core/class-builtin.php:1644
|
5581 |
msgid "Greenland"
|
5582 |
msgstr ""
|
5583 |
|
5584 |
+
#: includes/core/class-builtin.php:1645
|
5585 |
msgid "Grenada"
|
5586 |
msgstr ""
|
5587 |
|
5588 |
+
#: includes/core/class-builtin.php:1646
|
5589 |
msgid "Guadeloupe"
|
5590 |
msgstr ""
|
5591 |
|
5592 |
+
#: includes/core/class-builtin.php:1647
|
5593 |
msgid "Guam"
|
5594 |
msgstr ""
|
5595 |
|
5596 |
+
#: includes/core/class-builtin.php:1648
|
5597 |
msgid "Guatemala"
|
5598 |
msgstr ""
|
5599 |
|
5600 |
+
#: includes/core/class-builtin.php:1649
|
5601 |
msgid "Guernsey"
|
5602 |
msgstr ""
|
5603 |
|
5604 |
+
#: includes/core/class-builtin.php:1650
|
5605 |
msgid "Guinea"
|
5606 |
msgstr ""
|
5607 |
|
5608 |
+
#: includes/core/class-builtin.php:1651
|
5609 |
msgid "Guinea-Bissau"
|
5610 |
msgstr ""
|
5611 |
|
5612 |
+
#: includes/core/class-builtin.php:1652
|
5613 |
msgid "Guyana"
|
5614 |
msgstr ""
|
5615 |
|
5616 |
+
#: includes/core/class-builtin.php:1653
|
5617 |
msgid "Haiti"
|
5618 |
msgstr ""
|
5619 |
|
5620 |
+
#: includes/core/class-builtin.php:1654
|
5621 |
msgid "Heard Island and McDonald Islands"
|
5622 |
msgstr ""
|
5623 |
|
5624 |
+
#: includes/core/class-builtin.php:1655
|
5625 |
msgid "Holy See (Vatican City State)"
|
5626 |
msgstr ""
|
5627 |
|
5628 |
+
#: includes/core/class-builtin.php:1656
|
5629 |
msgid "Honduras"
|
5630 |
msgstr ""
|
5631 |
|
5632 |
+
#: includes/core/class-builtin.php:1657
|
5633 |
msgid "Hong Kong"
|
5634 |
msgstr ""
|
5635 |
|
5636 |
+
#: includes/core/class-builtin.php:1658
|
5637 |
msgid "Hungary"
|
5638 |
msgstr ""
|
5639 |
|
5640 |
+
#: includes/core/class-builtin.php:1659
|
5641 |
msgid "Iceland"
|
5642 |
msgstr ""
|
5643 |
|
5644 |
+
#: includes/core/class-builtin.php:1660
|
5645 |
msgid "India"
|
5646 |
msgstr ""
|
5647 |
|
5648 |
+
#: includes/core/class-builtin.php:1661
|
5649 |
msgid "Indonesia"
|
5650 |
msgstr ""
|
5651 |
|
5652 |
+
#: includes/core/class-builtin.php:1662
|
5653 |
msgid "Iran, Islamic Republic of"
|
5654 |
msgstr ""
|
5655 |
|
5656 |
+
#: includes/core/class-builtin.php:1663
|
5657 |
msgid "Iraq"
|
5658 |
msgstr ""
|
5659 |
|
5660 |
+
#: includes/core/class-builtin.php:1664
|
5661 |
msgid "Ireland"
|
5662 |
msgstr ""
|
5663 |
|
5664 |
+
#: includes/core/class-builtin.php:1665
|
5665 |
msgid "Isle of Man"
|
5666 |
msgstr ""
|
5667 |
|
5668 |
+
#: includes/core/class-builtin.php:1666
|
5669 |
msgid "Israel"
|
5670 |
msgstr ""
|
5671 |
|
5672 |
+
#: includes/core/class-builtin.php:1667
|
5673 |
msgid "Italy"
|
5674 |
msgstr ""
|
5675 |
|
5676 |
+
#: includes/core/class-builtin.php:1668
|
5677 |
msgid "Jamaica"
|
5678 |
msgstr ""
|
5679 |
|
5680 |
+
#: includes/core/class-builtin.php:1669
|
5681 |
msgid "Japan"
|
5682 |
msgstr ""
|
5683 |
|
5684 |
+
#: includes/core/class-builtin.php:1670
|
5685 |
msgid "Jersey"
|
5686 |
msgstr ""
|
5687 |
|
5688 |
+
#: includes/core/class-builtin.php:1671
|
5689 |
msgid "Jordan"
|
5690 |
msgstr ""
|
5691 |
|
5692 |
+
#: includes/core/class-builtin.php:1672
|
5693 |
msgid "Kazakhstan"
|
5694 |
msgstr ""
|
5695 |
|
5696 |
+
#: includes/core/class-builtin.php:1673
|
5697 |
msgid "Kenya"
|
5698 |
msgstr ""
|
5699 |
|
5700 |
+
#: includes/core/class-builtin.php:1674
|
5701 |
msgid "Kiribati"
|
5702 |
msgstr ""
|
5703 |
|
5704 |
+
#: includes/core/class-builtin.php:1675
|
5705 |
msgid "Korea, Democratic People's Republic of"
|
5706 |
msgstr ""
|
5707 |
|
5708 |
+
#: includes/core/class-builtin.php:1676
|
5709 |
msgid "Korea, Republic of"
|
5710 |
msgstr ""
|
5711 |
|
5712 |
+
#: includes/core/class-builtin.php:1677
|
5713 |
msgid "Kuwait"
|
5714 |
msgstr ""
|
5715 |
|
5716 |
+
#: includes/core/class-builtin.php:1678
|
5717 |
msgid "Kyrgyzstan"
|
5718 |
msgstr ""
|
5719 |
|
5720 |
+
#: includes/core/class-builtin.php:1679
|
5721 |
msgid "Lao People's Democratic Republic"
|
5722 |
msgstr ""
|
5723 |
|
5724 |
+
#: includes/core/class-builtin.php:1680
|
5725 |
msgid "Latvia"
|
5726 |
msgstr ""
|
5727 |
|
5728 |
+
#: includes/core/class-builtin.php:1681
|
5729 |
msgid "Lebanon"
|
5730 |
msgstr ""
|
5731 |
|
5732 |
+
#: includes/core/class-builtin.php:1682
|
5733 |
msgid "Lesotho"
|
5734 |
msgstr ""
|
5735 |
|
5736 |
+
#: includes/core/class-builtin.php:1683
|
5737 |
msgid "Liberia"
|
5738 |
msgstr ""
|
5739 |
|
5740 |
+
#: includes/core/class-builtin.php:1684
|
5741 |
msgid "Libyan Arab Jamahiriya"
|
5742 |
msgstr ""
|
5743 |
|
5744 |
+
#: includes/core/class-builtin.php:1685
|
5745 |
msgid "Liechtenstein"
|
5746 |
msgstr ""
|
5747 |
|
5748 |
+
#: includes/core/class-builtin.php:1686
|
5749 |
msgid "Lithuania"
|
5750 |
msgstr ""
|
5751 |
|
5752 |
+
#: includes/core/class-builtin.php:1687
|
5753 |
msgid "Luxembourg"
|
5754 |
msgstr ""
|
5755 |
|
5756 |
+
#: includes/core/class-builtin.php:1688
|
5757 |
msgid "Macao"
|
5758 |
msgstr ""
|
5759 |
|
5760 |
+
#: includes/core/class-builtin.php:1689
|
5761 |
msgid "Macedonia, the former Yugoslav Republic of"
|
5762 |
msgstr ""
|
5763 |
|
5764 |
+
#: includes/core/class-builtin.php:1690
|
5765 |
msgid "Madagascar"
|
5766 |
msgstr ""
|
5767 |
|
5768 |
+
#: includes/core/class-builtin.php:1691
|
5769 |
msgid "Malawi"
|
5770 |
msgstr ""
|
5771 |
|
5772 |
+
#: includes/core/class-builtin.php:1692
|
5773 |
msgid "Malaysia"
|
5774 |
msgstr ""
|
5775 |
|
5776 |
+
#: includes/core/class-builtin.php:1693
|
5777 |
msgid "Maldives"
|
5778 |
msgstr ""
|
5779 |
|
5780 |
+
#: includes/core/class-builtin.php:1694
|
5781 |
msgid "Mali"
|
5782 |
msgstr ""
|
5783 |
|
5784 |
+
#: includes/core/class-builtin.php:1695
|
5785 |
msgid "Malta"
|
5786 |
msgstr ""
|
5787 |
|
5788 |
+
#: includes/core/class-builtin.php:1696
|
5789 |
msgid "Marshall Islands"
|
5790 |
msgstr ""
|
5791 |
|
5792 |
+
#: includes/core/class-builtin.php:1697
|
5793 |
msgid "Martinique"
|
5794 |
msgstr ""
|
5795 |
|
5796 |
+
#: includes/core/class-builtin.php:1698
|
5797 |
msgid "Mauritania"
|
5798 |
msgstr ""
|
5799 |
|
5800 |
+
#: includes/core/class-builtin.php:1699
|
5801 |
msgid "Mauritius"
|
5802 |
msgstr ""
|
5803 |
|
5804 |
+
#: includes/core/class-builtin.php:1700
|
5805 |
msgid "Mayotte"
|
5806 |
msgstr ""
|
5807 |
|
5808 |
+
#: includes/core/class-builtin.php:1701
|
5809 |
msgid "Mexico"
|
5810 |
msgstr ""
|
5811 |
|
5812 |
+
#: includes/core/class-builtin.php:1702
|
5813 |
msgid "Micronesia, Federated States of"
|
5814 |
msgstr ""
|
5815 |
|
5816 |
+
#: includes/core/class-builtin.php:1703
|
5817 |
msgid "Moldova, Republic of"
|
5818 |
msgstr ""
|
5819 |
|
5820 |
+
#: includes/core/class-builtin.php:1704
|
5821 |
msgid "Monaco"
|
5822 |
msgstr ""
|
5823 |
|
5824 |
+
#: includes/core/class-builtin.php:1705
|
5825 |
msgid "Mongolia"
|
5826 |
msgstr ""
|
5827 |
|
5828 |
+
#: includes/core/class-builtin.php:1706
|
5829 |
msgid "Montenegro"
|
5830 |
msgstr ""
|
5831 |
|
5832 |
+
#: includes/core/class-builtin.php:1707
|
5833 |
msgid "Montserrat"
|
5834 |
msgstr ""
|
5835 |
|
5836 |
+
#: includes/core/class-builtin.php:1708
|
5837 |
msgid "Morocco"
|
5838 |
msgstr ""
|
5839 |
|
5840 |
+
#: includes/core/class-builtin.php:1709
|
5841 |
msgid "Mozambique"
|
5842 |
msgstr ""
|
5843 |
|
5844 |
+
#: includes/core/class-builtin.php:1710
|
5845 |
msgid "Myanmar"
|
5846 |
msgstr ""
|
5847 |
|
5848 |
+
#: includes/core/class-builtin.php:1711
|
5849 |
msgid "Namibia"
|
5850 |
msgstr ""
|
5851 |
|
5852 |
+
#: includes/core/class-builtin.php:1713
|
5853 |
msgid "Nepal"
|
5854 |
msgstr ""
|
5855 |
|
5856 |
+
#: includes/core/class-builtin.php:1714
|
5857 |
msgid "Netherlands"
|
5858 |
msgstr ""
|
5859 |
|
5860 |
+
#: includes/core/class-builtin.php:1715
|
5861 |
msgid "Netherlands Antilles"
|
5862 |
msgstr ""
|
5863 |
|
5864 |
+
#: includes/core/class-builtin.php:1716
|
5865 |
msgid "New Caledonia"
|
5866 |
msgstr ""
|
5867 |
|
5868 |
+
#: includes/core/class-builtin.php:1717
|
5869 |
msgid "New Zealand"
|
5870 |
msgstr ""
|
5871 |
|
5872 |
+
#: includes/core/class-builtin.php:1718
|
5873 |
msgid "Nicaragua"
|
5874 |
msgstr ""
|
5875 |
|
5876 |
+
#: includes/core/class-builtin.php:1719
|
5877 |
msgid "Niger"
|
5878 |
msgstr ""
|
5879 |
|
5880 |
+
#: includes/core/class-builtin.php:1720
|
5881 |
msgid "Nigeria"
|
5882 |
msgstr ""
|
5883 |
|
5884 |
+
#: includes/core/class-builtin.php:1721
|
5885 |
msgid "Niue"
|
5886 |
msgstr ""
|
5887 |
|
5888 |
+
#: includes/core/class-builtin.php:1722
|
5889 |
msgid "Norfolk Island"
|
5890 |
msgstr ""
|
5891 |
|
5892 |
+
#: includes/core/class-builtin.php:1723
|
5893 |
msgid "Northern Mariana Islands"
|
5894 |
msgstr ""
|
5895 |
|
5896 |
+
#: includes/core/class-builtin.php:1724
|
5897 |
msgid "Norway"
|
5898 |
msgstr ""
|
5899 |
|
5900 |
+
#: includes/core/class-builtin.php:1725
|
5901 |
msgid "Oman"
|
5902 |
msgstr ""
|
5903 |
|
5904 |
+
#: includes/core/class-builtin.php:1726
|
5905 |
msgid "Pakistan"
|
5906 |
msgstr ""
|
5907 |
|
5908 |
+
#: includes/core/class-builtin.php:1727
|
5909 |
msgid "Palau"
|
5910 |
msgstr ""
|
5911 |
|
5912 |
+
#: includes/core/class-builtin.php:1728
|
5913 |
msgid "Palestine"
|
5914 |
msgstr ""
|
5915 |
|
5916 |
+
#: includes/core/class-builtin.php:1729
|
5917 |
msgid "Panama"
|
5918 |
msgstr ""
|
5919 |
|
5920 |
+
#: includes/core/class-builtin.php:1730
|
5921 |
msgid "Papua New Guinea"
|
5922 |
msgstr ""
|
5923 |
|
5924 |
+
#: includes/core/class-builtin.php:1731
|
5925 |
msgid "Paraguay"
|
5926 |
msgstr ""
|
5927 |
|
5928 |
+
#: includes/core/class-builtin.php:1732
|
5929 |
msgid "Peru"
|
5930 |
msgstr ""
|
5931 |
|
5932 |
+
#: includes/core/class-builtin.php:1733
|
5933 |
msgid "Philippines"
|
5934 |
msgstr ""
|
5935 |
|
5936 |
+
#: includes/core/class-builtin.php:1734
|
5937 |
msgid "Pitcairn"
|
5938 |
msgstr ""
|
5939 |
|
5940 |
+
#: includes/core/class-builtin.php:1735
|
5941 |
msgid "Poland"
|
5942 |
msgstr ""
|
5943 |
|
5944 |
+
#: includes/core/class-builtin.php:1736
|
5945 |
msgid "Portugal"
|
5946 |
msgstr ""
|
5947 |
|
5948 |
+
#: includes/core/class-builtin.php:1737
|
5949 |
msgid "Puerto Rico"
|
5950 |
msgstr ""
|
5951 |
|
5952 |
+
#: includes/core/class-builtin.php:1738
|
5953 |
msgid "Qatar"
|
5954 |
msgstr ""
|
5955 |
|
5956 |
+
#: includes/core/class-builtin.php:1739
|
5957 |
msgid "Réunion"
|
5958 |
msgstr ""
|
5959 |
|
5960 |
+
#: includes/core/class-builtin.php:1740
|
5961 |
msgid "Romania"
|
5962 |
msgstr ""
|
5963 |
|
5964 |
+
#: includes/core/class-builtin.php:1741
|
5965 |
msgid "Russian Federation"
|
5966 |
msgstr ""
|
5967 |
|
5968 |
+
#: includes/core/class-builtin.php:1742
|
5969 |
msgid "Rwanda"
|
5970 |
msgstr ""
|
5971 |
|
5972 |
+
#: includes/core/class-builtin.php:1743
|
5973 |
msgid "Saint Barthélemy"
|
5974 |
msgstr ""
|
5975 |
|
5976 |
+
#: includes/core/class-builtin.php:1744
|
5977 |
msgid "Saint Helena"
|
5978 |
msgstr ""
|
5979 |
|
5980 |
+
#: includes/core/class-builtin.php:1745
|
5981 |
msgid "Saint Kitts and Nevis"
|
5982 |
msgstr ""
|
5983 |
|
5984 |
+
#: includes/core/class-builtin.php:1746
|
5985 |
msgid "Saint Lucia"
|
5986 |
msgstr ""
|
5987 |
|
5988 |
+
#: includes/core/class-builtin.php:1747
|
5989 |
msgid "Saint Martin (French part)"
|
5990 |
msgstr ""
|
5991 |
|
5992 |
+
#: includes/core/class-builtin.php:1748
|
5993 |
msgid "Saint Pierre and Miquelon"
|
5994 |
msgstr ""
|
5995 |
|
5996 |
+
#: includes/core/class-builtin.php:1749
|
5997 |
msgid "Saint Vincent and the Grenadines"
|
5998 |
msgstr ""
|
5999 |
|
6000 |
+
#: includes/core/class-builtin.php:1750
|
6001 |
msgid "Samoa"
|
6002 |
msgstr ""
|
6003 |
|
6004 |
+
#: includes/core/class-builtin.php:1751
|
6005 |
msgid "San Marino"
|
6006 |
msgstr ""
|
6007 |
|
6008 |
+
#: includes/core/class-builtin.php:1752
|
6009 |
msgid "Sao Tome and Principe"
|
6010 |
msgstr ""
|
6011 |
|
6012 |
+
#: includes/core/class-builtin.php:1753
|
6013 |
msgid "Saudi Arabia"
|
6014 |
msgstr ""
|
6015 |
|
6016 |
+
#: includes/core/class-builtin.php:1754
|
6017 |
msgid "Senegal"
|
6018 |
msgstr ""
|
6019 |
|
6020 |
+
#: includes/core/class-builtin.php:1755
|
6021 |
msgid "Serbia"
|
6022 |
msgstr ""
|
6023 |
|
6024 |
+
#: includes/core/class-builtin.php:1756
|
6025 |
msgid "Seychelles"
|
6026 |
msgstr ""
|
6027 |
|
6028 |
+
#: includes/core/class-builtin.php:1757
|
6029 |
msgid "Sierra Leone"
|
6030 |
msgstr ""
|
6031 |
|
6032 |
+
#: includes/core/class-builtin.php:1758
|
6033 |
msgid "Singapore"
|
6034 |
msgstr ""
|
6035 |
|
6036 |
+
#: includes/core/class-builtin.php:1759
|
6037 |
msgid "Slovakia"
|
6038 |
msgstr ""
|
6039 |
|
6040 |
+
#: includes/core/class-builtin.php:1760
|
6041 |
msgid "Slovenia"
|
6042 |
msgstr ""
|
6043 |
|
6044 |
+
#: includes/core/class-builtin.php:1761
|
6045 |
msgid "Solomon Islands"
|
6046 |
msgstr ""
|
6047 |
|
6048 |
+
#: includes/core/class-builtin.php:1762
|
6049 |
msgid "Somalia"
|
6050 |
msgstr ""
|
6051 |
|
6052 |
+
#: includes/core/class-builtin.php:1763
|
6053 |
msgid "South Africa"
|
6054 |
msgstr ""
|
6055 |
|
6056 |
+
#: includes/core/class-builtin.php:1764
|
6057 |
msgid "South Georgia and the South Sandwich Islands"
|
6058 |
msgstr ""
|
6059 |
|
6060 |
+
#: includes/core/class-builtin.php:1765
|
6061 |
msgid "South Sudan"
|
6062 |
msgstr ""
|
6063 |
|
6064 |
+
#: includes/core/class-builtin.php:1766
|
6065 |
msgid "Spain"
|
6066 |
msgstr ""
|
6067 |
|
6068 |
+
#: includes/core/class-builtin.php:1767
|
6069 |
msgid "Sri Lanka"
|
6070 |
msgstr ""
|
6071 |
|
6072 |
+
#: includes/core/class-builtin.php:1768
|
6073 |
msgid "Sudan"
|
6074 |
msgstr ""
|
6075 |
|
6076 |
+
#: includes/core/class-builtin.php:1769
|
6077 |
msgid "Suriname"
|
6078 |
msgstr ""
|
6079 |
|
6080 |
+
#: includes/core/class-builtin.php:1770
|
6081 |
msgid "Svalbard and Jan Mayen"
|
6082 |
msgstr ""
|
6083 |
|
6084 |
+
#: includes/core/class-builtin.php:1771
|
6085 |
msgid "Swaziland"
|
6086 |
msgstr ""
|
6087 |
|
6088 |
+
#: includes/core/class-builtin.php:1772
|
6089 |
msgid "Sweden"
|
6090 |
msgstr ""
|
6091 |
|
6092 |
+
#: includes/core/class-builtin.php:1773
|
6093 |
msgid "Switzerland"
|
6094 |
msgstr ""
|
6095 |
|
6096 |
+
#: includes/core/class-builtin.php:1774
|
6097 |
msgid "Syrian Arab Republic"
|
6098 |
msgstr ""
|
6099 |
|
6100 |
+
#: includes/core/class-builtin.php:1775
|
6101 |
msgid "Taiwan, Province of China"
|
6102 |
msgstr ""
|
6103 |
|
6104 |
+
#: includes/core/class-builtin.php:1776
|
6105 |
msgid "Tajikistan"
|
6106 |
msgstr ""
|
6107 |
|
6108 |
+
#: includes/core/class-builtin.php:1777
|
6109 |
msgid "Tanzania, United Republic of"
|
6110 |
msgstr ""
|
6111 |
|
6112 |
+
#: includes/core/class-builtin.php:1778
|
6113 |
msgid "Thailand"
|
6114 |
msgstr ""
|
6115 |
|
6116 |
+
#: includes/core/class-builtin.php:1779
|
6117 |
msgid "Timor-Leste"
|
6118 |
msgstr ""
|
6119 |
|
6120 |
+
#: includes/core/class-builtin.php:1780
|
6121 |
msgid "Togo"
|
6122 |
msgstr ""
|
6123 |
|
6124 |
+
#: includes/core/class-builtin.php:1781
|
6125 |
msgid "Tokelau"
|
6126 |
msgstr ""
|
6127 |
|
6128 |
+
#: includes/core/class-builtin.php:1783
|
6129 |
msgid "Trinidad and Tobago"
|
6130 |
msgstr ""
|
6131 |
|
6132 |
+
#: includes/core/class-builtin.php:1784
|
6133 |
msgid "Tunisia"
|
6134 |
msgstr ""
|
6135 |
|
6136 |
+
#: includes/core/class-builtin.php:1785
|
6137 |
msgid "Turkey"
|
6138 |
msgstr ""
|
6139 |
|
6140 |
+
#: includes/core/class-builtin.php:1786
|
6141 |
msgid "Turkmenistan"
|
6142 |
msgstr ""
|
6143 |
|
6144 |
+
#: includes/core/class-builtin.php:1787
|
6145 |
msgid "Turks and Caicos Islands"
|
6146 |
msgstr ""
|
6147 |
|
6148 |
+
#: includes/core/class-builtin.php:1788
|
6149 |
msgid "Tuvalu"
|
6150 |
msgstr ""
|
6151 |
|
6152 |
+
#: includes/core/class-builtin.php:1789
|
6153 |
msgid "Uganda"
|
6154 |
msgstr ""
|
6155 |
|
6156 |
+
#: includes/core/class-builtin.php:1790
|
6157 |
msgid "Ukraine"
|
6158 |
msgstr ""
|
6159 |
|
6160 |
+
#: includes/core/class-builtin.php:1791
|
6161 |
msgid "United Arab Emirates"
|
6162 |
msgstr ""
|
6163 |
|
6164 |
+
#: includes/core/class-builtin.php:1792
|
6165 |
msgid "United Kingdom"
|
6166 |
msgstr ""
|
6167 |
|
6168 |
+
#: includes/core/class-builtin.php:1793
|
6169 |
msgid "United States"
|
6170 |
msgstr ""
|
6171 |
|
6172 |
+
#: includes/core/class-builtin.php:1794
|
6173 |
msgid "United States Minor Outlying Islands"
|
6174 |
msgstr ""
|
6175 |
|
6176 |
+
#: includes/core/class-builtin.php:1795
|
6177 |
msgid "Uruguay"
|
6178 |
msgstr ""
|
6179 |
|
6180 |
+
#: includes/core/class-builtin.php:1796
|
6181 |
msgid "Uzbekistan"
|
6182 |
msgstr ""
|
6183 |
|
6184 |
+
#: includes/core/class-builtin.php:1797
|
6185 |
msgid "Vanuatu"
|
6186 |
msgstr ""
|
6187 |
|
6188 |
+
#: includes/core/class-builtin.php:1798
|
6189 |
msgid "Venezuela, Bolivarian Republic of"
|
6190 |
msgstr ""
|
6191 |
|
6192 |
+
#: includes/core/class-builtin.php:1799
|
6193 |
msgid "Viet Nam"
|
6194 |
msgstr ""
|
6195 |
|
6196 |
+
#: includes/core/class-builtin.php:1800
|
6197 |
msgid "Virgin Islands, British"
|
6198 |
msgstr ""
|
6199 |
|
6200 |
+
#: includes/core/class-builtin.php:1801
|
6201 |
msgid "Virgin Islands, U.S."
|
6202 |
msgstr ""
|
6203 |
|
6204 |
+
#: includes/core/class-builtin.php:1802
|
6205 |
msgid "Wallis and Futuna"
|
6206 |
msgstr ""
|
6207 |
|
6208 |
+
#: includes/core/class-builtin.php:1803
|
6209 |
msgid "Western Sahara"
|
6210 |
msgstr ""
|
6211 |
|
6212 |
+
#: includes/core/class-builtin.php:1804
|
6213 |
msgid "Yemen"
|
6214 |
msgstr ""
|
6215 |
|
6216 |
+
#: includes/core/class-builtin.php:1805
|
6217 |
msgid "Zambia"
|
6218 |
msgstr ""
|
6219 |
|
6220 |
+
#: includes/core/class-builtin.php:1806
|
6221 |
msgid "Zimbabwe"
|
6222 |
msgstr ""
|
6223 |
|
6308 |
msgid "Less than 1 year old"
|
6309 |
msgstr ""
|
6310 |
|
6311 |
+
#: includes/core/class-external-integrations.php:494
|
6312 |
#, php-format
|
6313 |
msgid "Edit the %s translation"
|
6314 |
msgstr ""
|
6315 |
|
6316 |
+
#: includes/core/class-external-integrations.php:501
|
6317 |
#, php-format
|
6318 |
msgid "Add translation to %s"
|
6319 |
msgstr ""
|
6320 |
|
6321 |
+
#: includes/core/class-fields.php:1196 templates/message.php:5
|
6322 |
#, php-format
|
6323 |
msgid "%s"
|
6324 |
msgstr ""
|
6325 |
|
6326 |
+
#: includes/core/class-fields.php:1215
|
6327 |
msgid "Custom Field"
|
6328 |
msgstr ""
|
6329 |
|
6330 |
+
#: includes/core/class-fields.php:1512
|
6331 |
msgid "Please upload a valid image!"
|
6332 |
msgstr ""
|
6333 |
|
6334 |
+
#: includes/core/class-fields.php:1519 includes/core/class-fields.php:1540
|
6335 |
msgid "Upload"
|
6336 |
msgstr ""
|
6337 |
|
6338 |
+
#: includes/core/class-fields.php:1520
|
6339 |
msgid "Sorry this is not a valid image."
|
6340 |
msgstr ""
|
6341 |
|
6342 |
+
#: includes/core/class-fields.php:1521
|
6343 |
msgid "This image is too large!"
|
6344 |
msgstr ""
|
6345 |
|
6346 |
+
#: includes/core/class-fields.php:1522
|
6347 |
msgid "This image is too small!"
|
6348 |
msgstr ""
|
6349 |
|
6350 |
+
#: includes/core/class-fields.php:1523
|
6351 |
msgid "You can only upload one image"
|
6352 |
msgstr ""
|
6353 |
|
6354 |
+
#: includes/core/class-fields.php:1991
|
6355 |
msgid "Current Password"
|
6356 |
msgstr ""
|
6357 |
|
6358 |
+
#: includes/core/class-fields.php:2020
|
6359 |
msgid "New Password"
|
6360 |
msgstr ""
|
6361 |
|
6362 |
+
#: includes/core/class-fields.php:2052
|
6363 |
#, php-format
|
6364 |
msgid "Confirm %s"
|
6365 |
msgstr ""
|
6366 |
|
6367 |
+
#: includes/core/class-fields.php:2287
|
6368 |
msgid "Upload Photo"
|
6369 |
msgstr ""
|
6370 |
|
6371 |
+
#: includes/core/class-fields.php:2308 includes/core/class-fields.php:2332
|
6372 |
#: includes/core/um-actions-profile.php:727
|
6373 |
msgid "Change photo"
|
6374 |
msgstr ""
|
6375 |
|
6376 |
+
#: includes/core/class-fields.php:2332 includes/core/class-fields.php:2429
|
6377 |
msgid "Processing..."
|
6378 |
msgstr ""
|
6379 |
|
6380 |
+
#: includes/core/class-fields.php:2354
|
6381 |
msgid "Upload File"
|
6382 |
msgstr ""
|
6383 |
|
6384 |
+
#: includes/core/class-fields.php:2396 includes/core/um-filters-fields.php:243
|
6385 |
msgid "This file has been removed."
|
6386 |
msgstr ""
|
6387 |
|
6388 |
+
#: includes/core/class-fields.php:2399 includes/core/class-fields.php:2429
|
6389 |
msgid "Change file"
|
6390 |
msgstr ""
|
6391 |
|
6392 |
+
#: includes/core/class-fields.php:2429
|
6393 |
msgid "Save"
|
6394 |
msgstr ""
|
6395 |
|
6396 |
+
#: includes/core/class-fields.php:3852
|
6397 |
#, php-format
|
6398 |
msgid ""
|
6399 |
"Your profile is looking a little empty. Why not <a href=\"%s\">add</a> some "
|
6400 |
"information!"
|
6401 |
msgstr ""
|
6402 |
|
6403 |
+
#: includes/core/class-fields.php:3854
|
6404 |
msgid "This user has not added any information to their profile yet."
|
6405 |
msgstr ""
|
6406 |
|
6441 |
msgid "You can not edit this user"
|
6442 |
msgstr ""
|
6443 |
|
6444 |
+
#: includes/core/class-mail.php:612 includes/core/class-password.php:701
|
6445 |
+
#: includes/core/class-profile.php:424
|
6446 |
+
msgid "Your set password"
|
6447 |
+
msgstr ""
|
6448 |
+
|
6449 |
+
#: includes/core/class-password.php:458
|
6450 |
msgid "Please provide your username or email"
|
6451 |
msgstr ""
|
6452 |
|
6453 |
+
#: includes/core/class-password.php:462
|
6454 |
msgid "We can't find an account registered with that address or username"
|
6455 |
msgstr ""
|
6456 |
|
6457 |
+
#: includes/core/class-password.php:481
|
6458 |
msgid ""
|
6459 |
"You have reached the limit for requesting password change for this user "
|
6460 |
"already. Contact support if you cannot open the email"
|
6461 |
msgstr ""
|
6462 |
|
6463 |
+
#: includes/core/class-password.php:537
|
6464 |
msgid "You must enter a new password"
|
6465 |
msgstr ""
|
6466 |
|
6467 |
+
#: includes/core/class-password.php:543 includes/core/um-actions-account.php:59
|
6468 |
msgid "Your password must contain at least 8 characters"
|
6469 |
msgstr ""
|
6470 |
|
6471 |
+
#: includes/core/class-password.php:547 includes/core/um-actions-account.php:63
|
6472 |
msgid "Your password must contain less than 30 characters"
|
6473 |
msgstr ""
|
6474 |
|
6475 |
+
#: includes/core/class-password.php:551 includes/core/um-actions-account.php:67
|
6476 |
#: includes/core/um-actions-form.php:476
|
6477 |
msgid ""
|
6478 |
"Your password must contain at least one lowercase letter, one capital letter "
|
6479 |
"and one number"
|
6480 |
msgstr ""
|
6481 |
|
6482 |
+
#: includes/core/class-password.php:557
|
6483 |
msgid "You must confirm your new password"
|
6484 |
msgstr ""
|
6485 |
|
6486 |
+
#: includes/core/class-password.php:561 includes/core/um-actions-form.php:485
|
6487 |
msgid "Your passwords do not match"
|
6488 |
msgstr ""
|
6489 |
|
6490 |
+
#: includes/core/class-permalinks.php:186
|
6491 |
msgid "This activation link is expired or have already been used."
|
6492 |
msgstr ""
|
6493 |
|
6494 |
#. translators: %s: support forums URL
|
6495 |
+
#: includes/core/class-plugin-updater.php:270
|
6496 |
#, php-format
|
6497 |
msgid ""
|
6498 |
"An unexpected error occurred. Something may be wrong with https://"
|
6500 |
"have problems, please try the <a href=\"%s\">support forums</a>."
|
6501 |
msgstr ""
|
6502 |
|
6503 |
+
#: includes/core/class-plugin-updater.php:271
|
6504 |
msgid "https://wordpress.org/support/"
|
6505 |
msgstr ""
|
6506 |
|
6516 |
msgid "Comments"
|
6517 |
msgstr ""
|
6518 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6519 |
#: includes/core/class-shortcodes.php:360
|
6520 |
msgid ""
|
6521 |
"This content has been restricted to logged in users only. Please <a href="
|
6572 |
msgid "Membership Inactive"
|
6573 |
msgstr ""
|
6574 |
|
6575 |
+
#: includes/core/rest/class-api-v1.php:256
|
6576 |
+
#: includes/core/rest/class-api-v1.php:328
|
6577 |
+
#: includes/core/rest/class-api-v1.php:365
|
6578 |
+
#: includes/core/rest/class-api-v2.php:256
|
6579 |
+
#: includes/core/rest/class-api-v2.php:328
|
6580 |
+
#: includes/core/rest/class-api-v2.php:365
|
6581 |
+
msgid "You must provide a user ID"
|
6582 |
+
msgstr ""
|
6583 |
+
|
6584 |
+
#: includes/core/rest/class-api-v1.php:261
|
6585 |
+
#: includes/core/rest/class-api-v2.php:261
|
6586 |
+
msgid "You need to provide data to update"
|
6587 |
+
msgstr ""
|
6588 |
+
|
6589 |
+
#: includes/core/rest/class-api-v1.php:270
|
6590 |
+
#: includes/core/rest/class-api-v2.php:270
|
6591 |
+
msgid "User status has been changed."
|
6592 |
+
msgstr ""
|
6593 |
+
|
6594 |
+
#: includes/core/rest/class-api-v1.php:299
|
6595 |
+
#: includes/core/rest/class-api-v2.php:299
|
6596 |
+
msgid "User role has been changed."
|
6597 |
+
msgstr ""
|
6598 |
+
|
6599 |
+
#: includes/core/rest/class-api-v1.php:303
|
6600 |
+
#: includes/core/rest/class-api-v2.php:303
|
6601 |
+
msgid "User meta has been changed."
|
6602 |
+
msgstr ""
|
6603 |
+
|
6604 |
+
#: includes/core/rest/class-api-v1.php:334
|
6605 |
+
#: includes/core/rest/class-api-v1.php:371
|
6606 |
+
#: includes/core/rest/class-api-v2.php:334
|
6607 |
+
#: includes/core/rest/class-api-v2.php:371
|
6608 |
+
msgid "Invalid user specified"
|
6609 |
+
msgstr ""
|
6610 |
+
|
6611 |
+
#: includes/core/rest/class-api-v1.php:341
|
6612 |
+
#: includes/core/rest/class-api-v2.php:341
|
6613 |
+
msgid "User has been successfully deleted."
|
6614 |
+
msgstr ""
|
6615 |
+
|
6616 |
+
#: includes/core/rest/class-api.php:253
|
6617 |
+
msgid "You must specify both a token and API key!"
|
6618 |
+
msgstr ""
|
6619 |
+
|
6620 |
+
#: includes/core/rest/class-api.php:265
|
6621 |
+
msgid "Your request could not be authenticated"
|
6622 |
+
msgstr ""
|
6623 |
+
|
6624 |
+
#: includes/core/rest/class-api.php:277
|
6625 |
+
msgid "Invalid API key"
|
6626 |
+
msgstr ""
|
6627 |
+
|
6628 |
+
#: includes/core/rest/class-api.php:434
|
6629 |
+
msgid "Invalid query!"
|
6630 |
+
msgstr ""
|
6631 |
+
|
6632 |
#: includes/core/um-actions-account.php:17
|
6633 |
msgid "Are you hacking? Please try again!"
|
6634 |
msgstr ""
|
6681 |
msgstr ""
|
6682 |
|
6683 |
#: includes/core/um-actions-core.php:89 includes/core/um-actions-core.php:100
|
6684 |
+
#: includes/core/um-actions-core.php:113 includes/core/um-actions-core.php:123
|
6685 |
+
#: includes/core/um-actions-core.php:136
|
6686 |
msgid "You do not have permission to make this action."
|
6687 |
msgstr ""
|
6688 |
|
6689 |
+
#: includes/core/um-actions-core.php:146
|
6690 |
msgid "You do not have permission to delete this user."
|
6691 |
msgstr ""
|
6692 |
|
7026 |
msgid "Login as this user"
|
7027 |
msgstr ""
|
7028 |
|
7029 |
+
#: includes/um-short-functions.php:741
|
7030 |
msgid "date submitted"
|
7031 |
msgstr ""
|
7032 |
|
7033 |
+
#: includes/um-short-functions.php:747
|
7034 |
msgid "(empty)"
|
7035 |
msgstr ""
|
7036 |
|
languages/ultimatemember-en_US.po
CHANGED
@@ -6401,6 +6401,11 @@ msgstr ""
|
|
6401 |
msgid "Comments"
|
6402 |
msgstr ""
|
6403 |
|
|
|
|
|
|
|
|
|
|
|
6404 |
#: includes/core/class-rest-api.php:217
|
6405 |
msgid "You must specify both a token and API key!"
|
6406 |
msgstr ""
|
6401 |
msgid "Comments"
|
6402 |
msgstr ""
|
6403 |
|
6404 |
+
#: includes/core/class-profile.php:424 includes/core/class-mail.php:609
|
6405 |
+
#: includes/core/class-password.php:701
|
6406 |
+
msgid "Your set password"
|
6407 |
+
msgstr ""
|
6408 |
+
|
6409 |
#: includes/core/class-rest-api.php:217
|
6410 |
msgid "You must specify both a token and API key!"
|
6411 |
msgstr ""
|
readme.txt
CHANGED
@@ -4,9 +4,9 @@ Plugin URI: https://ultimatemember.com/
|
|
4 |
Contributors: ultimatemember, champsupertramp, nsinelnikov
|
5 |
Donate link:
|
6 |
Tags: community, member, membership, user-profile, user-registration
|
7 |
-
Requires at least: 4.
|
8 |
-
Tested up to: 5.
|
9 |
-
Stable tag: 2.0.
|
10 |
License: GNU Version 2 or Any Later Version
|
11 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
12 |
|
@@ -133,6 +133,34 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
|
|
133 |
|
134 |
= Important: UM2.0+ is a significant update to the code base from 1.3.88. Please make sure you take a full-site backup with restore point before updating the plugin =
|
135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
= 2.0.43: March 29, 2019 =
|
137 |
|
138 |
* Bugfixes:
|
4 |
Contributors: ultimatemember, champsupertramp, nsinelnikov
|
5 |
Donate link:
|
6 |
Tags: community, member, membership, user-profile, user-registration
|
7 |
+
Requires at least: 4.9
|
8 |
+
Tested up to: 5.2
|
9 |
+
Stable tag: 2.0.44
|
10 |
License: GNU Version 2 or Any Later Version
|
11 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
12 |
|
133 |
|
134 |
= Important: UM2.0+ is a significant update to the code base from 1.3.88. Please make sure you take a full-site backup with restore point before updating the plugin =
|
135 |
|
136 |
+
= 2.0.44: May 08, 2019 =
|
137 |
+
|
138 |
+
* Enhancements:
|
139 |
+
- Added automatically template saver when you upgrade your theme
|
140 |
+
- Added default value for Date and Time user profile fields
|
141 |
+
- Updated Scroll library
|
142 |
+
- Added REST API v2 class with new query vars. There is an ability to select v1 or v2 for use. For old users v1 is default, for new users v2
|
143 |
+
|
144 |
+
* Bugfixes:
|
145 |
+
- Added nocache headers to reset password form
|
146 |
+
- Email templates saving to child theme, if parent theme already has email template files
|
147 |
+
- Email templates locate in the default plugin folder with active WPML
|
148 |
+
- Form builder with some predefined form fields, which had different keys/metakeys (currently use the same)
|
149 |
+
- Logout redirect with active WPML
|
150 |
+
- Fixed $_SERVER usage when WP-CLI using
|
151 |
+
- Extended integration for UM field value
|
152 |
+
- um_user function avoid loop when 'display name' and 'full name' used
|
153 |
+
- Restriction options for Terms and access on front-end
|
154 |
+
- Plugin/Theme upgrader
|
155 |
+
- Remove duplicate data 'user_login' from metadata
|
156 |
+
- Replace placeholders duplicates
|
157 |
+
- Password Reset link regeneration
|
158 |
+
- Fixed issues with scroll on mobile devices
|
159 |
+
- Fixed multisite activation
|
160 |
+
|
161 |
+
* Deprecated:
|
162 |
+
- "Is Account page?" and "Is User page?" options for WPML integration ( because WPML translations works properly )
|
163 |
+
|
164 |
= 2.0.43: March 29, 2019 =
|
165 |
|
166 |
* Bugfixes:
|
ultimate-member.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Ultimate Member
|
4 |
Plugin URI: http://ultimatemember.com/
|
5 |
Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
|
6 |
-
Version: 2.0.
|
7 |
Author: Ultimate Member
|
8 |
Author URI: http://ultimatemember.com/
|
9 |
Text Domain: ultimate-member
|
3 |
Plugin Name: Ultimate Member
|
4 |
Plugin URI: http://ultimatemember.com/
|
5 |
Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
|
6 |
+
Version: 2.0.44
|
7 |
Author: Ultimate Member
|
8 |
Author URI: http://ultimatemember.com/
|
9 |
Text Domain: ultimate-member
|