Version Description
= 7.3.0 = See: https://codex.buddypress.org/releases/version-7-3-0/
= 7.2.1 = See: https://codex.buddypress.org/releases/version-7-2-1/
= 7.2.0 = See: https://codex.buddypress.org/releases/version-7-2-0/
= 7.1.0 = See: https://codex.buddypress.org/releases/version-7-1-0/
= 7.0.0 = See: https://codex.buddypress.org/releases/version-7-0-0/
= 6.4.0 = See: https://codex.buddypress.org/releases/version-6-4-0/
= 6.3.0 = See: https://codex.buddypress.org/releases/version-6-3-0/
= 6.2.0 = See: https://codex.buddypress.org/releases/version-6-2-0/
= 6.1.0 = See: https://codex.buddypress.org/releases/version-6-1-0/
= 6.0.0 = See: https://codex.buddypress.org/releases/version-6-0-0/
= 5.2.0 = See: https://codex.buddypress.org/releases/version-5-2-0/
= 5.1.2 = See: https://codex.buddypress.org/releases/version-5-1-2/
= 5.1.1 = See: https://codex.buddypress.org/releases/version-5-1-1/
= 5.1.0 = See: https://codex.buddypress.org/releases/version-5-1-0/
= 5.0.0 = See: https://codex.buddypress.org/releases/version-5-0-0/
= 4.4.0 = See: https://codex.buddypress.org/releases/version-4-4-0/
= 4.3.0 = See: https://codex.buddypress.org/releases/version-4-3-0/
= 4.2.0 = See: https://codex.buddypress.org/releases/version-4-2-0/
= 4.1.0 = See: https://codex.buddypress.org/releases/version-4-1-0/
= 4.0.0 = See: https://codex.buddypress.org/releases/version-4-0-0/
Release Info
Developer | imath |
Plugin | BuddyPress |
Version | 8.0.0-beta2 |
Comparing to | |
See all releases |
Code changes from version 8.0.0-beta1 to 8.0.0-beta2
- bp-activity/bp-activity-cssjs.php +9 -3
- bp-activity/js/mentions.min.js +1 -1
- bp-core/admin/bp-core-admin-functions.php +14 -1
- bp-core/admin/bp-core-admin-slugs.php +30 -18
- bp-core/admin/js/hello.min.js +1 -1
- bp-core/bp-core-avatars.php +1 -1
- bp-core/bp-core-blocks.php +14 -1
- bp-core/js/block-components.js +1 -1
- bp-core/js/block-components.js.map +1 -1
- bp-core/js/vendor/jquery-scroll-to.min.js +1 -1
- bp-core/js/vendor/jquery.atwho.min.js +1 -1
- bp-core/js/vendor/moment-js/moment.min.js +1 -1
- bp-groups/js/manage-members.min.js +1 -1
- bp-loader.php +1 -1
- bp-members/actions/invitations-bulk-manage.php +2 -2
- bp-members/bp-members-adminbar.php +3 -3
- bp-members/bp-members-filters.php +9 -1
- bp-members/bp-members-invitations.php +6 -7
- bp-members/bp-members-template.php +2 -2
- bp-members/classes/class-bp-members-component.php +2 -6
- bp-members/classes/class-bp-rest-members-endpoint.php +4 -0
- bp-members/screens/invitations.php +120 -0
- bp-members/screens/list-invites.php +0 -80
- bp-members/screens/send-invites.php +0 -77
- bp-messages/js/autocomplete/jquery.autocomplete.min.js +1 -1
- bp-templates/bp-legacy/buddypress/members/single/invitations/invitations-loop.php +1 -1
- bp-templates/bp-legacy/buddypress/members/single/invitations/send-invites.php +14 -1
- bp-templates/bp-nouveau/buddypress/members/single/invitations/invitations-loop.php +1 -1
- bp-templates/bp-nouveau/buddypress/members/single/invitations/send-invites.php +26 -23
- bp-templates/bp-nouveau/includes/activity/widgets.php +11 -4
- bp-templates/bp-nouveau/includes/functions.php +20 -2
- bp-templates/bp-nouveau/js/buddypress-messages.js +22 -11
- bp-templates/bp-nouveau/js/buddypress-messages.min.js +1 -1
- buddypress.pot +149 -129
- class-buddypress.php +1 -1
- composer.json +3 -1
@@ -22,10 +22,16 @@ function bp_activity_mentions_script() {
|
|
22 |
|
23 |
// Special handling for New/Edit screens in wp-admin.
|
24 |
if ( is_admin() ) {
|
|
|
|
|
|
|
|
|
|
|
25 |
if (
|
26 |
-
!
|
27 |
-
|
28 |
-
!
|
|
|
29 |
return;
|
30 |
}
|
31 |
}
|
22 |
|
23 |
// Special handling for New/Edit screens in wp-admin.
|
24 |
if ( is_admin() ) {
|
25 |
+
$current_screen = null;
|
26 |
+
if ( function_exists( 'get_current_screen' ) ) {
|
27 |
+
$current_screen = get_current_screen();
|
28 |
+
}
|
29 |
+
|
30 |
if (
|
31 |
+
! $current_screen ||
|
32 |
+
( isset( $current_screen->is_block_editor ) && $current_screen->is_block_editor ) ||
|
33 |
+
! in_array( $current_screen->base, array( 'page', 'post' ) ) ||
|
34 |
+
! post_type_supports( $current_screen->post_type, 'editor' ) ) {
|
35 |
return;
|
36 |
}
|
37 |
}
|
@@ -1 +1 @@
|
|
1 |
-
window.bp=window.bp||{},function(t,r){var o,a=[];t.mentions=t.mentions||{},t.mentions.users=window.bp.mentions.users||[],"object"==typeof window.BP_Suggestions&&(t.mentions.users=window.BP_Suggestions.friends||t.mentions.users),r.fn.bp_mentions=function(t){Array.isArray(t)&&(t={data:t});var e={delay:200,hideWithoutSuffix:!0,insertTpl:"@${ID}",limit:10,startWithSpace:!1,suffix:"",callbacks:{filter:function(t,e,i){for(var n,s=[],r=new RegExp("^"+t+"| "+t,"ig"),o=0,a=e.length;o<a;o++)(n=e[o])[i].toLowerCase().match(r)&&s.push(n);return s},highlighter:function(t,e){if(!e)return t;e=new RegExp(">(\\s*|[\\w\\s]*)("+this.at.replace("+","\\+")+"?"+e.replace("+","\\+")+")([\\w ]*)\\s*<","ig");return t.replace(e,function(t,e,i,n){return">"+e+"<strong>"+i+"</strong>"+n+"<"})},before_reposition:function(t){var e,i=r("#atwho-ground-"+this.id+" .atwho-view"),n=r("body"),s=this.$inputor.data("atwho");"undefined"!==s&&"undefined"!==s.iframe&&null!==s.iframe?(e=this.$inputor.caret("offset",{iframe:s.iframe}),"undefined"!==(s=r(s.iframe).offset())&&(e.left+=s.left,e.top+=s.top)):e=this.$inputor.caret("offset"),i=e.left>n.width()/2?(i.addClass("right"),e.left-t.left-this.view.$el.width()):(i.removeClass("right"),e.left-t.left+1),n.width()<=400&&r(document).scrollTop(e.top-6),
|
1 |
+
window.bp=window.bp||{},function(t,r){var o,a=[];t.mentions=t.mentions||{},t.mentions.users=window.bp.mentions.users||[],"object"==typeof window.BP_Suggestions&&(t.mentions.users=window.BP_Suggestions.friends||t.mentions.users),r.fn.bp_mentions=function(t){Array.isArray(t)&&(t={data:t});var e={delay:200,hideWithoutSuffix:!0,insertTpl:"@${ID}",limit:10,startWithSpace:!1,suffix:"",callbacks:{filter:function(t,e,i){for(var n,s=[],r=new RegExp("^"+t+"| "+t,"ig"),o=0,a=e.length;o<a;o++)(n=e[o])[i].toLowerCase().match(r)&&s.push(n);return s},highlighter:function(t,e){if(!e)return t;e=new RegExp(">(\\s*|[\\w\\s]*)("+this.at.replace("+","\\+")+"?"+e.replace("+","\\+")+")([\\w ]*)\\s*<","ig");return t.replace(e,function(t,e,i,n){return">"+e+"<strong>"+i+"</strong>"+n+"<"})},before_reposition:function(t){var e,i=r("#atwho-ground-"+this.id+" .atwho-view"),n=r("body"),s=this.$inputor.data("atwho");"undefined"!==s&&"undefined"!==s.iframe&&null!==s.iframe?(e=this.$inputor.caret("offset",{iframe:s.iframe}),"undefined"!==(s=r(s.iframe).offset())&&(e.left+=s.left,e.top+=s.top)):e=this.$inputor.caret("offset"),i=e.left>n.width()/2?(i.addClass("right"),e.left-t.left-this.view.$el.width()):(i.removeClass("right"),e.left-t.left+1),n.width()<=400&&r(document).scrollTop(e.top-6),n=parseInt(this.$inputor.css("line-height").substr(0,this.$inputor.css("line-height").length-2),10),t.top=e.top+(n=!n||n<5?19:n),t.left+=i},inserting_wrapper:function(t,e,i){return""+e+i}}},i={callbacks:{remoteFilter:function(e,i){var t,n=r(this),s={};"object"!=typeof(o=a[e])?(n.xhr&&n.xhr.abort(),s={action:"bp_get_suggestions",term:e,type:"members"},"number"!=typeof(t=this.$inputor.data("suggestions-group-id"))&&"string"!=typeof t||isNaN(t-parseFloat(t))||(s["group-id"]=parseInt(this.$inputor.data("suggestions-group-id"),10)),n.xhr=r.getJSON(ajaxurl,s).done(function(t){t.success&&(t=r.map(t.data,function(t){return t.search=t.search||t.ID+" "+t.name,t}),a[e]=t,i(t))})):i(o)}},data:r.map(t.data,function(t){return t.search=t.search||t.ID+" "+t.name,t}),at:"@",searchKey:"search",displayTpl:'<li data-value="@${ID}"><img src="${image}" alt="" /><span class="username">@${ID}</span><small>${name}</small></li>'},t=r.extend(!0,{},e,i,t);return r.fn.atwho.call(this,t)},r(document).ready(function(){r(".bp-suggestions, #comments form textarea, .wp-editor-area").bp_mentions(t.mentions.users)}),t.mentions.tinyMCEinit=function(){void 0===window.tinyMCE||null===window.tinyMCE.activeEditor||void 0===window.tinyMCE.activeEditor||r(window.tinyMCE.activeEditor.contentDocument.activeElement).atwho("setIframe",r(".wp-editor-wrap iframe")[0]).bp_mentions(t.mentions.users)}}(bp,jQuery);
|
@@ -1344,4 +1344,17 @@ function bp_block_category( $categories = array(), $post = null ) {
|
|
1344 |
)
|
1345 |
);
|
1346 |
}
|
1347 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1344 |
)
|
1345 |
);
|
1346 |
}
|
1347 |
+
|
1348 |
+
/**
|
1349 |
+
* Select the right `block_categories` filter according to WP version.
|
1350 |
+
*
|
1351 |
+
* @since 8.0.0
|
1352 |
+
*/
|
1353 |
+
function bp_block_init_category_filter() {
|
1354 |
+
if ( function_exists( 'get_default_block_categories' ) ) {
|
1355 |
+
add_filter( 'block_categories_all', 'bp_block_category', 1, 2 );
|
1356 |
+
} else {
|
1357 |
+
add_filter( 'block_categories', 'bp_block_category', 1, 2 );
|
1358 |
+
}
|
1359 |
+
}
|
1360 |
+
add_action( 'bp_init', 'bp_block_init_category_filter' );
|
@@ -117,11 +117,11 @@ function bp_core_admin_slugs_options() {
|
|
117 |
// Set up an array of components (along with component names) that have directory pages.
|
118 |
$directory_pages = bp_core_admin_get_directory_pages();
|
119 |
|
120 |
-
if ( !empty( $directory_pages ) ) : ?>
|
121 |
|
122 |
-
<h3><?php
|
123 |
|
124 |
-
<p><?php
|
125 |
|
126 |
<table class="form-table">
|
127 |
<tbody>
|
@@ -141,13 +141,13 @@ function bp_core_admin_slugs_options() {
|
|
141 |
'name' => 'bp_pages[' . esc_attr( $name ) . ']',
|
142 |
'echo' => false,
|
143 |
'show_option_none' => __( '- None -', 'buddypress' ),
|
144 |
-
'selected' => !empty( $existing_pages[$name] ) ? $existing_pages[$name] : false
|
145 |
) ); ?>
|
146 |
|
147 |
<?php if ( ! empty( $existing_pages[ $name ] ) && get_post( $existing_pages[ $name ] ) ) : ?>
|
148 |
|
149 |
<a href="<?php echo esc_url( get_permalink( $existing_pages[$name] ) ); ?>" class="button-secondary" target="_bp">
|
150 |
-
<?php
|
151 |
<span class="screen-reader-text"><?php esc_html_e( '(opens in a new tab)', 'buddypress' ); ?></span>
|
152 |
</a>
|
153 |
|
@@ -185,23 +185,40 @@ function bp_core_admin_slugs_options() {
|
|
185 |
|
186 |
if ( !empty( $static_pages ) ) : ?>
|
187 |
|
188 |
-
<h3><?php
|
189 |
|
190 |
<?php if ( bp_get_signup_allowed() || bp_get_members_invitations_allowed() ) : ?>
|
191 |
-
<p
|
|
|
|
|
|
|
192 |
<?php else : ?>
|
193 |
<?php if ( is_multisite() ) : ?>
|
194 |
<p>
|
195 |
<?php
|
196 |
-
|
197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
?>
|
199 |
</p>
|
200 |
<?php else : ?>
|
201 |
<p>
|
202 |
<?php
|
203 |
-
|
204 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
?>
|
206 |
</p>
|
207 |
<?php endif; ?>
|
@@ -228,12 +245,6 @@ function bp_core_admin_slugs_options() {
|
|
228 |
'selected' => !empty( $existing_pages[$name] ) ? $existing_pages[$name] : false
|
229 |
) ) ?>
|
230 |
|
231 |
-
<?php if ( ! empty( $existing_pages[ $name ] ) && get_post( $existing_pages[ $name ] ) ) : ?>
|
232 |
-
|
233 |
-
<a href="<?php echo get_permalink( $existing_pages[$name] ); ?>" class="button-secondary" target="_bp"><?php _e( 'View', 'buddypress' ); ?></a>
|
234 |
-
|
235 |
-
<?php endif; ?>
|
236 |
-
|
237 |
<?php if ( ! bp_is_root_blog() ) restore_current_blog(); ?>
|
238 |
|
239 |
</td>
|
@@ -266,8 +277,9 @@ function bp_core_admin_slugs_options() {
|
|
266 |
function bp_core_admin_slugs_setup_handler() {
|
267 |
|
268 |
if ( isset( $_POST['bp-admin-pages-submit'] ) ) {
|
269 |
-
if ( !check_admin_referer( 'bp-admin-pages-setup' ) )
|
270 |
return false;
|
|
|
271 |
|
272 |
// Then, update the directory pages.
|
273 |
if ( isset( $_POST['bp_pages'] ) ) {
|
117 |
// Set up an array of components (along with component names) that have directory pages.
|
118 |
$directory_pages = bp_core_admin_get_directory_pages();
|
119 |
|
120 |
+
if ( ! empty( $directory_pages ) ) : ?>
|
121 |
|
122 |
+
<h3><?php esc_html_e( 'Directories', 'buddypress' ); ?></h3>
|
123 |
|
124 |
+
<p><?php esc_html_e( 'Associate a WordPress Page with each BuddyPress component directory.', 'buddypress' ); ?></p>
|
125 |
|
126 |
<table class="form-table">
|
127 |
<tbody>
|
141 |
'name' => 'bp_pages[' . esc_attr( $name ) . ']',
|
142 |
'echo' => false,
|
143 |
'show_option_none' => __( '- None -', 'buddypress' ),
|
144 |
+
'selected' => ! empty( $existing_pages[$name] ) ? $existing_pages[$name] : false
|
145 |
) ); ?>
|
146 |
|
147 |
<?php if ( ! empty( $existing_pages[ $name ] ) && get_post( $existing_pages[ $name ] ) ) : ?>
|
148 |
|
149 |
<a href="<?php echo esc_url( get_permalink( $existing_pages[$name] ) ); ?>" class="button-secondary" target="_bp">
|
150 |
+
<?php esc_html_e( 'View', 'buddypress' ); ?> <span class="dashicons dashicons-external" aria-hidden="true"></span>
|
151 |
<span class="screen-reader-text"><?php esc_html_e( '(opens in a new tab)', 'buddypress' ); ?></span>
|
152 |
</a>
|
153 |
|
185 |
|
186 |
if ( !empty( $static_pages ) ) : ?>
|
187 |
|
188 |
+
<h3><?php esc_html_e( 'Registration', 'buddypress' ); ?></h3>
|
189 |
|
190 |
<?php if ( bp_get_signup_allowed() || bp_get_members_invitations_allowed() ) : ?>
|
191 |
+
<p>
|
192 |
+
<?php esc_html_e( 'Associate WordPress Pages with the following BuddyPress Registration pages.', 'buddypress' ); ?>
|
193 |
+
<?php esc_html_e( 'These pages will only be reachable by users who are not logged in.', 'buddypress' ); ?>
|
194 |
+
</p>
|
195 |
<?php else : ?>
|
196 |
<?php if ( is_multisite() ) : ?>
|
197 |
<p>
|
198 |
<?php
|
199 |
+
printf(
|
200 |
+
/* translators: %s: the link to the Network settings page */
|
201 |
+
esc_html_x( 'Registration is currently disabled. Before associating a page is allowed, please enable registration by selecting either the "User accounts may be registered" or "Both sites and user accounts can be registered" option on %s.', 'Disabled registration message for multisite config', 'buddypress' ),
|
202 |
+
sprintf(
|
203 |
+
'<a href="%1$s">%2$s</a>',
|
204 |
+
esc_url( network_admin_url( 'settings.php' ) ),
|
205 |
+
esc_html_x( 'this page', 'Link text for the Multisite’s network settings page', 'buddypress' )
|
206 |
+
)
|
207 |
+
);
|
208 |
?>
|
209 |
</p>
|
210 |
<?php else : ?>
|
211 |
<p>
|
212 |
<?php
|
213 |
+
printf(
|
214 |
+
/* translators: %s: the link to the Site general options page */
|
215 |
+
esc_html_x( 'Registration is currently disabled. Before associating a page is allowed, please enable registration by clicking on the "Anyone can register" checkbox on %s.', 'Disabled registration message for regular site config', 'buddypress' ),
|
216 |
+
sprintf(
|
217 |
+
'<a href="%1$s">%2$s</a>',
|
218 |
+
esc_url( admin_url( 'options-general.php' ) ),
|
219 |
+
esc_html_x( 'this page', 'Link text for the Site’s general options page', 'buddypress' )
|
220 |
+
)
|
221 |
+
);
|
222 |
?>
|
223 |
</p>
|
224 |
<?php endif; ?>
|
245 |
'selected' => !empty( $existing_pages[$name] ) ? $existing_pages[$name] : false
|
246 |
) ) ?>
|
247 |
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
<?php if ( ! bp_is_root_blog() ) restore_current_blog(); ?>
|
249 |
|
250 |
</td>
|
277 |
function bp_core_admin_slugs_setup_handler() {
|
278 |
|
279 |
if ( isset( $_POST['bp-admin-pages-submit'] ) ) {
|
280 |
+
if ( ! check_admin_referer( 'bp-admin-pages-setup' ) ) {
|
281 |
return false;
|
282 |
+
}
|
283 |
|
284 |
// Then, update the directory pages.
|
285 |
if ( isset( $_POST['bp_pages'] ) ) {
|
@@ -1 +1 @@
|
|
1 |
-
!function(o,t){var a;"undefined"!=typeof bpHelloStrings&&(a=function(e){e=e||bpHelloStrings.pageNotFound,o("#dynamic-content").html(o("<div></div>").prop("id","message").addClass("notice notice-error error").html(o("<p></p>").html(e)))},o("#plugin-information-tabs").on("click","a",function(e){e.preventDefault();var e=o(e.currentTarget),n=o("#dynamic-content");e.hasClass("dynamic")?(o("#top-features").hide(),n.html(""),n.addClass("show"),o("#TB_window").addClass("thickbox-loading"),t.apiRequest({url:e.data("endpoint"),type:"GET",beforeSend:function(e,n){n.url=n.url.replace("&_wpnonce=none","")},data:{context:"view",slug:e.data("slug"),_wpnonce:"none"}}).done(function(e){e=_.first(e);e&&e.content?n.html(e.content.rendered):a()}).fail(function(e){return!(!e||!e.message)&&void a(e.message)}).always(function(){o("#TB_window").removeClass("thickbox-loading")})):(o("#top-features").show(),n.html(""),n.removeClass("show"))}),o(document).ready(function(){
|
1 |
+
!function(o,t){var a;"undefined"!=typeof bpHelloStrings&&(a=function(e){e=e||bpHelloStrings.pageNotFound,o("#dynamic-content").html(o("<div></div>").prop("id","message").addClass("notice notice-error error").html(o("<p></p>").html(e)))},o("#plugin-information-tabs").on("click","a",function(e){e.preventDefault();var e=o(e.currentTarget),n=o("#dynamic-content");e.hasClass("dynamic")?(o("#top-features").hide(),n.html(""),n.addClass("show"),o("#TB_window").addClass("thickbox-loading"),t.apiRequest({url:e.data("endpoint"),type:"GET",beforeSend:function(e,n){n.url=n.url.replace("&_wpnonce=none","")},data:{context:"view",slug:e.data("slug"),_wpnonce:"none"}}).done(function(e){e=_.first(e);e&&e.content?n.html(e.content.rendered):a()}).fail(function(e){return!(!e||!e.message)&&void a(e.message)}).always(function(){o("#TB_window").removeClass("thickbox-loading")})):(o("#top-features").show(),n.html(""),n.removeClass("show"))}),o(document).ready(function(){!function(){if("function"!=typeof window.tb_show)return;window.tb_show("BuddyPress","#TB_inline?inlineId=bp-hello-container"),o("#TB_window").attr({role:"dialog","aria-label":bpHelloStrings.modalLabel}).addClass("plugin-details-modal").removeClass("thickbox-loading"),o("#TB_ajaxContent").prop("style","height: 100%; width: auto; padding: 0; border: none;");var n=o(":tabbable","#TB_ajaxContent").last();o("#TB_window").on("keydown",function(e){9!==e.keyCode||e.shiftKey||o(n).prop("classList").value!==o(e.target).prop("classList").value||(e.preventDefault(),o("#TB_closeWindowButton").focus()),9===e.keyCode&&e.shiftKey&&"TB_closeWindowButton"===o(e.target).prop("id")&&(e.preventDefault(),o(n).focus())})}()}))}(jQuery,window.bp||{});
|
@@ -979,7 +979,7 @@ function bp_core_avatar_handle_upload( $file, $upload_dir_filter ) {
|
|
979 |
$bp->avatar_admin->image = new stdClass();
|
980 |
|
981 |
// We only want to handle one image after resize.
|
982 |
-
if ( empty( $bp->avatar_admin->resized ) ) {
|
983 |
$bp->avatar_admin->image->file = $bp->avatar_admin->original['file'];
|
984 |
$bp->avatar_admin->image->dir = str_replace( $upload_path, '', $bp->avatar_admin->original['file'] );
|
985 |
} else {
|
979 |
$bp->avatar_admin->image = new stdClass();
|
980 |
|
981 |
// We only want to handle one image after resize.
|
982 |
+
if ( empty( $bp->avatar_admin->resized ) || is_wp_error( $bp->avatar_admin->resized ) ) {
|
983 |
$bp->avatar_admin->image->file = $bp->avatar_admin->original['file'];
|
984 |
$bp->avatar_admin->image->dir = str_replace( $upload_path, '', $bp->avatar_admin->original['file'] );
|
985 |
} else {
|
@@ -67,7 +67,20 @@ function bp_blocks_editor_settings( $editor_settings = array() ) {
|
|
67 |
|
68 |
return $editor_settings;
|
69 |
}
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
/**
|
73 |
* Register a BuddyPress block type.
|
67 |
|
68 |
return $editor_settings;
|
69 |
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Select the right `block_editor_settings` filter according to WP version.
|
73 |
+
*
|
74 |
+
* @since 8.0.0
|
75 |
+
*/
|
76 |
+
function bp_block_init_editor_settings_filter() {
|
77 |
+
if ( function_exists( 'get_block_editor_settings' ) ) {
|
78 |
+
add_filter( 'block_editor_settings_all', 'bp_blocks_editor_settings' );
|
79 |
+
} else {
|
80 |
+
add_filter( 'block_editor_settings', 'bp_blocks_editor_settings' );
|
81 |
+
}
|
82 |
+
}
|
83 |
+
add_action( 'bp_init', 'bp_block_init_editor_settings_filter' );
|
84 |
|
85 |
/**
|
86 |
* Register a BuddyPress block type.
|
@@ -15,7 +15,7 @@ function t(o,e){return module.exports=t=Object.setPrototypeOf||function(t,o){ret
|
|
15 |
},{}],"RISo":[function(require,module,exports) {
|
16 |
var e=require("./setPrototypeOf");function r(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),t&&e(r,t)}module.exports=r;
|
17 |
},{"./setPrototypeOf":"zqo5"}],"W80x":[function(require,module,exports) {
|
18 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=o(require("@babel/runtime/helpers/classCallCheck")),t=o(require("@babel/runtime/helpers/createClass")),r=o(require("@babel/runtime/helpers/assertThisInitialized")),a=o(require("@babel/runtime/helpers/possibleConstructorReturn")),s=o(require("@babel/runtime/helpers/getPrototypeOf")),n=o(require("@babel/runtime/helpers/inherits"));function o(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=l();return function(){var r,n=(0,s.default)(e);if(t){var o=(0,s.default)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,a.default)(this,r)}}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return
|
19 |
},{"@babel/runtime/helpers/classCallCheck":"IC7x","@babel/runtime/helpers/createClass":"WiqS","@babel/runtime/helpers/assertThisInitialized":"NS7G","@babel/runtime/helpers/possibleConstructorReturn":"oXYo","@babel/runtime/helpers/getPrototypeOf":"goD2","@babel/runtime/helpers/inherits":"RISo"}],"iA92":[function(require,module,exports) {
|
20 |
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("./autocompleter"));function t(e){return e&&e.__esModule?e:{default:e}}var r={AutoCompleter:e.default};exports.default=r;
|
21 |
},{"./autocompleter":"W80x"}],"Ee8M":[function(require,module,exports) {
|
15 |
},{}],"RISo":[function(require,module,exports) {
|
16 |
var e=require("./setPrototypeOf");function r(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),t&&e(r,t)}module.exports=r;
|
17 |
},{"./setPrototypeOf":"zqo5"}],"W80x":[function(require,module,exports) {
|
18 |
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=o(require("@babel/runtime/helpers/classCallCheck")),t=o(require("@babel/runtime/helpers/createClass")),r=o(require("@babel/runtime/helpers/assertThisInitialized")),a=o(require("@babel/runtime/helpers/possibleConstructorReturn")),s=o(require("@babel/runtime/helpers/getPrototypeOf")),n=o(require("@babel/runtime/helpers/inherits"));function o(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=l();return function(){var r,n=(0,s.default)(e);if(t){var o=(0,s.default)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,a.default)(this,r)}}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var c=wp,i=c.apiFetch,m=c.components.Popover,p=c.element,h=p.Component,f=p.Fragment,d=p.createElement,b=c.i18n.__,v=c.url.addQueryArgs,_=function(a){(0,n.default)(o,a);var s=u(o);function o(){var t;return(0,e.default)(this,o),(t=s.apply(this,arguments)).state={search:"",items:[],error:""},t.searchItemName=t.searchItemName.bind((0,r.default)(t)),t.selectItemName=t.selectItemName.bind((0,r.default)(t)),t}return(0,t.default)(o,[{key:"searchItemName",value:function(e){var t=this,r=this.state.search,a=this.props,s=a.component,n=a.objectQueryArgs;this.setState({search:e}),e.length<r.length&&this.setState({items:[]});var o="/buddypress/v1/"+s,u={};e&&(u.search=encodeURIComponent(e)),n&&(u=Object.assign(u,n)),i({path:v(o,u)}).then(function(e){t.setState({items:e})},function(e){t.setState({error:e.message})})}},{key:"selectItemName",value:function(e,t){var r=this.props.onSelectItem;return e.preventDefault(),this.setState({search:"",items:[],error:""}),r({itemID:t})}},{key:"render",value:function(){var e,t=this,r=this.state,a=r.search,s=r.items,n=this.props,o=n.ariaLabel,u=n.placeholder,l=n.useAvatar,c=n.slugValue;return o||(o=b("Item's name","buddypress")),u||(u=b("Enter Item's name here…","buddypress")),s.length&&(e=s.map(function(e){return d("button",{type:"button",key:"editor-autocompleters__item-item-"+e.id,role:"option","aria-selected":"true",className:"components-button components-autocomplete__result editor-autocompleters__user",onClick:function(r){return t.selectItemName(r,e.id)}},l&&d("img",{key:"avatar",className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls.thumb}),d("span",{key:"name",className:"editor-autocompleters__user-name"},e.name),c&&null!==c(e)&&d("span",{key:"slug",className:"editor-autocompleters__user-slug"},c(e)))})),d(f,null,d("input",{type:"text",value:a,className:"components-placeholder__input","aria-label":o,placeholder:u,onChange:function(e){return t.searchItemName(e.target.value)}}),0!==s.length&&d(m,{className:"components-autocomplete__popover",focusOnMount:!1,position:"bottom left"},d("div",{className:"components-autocomplete__results"},e)))}}]),o}(h),y=_;exports.default=y;
|
19 |
},{"@babel/runtime/helpers/classCallCheck":"IC7x","@babel/runtime/helpers/createClass":"WiqS","@babel/runtime/helpers/assertThisInitialized":"NS7G","@babel/runtime/helpers/possibleConstructorReturn":"oXYo","@babel/runtime/helpers/getPrototypeOf":"goD2","@babel/runtime/helpers/inherits":"RISo"}],"iA92":[function(require,module,exports) {
|
20 |
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("./autocompleter"));function t(e){return e&&e.__esModule?e:{default:e}}var r={AutoCompleter:e.default};exports.default=r;
|
21 |
},{"./autocompleter":"W80x"}],"Ee8M":[function(require,module,exports) {
|
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["../../../../../node_modules/@babel/runtime/helpers/classCallCheck.js","../../../../../node_modules/@babel/runtime/helpers/createClass.js","../../../../../node_modules/@babel/runtime/helpers/assertThisInitialized.js","../../../../../node_modules/@babel/runtime/helpers/typeof.js","../../../../../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","../../../../../node_modules/@babel/runtime/helpers/getPrototypeOf.js","../../../../../node_modules/@babel/runtime/helpers/setPrototypeOf.js","../../../../../node_modules/@babel/runtime/helpers/inherits.js","components/autocompleter.js","components/index.js","block-components.js"],"names":["AutoCompleter","wp","apiFetch","Popover","components","element","Component","Fragment","createElement","__","i18n","addQueryArgs","url","arguments","state","search","items","error","searchItemName","bind","selectItemName","value","props","component","objectQueryArgs","setState","length","path","queryArgs","encodeURIComponent","Object","assign","then","message","event","itemID","onSelectItem","preventDefault","itemsList","ariaLabel","placeholder","useAvatar","slugValue","map","item","id","avatar_urls","thumb","name","target"],"mappings":";AAAA,SAAA,EAAA,EAAA,GACA,KAAA,aAAA,GACA,MAAA,IAAA,UAAA,qCAIA,OAAA,QAAA;;ACNA,SAAA,EAAA,EAAA,GACA,IAAA,IAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,CACA,IAAA,EAAA,EAAA,GACA,EAAA,WAAA,EAAA,aAAA,EACA,EAAA,cAAA,EACA,UAAA,IAAA,EAAA,UAAA,GACA,OAAA,eAAA,EAAA,EAAA,IAAA,IAIA,SAAA,EAAA,EAAA,EAAA,GAGA,OAFA,GAAA,EAAA,EAAA,UAAA,GACA,GAAA,EAAA,EAAA,GACA,EAGA,OAAA,QAAA;;AChBA,SAAA,EAAA,GACA,QAAA,IAAA,EACA,MAAA,IAAA,eAAA,6DAGA,OAAA,EAGA,OAAA,QAAA;;ACRA,SAAA,EAAA,GAaA,MAVA,mBAAA,QAAA,iBAAA,OAAA,SACA,OAAA,QAAA,EAAA,SAAA,GACA,cAAA,GAGA,OAAA,QAAA,EAAA,SAAA,GACA,OAAA,GAAA,mBAAA,QAAA,EAAA,cAAA,QAAA,IAAA,OAAA,UAAA,gBAAA,GAIA,EAAA,GAGA,OAAA,QAAA;;AChBA,IAAA,EAAA,QAAA,qBAEA,EAAA,QAAA,2BAEA,SAAA,EAAA,EAAA,GACA,OAAA,GAAA,WAAA,EAAA,IAAA,mBAAA,EAIA,EAAA,GAHA,EAMA,OAAA,QAAA;;ACZA,SAAA,EAAA,GAIA,OAHA,OAAA,QAAA,EAAA,OAAA,eAAA,OAAA,eAAA,SAAA,GACA,OAAA,EAAA,WAAA,OAAA,eAAA,IAEA,EAAA,GAGA,OAAA,QAAA;;ACPA,SAAA,EAAA,EAAA,GAMA,OALA,OAAA,QAAA,EAAA,OAAA,gBAAA,SAAA,EAAA,GAEA,OADA,EAAA,UAAA,EACA,GAGA,EAAA,EAAA,GAGA,OAAA,QAAA;;ACTA,IAAA,EAAA,QAAA,oBAEA,SAAA,EAAA,EAAA,GACA,GAAA,mBAAA,GAAA,OAAA,EACA,MAAA,IAAA,UAAA,sDAGA,EAAA,UAAA,OAAA,OAAA,GAAA,EAAA,UAAA,CACA,YAAA,CACA,MAAA,EACA,UAAA,EACA,cAAA,KAGA,GAAA,EAAA,EAAA,GAGA,OAAA,QAAA;;ACyHeA,aAAAA,OAAAA,eAAAA,QAAAA,aAAAA,CAAAA,OAAAA,IAAAA,QAAAA,aAAAA,EAAAA,IAAAA,EAAAA,EAAAA,QAAAA,0CAAAA,EAAAA,EAAAA,QAAAA,uCAAAA,EAAAA,EAAAA,QAAAA,iDAAAA,EAAAA,EAAAA,QAAAA,qDAAAA,EAAAA,EAAAA,QAAAA,0CAAAA,EAAAA,EAAAA,QAAAA,oCAAAA,SAAAA,EAAAA,GAAAA,OAAAA,GAAAA,EAAAA,WAAAA,EAAAA,CAAAA,QAAAA,GAAAA,SAAAA,EAAAA,GAAAA,IAAAA,EAAAA,IAAAA,OAAAA,WAAAA,IAAAA,EAAAA,GAAAA,EAAAA,EAAAA,SAAAA,GAAAA,GAAAA,EAAAA,CAAAA,IAAAA,GAAAA,EAAAA,EAAAA,SAAAA,MAAAA,YAAAA,EAAAA,QAAAA,UAAAA,EAAAA,UAAAA,QAAAA,EAAAA,EAAAA,MAAAA,KAAAA,WAAAA,OAAAA,EAAAA,EAAAA,SAAAA,KAAAA,IAAAA,SAAAA,IAAAA,GAAAA,oBAAAA,UAAAA,QAAAA,UAAAA,OAAAA,EAAAA,GAAAA,QAAAA,UAAAA,KAAAA,OAAAA,EAAAA,GAAAA,mBAAAA,MAAAA,OAAAA,EAAAA,IAAAA,OAAAA,KAAAA,UAAAA,SAAAA,KAAAA,QAAAA,UAAAA,KAAAA,GAAAA,gBAAAA,EAAAA,MAAAA,GAAAA,OAAAA,GAvHXC,IAAAA,EAAAA,GAfHC,EAAAA,EAAAA,SAECC,EADDC,EAAAA,WACCD,QAEDE,EAAAA,EAAAA,QACCC,EAAAA,EAAAA,UACAC,EAAAA,EAAAA,SACAC,EAAAA,EAAAA,cAGAC,EADDC,EAAAA,KACCD,GAGAE,EADDC,EAAAA,IACCD,aAIIX,EAAAA,SAAAA,IAqHSA,EAAAA,EAAAA,SAAAA,EAAAA,GAAAA,IAAAA,EAAAA,EAAAA,GApHA,SAAA,IAAA,IAAA,EAAA,OAAA,EAAA,EAAA,SAAA,KAAA,IACHa,EAAAA,EAAAA,MAAAA,KAAAA,YAELC,MAAQ,CACZC,OAAQ,GACRC,MAAO,GACPC,MAAO,IAGHC,EAAAA,eAAiB,EAAKA,eAAeC,MAA1C,EAAA,EAAA,SAAA,IACKC,EAAAA,eAAiB,EAAKA,eAAeD,MAA1C,EAAA,EAAA,SAAA,IAVa,EAoHAnB,OAAAA,EAAAA,EAAAA,SAAAA,EAAAA,CAAAA,CAAAA,IAAAA,iBAvGEqB,MAAAA,SAAAA,GAAQ,IAAA,EAAA,KACfN,EAAW,KAAKD,MAAhBC,OAC+B,EAAA,KAAKO,MAApCC,EAAAA,EAAAA,UAAWC,EAAAA,EAAAA,gBACdC,KAAAA,SAAU,CAAEV,OAAQM,IAEpBA,EAAMK,OAASX,EAAOW,QACrBD,KAAAA,SAAU,CAAET,MAAO,KAGrBW,IAAAA,EAAM,kBAAoBJ,EAC1BK,EAAY,GAEXP,IACJO,EAAUb,OAASc,mBAAoBR,IAGnCG,IACJI,EAAYE,OAAOC,OAAQH,EAAWJ,IAGvCtB,EAAU,CAAEyB,KAAOhB,EAAcgB,EAAMC,KAAgBI,KAAM,SAAAhB,GAC5D,EAAKS,SAAU,CAAET,MAAOA,KACtB,SAAAC,GACF,EAAKQ,SAAU,CAAER,MAAOA,EAAMgB,cAgFlBjC,CAAAA,IAAAA,iBA5EEkC,MAAAA,SAAAA,EAAOC,GACdC,IAAAA,EAAiB,KAAKd,MAAtBc,aASDA,OARPF,EAAMG,iBAEDZ,KAAAA,SAAU,CACdV,OAAQ,GACRC,MAAO,GACPC,MAAO,KAGDmB,EAAc,CAAED,OAAQA,MAkElBnC,CAAAA,IAAAA,SA/DL,MAAA,WAAA,IAGJsC,EAHI,EAAA,KACkB,EAAA,KAAKxB,MAAvBC,EAAAA,EAAAA,OAAQC,EAAAA,EAAAA,MACuC,EAAA,KAAKM,MAAtDiB,EAAAA,EAAAA,UAAWC,EAAAA,EAAAA,YAAaC,EAAAA,EAAAA,UAAWC,EAAAA,EAAAA,UAoCxC,OAjCMH,IACNA,EAAY9B,EAAI,cAAgB,eAG1B+B,IACNA,EAAc/B,EAAI,0BAA4B,eAG1CO,EAAMU,SACVY,EAAYtB,EAAM2B,IAAK,SAAEC,GAEvB,OAAA,EAAA,SAAA,CACC,KAAK,SAAS,IAAM,oCAAsCA,EAAKC,GAC/D,KAAK,SACS,gBAAA,OACd,UAAU,gFACV,QAAU,SAAEX,GAAW,OAAA,EAAKd,eAAgBc,EAAOU,EAAKC,MAEtDJ,GACD,EAAA,MAAA,CAAK,IAAI,SAAS,UAAU,qCAAqC,IAAI,GAAG,IAAMG,EAAKE,YAAYC,QAGhG,EAAA,OAAA,CAAM,IAAI,OAAO,UAAU,oCAAqCH,EAAKI,MAEnEN,GAAa,OAASA,EAAWE,IAClC,EAAA,OAAA,CAAM,IAAI,OAAO,UAAU,oCAAqCF,EAAWE,QAQ/E,EAAC,EACA,KAAA,EAAA,QAAA,CACC,KAAK,OACL,MAAQ7B,EACR,UAAU,gCACGwB,aAAAA,EACb,YAAcC,EACd,SAAW,SAAEN,GAAW,OAAA,EAAKhB,eAAgBgB,EAAMe,OAAO5B,UAEzD,IAAML,EAAMU,QACb,EAAC,EAAD,CACC,UAAU,mCACV,cAAe,EACf,SAAS,eAET,EAAA,MAAA,CAAK,UAAU,oCACZY,SASMtC,EArHTA,CAAsBM,GAqHbN,EAAAA,EAAAA,QAAAA,QAAAA;;ACvIA,aAAA,OAAA,eAAA,QAAA,aAAA,CAAA,OAAA,IAAA,QAAA,aAAA,EAFf,IAAA,EAAA,EAAA,QAAA,oBAEe,SAAA,EAAA,GAAA,OAAA,GAAA,EAAA,WAAA,EAAA,CAAA,QAAA,GAAA,IAAA,EAAA,CACdA,cAAAA,EAAAA,SADc,QAAA,QAAA;;ACHf,aAAA,OAAA,eAAA,QAAA,aAAA,CAAA,OAAA,IAAA,OAAA,eAAA,QAAA,kBAAA,CAAA,YAAA,EAAA,IAAA,WAAA,OAAA,EAAA,WAAA,IAAA,EAAA,EAAA,QAAA,iBAAA,SAAA,EAAA,GAAA,OAAA,GAAA,EAAA,WAAA,EAAA,CAAA,QAAA","file":"block-components.js","sourceRoot":"../../../src/js/bp-core/js/block-components","sourcesContent":["function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","var _typeof = require(\"../helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","/**\n * WordPress dependencies.\n */\nconst {\n\tapiFetch,\n\tcomponents: {\n\t\tPopover,\n\t},\n\telement: {\n\t\tComponent,\n\t\tFragment,\n\t\tcreateElement,\n\t},\n\ti18n: {\n\t\t__,\n\t},\n\turl: {\n\t\taddQueryArgs,\n\t},\n} = wp;\n\nclass AutoCompleter extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\tsearch: '',\n\t\t\titems: [],\n\t\t\terror: '',\n\t\t};\n\n\t\tthis.searchItemName = this.searchItemName.bind( this );\n\t\tthis.selectItemName = this.selectItemName.bind( this );\n\t}\n\n\tsearchItemName( value ) {\n\t\tconst { search } = this.state;\n\t\tconst { component, objectQueryArgs } = this.props;\n\t\tthis.setState( { search: value } );\n\n\t\tif ( value.length < search.length ) {\n\t\t\tthis.setState( { items: [] } );\n\t\t}\n\n\t\tlet path= '/buddypress/v1/' + component;\n\t\tlet queryArgs = {};\n\n\t\tif ( value ) {\n\t\t\tqueryArgs.search = encodeURIComponent( value );\n\t\t}\n\n\t\tif ( objectQueryArgs ) {\n\t\t\tqueryArgs = Object.assign( queryArgs, objectQueryArgs );\n\t\t}\n\n\t\tapiFetch( { path: addQueryArgs( path, queryArgs ) } ).then( items => {\n\t\t\tthis.setState( { items: items } );\n\t\t}, error => {\n\t\t\tthis.setState( { error: error.message } );\n\t\t} );\n\t}\n\n\tselectItemName( event, itemID ) {\n\t\tconst { onSelectItem } = this.props;\n\t\tevent.preventDefault();\n\n\t\tthis.setState( {\n\t\t\tsearch: '',\n\t\t\titems: [],\n\t\t\terror: '',\n\t\t} );\n\n\t\treturn onSelectItem( { itemID: itemID } );\n\t}\n\n\trender() {\n\t\tconst { search, items } = this.state;\n\t\tlet { ariaLabel, placeholder, useAvatar, slugValue } = this.props;\n\t\tlet itemsList;\n\n\t\tif ( ! ariaLabel ) {\n\t\t\tariaLabel = __( 'Item\\'s name', 'buddypress' );\n\t\t}\n\n\t\tif ( ! placeholder ) {\n\t\t\tplaceholder = __( 'Enter Item\\'s name here…', 'buddypress' );\n\t\t}\n\n\t\tif ( items.length ) {\n\t\t\titemsList = items.map( ( item ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\" key={ 'editor-autocompleters__item-item-' + item.id }\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\taria-selected=\"true\"\n\t\t\t\t\t\tclassName=\"components-button components-autocomplete__result editor-autocompleters__user\"\n\t\t\t\t\t\tonClick={ ( event ) => this.selectItemName( event, item.id ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ useAvatar && (\n\t\t\t\t\t\t\t<img key=\"avatar\" className=\"editor-autocompleters__user-avatar\" alt=\"\" src={ item.avatar_urls.thumb } />\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t<span key=\"name\" className=\"editor-autocompleters__user-name\">{ item.name }</span>\n\n\t\t\t\t\t\t{ slugValue && null !== slugValue( item ) && (\n\t\t\t\t\t\t\t<span key=\"slug\" className=\"editor-autocompleters__user-slug\">{ slugValue( item ) }</span>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</button>\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\treturn (\n\t\t\t<Fragment>\n\t\t\t\t<input\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tvalue={ search }\n\t\t\t\t\tclassName=\"components-placeholder__input\"\n\t\t\t\t\taria-label={ ariaLabel }\n\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\tonChange={ ( event ) => this.searchItemName( event.target.value ) }\n\t\t\t\t/>\n\t\t\t\t{ 0 !== items.length &&\n\t\t\t\t\t<Popover\n\t\t\t\t\t\tclassName=\"components-autocomplete__popover\"\n\t\t\t\t\t\tfocusOnMount={ false }\n\t\t\t\t\t\tposition=\"bottom left\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"components-autocomplete__results\">\n\t\t\t\t\t\t\t{ itemsList }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Popover>\n\t\t\t\t}\n\t\t\t</Fragment>\n\t\t);\n\t}\n}\n\nexport default AutoCompleter;\n","// Components\nimport AutoCompleter from './autocompleter'\n\nexport default {\n\tAutoCompleter\n};\n","export { default as blockComponents } from './components';\n"]}
|
1 |
+
{"version":3,"sources":["../../../../../node_modules/@babel/runtime/helpers/classCallCheck.js","../../../../../node_modules/@babel/runtime/helpers/createClass.js","../../../../../node_modules/@babel/runtime/helpers/assertThisInitialized.js","../../../../../node_modules/@babel/runtime/helpers/typeof.js","../../../../../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","../../../../../node_modules/@babel/runtime/helpers/getPrototypeOf.js","../../../../../node_modules/@babel/runtime/helpers/setPrototypeOf.js","../../../../../node_modules/@babel/runtime/helpers/inherits.js","components/autocompleter.js","components/index.js","block-components.js"],"names":["AutoCompleter","wp","apiFetch","Popover","components","element","Component","Fragment","createElement","__","i18n","addQueryArgs","url","arguments","state","search","items","error","searchItemName","bind","selectItemName","value","props","component","objectQueryArgs","setState","length","path","queryArgs","encodeURIComponent","Object","assign","then","message","event","itemID","onSelectItem","preventDefault","itemsList","ariaLabel","placeholder","useAvatar","slugValue","map","item","id","avatar_urls","thumb","name","target"],"mappings":";AAAA,SAAA,EAAA,EAAA,GACA,KAAA,aAAA,GACA,MAAA,IAAA,UAAA,qCAIA,OAAA,QAAA;;ACNA,SAAA,EAAA,EAAA,GACA,IAAA,IAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,CACA,IAAA,EAAA,EAAA,GACA,EAAA,WAAA,EAAA,aAAA,EACA,EAAA,cAAA,EACA,UAAA,IAAA,EAAA,UAAA,GACA,OAAA,eAAA,EAAA,EAAA,IAAA,IAIA,SAAA,EAAA,EAAA,EAAA,GAGA,OAFA,GAAA,EAAA,EAAA,UAAA,GACA,GAAA,EAAA,EAAA,GACA,EAGA,OAAA,QAAA;;AChBA,SAAA,EAAA,GACA,QAAA,IAAA,EACA,MAAA,IAAA,eAAA,6DAGA,OAAA,EAGA,OAAA,QAAA;;ACRA,SAAA,EAAA,GAaA,MAVA,mBAAA,QAAA,iBAAA,OAAA,SACA,OAAA,QAAA,EAAA,SAAA,GACA,cAAA,GAGA,OAAA,QAAA,EAAA,SAAA,GACA,OAAA,GAAA,mBAAA,QAAA,EAAA,cAAA,QAAA,IAAA,OAAA,UAAA,gBAAA,GAIA,EAAA,GAGA,OAAA,QAAA;;AChBA,IAAA,EAAA,QAAA,qBAEA,EAAA,QAAA,2BAEA,SAAA,EAAA,EAAA,GACA,OAAA,GAAA,WAAA,EAAA,IAAA,mBAAA,EAIA,EAAA,GAHA,EAMA,OAAA,QAAA;;ACZA,SAAA,EAAA,GAIA,OAHA,OAAA,QAAA,EAAA,OAAA,eAAA,OAAA,eAAA,SAAA,GACA,OAAA,EAAA,WAAA,OAAA,eAAA,IAEA,EAAA,GAGA,OAAA,QAAA;;ACPA,SAAA,EAAA,EAAA,GAMA,OALA,OAAA,QAAA,EAAA,OAAA,gBAAA,SAAA,EAAA,GAEA,OADA,EAAA,UAAA,EACA,GAGA,EAAA,EAAA,GAGA,OAAA,QAAA;;ACTA,IAAA,EAAA,QAAA,oBAEA,SAAA,EAAA,EAAA,GACA,GAAA,mBAAA,GAAA,OAAA,EACA,MAAA,IAAA,UAAA,sDAGA,EAAA,UAAA,OAAA,OAAA,GAAA,EAAA,UAAA,CACA,YAAA,CACA,MAAA,EACA,UAAA,EACA,cAAA,KAGA,GAAA,EAAA,EAAA,GAGA,OAAA,QAAA;;ACyHeA,aAAAA,OAAAA,eAAAA,QAAAA,aAAAA,CAAAA,OAAAA,IAAAA,QAAAA,aAAAA,EAAAA,IAAAA,EAAAA,EAAAA,QAAAA,0CAAAA,EAAAA,EAAAA,QAAAA,uCAAAA,EAAAA,EAAAA,QAAAA,iDAAAA,EAAAA,EAAAA,QAAAA,qDAAAA,EAAAA,EAAAA,QAAAA,0CAAAA,EAAAA,EAAAA,QAAAA,oCAAAA,SAAAA,EAAAA,GAAAA,OAAAA,GAAAA,EAAAA,WAAAA,EAAAA,CAAAA,QAAAA,GAAAA,SAAAA,EAAAA,GAAAA,IAAAA,EAAAA,IAAAA,OAAAA,WAAAA,IAAAA,EAAAA,GAAAA,EAAAA,EAAAA,SAAAA,GAAAA,GAAAA,EAAAA,CAAAA,IAAAA,GAAAA,EAAAA,EAAAA,SAAAA,MAAAA,YAAAA,EAAAA,QAAAA,UAAAA,EAAAA,UAAAA,QAAAA,EAAAA,EAAAA,MAAAA,KAAAA,WAAAA,OAAAA,EAAAA,EAAAA,SAAAA,KAAAA,IAAAA,SAAAA,IAAAA,GAAAA,oBAAAA,UAAAA,QAAAA,UAAAA,OAAAA,EAAAA,GAAAA,QAAAA,UAAAA,KAAAA,OAAAA,EAAAA,GAAAA,mBAAAA,MAAAA,OAAAA,EAAAA,IAAAA,OAAAA,QAAAA,UAAAA,QAAAA,KAAAA,QAAAA,UAAAA,QAAAA,GAAAA,gBAAAA,EAAAA,MAAAA,GAAAA,OAAAA,GAvHXC,IAAAA,EAAAA,GAfHC,EAAAA,EAAAA,SAECC,EADDC,EAAAA,WACCD,QAEDE,EAAAA,EAAAA,QACCC,EAAAA,EAAAA,UACAC,EAAAA,EAAAA,SACAC,EAAAA,EAAAA,cAGAC,EADDC,EAAAA,KACCD,GAGAE,EADDC,EAAAA,IACCD,aAIIX,EAAAA,SAAAA,IAqHSA,EAAAA,EAAAA,SAAAA,EAAAA,GAAAA,IAAAA,EAAAA,EAAAA,GApHA,SAAA,IAAA,IAAA,EAAA,OAAA,EAAA,EAAA,SAAA,KAAA,IACHa,EAAAA,EAAAA,MAAAA,KAAAA,YAELC,MAAQ,CACZC,OAAQ,GACRC,MAAO,GACPC,MAAO,IAGHC,EAAAA,eAAiB,EAAKA,eAAeC,MAA1C,EAAA,EAAA,SAAA,IACKC,EAAAA,eAAiB,EAAKA,eAAeD,MAA1C,EAAA,EAAA,SAAA,IAVa,EAoHAnB,OAAAA,EAAAA,EAAAA,SAAAA,EAAAA,CAAAA,CAAAA,IAAAA,iBAvGEqB,MAAAA,SAAAA,GAAQ,IAAA,EAAA,KACfN,EAAW,KAAKD,MAAhBC,OAC+B,EAAA,KAAKO,MAApCC,EAAAA,EAAAA,UAAWC,EAAAA,EAAAA,gBACdC,KAAAA,SAAU,CAAEV,OAAQM,IAEpBA,EAAMK,OAASX,EAAOW,QACrBD,KAAAA,SAAU,CAAET,MAAO,KAGrBW,IAAAA,EAAM,kBAAoBJ,EAC1BK,EAAY,GAEXP,IACJO,EAAUb,OAASc,mBAAoBR,IAGnCG,IACJI,EAAYE,OAAOC,OAAQH,EAAWJ,IAGvCtB,EAAU,CAAEyB,KAAOhB,EAAcgB,EAAMC,KAAgBI,KAAM,SAAAhB,GAC5D,EAAKS,SAAU,CAAET,MAAOA,KACtB,SAAAC,GACF,EAAKQ,SAAU,CAAER,MAAOA,EAAMgB,cAgFlBjC,CAAAA,IAAAA,iBA5EEkC,MAAAA,SAAAA,EAAOC,GACdC,IAAAA,EAAiB,KAAKd,MAAtBc,aASDA,OARPF,EAAMG,iBAEDZ,KAAAA,SAAU,CACdV,OAAQ,GACRC,MAAO,GACPC,MAAO,KAGDmB,EAAc,CAAED,OAAQA,MAkElBnC,CAAAA,IAAAA,SA/DL,MAAA,WAAA,IAGJsC,EAHI,EAAA,KACkB,EAAA,KAAKxB,MAAvBC,EAAAA,EAAAA,OAAQC,EAAAA,EAAAA,MACuC,EAAA,KAAKM,MAAtDiB,EAAAA,EAAAA,UAAWC,EAAAA,EAAAA,YAAaC,EAAAA,EAAAA,UAAWC,EAAAA,EAAAA,UAoCxC,OAjCMH,IACNA,EAAY9B,EAAI,cAAgB,eAG1B+B,IACNA,EAAc/B,EAAI,0BAA4B,eAG1CO,EAAMU,SACVY,EAAYtB,EAAM2B,IAAK,SAAEC,GAEvB,OAAA,EAAA,SAAA,CACC,KAAK,SAAS,IAAM,oCAAsCA,EAAKC,GAC/D,KAAK,SACS,gBAAA,OACd,UAAU,gFACV,QAAU,SAAEX,GAAW,OAAA,EAAKd,eAAgBc,EAAOU,EAAKC,MAEtDJ,GACD,EAAA,MAAA,CAAK,IAAI,SAAS,UAAU,qCAAqC,IAAI,GAAG,IAAMG,EAAKE,YAAYC,QAGhG,EAAA,OAAA,CAAM,IAAI,OAAO,UAAU,oCAAqCH,EAAKI,MAEnEN,GAAa,OAASA,EAAWE,IAClC,EAAA,OAAA,CAAM,IAAI,OAAO,UAAU,oCAAqCF,EAAWE,QAQ/E,EAAC,EACA,KAAA,EAAA,QAAA,CACC,KAAK,OACL,MAAQ7B,EACR,UAAU,gCACGwB,aAAAA,EACb,YAAcC,EACd,SAAW,SAAEN,GAAW,OAAA,EAAKhB,eAAgBgB,EAAMe,OAAO5B,UAEzD,IAAML,EAAMU,QACb,EAAC,EAAD,CACC,UAAU,mCACV,cAAe,EACf,SAAS,eAET,EAAA,MAAA,CAAK,UAAU,oCACZY,SASMtC,EArHTA,CAAsBM,GAqHbN,EAAAA,EAAAA,QAAAA,QAAAA;;ACvIA,aAAA,OAAA,eAAA,QAAA,aAAA,CAAA,OAAA,IAAA,QAAA,aAAA,EAFf,IAAA,EAAA,EAAA,QAAA,oBAEe,SAAA,EAAA,GAAA,OAAA,GAAA,EAAA,WAAA,EAAA,CAAA,QAAA,GAAA,IAAA,EAAA,CACdA,cAAAA,EAAAA,SADc,QAAA,QAAA;;ACHf,aAAA,OAAA,eAAA,QAAA,aAAA,CAAA,OAAA,IAAA,OAAA,eAAA,QAAA,kBAAA,CAAA,YAAA,EAAA,IAAA,WAAA,OAAA,EAAA,WAAA,IAAA,EAAA,EAAA,QAAA,iBAAA,SAAA,EAAA,GAAA,OAAA,GAAA,EAAA,WAAA,EAAA,CAAA,QAAA","file":"block-components.js","sourceRoot":"../../../src/js/bp-core/js/block-components","sourcesContent":["function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","var _typeof = require(\"../helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","/**\n * WordPress dependencies.\n */\nconst {\n\tapiFetch,\n\tcomponents: {\n\t\tPopover,\n\t},\n\telement: {\n\t\tComponent,\n\t\tFragment,\n\t\tcreateElement,\n\t},\n\ti18n: {\n\t\t__,\n\t},\n\turl: {\n\t\taddQueryArgs,\n\t},\n} = wp;\n\nclass AutoCompleter extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\tsearch: '',\n\t\t\titems: [],\n\t\t\terror: '',\n\t\t};\n\n\t\tthis.searchItemName = this.searchItemName.bind( this );\n\t\tthis.selectItemName = this.selectItemName.bind( this );\n\t}\n\n\tsearchItemName( value ) {\n\t\tconst { search } = this.state;\n\t\tconst { component, objectQueryArgs } = this.props;\n\t\tthis.setState( { search: value } );\n\n\t\tif ( value.length < search.length ) {\n\t\t\tthis.setState( { items: [] } );\n\t\t}\n\n\t\tlet path= '/buddypress/v1/' + component;\n\t\tlet queryArgs = {};\n\n\t\tif ( value ) {\n\t\t\tqueryArgs.search = encodeURIComponent( value );\n\t\t}\n\n\t\tif ( objectQueryArgs ) {\n\t\t\tqueryArgs = Object.assign( queryArgs, objectQueryArgs );\n\t\t}\n\n\t\tapiFetch( { path: addQueryArgs( path, queryArgs ) } ).then( items => {\n\t\t\tthis.setState( { items: items } );\n\t\t}, error => {\n\t\t\tthis.setState( { error: error.message } );\n\t\t} );\n\t}\n\n\tselectItemName( event, itemID ) {\n\t\tconst { onSelectItem } = this.props;\n\t\tevent.preventDefault();\n\n\t\tthis.setState( {\n\t\t\tsearch: '',\n\t\t\titems: [],\n\t\t\terror: '',\n\t\t} );\n\n\t\treturn onSelectItem( { itemID: itemID } );\n\t}\n\n\trender() {\n\t\tconst { search, items } = this.state;\n\t\tlet { ariaLabel, placeholder, useAvatar, slugValue } = this.props;\n\t\tlet itemsList;\n\n\t\tif ( ! ariaLabel ) {\n\t\t\tariaLabel = __( 'Item\\'s name', 'buddypress' );\n\t\t}\n\n\t\tif ( ! placeholder ) {\n\t\t\tplaceholder = __( 'Enter Item\\'s name here…', 'buddypress' );\n\t\t}\n\n\t\tif ( items.length ) {\n\t\t\titemsList = items.map( ( item ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\" key={ 'editor-autocompleters__item-item-' + item.id }\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\taria-selected=\"true\"\n\t\t\t\t\t\tclassName=\"components-button components-autocomplete__result editor-autocompleters__user\"\n\t\t\t\t\t\tonClick={ ( event ) => this.selectItemName( event, item.id ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ useAvatar && (\n\t\t\t\t\t\t\t<img key=\"avatar\" className=\"editor-autocompleters__user-avatar\" alt=\"\" src={ item.avatar_urls.thumb } />\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t<span key=\"name\" className=\"editor-autocompleters__user-name\">{ item.name }</span>\n\n\t\t\t\t\t\t{ slugValue && null !== slugValue( item ) && (\n\t\t\t\t\t\t\t<span key=\"slug\" className=\"editor-autocompleters__user-slug\">{ slugValue( item ) }</span>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</button>\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\treturn (\n\t\t\t<Fragment>\n\t\t\t\t<input\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tvalue={ search }\n\t\t\t\t\tclassName=\"components-placeholder__input\"\n\t\t\t\t\taria-label={ ariaLabel }\n\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\tonChange={ ( event ) => this.searchItemName( event.target.value ) }\n\t\t\t\t/>\n\t\t\t\t{ 0 !== items.length &&\n\t\t\t\t\t<Popover\n\t\t\t\t\t\tclassName=\"components-autocomplete__popover\"\n\t\t\t\t\t\tfocusOnMount={ false }\n\t\t\t\t\t\tposition=\"bottom left\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"components-autocomplete__results\">\n\t\t\t\t\t\t\t{ itemsList }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Popover>\n\t\t\t\t}\n\t\t\t</Fragment>\n\t\t);\n\t}\n}\n\nexport default AutoCompleter;\n","// Components\nimport AutoCompleter from './autocompleter'\n\nexport default {\n\tAutoCompleter\n};\n","export { default as blockComponents } from './components';\n"]}
|
@@ -1 +1 @@
|
|
1 |
-
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(r){"use strict";var w=r.scrollTo=function(e,t,o){return r(window).scrollTo(e,t,o)};function i(e){return!e.nodeName||-1!==r.inArray(e.nodeName.toLowerCase(),["iframe","#document","html","body"])}function t(e){return"function"==typeof e}function n(e){return t(e)||r.isPlainObject(e)?e:{top:e,left:e}}return w.defaults={axis:"xy",duration:0,limit:!0},r.fn.scrollTo=function(e,o,h){"object"==typeof o&&(h=o,o=0),"
|
1 |
+
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(r){"use strict";var w=r.scrollTo=function(e,t,o){return r(window).scrollTo(e,t,o)};function i(e){return!e.nodeName||-1!==r.inArray(e.nodeName.toLowerCase(),["iframe","#document","html","body"])}function t(e){return"function"==typeof e}function n(e){return t(e)||r.isPlainObject(e)?e:{top:e,left:e}}return w.defaults={axis:"xy",duration:0,limit:!0},r.fn.scrollTo=function(e,o,h){"object"==typeof o&&(h=o,o=0),"max"===e&&(e=9e9),h=r.extend({},w.defaults,h="function"==typeof h?{onAfter:h}:h),o=o||h.duration;var x=h.queue&&1<h.axis.length;return x&&(o/=2),h.offset=n(h.offset),h.over=n(h.over),this.each(function(){if(null!==e){var f,u=i(this),a=u?this.contentWindow||window:this,c=r(a),l=e,d={};switch(typeof l){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(l)){l=n(l);break}l=u?r(l):r(l,a);case"object":if(0===l.length)return;(l.is||l.style)&&(f=(l=r(l)).offset())}var m=t(h.offset)&&h.offset(a,l)||h.offset;r.each(h.axis.split(""),function(e,t){var o="x"===t?"Left":"Top",n=o.toLowerCase(),r="scroll"+o,i=c[r](),s=w.max(a,t);f?(d[r]=f[n]+(u?0:i-c.offset()[n]),h.margin&&(d[r]-=parseInt(l.css("margin"+o),10)||0,d[r]-=parseInt(l.css("border"+o+"Width"),10)||0),d[r]+=m[n]||0,h.over[n]&&(d[r]+=l["x"===t?"width":"height"]()*h.over[n])):(n=l[n],d[r]=n.slice&&"%"===n.slice(-1)?parseFloat(n)/100*s:n),h.limit&&/^\d+$/.test(d[r])&&(d[r]=d[r]<=0?0:Math.min(d[r],s)),!e&&1<h.axis.length&&(i===d[r]?d={}:x&&(p(h.onAfterFirst),d={}))}),p(h.onAfter)}function p(e){var t=r.extend({},h,{queue:!0,duration:o,complete:e&&function(){e.call(a,l,h)}});c.animate(d,t)}})},w.max=function(e,t){var o="x"===t?"Width":"Height",n="scroll"+o;if(!i(e))return e[n]-r(e)[o.toLowerCase()]();t="client"+o,o=e.ownerDocument||e.document,e=o.documentElement,o=o.body;return Math.max(e[n],o[n])-Math.min(e[t],o[t])},r.Tween.propHooks.scrollLeft=r.Tween.propHooks.scrollTop={get:function(e){return r(e.elem)[e.prop]()},set:function(e){var t=this.get(e);if(e.options.interrupt&&e._last&&e._last!==t)return r(e.elem).stop();var o=Math.round(e.now);t!==o&&(r(e.elem)[e.prop](o),e._last=this.get(e))}},w});
|
@@ -1 +1 @@
|
|
1 |
-
!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}(function(l){var i,h;function t(t){this.currentFlag=null,this.controllers={},this.aliasMaps={},this.$inputor=l(t),this.setupRootElement(),this.listen()}h={ESC:27,TAB:9,ENTER:13,CTRL:17,A:65,P:80,N:78,LEFT:37,UP:38,RIGHT:39,DOWN:40,BACKSPACE:8,SPACE:32},i={beforeSave:function(t){return n.arrayToDefaultHash(t)},matcher:function(t,e,i,r){var n;return t=t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),i&&(t="(?:^|\\s)"+t),n=decodeURI("%C3%80"),i=decodeURI("%C3%BF"),(e=new RegExp(t+"([A-Za-z"+n+"-"+i+"0-9_"+(r?" ":"")+"'.+-]*)$|"+t+"([^\\x00-\\xff]*)$","gi").exec(e))?e[2]||e[1]:null},filter:function(t,e,i){for(var r,n=[],o=0,s=e.length;o<s;o++)r=e[o],~new String(r[i]).toLowerCase().indexOf(t.toLowerCase())&&n.push(r);return n},remoteFilter:null,sorter:function(t,e,i){var r,n,o,s;if(!t)return e;for(r=[],n=0,s=e.length;n<s;n++)(o=e[n]).atwho_order=new String(o[i]).toLowerCase().indexOf(t.toLowerCase()),-1<o.atwho_order&&r.push(o);return r.sort(function(t,e){return t.atwho_order-e.atwho_order})},tplEval:function(t,r){var e=t;try{return(e="string"!=typeof t?t(r):e).replace(/\$\{([^\}]*)\}/g,function(t,e,i){return r[e]})}catch(t){return""}},highlighter:function(t,e){return e?(e=new RegExp(">\\s*([^<]*?)("+e.replace("+","\\+")+")([^<]*)\\s*<","ig"),t.replace(e,function(t,e,i,r){return"> "+e+"<strong>"+i+"</strong>"+r+" <"})):t},beforeInsert:function(t,e,i){return t},beforeReposition:function(t){return t},afterMatchFailed:function(t,e){}},t.prototype.createContainer=function(t){var e;return null!=(e=this.$el)&&e.remove(),l(t.body).append(this.$el=l("<div class='atwho-container'></div>"))},t.prototype.setupRootElement=function(e,t){if(null==t&&(t=!1),e)this.window=e.contentWindow,this.document=e.contentDocument||this.window.document,this.iframe=e;else{this.document=this.$inputor[0].ownerDocument,this.window=this.document.defaultView||this.document.parentWindow;try{this.iframe=this.window.frameElement}catch(t){if(e=t,this.iframe=null,l.fn.atwho.debug)throw new Error("iframe auto-discovery is failed.\nPlease use `setIframe` to set the target iframe manually.\n"+e)}}return this.createContainer((this.iframeAsRoot=t)?this.document:document)},t.prototype.controller=function(t){var e,i,r,n;if(this.aliasMaps[t])i=this.controllers[this.aliasMaps[t]];else for(r in n=this.controllers)if(e=n[r],r===t){i=e;break}return i||this.controllers[this.currentFlag]},t.prototype.setContextFor=function(t){return this.currentFlag=t,this},t.prototype.reg=function(t,e){var i=(i=this.controllers)[t]||(i[t]=new(this.$inputor.is("[contentEditable]")?c:g)(this,t));return e.alias&&(this.aliasMaps[e.alias]=t),i.init(e),this},t.prototype.listen=function(){return this.$inputor.on("compositionstart",(a=this,function(t){var e;return null!=(e=a.controller())&&e.view.hide(),a.isComposing=!0,null})).on("compositionend",(s=this,function(t){return s.isComposing=!1,setTimeout(function(t){return s.dispatch(t)}),null})).on("keyup.atwhoInner",(o=this,function(t){return o.onKeyup(t)})).on("keydown.atwhoInner",(r=this,function(t){return r.onKeydown(t)})).on("blur.atwhoInner",(i=this,function(t){var e;if(e=i.controller())return e.expectedQueryCBId=null,e.view.hide(t,e.getOpt("displayTimeout"))})).on("click.atwhoInner",(e=this,function(t){return e.dispatch(t)})).on("scroll.atwhoInner",(n=this,function(){var r=n.$inputor.scrollTop();return function(t){var e,i=t.target.scrollTop;return r!==i&&null!=(e=n.controller())&&e.view.hide(t),r=i,!0}}()));var n,e,i,r,o,s,a},t.prototype.shutdown=function(){var t,e=this.controllers;for(t in e)e[t].destroy(),delete this.controllers[t];return this.$inputor.off(".atwhoInner"),this.$el.remove()},t.prototype.dispatch=function(t){var e,i,r=this.controllers,n=[];for(e in r)i=r[e],n.push(i.lookUp(t));return n},t.prototype.onKeyup=function(t){var e;switch(t.keyCode){case h.ESC:t.preventDefault(),null!=(e=this.controller())&&e.view.hide();break;case h.DOWN:case h.UP:case h.CTRL:case h.ENTER:l.noop();break;case h.P:case h.N:t.ctrlKey||this.dispatch(t);break;default:this.dispatch(t)}},t.prototype.onKeydown=function(t){var e,i=null!=(e=this.controller())?e.view:void 0;if(i&&i.visible())switch(t.keyCode){case h.ESC:t.preventDefault(),i.hide(t);break;case h.UP:t.preventDefault(),i.prev();break;case h.DOWN:t.preventDefault(),i.next();break;case h.P:if(!t.ctrlKey)return;t.preventDefault(),i.prev();break;case h.N:if(!t.ctrlKey)return;t.preventDefault(),i.next();break;case h.TAB:case h.ENTER:case h.SPACE:if(!i.visible())return;if(!this.controller().getOpt("spaceSelectsMatch")&&t.keyCode===h.SPACE)return;if(!this.controller().getOpt("tabSelectsMatch")&&t.keyCode===h.TAB)return;i.highlighted()?(t.preventDefault(),i.choose(t)):i.hide(t);break;default:l.noop()}};var o=t,r=[].slice;function e(t,e){this.app=t,this.at=e,this.$inputor=this.app.$inputor,this.id=this.$inputor[0].id||this.uid(),this.expectedQueryCBId=null,this.setting=null,this.query=null,this.pos=0,this.range=null,0===(this.$el=l("#atwho-ground-"+this.id,this.app.$el)).length&&this.app.$el.append(this.$el=l("<div id='atwho-ground-"+this.id+"'></div>")),this.model=new p(this),this.view=new f(this)}e.prototype.uid=function(){return(Math.random().toString(16)+"000000000").substr(2,8)+(new Date).getTime()},e.prototype.init=function(t){return this.setting=l.extend({},this.setting||l.fn.atwho.default,t),this.view.init(),this.model.reload(this.setting.data)},e.prototype.destroy=function(){return this.trigger("beforeDestroy"),this.model.destroy(),this.view.destroy(),this.$el.remove()},e.prototype.callDefault=function(){var e=arguments[0],t=2<=arguments.length?r.call(arguments,1):[];try{return i[e].apply(this,t)}catch(t){return l.error(t+" Or maybe At.js doesn't have function "+e)}},e.prototype.trigger=function(t,e){var i;return(e=null==e?[]:e).push(this),t=(i=this.getOpt("alias"))?t+"-"+i+".atwho":t+".atwho",this.$inputor.trigger(t,e)},e.prototype.callbacks=function(t){return this.getOpt("callbacks")[t]||i[t]},e.prototype.getOpt=function(t,e){try{return this.setting[t]}catch(t){return null}},e.prototype.insertContentFor=function(t){var e=this.getOpt("insertTpl"),t=l.extend({},t.data("item-data"),{"atwho-at":this.at});return this.callbacks("tplEval").call(this,e,t,"onInsert")},e.prototype.renderView=function(t){var e=this.getOpt("searchKey");return t=this.callbacks("sorter").call(this,this.query.text,t.slice(0,1001),e),this.view.render(t.slice(0,this.getOpt("limit")))},e.arrayToDefaultHash=function(t){var e,i,r,n;if(!Array.isArray(t))return t;for(n=[],e=0,r=t.length;e<r;e++)i=t[e],l.isPlainObject(i)?n.push(i):n.push({name:i});return n},e.prototype.lookUp=function(t){var e;if((!t||"click"!==t.type||this.getOpt("lookUpOnClick"))&&(!this.getOpt("suspendOnComposing")||!this.app.isComposing))return(e=this.catchQuery(t))?(this.app.setContextFor(this.at),(t=this.getOpt("delay"))?this._delayLookUp(e,t):this._lookUp(e)):this.expectedQueryCBId=null,e},e.prototype._delayLookUp=function(t,e){var i,r,n=Date.now?Date.now():(new Date).getTime();return this.previousCallTime||(this.previousCallTime=n),0<(i=e-(n-this.previousCallTime))&&i<e?(this.previousCallTime=n,this._stopDelayedCall(),this.delayedCallTimeout=setTimeout((r=this,function(){return r.previousCallTime=0,r.delayedCallTimeout=null,r._lookUp(t)}),e)):(this._stopDelayedCall(),this.previousCallTime!==n&&(this.previousCallTime=0),this._lookUp(t))},e.prototype._stopDelayedCall=function(){if(this.delayedCallTimeout)return clearTimeout(this.delayedCallTimeout),this.delayedCallTimeout=null},e.prototype._generateQueryCBId=function(){return{}},e.prototype._lookUp=function(t){var e=function(t,e){if(t===this.expectedQueryCBId)return e&&0<e.length?this.renderView(this.constructor.arrayToDefaultHash(e)):this.view.hide()};return this.expectedQueryCBId=this._generateQueryCBId(),this.model.query(t.text,l.proxy(e,this,this.expectedQueryCBId))};var n,s=function(t,e){for(var i in e)a.call(e,i)&&(t[i]=e[i]);function r(){this.constructor=t}return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},a={}.hasOwnProperty;function u(){return u.__super__.constructor.apply(this,arguments)}s(u,n=e),u.prototype.catchQuery=function(){var t=this.$inputor.val(),e=this.$inputor.caret("pos",{iframe:this.app.iframe}),i=t.slice(0,e),t=this.callbacks("matcher").call(this,this.at,i,this.getOpt("startWithSpace"),this.getOpt("acceptSpaceBar")),i="string"==typeof t;if(!(i&&t.length<this.getOpt("minLen",0)))return i&&t.length<=this.getOpt("maxLen",20)?(e=(i=e-t.length)+t.length,t={text:t,headPos:this.pos=i,endPos:e},this.trigger("matched",[this.at,t.text])):(t=null,this.view.hide()),this.query=t},u.prototype.rect=function(){var t,e;if(t=this.$inputor.caret("offset",this.pos-1,{iframe:this.app.iframe}))return this.app.iframe&&!this.app.iframeAsRoot&&(e=l(this.app.iframe).offset(),t.left+=e.left,t.top+=e.top),e=this.app.document.selection?0:2,{left:t.left,top:t.top,bottom:t.top+t.height+e}},u.prototype.insert=function(t,e){var i=this.$inputor,r=i.val(),n=r.slice(0,Math.max(this.query.headPos-this.at.length,0)),o=""===(o=this.getOpt("suffix"))?o:o||" ",r=""+n+(t+=o)+r.slice(this.query.endPos||0);return i.val(r),i.caret("pos",n.length+t.length,{iframe:this.app.iframe}),i.is(":focus")||i.trigger("focus"),i.trigger("change")};var c,p,f,d,g=u,s=function(t,e){for(var i in e)a.call(e,i)&&(t[i]=e[i]);function r(){this.constructor=t}return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},a={}.hasOwnProperty;function y(){return y.__super__.constructor.apply(this,arguments)}function v(t){this.context=t,this.at=this.context.at,this.storage=this.context.$inputor}function w(t){this.context=t,this.$el=l("<div class='atwho-view'><ul class='atwho-view-ul'></ul></div>"),this.$elUl=this.$el.children(),this.timeoutID=null,this.context.$el.append(this.$el),this.bindEvent()}s(y,n),y.prototype._getRange=function(){var t=this.app.window.getSelection();if(0<t.rangeCount)return t.getRangeAt(0)},y.prototype._setRange=function(t,e,i){if((i=null==i?this._getRange():i)&&e)return e=l(e)[0],"after"===t?(i.setEndAfter(e),i.setStartAfter(e)):(i.setEndBefore(e),i.setStartBefore(e)),i.collapse(!1),this._clearRange(i)},y.prototype._clearRange=function(t){var e;if(null==t&&(t=this._getRange()),e=this.app.window.getSelection(),null==this.ctrl_a_pressed)return e.removeAllRanges(),e.addRange(t)},y.prototype._movingEvent=function(t){var e;return"click"===t.type||(e=t.which)===h.RIGHT||e===h.LEFT||e===h.UP||e===h.DOWN},y.prototype._unwrap=function(t){var e;return(e=(t=l(t).unwrap().get(0)).nextSibling)&&e.nodeValue&&(t.nodeValue+=e.nodeValue,l(e).remove()),t},y.prototype.catchQuery=function(t){var e,i,r,n,o,s,a;if((a=this._getRange())&&a.collapsed){if(t.which===h.ENTER)return(i=l(a.startContainer).closest(".atwho-query")).contents().unwrap(),i.is(":empty")&&i.remove(),(i=l(".atwho-query",this.app.document)).text(i.text()).contents().last().unwrap(),void this._clearRange();if(/firefox/i.test(navigator.userAgent)){if(l(a.startContainer).is(this.$inputor))return void this._clearRange();t.which===h.BACKSPACE&&a.startContainer.nodeType===document.ELEMENT_NODE&&0<=(o=a.startOffset-1)?((r=a.cloneRange()).setStart(a.startContainer,o),l(r.cloneContents()).contents().last().is(".atwho-inserted")&&(o=l(a.startContainer).contents().get(o),this._setRange("after",l(o).contents().last()))):t.which===h.LEFT&&a.startContainer.nodeType===document.TEXT_NODE&&(e=l(a.startContainer.previousSibling)).is(".atwho-inserted")&&0===a.startOffset&&this._setRange("after",e.contents().last())}if(l(a.startContainer).closest(".atwho-inserted").addClass("atwho-query").siblings().removeClass("atwho-query"),0<(i=l(".atwho-query",this.app.document)).length&&i.is(":empty")&&0===i.text().length&&i.remove(),this._movingEvent(t)||i.removeClass("atwho-inserted"),0<i.length)switch(t.which){case h.LEFT:return this._setRange("before",i.get(0),a),void i.removeClass("atwho-query");case h.RIGHT:return this._setRange("after",i.get(0).nextSibling,a),void i.removeClass("atwho-query")}return 0<i.length&&(s=i.attr("data-atwho-at-query"))&&(i.empty().html(s).attr("data-atwho-at-query",null),this._setRange("after",i.get(0),a)),(r=a.cloneRange()).setStart(a.startContainer,0),r="string"==typeof(s=this.callbacks("matcher").call(this,this.at,r.toString(),this.getOpt("startWithSpace"),this.getOpt("acceptSpaceBar"))),0===i.length&&r&&0<=(n=a.startOffset-this.at.length-s.length)&&(a.setStart(a.startContainer,n),i=l("<span/>",this.app.document).attr(this.getOpt("editableAtwhoQueryAttrs")).addClass("atwho-query"),a.surroundContents(i.get(0)),(n=i.contents().last().get(0))&&(/firefox/i.test(navigator.userAgent)?(a.setStart(n,n.length),a.setEnd(n,n.length),this._clearRange(a)):this._setRange("after",n,a))),r&&s.length<this.getOpt("minLen",0)?void 0:r&&s.length<=this.getOpt("maxLen",20)?(s={text:s,el:i},this.trigger("matched",[this.at,s.text]),this.query=s):(this.view.hide(),this.query={el:i},0<=i.text().indexOf(this.at)&&(this._movingEvent(t)&&i.hasClass("atwho-inserted")?i.removeClass("atwho-query"):!1!==this.callbacks("afterMatchFailed").call(this,this.at,i)&&this._setRange("after",this._unwrap(i.text(i.text()).contents().first()))),null)}},y.prototype.rect=function(){var t,e=this.query.el.offset();if(e&&this.query.el[0].getClientRects().length)return this.app.iframe&&!this.app.iframeAsRoot&&(t=l(this.app.iframe).offset(),e.left+=t.left-this.$inputor.scrollLeft(),e.top+=t.top-this.$inputor.scrollTop()),e.bottom=e.top+this.query.el.height(),e},y.prototype.insert=function(t,e){var i;return this.$inputor.is(":focus")||this.$inputor.focus(),(i=this.getOpt("functionOverrides")).insert?i.insert.call(this,t,e):(i=""===(i=this.getOpt("suffix"))?i:i||" ",e=e.data("item-data"),this.query.el.removeClass("atwho-query").addClass("atwho-inserted").html(t).attr("data-atwho-at-query",""+e["atwho-at"]+this.query.text).attr("contenteditable","false"),(e=this._getRange())&&(this.query.el.length&&e.setEndAfter(this.query.el[0]),e.collapse(!1),e.insertNode(i=this.app.document.createTextNode(""+i)),this._setRange("after",i,e)),this.$inputor.is(":focus")||this.$inputor.focus(),this.$inputor.change())},c=y,v.prototype.destroy=function(){return this.storage.data(this.at,null)},v.prototype.saved=function(){return 0<this.fetch()},v.prototype.query=function(t,e){var i=this.fetch(),r=this.context.getOpt("searchKey");return i=this.context.callbacks("filter").call(this.context,t,i,r)||[],r=this.context.callbacks("remoteFilter"),0<i.length||!r&&0===i.length?e(i):r.call(this.context,t,e)},v.prototype.fetch=function(){return this.storage.data(this.at)||[]},v.prototype.save=function(t){return this.storage.data(this.at,this.context.callbacks("beforeSave").call(this.context,t||[]))},v.prototype.load=function(t){if(!this.saved()&&t)return this._load(t)},v.prototype.reload=function(t){return this._load(t)},v.prototype._load=function(t){return"string"==typeof t?l.ajax(t,{dataType:"json"}).done((e=this,function(t){return e.save(t)})):this.save(t);var e},p=v,w.prototype.init=function(){var t=this.context.getOpt("alias")||this.context.at.charCodeAt(0),e=this.context.getOpt("headerTpl");return e&&1===this.$el.children().length&&this.$el.prepend(e),this.$el.attr({id:"at-view-"+t})},w.prototype.destroy=function(){return this.$el.remove()},w.prototype.bindEvent=function(){var e,i=this.$el.find("ul"),r=0,n=0;return i.on("mousemove.atwho-view","li",function(t){var e;if((r!==t.clientX||n!==t.clientY)&&(r=t.clientX,n=t.clientY,!(e=l(t.currentTarget)).hasClass("cur")))return i.find(".cur").removeClass("cur"),e.addClass("cur")}).on("click.atwho-view","li",(e=this,function(t){return i.find(".cur").removeClass("cur"),l(t.currentTarget).addClass("cur"),e.choose(t),t.preventDefault()}))},w.prototype.visible=function(){return l.expr.pseudos.visible(this.$el[0])},w.prototype.highlighted=function(){return 0<this.$el.find(".cur").length},w.prototype.choose=function(t){var e,i;if((e=this.$el.find(".cur")).length&&(i=this.context.insertContentFor(e),this.context._stopDelayedCall(),this.context.insert(this.context.callbacks("beforeInsert").call(this.context,i,e,t),e),this.context.trigger("inserted",[e,t]),this.hide(t)),this.context.getOpt("hideWithoutSuffix"))return this.stopShowing=!0},w.prototype.reposition=function(t){var e=this.context.app.iframeAsRoot?this.context.app.window:window;return t.bottom+this.$el.height()-l(e).scrollTop()>l(e).height()&&(t.bottom=t.top-this.$el.height()),t.left>(e=l(e).width()-this.$el.width()-5)&&(t.left=e),e={left:t.left,top:t.bottom},null!=(t=this.context.callbacks("beforeReposition"))&&t.call(this.context,e),this.$el.offset(e),this.context.trigger("reposition",[e])},w.prototype.next=function(){var t=this.$el.find(".cur").removeClass("cur").next();return(t=!t.length?this.$el.find("li:first"):t).addClass("cur"),t=(t=t[0]).offsetTop+t.offsetHeight+(t.nextSibling?t.nextSibling.offsetHeight:0),this.scrollTop(Math.max(0,t-this.$el.height()))},w.prototype.prev=function(){var t=this.$el.find(".cur").removeClass("cur").prev();return(t=!t.length?this.$el.find("li:last"):t).addClass("cur"),t=(t=t[0]).offsetTop+t.offsetHeight+(t.nextSibling?t.nextSibling.offsetHeight:0),this.scrollTop(Math.max(0,t-this.$el.height()))},w.prototype.scrollTop=function(t){var e=this.context.getOpt("scrollDuration");return e?this.$elUl.animate({scrollTop:t},e):this.$elUl.scrollTop(t)},w.prototype.show=function(){var t;if(!this.stopShowing)return this.visible()||(this.$el.show(),this.$el.scrollTop(0),this.context.trigger("shown")),(t=this.context.rect())?this.reposition(t):void 0;this.stopShowing=!1},w.prototype.hide=function(t,e){var i;if(this.visible())return isNaN(e)?(this.$el.hide(),this.context.trigger("hidden",[t])):(i=this,t=function(){return i.hide()},clearTimeout(this.timeoutID),this.timeoutID=setTimeout(t,e))},w.prototype.render=function(t){var e,i,r,n,o,s;if(Array.isArray(t)&&0<t.length){for(this.$el.find("ul").empty(),e=this.$el.find("ul"),s=this.context.getOpt("displayTpl"),i=0,n=t.length;i<n;i++)r=t[i],r=l.extend({},r,{"atwho-at":this.context.at}),o=this.context.callbacks("tplEval").call(this.context,s,r,"onDisplay"),(o=l(this.context.callbacks("highlighter").call(this.context,o,this.context.query.text))).data("item-data",r),e.append(o);return this.show(),this.context.getOpt("highlightFirst")?e.find("li:first").addClass("cur"):void 0}this.hide()},f=w,d={load:function(t,e){if(t=this.controller(t))return t.model.load(e)},isSelecting:function(){var t;return!(null==(t=this.controller())||!t.view.visible())},hide:function(){var t;return null!=(t=this.controller())?t.view.hide():void 0},reposition:function(){var t;if(t=this.controller())return t.view.reposition(t.rect())},setIframe:function(t,e){return this.setupRootElement(t,e),null},run:function(){return this.dispatch()},destroy:function(){return this.shutdown(),this.$inputor.data("atwho",null)}},l.fn.atwho=function(i){var r=arguments,n=null;return this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each(function(){var t,e;return(e=(t=l(this)).data("atwho"))||t.data("atwho",e=new o(this)),"object"!=typeof i&&i?d[i]&&e?n=d[i].apply(e,Array.prototype.slice.call(r,1)):l.error("Method "+i+" does not exist on jQuery.atwho"):e.reg(i.at,i)}),null!=n?n:this},l.fn.atwho.default={at:void 0,alias:void 0,data:null,displayTpl:"<li>${name}</li>",insertTpl:"${atwho-at}${name}",headerTpl:null,callbacks:i,functionOverrides:{},searchKey:"name",suffix:void 0,hideWithoutSuffix:!1,startWithSpace:!0,acceptSpaceBar:!1,highlightFirst:!0,limit:5,maxLen:20,minLen:0,displayTimeout:300,delay:null,spaceSelectsMatch:!1,tabSelectsMatch:!0,editableAtwhoQueryAttrs:{},scrollDuration:150,suspendOnComposing:!0,lookUpOnClick:!0},l.fn.atwho.debug=!1});
|
1 |
+
!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}(function(l){var i,h;function t(t){this.currentFlag=null,this.controllers={},this.aliasMaps={},this.$inputor=l(t),this.setupRootElement(),this.listen()}h={ESC:27,TAB:9,ENTER:13,CTRL:17,A:65,P:80,N:78,LEFT:37,UP:38,RIGHT:39,DOWN:40,BACKSPACE:8,SPACE:32},i={beforeSave:function(t){return n.arrayToDefaultHash(t)},matcher:function(t,e,i,r){var n;return t=t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),i&&(t="(?:^|\\s)"+t),n=decodeURI("%C3%80"),i=decodeURI("%C3%BF"),(e=new RegExp(t+"([A-Za-z"+n+"-"+i+"0-9_"+(r?" ":"")+"'.+-]*)$|"+t+"([^\\x00-\\xff]*)$","gi").exec(e))?e[2]||e[1]:null},filter:function(t,e,i){for(var r,n=[],o=0,s=e.length;o<s;o++)r=e[o],~new String(r[i]).toLowerCase().indexOf(t.toLowerCase())&&n.push(r);return n},remoteFilter:null,sorter:function(t,e,i){var r,n,o,s;if(!t)return e;for(r=[],n=0,s=e.length;n<s;n++)(o=e[n]).atwho_order=new String(o[i]).toLowerCase().indexOf(t.toLowerCase()),-1<o.atwho_order&&r.push(o);return r.sort(function(t,e){return t.atwho_order-e.atwho_order})},tplEval:function(t,r){var e=t;try{return(e="string"!=typeof t?t(r):e).replace(/\$\{([^\}]*)\}/g,function(t,e,i){return r[e]})}catch(t){return""}},highlighter:function(t,e){return e?(e=new RegExp(">\\s*([^<]*?)("+e.replace("+","\\+")+")([^<]*)\\s*<","ig"),t.replace(e,function(t,e,i,r){return"> "+e+"<strong>"+i+"</strong>"+r+" <"})):t},beforeInsert:function(t,e,i){return t},beforeReposition:function(t){return t},afterMatchFailed:function(t,e){}},t.prototype.createContainer=function(t){var e;return null!=(e=this.$el)&&e.remove(),l(t.body).append(this.$el=l("<div class='atwho-container'></div>"))},t.prototype.setupRootElement=function(e,t){if(null==t&&(t=!1),e)this.window=e.contentWindow,this.document=e.contentDocument||this.window.document,this.iframe=e;else{this.document=this.$inputor[0].ownerDocument,this.window=this.document.defaultView||this.document.parentWindow;try{this.iframe=this.window.frameElement}catch(t){if(e=t,this.iframe=null,l.fn.atwho.debug)throw new Error("iframe auto-discovery is failed.\nPlease use `setIframe` to set the target iframe manually.\n"+e)}}return this.createContainer((this.iframeAsRoot=t)?this.document:document)},t.prototype.controller=function(t){var e,i,r,n;if(this.aliasMaps[t])i=this.controllers[this.aliasMaps[t]];else for(r in n=this.controllers)if(e=n[r],r===t){i=e;break}return i||this.controllers[this.currentFlag]},t.prototype.setContextFor=function(t){return this.currentFlag=t,this},t.prototype.reg=function(t,e){var i=(i=this.controllers)[t]||(i[t]=new(this.$inputor.is("[contentEditable]")?c:g)(this,t));return e.alias&&(this.aliasMaps[e.alias]=t),i.init(e),this},t.prototype.listen=function(){return this.$inputor.on("compositionstart",(a=this,function(t){var e;return null!=(e=a.controller())&&e.view.hide(),a.isComposing=!0,null})).on("compositionend",(s=this,function(t){return s.isComposing=!1,setTimeout(function(t){return s.dispatch(t)}),null})).on("keyup.atwhoInner",(o=this,function(t){return o.onKeyup(t)})).on("keydown.atwhoInner",(r=this,function(t){return r.onKeydown(t)})).on("blur.atwhoInner",(i=this,function(t){var e;if(e=i.controller())return e.expectedQueryCBId=null,e.view.hide(t,e.getOpt("displayTimeout"))})).on("click.atwhoInner",(e=this,function(t){return e.dispatch(t)})).on("scroll.atwhoInner",(n=this,function(){var r=n.$inputor.scrollTop();return function(t){var e,i=t.target.scrollTop;return r!==i&&null!=(e=n.controller())&&e.view.hide(t),r=i,!0}}()));var n,e,i,r,o,s,a},t.prototype.shutdown=function(){var t,e=this.controllers;for(t in e)e[t].destroy(),delete this.controllers[t];return this.$inputor.off(".atwhoInner"),this.$el.remove()},t.prototype.dispatch=function(t){var e,i,r=this.controllers,n=[];for(e in r)i=r[e],n.push(i.lookUp(t));return n},t.prototype.onKeyup=function(t){var e;switch(t.keyCode){case h.ESC:t.preventDefault(),null!=(e=this.controller())&&e.view.hide();break;case h.DOWN:case h.UP:case h.CTRL:case h.ENTER:l.noop();break;case h.P:case h.N:t.ctrlKey||this.dispatch(t);break;default:this.dispatch(t)}},t.prototype.onKeydown=function(t){var e,i=null!=(e=this.controller())?e.view:void 0;if(i&&i.visible())switch(t.keyCode){case h.ESC:t.preventDefault(),i.hide(t);break;case h.UP:t.preventDefault(),i.prev();break;case h.DOWN:t.preventDefault(),i.next();break;case h.P:if(!t.ctrlKey)return;t.preventDefault(),i.prev();break;case h.N:if(!t.ctrlKey)return;t.preventDefault(),i.next();break;case h.TAB:case h.ENTER:case h.SPACE:if(!i.visible())return;if(!this.controller().getOpt("spaceSelectsMatch")&&t.keyCode===h.SPACE)return;if(!this.controller().getOpt("tabSelectsMatch")&&t.keyCode===h.TAB)return;i.highlighted()?(t.preventDefault(),i.choose(t)):i.hide(t);break;default:l.noop()}};var o=t,r=[].slice;function e(t,e){this.app=t,this.at=e,this.$inputor=this.app.$inputor,this.id=this.$inputor[0].id||this.uid(),this.expectedQueryCBId=null,this.setting=null,this.query=null,this.pos=0,this.range=null,0===(this.$el=l("#atwho-ground-"+this.id,this.app.$el)).length&&this.app.$el.append(this.$el=l("<div id='atwho-ground-"+this.id+"'></div>")),this.model=new p(this),this.view=new f(this)}e.prototype.uid=function(){return(Math.random().toString(16)+"000000000").substr(2,8)+(new Date).getTime()},e.prototype.init=function(t){return this.setting=l.extend({},this.setting||l.fn.atwho.default,t),this.view.init(),this.model.reload(this.setting.data)},e.prototype.destroy=function(){return this.trigger("beforeDestroy"),this.model.destroy(),this.view.destroy(),this.$el.remove()},e.prototype.callDefault=function(){var e=arguments[0],t=2<=arguments.length?r.call(arguments,1):[];try{return i[e].apply(this,t)}catch(t){return l.error(t+" Or maybe At.js doesn't have function "+e)}},e.prototype.trigger=function(t,e){var i;return(e=null==e?[]:e).push(this),i=this.getOpt("alias"),this.$inputor.trigger(i?t+"-"+i+".atwho":t+".atwho",e)},e.prototype.callbacks=function(t){return this.getOpt("callbacks")[t]||i[t]},e.prototype.getOpt=function(t,e){try{return this.setting[t]}catch(t){return null}},e.prototype.insertContentFor=function(t){var e=this.getOpt("insertTpl"),t=l.extend({},t.data("item-data"),{"atwho-at":this.at});return this.callbacks("tplEval").call(this,e,t,"onInsert")},e.prototype.renderView=function(t){var e=this.getOpt("searchKey");return t=this.callbacks("sorter").call(this,this.query.text,t.slice(0,1001),e),this.view.render(t.slice(0,this.getOpt("limit")))},e.arrayToDefaultHash=function(t){var e,i,r,n;if(!Array.isArray(t))return t;for(n=[],e=0,r=t.length;e<r;e++)i=t[e],l.isPlainObject(i)?n.push(i):n.push({name:i});return n},e.prototype.lookUp=function(t){var e;if((!t||"click"!==t.type||this.getOpt("lookUpOnClick"))&&(!this.getOpt("suspendOnComposing")||!this.app.isComposing))return(e=this.catchQuery(t))?(this.app.setContextFor(this.at),(t=this.getOpt("delay"))?this._delayLookUp(e,t):this._lookUp(e)):this.expectedQueryCBId=null,e},e.prototype._delayLookUp=function(t,e){var i,r,n=Date.now?Date.now():(new Date).getTime();return this.previousCallTime||(this.previousCallTime=n),0<(i=e-(n-this.previousCallTime))&&i<e?(this.previousCallTime=n,this._stopDelayedCall(),this.delayedCallTimeout=setTimeout((r=this,function(){return r.previousCallTime=0,r.delayedCallTimeout=null,r._lookUp(t)}),e)):(this._stopDelayedCall(),this.previousCallTime!==n&&(this.previousCallTime=0),this._lookUp(t))},e.prototype._stopDelayedCall=function(){if(this.delayedCallTimeout)return clearTimeout(this.delayedCallTimeout),this.delayedCallTimeout=null},e.prototype._generateQueryCBId=function(){return{}},e.prototype._lookUp=function(t){var e=function(t,e){if(t===this.expectedQueryCBId)return e&&0<e.length?this.renderView(this.constructor.arrayToDefaultHash(e)):this.view.hide()};return this.expectedQueryCBId=this._generateQueryCBId(),this.model.query(t.text,l.proxy(e,this,this.expectedQueryCBId))};var n,s=function(t,e){for(var i in e)a.call(e,i)&&(t[i]=e[i]);function r(){this.constructor=t}return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},a={}.hasOwnProperty;function u(){return u.__super__.constructor.apply(this,arguments)}s(u,n=e),u.prototype.catchQuery=function(){var t=this.$inputor.val(),e=this.$inputor.caret("pos",{iframe:this.app.iframe}),i=t.slice(0,e),t=this.callbacks("matcher").call(this,this.at,i,this.getOpt("startWithSpace"),this.getOpt("acceptSpaceBar")),i="string"==typeof t;if(!(i&&t.length<this.getOpt("minLen",0)))return i&&t.length<=this.getOpt("maxLen",20)?(e=(i=e-t.length)+t.length,this.pos=i,this.trigger("matched",[this.at,(t={text:t,headPos:i,endPos:e}).text])):(t=null,this.view.hide()),this.query=t},u.prototype.rect=function(){var t,e;if(t=this.$inputor.caret("offset",this.pos-1,{iframe:this.app.iframe}))return this.app.iframe&&!this.app.iframeAsRoot&&(e=l(this.app.iframe).offset(),t.left+=e.left,t.top+=e.top),e=this.app.document.selection?0:2,{left:t.left,top:t.top,bottom:t.top+t.height+e}},u.prototype.insert=function(t,e){var i=this.$inputor,r=i.val(),n=r.slice(0,Math.max(this.query.headPos-this.at.length,0)),o=""===(o=this.getOpt("suffix"))?o:o||" ",r=""+n+(t+=o)+r.slice(this.query.endPos||0);return i.val(r),i.caret("pos",n.length+t.length,{iframe:this.app.iframe}),i.is(":focus")||i.trigger("focus"),i.trigger("change")};var c,p,f,d,g=u,s=function(t,e){for(var i in e)a.call(e,i)&&(t[i]=e[i]);function r(){this.constructor=t}return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},a={}.hasOwnProperty;function y(){return y.__super__.constructor.apply(this,arguments)}function v(t){this.context=t,this.at=this.context.at,this.storage=this.context.$inputor}function w(t){this.context=t,this.$el=l("<div class='atwho-view'><ul class='atwho-view-ul'></ul></div>"),this.$elUl=this.$el.children(),this.timeoutID=null,this.context.$el.append(this.$el),this.bindEvent()}s(y,n),y.prototype._getRange=function(){var t=this.app.window.getSelection();if(0<t.rangeCount)return t.getRangeAt(0)},y.prototype._setRange=function(t,e,i){if((i=null==i?this._getRange():i)&&e)return e=l(e)[0],"after"===t?(i.setEndAfter(e),i.setStartAfter(e)):(i.setEndBefore(e),i.setStartBefore(e)),i.collapse(!1),this._clearRange(i)},y.prototype._clearRange=function(t){var e;if(null==t&&(t=this._getRange()),e=this.app.window.getSelection(),null==this.ctrl_a_pressed)return e.removeAllRanges(),e.addRange(t)},y.prototype._movingEvent=function(t){var e;return"click"===t.type||(e=t.which)===h.RIGHT||e===h.LEFT||e===h.UP||e===h.DOWN},y.prototype._unwrap=function(t){var e;return(e=(t=l(t).unwrap().get(0)).nextSibling)&&e.nodeValue&&(t.nodeValue+=e.nodeValue,l(e).remove()),t},y.prototype.catchQuery=function(t){var e,i,r,n,o,s,a;if((a=this._getRange())&&a.collapsed){if(t.which===h.ENTER)return(i=l(a.startContainer).closest(".atwho-query")).contents().unwrap(),i.is(":empty")&&i.remove(),(i=l(".atwho-query",this.app.document)).text(i.text()).contents().last().unwrap(),void this._clearRange();if(/firefox/i.test(navigator.userAgent)){if(l(a.startContainer).is(this.$inputor))return void this._clearRange();t.which===h.BACKSPACE&&a.startContainer.nodeType===document.ELEMENT_NODE&&0<=(o=a.startOffset-1)?((r=a.cloneRange()).setStart(a.startContainer,o),l(r.cloneContents()).contents().last().is(".atwho-inserted")&&(o=l(a.startContainer).contents().get(o),this._setRange("after",l(o).contents().last()))):t.which===h.LEFT&&a.startContainer.nodeType===document.TEXT_NODE&&(e=l(a.startContainer.previousSibling)).is(".atwho-inserted")&&0===a.startOffset&&this._setRange("after",e.contents().last())}if(l(a.startContainer).closest(".atwho-inserted").addClass("atwho-query").siblings().removeClass("atwho-query"),0<(i=l(".atwho-query",this.app.document)).length&&i.is(":empty")&&0===i.text().length&&i.remove(),this._movingEvent(t)||i.removeClass("atwho-inserted"),0<i.length)switch(t.which){case h.LEFT:return this._setRange("before",i.get(0),a),void i.removeClass("atwho-query");case h.RIGHT:return this._setRange("after",i.get(0).nextSibling,a),void i.removeClass("atwho-query")}return 0<i.length&&(s=i.attr("data-atwho-at-query"))&&(i.empty().html(s).attr("data-atwho-at-query",null),this._setRange("after",i.get(0),a)),(r=a.cloneRange()).setStart(a.startContainer,0),r="string"==typeof(s=this.callbacks("matcher").call(this,this.at,r.toString(),this.getOpt("startWithSpace"),this.getOpt("acceptSpaceBar"))),0===i.length&&r&&0<=(n=a.startOffset-this.at.length-s.length)&&(a.setStart(a.startContainer,n),i=l("<span/>",this.app.document).attr(this.getOpt("editableAtwhoQueryAttrs")).addClass("atwho-query"),a.surroundContents(i.get(0)),(n=i.contents().last().get(0))&&(/firefox/i.test(navigator.userAgent)?(a.setStart(n,n.length),a.setEnd(n,n.length),this._clearRange(a)):this._setRange("after",n,a))),r&&s.length<this.getOpt("minLen",0)?void 0:r&&s.length<=this.getOpt("maxLen",20)?(this.trigger("matched",[this.at,(s={text:s,el:i}).text]),this.query=s):(this.view.hide(),this.query={el:i},0<=i.text().indexOf(this.at)&&(this._movingEvent(t)&&i.hasClass("atwho-inserted")?i.removeClass("atwho-query"):!1!==this.callbacks("afterMatchFailed").call(this,this.at,i)&&this._setRange("after",this._unwrap(i.text(i.text()).contents().first()))),null)}},y.prototype.rect=function(){var t,e=this.query.el.offset();if(e&&this.query.el[0].getClientRects().length)return this.app.iframe&&!this.app.iframeAsRoot&&(t=l(this.app.iframe).offset(),e.left+=t.left-this.$inputor.scrollLeft(),e.top+=t.top-this.$inputor.scrollTop()),e.bottom=e.top+this.query.el.height(),e},y.prototype.insert=function(t,e){var i;return this.$inputor.is(":focus")||this.$inputor.focus(),(i=this.getOpt("functionOverrides")).insert?i.insert.call(this,t,e):(i=""===(i=this.getOpt("suffix"))?i:i||" ",e=e.data("item-data"),this.query.el.removeClass("atwho-query").addClass("atwho-inserted").html(t).attr("data-atwho-at-query",""+e["atwho-at"]+this.query.text).attr("contenteditable","false"),(e=this._getRange())&&(this.query.el.length&&e.setEndAfter(this.query.el[0]),e.collapse(!1),e.insertNode(i=this.app.document.createTextNode(""+i)),this._setRange("after",i,e)),this.$inputor.is(":focus")||this.$inputor.focus(),this.$inputor.change())},c=y,v.prototype.destroy=function(){return this.storage.data(this.at,null)},v.prototype.saved=function(){return 0<this.fetch()},v.prototype.query=function(t,e){var i=this.fetch(),r=this.context.getOpt("searchKey");return i=this.context.callbacks("filter").call(this.context,t,i,r)||[],r=this.context.callbacks("remoteFilter"),0<i.length||!r&&0===i.length?e(i):r.call(this.context,t,e)},v.prototype.fetch=function(){return this.storage.data(this.at)||[]},v.prototype.save=function(t){return this.storage.data(this.at,this.context.callbacks("beforeSave").call(this.context,t||[]))},v.prototype.load=function(t){if(!this.saved()&&t)return this._load(t)},v.prototype.reload=function(t){return this._load(t)},v.prototype._load=function(t){return"string"==typeof t?l.ajax(t,{dataType:"json"}).done((e=this,function(t){return e.save(t)})):this.save(t);var e},p=v,w.prototype.init=function(){var t=this.context.getOpt("alias")||this.context.at.charCodeAt(0),e=this.context.getOpt("headerTpl");return e&&1===this.$el.children().length&&this.$el.prepend(e),this.$el.attr({id:"at-view-"+t})},w.prototype.destroy=function(){return this.$el.remove()},w.prototype.bindEvent=function(){var e,i=this.$el.find("ul"),r=0,n=0;return i.on("mousemove.atwho-view","li",function(t){var e;if((r!==t.clientX||n!==t.clientY)&&(r=t.clientX,n=t.clientY,!(e=l(t.currentTarget)).hasClass("cur")))return i.find(".cur").removeClass("cur"),e.addClass("cur")}).on("click.atwho-view","li",(e=this,function(t){return i.find(".cur").removeClass("cur"),l(t.currentTarget).addClass("cur"),e.choose(t),t.preventDefault()}))},w.prototype.visible=function(){return l.expr.pseudos.visible(this.$el[0])},w.prototype.highlighted=function(){return 0<this.$el.find(".cur").length},w.prototype.choose=function(t){var e,i;if((e=this.$el.find(".cur")).length&&(i=this.context.insertContentFor(e),this.context._stopDelayedCall(),this.context.insert(this.context.callbacks("beforeInsert").call(this.context,i,e,t),e),this.context.trigger("inserted",[e,t]),this.hide(t)),this.context.getOpt("hideWithoutSuffix"))return this.stopShowing=!0},w.prototype.reposition=function(t){var e=this.context.app.iframeAsRoot?this.context.app.window:window;return t.bottom+this.$el.height()-l(e).scrollTop()>l(e).height()&&(t.bottom=t.top-this.$el.height()),t.left>(e=l(e).width()-this.$el.width()-5)&&(t.left=e),e={left:t.left,top:t.bottom},null!=(t=this.context.callbacks("beforeReposition"))&&t.call(this.context,e),this.$el.offset(e),this.context.trigger("reposition",[e])},w.prototype.next=function(){var t=this.$el.find(".cur").removeClass("cur").next();return(t=!t.length?this.$el.find("li:first"):t).addClass("cur"),t=(t=t[0]).offsetTop+t.offsetHeight+(t.nextSibling?t.nextSibling.offsetHeight:0),this.scrollTop(Math.max(0,t-this.$el.height()))},w.prototype.prev=function(){var t=this.$el.find(".cur").removeClass("cur").prev();return(t=!t.length?this.$el.find("li:last"):t).addClass("cur"),t=(t=t[0]).offsetTop+t.offsetHeight+(t.nextSibling?t.nextSibling.offsetHeight:0),this.scrollTop(Math.max(0,t-this.$el.height()))},w.prototype.scrollTop=function(t){var e=this.context.getOpt("scrollDuration");return e?this.$elUl.animate({scrollTop:t},e):this.$elUl.scrollTop(t)},w.prototype.show=function(){var t;if(!this.stopShowing)return this.visible()||(this.$el.show(),this.$el.scrollTop(0),this.context.trigger("shown")),(t=this.context.rect())?this.reposition(t):void 0;this.stopShowing=!1},w.prototype.hide=function(t,e){var i;if(this.visible())return isNaN(e)?(this.$el.hide(),this.context.trigger("hidden",[t])):(i=this,t=function(){return i.hide()},clearTimeout(this.timeoutID),this.timeoutID=setTimeout(t,e))},w.prototype.render=function(t){var e,i,r,n,o,s;if(Array.isArray(t)&&0<t.length){for(this.$el.find("ul").empty(),e=this.$el.find("ul"),s=this.context.getOpt("displayTpl"),i=0,n=t.length;i<n;i++)r=t[i],r=l.extend({},r,{"atwho-at":this.context.at}),o=this.context.callbacks("tplEval").call(this.context,s,r,"onDisplay"),(o=l(this.context.callbacks("highlighter").call(this.context,o,this.context.query.text))).data("item-data",r),e.append(o);return this.show(),this.context.getOpt("highlightFirst")?e.find("li:first").addClass("cur"):void 0}this.hide()},f=w,d={load:function(t,e){if(t=this.controller(t))return t.model.load(e)},isSelecting:function(){var t;return!(null==(t=this.controller())||!t.view.visible())},hide:function(){var t;return null!=(t=this.controller())?t.view.hide():void 0},reposition:function(){var t;if(t=this.controller())return t.view.reposition(t.rect())},setIframe:function(t,e){return this.setupRootElement(t,e),null},run:function(){return this.dispatch()},destroy:function(){return this.shutdown(),this.$inputor.data("atwho",null)}},l.fn.atwho=function(i){var r=arguments,n=null;return this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each(function(){var t,e;return(e=(t=l(this)).data("atwho"))||t.data("atwho",e=new o(this)),"object"!=typeof i&&i?d[i]&&e?n=d[i].apply(e,Array.prototype.slice.call(r,1)):l.error("Method "+i+" does not exist on jQuery.atwho"):e.reg(i.at,i)}),null!=n?n:this},l.fn.atwho.default={at:void 0,alias:void 0,data:null,displayTpl:"<li>${name}</li>",insertTpl:"${atwho-at}${name}",headerTpl:null,callbacks:i,functionOverrides:{},searchKey:"name",suffix:void 0,hideWithoutSuffix:!1,startWithSpace:!0,acceptSpaceBar:!1,highlightFirst:!0,limit:5,maxLen:20,minLen:0,displayTimeout:300,delay:null,spaceSelectsMatch:!1,tabSelectsMatch:!0,editableAtwhoQueryAttrs:{},scrollDuration:150,suspendOnComposing:!0,lookUpOnClick:!0},l.fn.atwho.debug=!1});
|
@@ -1 +1 @@
|
|
1 |
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e;function c(){return e.apply(null,arguments)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function i(e,t){for(var n=[],s=0;s<e.length;++s)n.push(t(e[s],s));return n}function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e,t){for(var n in t)h(t,n)&&(e[n]=t[n]);return h(t,"toString")&&(e.toString=t.toString),h(t,"valueOf")&&(e.valueOf=t.valueOf),e}function l(e,t,n,s){return vt(e,t,n,s,!0).utc()}function f(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}),e._pf}function d(e){if(null==e._isValid){var t=f(e),n=_.call(t.parsedDateParts,function(e){return null!=e}),n=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return n;e._isValid=n}return e._isValid}function r(e){var t=l(NaN);return null!=e?u(f(t),e):f(t).userInvalidated=!0,t}function m(e){return void 0===e}var _=Array.prototype.some||function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1},y=c.momentProperties=[];function g(e,t){var n,s,i;if(m(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),m(t._i)||(e._i=t._i),m(t._f)||(e._f=t._f),m(t._l)||(e._l=t._l),m(t._strict)||(e._strict=t._strict),m(t._tzm)||(e._tzm=t._tzm),m(t._isUTC)||(e._isUTC=t._isUTC),m(t._offset)||(e._offset=t._offset),m(t._pf)||(e._pf=f(t)),m(t._locale)||(e._locale=t._locale),0<y.length)for(n in y)m(i=t[s=y[n]])||(e[s]=i);return e}var t=!1;function p(e){g(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),!1===t&&(t=!0,c.updateOffset(this),t=!1)}function w(e){return e instanceof p||null!=e&&null!=e._isAMomentObject}function v(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function S(e){var t=+e,e=0;return e=0!=t&&isFinite(t)?v(t):e}function M(e,t,n){for(var s=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),r=0,a=0;a<s;a++)(n&&e[a]!==t[a]||!n&&S(e[a])!==S(t[a]))&&r++;return r+i}function k(e){!1===c.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function n(i,r){var a=!0;return u(function(){if(null!=c.deprecationHandler&&c.deprecationHandler(null,i),a){for(var e,t=[],n=0;n<arguments.length;n++){if(e="","object"==typeof arguments[n]){for(var s in e+="\n["+n+"] ",arguments[0])e+=s+": "+arguments[0][s]+", ";e=e.slice(0,-2)}else e=arguments[n];t.push(e)}k(i+"\nArguments: "+Array.prototype.slice.call(t).join("")+"\n"+(new Error).stack),a=!1}return r.apply(this,arguments)},r)}var D={};function Y(e,t){null!=c.deprecationHandler&&c.deprecationHandler(e,t),D[e]||(k(t),D[e]=!0)}function x(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function O(e,t){var n,s=u({},e);for(n in t)h(t,n)&&(o(e[n])&&o(t[n])?(s[n]={},u(s[n],e[n]),u(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)h(e,n)&&!h(t,n)&&o(e[n])&&(s[n]=u({},s[n]));return s}function b(e){null!=e&&this.set(e)}c.suppressDeprecationWarnings=!1,c.deprecationHandler=null;var T=Object.keys||function(e){var t,n=[];for(t in e)h(e,t)&&n.push(t);return n};var P={};function W(e,t){var n=e.toLowerCase();P[n]=P[n+"s"]=P[t]=e}function R(e){return"string"==typeof e?P[e]||P[e.toLowerCase()]:void 0}function U(e){var t,n,s={};for(n in e)h(e,n)&&(t=R(n))&&(s[t]=e[n]);return s}var C={};function F(e,t){C[e]=t}function H(t,n){return function(e){return null!=e?(G(this,t,e),c.updateOffset(this,n),this):L(this,t)}}function L(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function G(e,t,n){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](n)}function V(e,t,n){var s=""+Math.abs(e),t=t-s.length;return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,t)).toString().substr(1)+s}var j=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,E=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,A={},I={};function N(e,t,n,s){var i="string"==typeof s?function(){return this[s]()}:s;e&&(I[e]=i),t&&(I[t[0]]=function(){return V(i.apply(this,arguments),t[1],t[2])}),n&&(I[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function z(e,t){return e.isValid()?(t=Z(t,e.localeData()),A[t]=A[t]||function(s){for(var e,i=s.match(j),t=0,r=i.length;t<r;t++)I[i[t]]?i[t]=I[i[t]]:i[t]=(e=i[t]).match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"");return function(e){for(var t="",n=0;n<r;n++)t+=i[n]instanceof Function?i[n].call(e,s):i[n];return t}}(t),A[t](e)):e.localeData().invalidDate()}function Z(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(E.lastIndex=0;0<=n&&E.test(e);)e=e.replace(E,s),E.lastIndex=0,--n;return e}var q=/\d/,$=/\d\d/,B=/\d{3}/,J=/\d{4}/,Q=/[+-]?\d{6}/,X=/\d\d?/,K=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,se=/[+-]?\d{1,6}/,ie=/\d+/,re=/[+-]?\d+/,ae=/Z|[+-]\d\d:?\d\d/gi,oe=/Z|[+-]\d\d(?::?\d\d)?/gi,ue=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,le={};function de(e,n,s){le[e]=x(n)?n:function(e,t){return e&&s?s:n}}function he(e,t){return h(le,e)?le[e](t._strict,t._locale):new RegExp(ce(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function ce(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var fe={};function me(e,n){var t,s=n;for("string"==typeof e&&(e=[e]),"number"==typeof n&&(s=function(e,t){t[n]=S(e)}),t=0;t<e.length;t++)fe[e[t]]=s}function _e(e,i){me(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}var ye,ge=0,pe=1,we=2,ve=3,Se=4,Me=5,ke=6,De=7,Ye=8;function xe(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}ye=Array.prototype.indexOf||function(e){for(var t=0;t<this.length;++t)if(this[t]===e)return t;return-1},N("M",["MM",2],"Mo",function(){return this.month()+1}),N("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),N("MMMM",0,0,function(e){return this.localeData().months(this,e)}),W("month","M"),F("month",8),de("M",X),de("MM",X,$),de("MMM",function(e,t){return t.monthsShortRegex(e)}),de("MMMM",function(e,t){return t.monthsRegex(e)}),me(["M","MM"],function(e,t){t[pe]=S(e)-1}),me(["MMM","MMMM"],function(e,t,n,s){s=n._locale.monthsParse(e,s,n._strict);null!=s?t[pe]=s:f(n).invalidMonth=e});var Oe=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,be="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Te="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Pe(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=S(t);else if("number"!=typeof(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),xe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function We(e){return null!=e?(Pe(this,e),c.updateOffset(this,!0),this):L(this,"Month")}var Re=ue;var Ue=ue;function Ce(){function e(e,t){return t.length-e.length}for(var t,n=[],s=[],i=[],r=0;r<12;r++)t=l([2e3,r]),n.push(this.monthsShort(t,"")),s.push(this.months(t,"")),i.push(this.months(t,"")),i.push(this.monthsShort(t,""));for(n.sort(e),s.sort(e),i.sort(e),r=0;r<12;r++)n[r]=ce(n[r]),s[r]=ce(s[r]);for(r=0;r<24;r++)i[r]=ce(i[r]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function Fe(e){return He(e)?366:365}function He(e){return e%4==0&&e%100!=0||e%400==0}N("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),N(0,["YY",2],0,function(){return this.year()%100}),N(0,["YYYY",4],0,"year"),N(0,["YYYYY",5],0,"year"),N(0,["YYYYYY",6,!0],0,"year"),W("year","y"),F("year",1),de("Y",re),de("YY",X,$),de("YYYY",ne,J),de("YYYYY",se,Q),de("YYYYYY",se,Q),me(["YYYYY","YYYYYY"],ge),me("YYYY",function(e,t){t[ge]=2===e.length?c.parseTwoDigitYear(e):S(e)}),me("YY",function(e,t){t[ge]=c.parseTwoDigitYear(e)}),me("Y",function(e,t){t[ge]=parseInt(e,10)}),c.parseTwoDigitYear=function(e){return S(e)+(68<S(e)?1900:2e3)};var Le=H("FullYear",!0);function Ge(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&0<=e&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ve(e,t,n){n=7+t-n;return n-(7+Ge(e,0,n).getUTCDay()-t)%7-1}function je(e,t,n,s,i){var r,i=1+7*(t-1)+(7+n-s)%7+Ve(e,s,i),i=i<=0?Fe(r=e-1)+i:i>Fe(e)?(r=e+1,i-Fe(e)):(r=e,i);return{year:r,dayOfYear:i}}function Ee(e,t,n){var s,i,r=Ve(e.year(),t,n),r=Math.floor((e.dayOfYear()-r-1)/7)+1;return r<1?s=r+Ae(i=e.year()-1,t,n):r>Ae(e.year(),t,n)?(s=r-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=r),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),n=Ve(e+1,t,n);return(Fe(e)-s+n)/7}N("w",["ww",2],"wo","week"),N("W",["WW",2],"Wo","isoWeek"),W("week","w"),W("isoWeek","W"),F("week",5),F("isoWeek",5),de("w",X),de("ww",X,$),de("W",X),de("WW",X,$),_e(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=S(e)});N("d",0,"do","day"),N("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),N("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),N("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),N("e",0,0,"weekday"),N("E",0,0,"isoWeekday"),W("day","d"),W("weekday","e"),W("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),de("d",X),de("e",X),de("E",X),de("dd",function(e,t){return t.weekdaysMinRegex(e)}),de("ddd",function(e,t){return t.weekdaysShortRegex(e)}),de("dddd",function(e,t){return t.weekdaysRegex(e)}),_e(["dd","ddd","dddd"],function(e,t,n,s){s=n._locale.weekdaysParse(e,s,n._strict);null!=s?t.d=s:f(n).invalidWeekday=e}),_e(["d","e","E"],function(e,t,n,s){t[s]=S(e)});var Ie="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ne="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Ze=ue;var qe=ue;var $e=ue;function Be(){function e(e,t){return t.length-e.length}for(var t,n,s,i=[],r=[],a=[],o=[],u=0;u<7;u++)s=l([2e3,1]).day(u),t=this.weekdaysMin(s,""),n=this.weekdaysShort(s,""),s=this.weekdays(s,""),i.push(t),r.push(n),a.push(s),o.push(t),o.push(n),o.push(s);for(i.sort(e),r.sort(e),a.sort(e),o.sort(e),u=0;u<7;u++)r[u]=ce(r[u]),a[u]=ce(a[u]),o[u]=ce(o[u]);this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Je(){return this.hours()%12||12}function Qe(e,t){N(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Xe(e,t){return t._meridiemParse}N("H",["HH",2],0,"hour"),N("h",["hh",2],0,Je),N("k",["kk",2],0,function(){return this.hours()||24}),N("hmm",0,0,function(){return""+Je.apply(this)+V(this.minutes(),2)}),N("hmmss",0,0,function(){return""+Je.apply(this)+V(this.minutes(),2)+V(this.seconds(),2)}),N("Hmm",0,0,function(){return""+this.hours()+V(this.minutes(),2)}),N("Hmmss",0,0,function(){return""+this.hours()+V(this.minutes(),2)+V(this.seconds(),2)}),Qe("a",!0),Qe("A",!1),W("hour","h"),F("hour",13),de("a",Xe),de("A",Xe),de("H",X),de("h",X),de("HH",X,$),de("hh",X,$),de("hmm",K),de("hmmss",ee),de("Hmm",K),de("Hmmss",ee),me(["H","HH"],ve),me(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),me(["h","hh"],function(e,t,n){t[ve]=S(e),f(n).bigHour=!0}),me("hmm",function(e,t,n){var s=e.length-2;t[ve]=S(e.substr(0,s)),t[Se]=S(e.substr(s)),f(n).bigHour=!0}),me("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ve]=S(e.substr(0,s)),t[Se]=S(e.substr(s,2)),t[Me]=S(e.substr(i)),f(n).bigHour=!0}),me("Hmm",function(e,t,n){var s=e.length-2;t[ve]=S(e.substr(0,s)),t[Se]=S(e.substr(s))}),me("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ve]=S(e.substr(0,s)),t[Se]=S(e.substr(s,2)),t[Me]=S(e.substr(i))});var Ke,et=H("Hours",!0),tt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",ordinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:be,monthsShort:Te,week:{dow:0,doy:6},weekdays:Ie,weekdaysMin:ze,weekdaysShort:Ne,meridiemParse:/[ap]\.?m?\.?/i},nt={};function st(e){return e&&e.toLowerCase().replace("_","-")}function it(e){var t;if(!nt[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=Ke._abbr,require("./locale/"+e),rt(t)}catch(e){}return nt[e]}function rt(e,t){var n;return(Ke=e&&(n=m(t)?ot(e):at(e,t))?n:Ke)._abbr}function at(e,t){if(null===t)return delete nt[e],null;var n=tt;return t.abbr=e,null!=nt[e]?(Y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=nt[e]._config):null!=t.parentLocale&&(null!=nt[t.parentLocale]?n=nt[t.parentLocale]._config:Y("parentLocaleUndefined","specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/")),nt[e]=new b(O(n,t)),rt(e),nt[e]}function ot(e){var t;if(!(e=e&&e._locale&&e._locale._abbr?e._locale._abbr:e))return Ke;if(!a(e)){if(t=it(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=st(e[r]).split("-")).length,n=(n=st(e[r+1]))?n.split("-"):null;0<t;){if(s=it(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&M(i,n,!0)>=t-1)break;t--}r++}return null}(e)}function ut(e){var t=e._a;return t&&-2===f(e).overflow&&(t=t[pe]<0||11<t[pe]?pe:t[we]<1||t[we]>xe(t[ge],t[pe])?we:t[ve]<0||24<t[ve]||24===t[ve]&&(0!==t[Se]||0!==t[Me]||0!==t[ke])?ve:t[Se]<0||59<t[Se]?Se:t[Me]<0||59<t[Me]?Me:t[ke]<0||999<t[ke]?ke:-1,f(e)._overflowDayOfYear&&(t<ge||we<t)&&(t=we),f(e)._overflowWeeks&&-1===t&&(t=De),f(e)._overflowWeekday&&-1===t&&(t=Ye),f(e).overflow=t),e}var lt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,dt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,ht=/Z|[+-]\d\d(?::?\d\d)?/,ct=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ft=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],mt=/^\/?Date\((\-?\d+)/i;function _t(e){var t,n,s,i,r,a,o=e._i,u=lt.exec(o)||dt.exec(o);if(u){for(f(e).iso=!0,t=0,n=ct.length;t<n;t++)if(ct[t][1].exec(u[1])){i=ct[t][0],s=!1!==ct[t][2];break}if(null!=i){if(u[3]){for(t=0,n=ft.length;t<n;t++)if(ft[t][1].exec(u[3])){r=(u[2]||" ")+ft[t][0];break}if(null==r)return void(e._isValid=!1)}if(s||null==r){if(u[4]){if(!ht.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),pt(e)}else e._isValid=!1}else e._isValid=!1}else e._isValid=!1}function yt(e,t,n){return null!=e?e:null!=t?t:n}function gt(e){var t,n,s,i,r,a,o,u,l,d,h=[];if(!e._d){for(s=e,i=new Date(c.now()),n=s._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()],e._w&&null==e._a[we]&&null==e._a[pe]&&(null!=(i=(s=e)._w).GG||null!=i.W||null!=i.E?(u=1,l=4,r=yt(i.GG,s._a[ge],Ee(St(),1,4).year),a=yt(i.W,1),((o=yt(i.E,1))<1||7<o)&&(d=!0)):(u=s._locale._week.dow,l=s._locale._week.doy,r=yt(i.gg,s._a[ge],Ee(St(),u,l).year),a=yt(i.w,1),null!=i.d?((o=i.d)<0||6<o)&&(d=!0):null!=i.e?(o=i.e+u,(i.e<0||6<i.e)&&(d=!0)):o=u),a<1||a>Ae(r,u,l)?f(s)._overflowWeeks=!0:null!=d?f(s)._overflowWeekday=!0:(l=je(r,a,o,u,l),s._a[ge]=l.year,s._dayOfYear=l.dayOfYear)),e._dayOfYear&&(l=yt(e._a[ge],n[ge]),e._dayOfYear>Fe(l)&&(f(e)._overflowDayOfYear=!0),l=Ge(l,0,e._dayOfYear),e._a[pe]=l.getUTCMonth(),e._a[we]=l.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=h[t]=n[t];for(;t<7;t++)e._a[t]=h[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ve]&&0===e._a[Se]&&0===e._a[Me]&&0===e._a[ke]&&(e._nextDay=!0,e._a[ve]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){return a=new Date(e,t,n,s,i,r,a),e<100&&0<=e&&isFinite(a.getFullYear())&&a.setFullYear(e),a}).apply(null,h),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ve]=24)}}function pt(e){if(e._f!==c.ISO_8601){e._a=[],f(e).empty=!0;for(var t,n,s,i,r,a=""+e._i,o=a.length,u=0,l=Z(e._f,e._locale).match(j)||[],d=0;d<l.length;d++)n=l[d],(t=(a.match(he(n,e))||[])[0])&&(0<(i=a.substr(0,a.indexOf(t))).length&&f(e).unusedInput.push(i),a=a.slice(a.indexOf(t)+t.length),u+=t.length),I[n]?(t?f(e).empty=!1:f(e).unusedTokens.push(n),s=n,r=e,null!=(i=t)&&h(fe,s)&&fe[s](i,r._a,r,s)):e._strict&&!t&&f(e).unusedTokens.push(n);f(e).charsLeftOver=o-u,0<a.length&&f(e).unusedInput.push(a),e._a[ve]<=12&&!0===f(e).bigHour&&0<e._a[ve]&&(f(e).bigHour=void 0),f(e).parsedDateParts=e._a.slice(0),f(e).meridiem=e._meridiem,e._a[ve]=function(e,t,n){if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((n=e.isPM(n))&&t<12&&(t+=12),t=!n&&12===t?0:t):t}(e._locale,e._a[ve],e._meridiem),gt(e),ut(e)}else _t(e)}function wt(e){var t=e._i,n=e._f;return e._locale=e._locale||ot(e._l),null===t||void 0===n&&""===t?r({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new p(ut(t)):(a(n)?function(e){var t,n,s,i,r;if(0===e._f.length)return f(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<e._f.length;i++)r=0,t=g({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],pt(t),d(t)&&(r+=f(t).charsLeftOver,r+=10*f(t).unusedTokens.length,f(t).score=r,(null==s||r<s)&&(s=r,n=t));u(e,n||t)}(e):s(t)?e._d=t:n?pt(e):void 0===(n=(t=e)._i)?t._d=new Date(c.now()):s(n)?t._d=new Date(n.valueOf()):"string"==typeof n?function(e){var t=mt.exec(e._i);null===t?(_t(e),!1===e._isValid&&(delete e._isValid,c.createFromInputFallback(e))):e._d=new Date(+t[1])}(t):a(n)?(t._a=i(n.slice(0),function(e){return parseInt(e,10)}),gt(t)):"object"==typeof n?function(e){var t;e._d||(t=U(e._i),e._a=i([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),gt(e))}(t):"number"==typeof n?t._d=new Date(n):c.createFromInputFallback(t),d(e)||(e._d=null),e))}function vt(e,t,n,s,i){var r={};return"boolean"==typeof n&&(s=n,n=void 0),(o(e)&&function(e){for(var t in e)return;return 1}(e)||a(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=i,r._l=n,r._i=e,r._f=t,r._strict=s,(r=new p(ut(wt(r=r))))._nextDay&&(r.add(1,"d"),r._nextDay=void 0),r}function St(e,t,n,s){return vt(e,t,n,s,!1)}c.createFromInputFallback=n("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),c.ISO_8601=function(){};ue=n("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=St.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:r()}),K=n("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=St.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:r()});function Mt(e,t){var n,s;if(!(t=1===t.length&&a(t[0])?t[0]:t).length)return St();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}function kt(e){var t=U(e),n=t.year||0,s=t.quarter||0,i=t.month||0,r=t.week||0,a=t.day||0,o=t.hour||0,u=t.minute||0,e=t.second||0,t=t.millisecond||0;this._milliseconds=+t+1e3*e+6e4*u+1e3*o*60*60,this._days=+a+7*r,this._months=+i+3*s+12*n,this._data={},this._locale=ot(),this._bubble()}function Dt(e){return e instanceof kt}function Yt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function xt(e,n){N(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+V(~~(e/60),2)+n+V(~~e%60,2)})}xt("Z",":"),xt("ZZ",""),de("Z",oe),de("ZZ",oe),me(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=bt(oe,e)});var Ot=/([\+\-]|\d\d)/gi;function bt(e,t){t=(t||"").match(e)||[],e=((t[t.length-1]||[])+"").match(Ot)||["-",0,0],t=60*e[1]+S(e[2]);return"+"===e[0]?t:-t}function Tt(e,t){var n;return t._isUTC?(n=t.clone(),t=(w(e)||s(e)?e:St(e)).valueOf()-n.valueOf(),n._d.setTime(n._d.valueOf()+t),c.updateOffset(n,!1),n):St(e).local()}function Pt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Wt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}c.updateOffset=function(){};var Rt=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ut=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;function Ct(e,t){var n,s=e,i=null;return Dt(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:"number"==typeof e?(s={},t?s[t]=e:s.milliseconds=e):(i=Rt.exec(e))?(n="-"===i[1]?-1:1,s={y:0,d:S(i[we])*n,h:S(i[ve])*n,m:S(i[Se])*n,s:S(i[Me])*n,ms:S(Yt(1e3*i[ke]))*n}):(i=Ut.exec(e))?(n="-"===i[1]?-1:1,s={y:Ft(i[2],n),M:Ft(i[3],n),w:Ft(i[4],n),d:Ft(i[5],n),h:Ft(i[6],n),m:Ft(i[7],n),s:Ft(i[8],n)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(n=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Tt(t,e),e.isBefore(t)?n=Ht(e,t):((n=Ht(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(St(s.from),St(s.to)),(s={}).ms=n.milliseconds,s.M=n.months),s=new kt(s),Dt(e)&&h(e,"_locale")&&(s._locale=e._locale),s}function Ft(e,t){e=e&&parseFloat(e.replace(",","."));return(isNaN(e)?0:e)*t}function Ht(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Lt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(Y(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),Gt(this,Ct(e="string"==typeof e?+e:e,t),s),this}}function Gt(e,t,n,s){var i=t._milliseconds,r=Yt(t._days),t=Yt(t._months);e.isValid()&&(s=null==s||s,i&&e._d.setTime(e._d.valueOf()+i*n),r&&G(e,"Date",L(e,"Date")+r*n),t&&Pe(e,L(e,"Month")+t*n),s&&c.updateOffset(e,r||t))}Ct.fn=kt.prototype;ee=Lt(1,"add"),be=Lt(-1,"subtract");function Vt(e){return void 0===e?this._locale._abbr:(null!=(e=ot(e))&&(this._locale=e),this)}c.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",c.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";Te=n("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function jt(){return this._locale}function Et(e,t){N(0,[e,e.length],0,t)}function At(e,t,n,s,i){var r;return null==e?Ee(this,s,i).year:(r=Ae(e,s,i),function(e,t,n,s,i){i=je(e,t,n,s,i),i=Ge(i.year,0,i.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}.call(this,e,t=r<t?r:t,n,s,i))}N(0,["gg",2],0,function(){return this.weekYear()%100}),N(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Et("gggg","weekYear"),Et("ggggg","weekYear"),Et("GGGG","isoWeekYear"),Et("GGGGG","isoWeekYear"),W("weekYear","gg"),W("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),de("G",re),de("g",re),de("GG",X,$),de("gg",X,$),de("GGGG",ne,J),de("gggg",ne,J),de("GGGGG",se,Q),de("ggggg",se,Q),_e(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=S(e)}),_e(["gg","GG"],function(e,t,n,s){t[s]=c.parseTwoDigitYear(e)}),N("Q",0,"Qo","quarter"),W("quarter","Q"),F("quarter",7),de("Q",q),me("Q",function(e,t){t[pe]=3*(S(e)-1)}),N("D",["DD",2],"Do","date"),W("date","D"),F("date",9),de("D",X),de("DD",X,$),de("Do",function(e,t){return e?t._ordinalParse:t._ordinalParseLenient}),me(["D","DD"],we),me("Do",function(e,t){t[we]=S(e.match(X)[0])});Ie=H("Date",!0);N("DDD",["DDDD",3],"DDDo","dayOfYear"),W("dayOfYear","DDD"),F("dayOfYear",4),de("DDD",te),de("DDDD",B),me(["DDD","DDDD"],function(e,t,n){n._dayOfYear=S(e)}),N("m",["mm",2],0,"minute"),W("minute","m"),F("minute",14),de("m",X),de("mm",X,$),me(["m","mm"],Se);ze=H("Minutes",!1);N("s",["ss",2],0,"second"),W("second","s"),F("second",15),de("s",X),de("ss",X,$),me(["s","ss"],Me);var It,Ne=H("Seconds",!1);for(N("S",0,0,function(){return~~(this.millisecond()/100)}),N(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),N(0,["SSS",3],0,"millisecond"),N(0,["SSSS",4],0,function(){return 10*this.millisecond()}),N(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),N(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),N(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),N(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),N(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),W("millisecond","ms"),F("millisecond",16),de("S",te,q),de("SS",te,$),de("SSS",te,B),It="SSSS";It.length<=9;It+="S")de(It,ie);function Nt(e,t){t[ke]=S(1e3*("0."+e))}for(It="S";It.length<=9;It+="S")me(It,Nt);ne=H("Milliseconds",!1);N("z",0,0,"zoneAbbr"),N("zz",0,0,"zoneName");J=p.prototype;J.add=ee,J.calendar=function(e,t){var n=e||St(),e=Tt(n,this).startOf("day"),e=c.calendarFormat(this,e)||"sameElse",t=t&&(x(t[e])?t[e].call(this,n):t[e]);return this.format(t||this.localeData().calendar(e,this,St(n)))},J.clone=function(){return new p(this)},J.diff=function(e,t,n){var s,i;return this.isValid()&&(s=Tt(e,this)).isValid()?(e=6e4*(s.utcOffset()-this.utcOffset()),"year"===(t=R(t))||"month"===t||"quarter"===t?(i=function(e,t){var n,s=12*(t.year()-e.year())+(t.month()-e.month()),i=e.clone().add(s,"months");i=t-i<0?(n=e.clone().add(s-1,"months"),(t-i)/(i-n)):(n=e.clone().add(1+s,"months"),(t-i)/(n-i));return-(s+i)||0}(this,s),"quarter"===t?i/=3:"year"===t&&(i/=12)):(s=this-s,i="second"===t?s/1e3:"minute"===t?s/6e4:"hour"===t?s/36e5:"day"===t?(s-e)/864e5:"week"===t?(s-e)/6048e5:s),n?i:v(i)):NaN},J.endOf=function(e){return void 0===(e=R(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},J.format=function(e){return e=e||(this.isUtc()?c.defaultFormatUtc:c.defaultFormat),e=z(this,e),this.localeData().postformat(e)},J.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||St(e).isValid())?Ct({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},J.fromNow=function(e){return this.from(St(),e)},J.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||St(e).isValid())?Ct({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},J.toNow=function(e){return this.to(St(),e)},J.get=function(e){return x(this[e=R(e)])?this[e]():this},J.invalidAt=function(){return f(this).overflow},J.isAfter=function(e,t){return e=w(e)?e:St(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=R(m(t)?"millisecond":t))?this.valueOf()>e.valueOf():e.valueOf()<this.clone().startOf(t).valueOf())},J.isBefore=function(e,t){return e=w(e)?e:St(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=R(m(t)?"millisecond":t))?this.valueOf()<e.valueOf():this.clone().endOf(t).valueOf()<e.valueOf())},J.isBetween=function(e,t,n,s){return("("===(s=s||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===s[1]?this.isBefore(t,n):!this.isAfter(t,n))},J.isSame=function(e,t){return e=w(e)?e:St(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=R(t||"millisecond"))?this.valueOf()===e.valueOf():(e=e.valueOf(),this.clone().startOf(t).valueOf()<=e&&e<=this.clone().endOf(t).valueOf()))},J.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},J.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},J.isValid=function(){return d(this)},J.lang=Te,J.locale=Vt,J.localeData=jt,J.max=K,J.min=ue,J.parsingFlags=function(){return u({},f(this))},J.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t,n=[];for(t in e)n.push({unit:t,priority:C[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=U(e)),s=0;s<n.length;s++)this[n[s].unit](e[n[s].unit]);else if(x(this[e=R(e)]))return this[e](t);return this},J.startOf=function(e){switch(e=R(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},J.subtract=be,J.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},J.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},J.toDate=function(){return new Date(this.valueOf())},J.toISOString=function(){var e=this.clone().utc();return 0<e.year()&&e.year()<=9999?x(Date.prototype.toISOString)?this.toDate().toISOString():z(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):z(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},J.toJSON=function(){return this.isValid()?this.toISOString():null},J.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},J.unix=function(){return Math.floor(this.valueOf()/1e3)},J.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},J.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},J.year=Le,J.isLeapYear=function(){return He(this.year())},J.weekYear=function(e){return At.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},J.isoWeekYear=function(e){return At.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},J.quarter=J.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},J.month=We,J.daysInMonth=function(){return xe(this.year(),this.month())},J.week=J.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},J.isoWeek=J.isoWeeks=function(e){var t=Ee(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},J.weeksInYear=function(){var e=this.localeData()._week;return Ae(this.year(),e.dow,e.doy)},J.isoWeeksInYear=function(){return Ae(this.year(),1,4)},J.date=Ie,J.day=J.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-s,"d")):s},J.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},J.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null==e)return this.day()||7;var t=(t=e,e=this.localeData(),"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t);return this.day(this.day()%7?t:t-7)},J.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},J.hour=J.hours=et,J.minute=J.minutes=ze,J.second=J.seconds=Ne,J.millisecond=J.milliseconds=ne,J.utcOffset=function(e,t){var n,s=this._offset||0;return this.isValid()?null!=e?("string"==typeof e?e=bt(oe,e):Math.abs(e)<16&&(e*=60),!this._isUTC&&t&&(n=Pt(this)),this._offset=e,this._isUTC=!0,null!=n&&this.add(n,"m"),s!==e&&(!t||this._changeInProgress?Gt(this,Ct(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,c.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?s:Pt(this):null!=e?this:NaN},J.utc=function(e){return this.utcOffset(0,e)},J.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Pt(this),"m")),this},J.parseZone=function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&(0===bt(ae,this._i)?this.utcOffset(0,!0):this.utcOffset(bt(ae,this._i))),this},J.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?St(e).utcOffset():0,(this.utcOffset()-e)%60==0)},J.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},J.isLocal=function(){return!!this.isValid()&&!this._isUTC},J.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},J.isUtc=Wt,J.isUTC=Wt,J.zoneAbbr=function(){return this._isUTC?"UTC":""},J.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},J.dates=n("dates accessor is deprecated. Use date instead.",Ie),J.months=n("months accessor is deprecated. Use month instead",We),J.years=n("years accessor is deprecated. Use year instead",Le),J.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),J.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!m(this._isDSTShifted))return this._isDSTShifted;var e,t={};return g(t,this),(t=wt(t))._a?(e=(t._isUTC?l:St)(t._a),this._isDSTShifted=this.isValid()&&0<M(t._a,e.toArray())):this._isDSTShifted=!1,this._isDSTShifted});se=J;function zt(e){return e}Q=b.prototype;function Zt(e,t,n,s){var i=ot(),t=l().set(s,t);return i[n](t,e)}function qt(e,t,n){if("number"==typeof e&&(t=e,e=void 0),e=e||"",null!=t)return Zt(e,t,n,"month");for(var s=[],i=0;i<12;i++)s[i]=Zt(e,i,n,"month");return s}function $t(e,t,n,s){t=("boolean"==typeof e?"number"==typeof t&&(n=t,t=void 0):(t=e,e=!1,"number"==typeof(n=t)&&(n=t,t=void 0)),t||"");var i=ot(),r=e?i._week.dow:0;if(null!=n)return Zt(t,(n+r)%7,s,"day");for(var a=[],o=0;o<7;o++)a[o]=Zt(t,(o+r)%7,s,"day");return a}Q.calendar=function(e,t,n){return x(e=this._calendar[e]||this._calendar.sameElse)?e.call(t,n):e},Q.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},Q.invalidDate=function(){return this._invalidDate},Q.ordinal=function(e){return this._ordinal.replace("%d",e)},Q.preparse=zt,Q.postformat=zt,Q.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return x(i)?i(e,t,n,s):i.replace(/%d/i,e)},Q.pastFuture=function(e,t){return x(e=this._relativeTime[0<e?"future":"past"])?e(t):e.replace(/%s/i,t)},Q.set=function(e){var t,n;for(n in e)x(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},Q.months=function(e,t){return e?(a(this._months)?this._months:this._months[(this._months.isFormat||Oe).test(t)?"format":"standalone"])[e.month()]:this._months},Q.monthsShort=function(e,t){return e?(a(this._monthsShort)?this._monthsShort:this._monthsShort[Oe.test(t)?"format":"standalone"])[e.month()]:this._monthsShort},Q.monthsParse=function(e,t,n){var s,i;if(this._monthsParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=l([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=ye.call(this._shortMonthsParse,e))?i:null:-1!==(i=ye.call(this._longMonthsParse,e))?i:null:"MMM"===t?-1!==(i=ye.call(this._shortMonthsParse,e))||-1!==(i=ye.call(this._longMonthsParse,e))?i:null:-1!==(i=ye.call(this._longMonthsParse,e))||-1!==(i=ye.call(this._shortMonthsParse,e))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=l([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(i="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},Q.monthsRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||Ce.call(this),e?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=Ue),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Q.monthsShortRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||Ce.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Re),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Q.week=function(e){return Ee(e,this._week.dow,this._week.doy).week},Q.firstDayOfYear=function(){return this._week.doy},Q.firstDayOfWeek=function(){return this._week.dow},Q.weekdays=function(e,t){return e?(a(this._weekdays)?this._weekdays:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"])[e.day()]:this._weekdays},Q.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},Q.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},Q.weekdaysParse=function(e,t,n){var s,i;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=l([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=ye.call(this._weekdaysParse,e))?i:null:"ddd"===t?-1!==(i=ye.call(this._shortWeekdaysParse,e))?i:null:-1!==(i=ye.call(this._minWeekdaysParse,e))?i:null:"dddd"===t?-1!==(i=ye.call(this._weekdaysParse,e))||-1!==(i=ye.call(this._shortWeekdaysParse,e))||-1!==(i=ye.call(this._minWeekdaysParse,e))?i:null:"ddd"===t?-1!==(i=ye.call(this._shortWeekdaysParse,e))||-1!==(i=ye.call(this._weekdaysParse,e))||-1!==(i=ye.call(this._minWeekdaysParse,e))?i:null:-1!==(i=ye.call(this._minWeekdaysParse,e))||-1!==(i=ye.call(this._weekdaysParse,e))||-1!==(i=ye.call(this._shortWeekdaysParse,e))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=l([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[s]||(i="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},Q.weekdaysRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=Ze),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Q.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Q.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$e),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Q.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Q.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},rt("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===S(e%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th")}}),c.lang=n("moment.lang is deprecated. Use moment.locale instead.",rt),c.langData=n("moment.langData is deprecated. Use moment.localeData instead.",ot);var Bt=Math.abs;function Jt(e,t,n,s){n=Ct(t,n);return e._milliseconds+=s*n._milliseconds,e._days+=s*n._days,e._months+=s*n._months,e._bubble()}function Qt(e){return e<0?Math.floor(e):Math.ceil(e)}function Xt(e){return 4800*e/146097}function Kt(e){return 146097*e/4800}function en(e){return function(){return this.as(e)}}q=en("ms"),$=en("s"),te=en("m"),B=en("h"),ee=en("d"),K=en("w"),ue=en("M"),be=en("y");function tn(e){return function(){return this._data[e]}}et=tn("milliseconds"),ze=tn("seconds"),Ne=tn("minutes"),ne=tn("hours"),Ie=tn("days"),Le=tn("months"),J=tn("years");var nn=Math.round,sn={s:45,m:45,h:22,d:26,M:11};function rn(e,t,n){var s=Ct(e).abs(),i=nn(s.as("s")),r=nn(s.as("m")),a=nn(s.as("h")),o=nn(s.as("d")),u=nn(s.as("M")),s=nn(s.as("y")),s=(i<sn.s?["s",i]:r<=1&&["m"])||r<sn.m&&["mm",r]||a<=1&&["h"]||a<sn.h&&["hh",a]||o<=1&&["d"]||o<sn.d&&["dd",o]||u<=1&&["M"]||u<sn.M&&["MM",u]||s<=1&&["y"]||["yy",s];return s[2]=t,s[3]=0<+e,s[4]=n,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,s)}var an=Math.abs;function on(){var e=an(this._milliseconds)/1e3,t=an(this._days),n=an(this._months),s=v(e/60),i=v(s/60);e%=60,s%=60;var r=v(n/12),a=n%=12,n=t,t=i,i=s,s=e,e=this.asSeconds();return e?(e<0?"-":"")+"P"+(r?r+"Y":"")+(a?a+"M":"")+(n?n+"D":"")+(t||i||s?"T":"")+(t?t+"H":"")+(i?i+"M":"")+(s?s+"S":""):"P0D"}Q=kt.prototype;return Q.abs=function(){var e=this._data;return this._milliseconds=Bt(this._milliseconds),this._days=Bt(this._days),this._months=Bt(this._months),e.milliseconds=Bt(e.milliseconds),e.seconds=Bt(e.seconds),e.minutes=Bt(e.minutes),e.hours=Bt(e.hours),e.months=Bt(e.months),e.years=Bt(e.years),this},Q.add=function(e,t){return Jt(this,e,t,1)},Q.subtract=function(e,t){return Jt(this,e,t,-1)},Q.as=function(e){var t,n,s=this._milliseconds;if("month"===(e=R(e))||"year"===e)return t=this._days+s/864e5,n=this._months+Xt(t),"month"===e?n:n/12;switch(t=this._days+Math.round(Kt(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},Q.asMilliseconds=q,Q.asSeconds=$,Q.asMinutes=te,Q.asHours=B,Q.asDays=ee,Q.asWeeks=K,Q.asMonths=ue,Q.asYears=be,Q.valueOf=function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*S(this._months/12)},Q._bubble=function(){var e=this._milliseconds,t=this._days,n=this._months,s=this._data;return 0<=e&&0<=t&&0<=n||e<=0&&t<=0&&n<=0||(e+=864e5*Qt(Kt(n)+t),n=t=0),s.milliseconds=e%1e3,e=v(e/1e3),s.seconds=e%60,e=v(e/60),s.minutes=e%60,e=v(e/60),s.hours=e%24,t+=v(e/24),n+=e=v(Xt(t)),t-=Qt(Kt(e)),e=v(n/12),n%=12,s.days=t,s.months=n,s.years=e,this},Q.get=function(e){return this[(e=R(e))+"s"]()},Q.milliseconds=et,Q.seconds=ze,Q.minutes=Ne,Q.hours=ne,Q.days=Ie,Q.weeks=function(){return v(this.days()/7)},Q.months=Le,Q.years=J,Q.humanize=function(e){var t=this.localeData(),n=rn(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Q.toISOString=on,Q.toString=on,Q.toJSON=on,Q.locale=Vt,Q.localeData=jt,Q.toIsoString=n("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",on),Q.lang=Te,N("X",0,0,"unix"),N("x",0,0,"valueOf"),de("x",re),de("X",/[+-]?\d+(\.\d{1,3})?/),me("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),me("x",function(e,t,n){n._d=new Date(S(e))}),c.version="2.15.1",e=St,c.fn=se,c.min=function(){return Mt("isBefore",[].slice.call(arguments,0))},c.max=function(){return Mt("isAfter",[].slice.call(arguments,0))},c.now=function(){return Date.now?Date.now():+new Date},c.utc=l,c.unix=function(e){return St(1e3*e)},c.months=function(e,t){return qt(e,t,"months")},c.isDate=s,c.locale=rt,c.invalid=r,c.duration=Ct,c.isMoment=w,c.weekdays=function(e,t,n){return $t(e,t,n,"weekdays")},c.parseZone=function(){return St.apply(null,arguments).parseZone()},c.localeData=ot,c.isDuration=Dt,c.monthsShort=function(e,t){return qt(e,t,"monthsShort")},c.weekdaysMin=function(e,t,n){return $t(e,t,n,"weekdaysMin")},c.defineLocale=at,c.updateLocale=function(e,t){return null!=t?((t=new b(t=O(null!=nt[e]?nt[e]._config:tt,t))).parentLocale=nt[e],nt[e]=t,rt(e)):null!=nt[e]&&(null!=nt[e].parentLocale?nt[e]=nt[e].parentLocale:null!=nt[e]&&delete nt[e]),nt[e]},c.locales=function(){return T(nt)},c.weekdaysShort=function(e,t,n){return $t(e,t,n,"weekdaysShort")},c.normalizeUnits=R,c.relativeTimeRounding=function(e){return void 0===e?nn:"function"==typeof e&&(nn=e,!0)},c.relativeTimeThreshold=function(e,t){return void 0!==sn[e]&&(void 0===t?sn[e]:(sn[e]=t,!0))},c.calendarFormat=function(e,t){return(t=e.diff(t,"days",!0))<-6?"sameElse":t<-1?"lastWeek":t<0?"lastDay":t<1?"sameDay":t<2?"nextDay":t<7?"nextWeek":"sameElse"},c.prototype=se,c});
|
1 |
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e;function h(){return e.apply(null,arguments)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function i(e,t){for(var n=[],s=0;s<e.length;++s)n.push(t(e[s],s));return n}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e,t){for(var n in t)c(t,n)&&(e[n]=t[n]);return c(t,"toString")&&(e.toString=t.toString),c(t,"valueOf")&&(e.valueOf=t.valueOf),e}function l(e,t,n,s){return St(e,t,n,s,!0).utc()}function f(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}),e._pf}function d(e){if(null==e._isValid){var t=f(e),n=_.call(t.parsedDateParts,function(e){return null!=e}),n=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return n;e._isValid=n}return e._isValid}function r(e){var t=l(NaN);return null!=e?u(f(t),e):f(t).userInvalidated=!0,t}function m(e){return void 0===e}var _=Array.prototype.some||function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1},y=h.momentProperties=[];function g(e,t){var n,s,i;if(m(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),m(t._i)||(e._i=t._i),m(t._f)||(e._f=t._f),m(t._l)||(e._l=t._l),m(t._strict)||(e._strict=t._strict),m(t._tzm)||(e._tzm=t._tzm),m(t._isUTC)||(e._isUTC=t._isUTC),m(t._offset)||(e._offset=t._offset),m(t._pf)||(e._pf=f(t)),m(t._locale)||(e._locale=t._locale),0<y.length)for(n in y)m(i=t[s=y[n]])||(e[s]=i);return e}var t=!1;function p(e){g(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),!1===t&&(t=!0,h.updateOffset(this),t=!1)}function w(e){return e instanceof p||null!=e&&null!=e._isAMomentObject}function v(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function S(e){var t=+e,e=0;return e=0!=t&&isFinite(t)?v(t):e}function M(e,t,n){for(var s=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),r=0,a=0;a<s;a++)(n&&e[a]!==t[a]||!n&&S(e[a])!==S(t[a]))&&r++;return r+i}function k(e){!1===h.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function n(i,r){var a=!0;return u(function(){if(null!=h.deprecationHandler&&h.deprecationHandler(null,i),a){for(var e,t=[],n=0;n<arguments.length;n++){if(e="","object"==typeof arguments[n]){for(var s in e+="\n["+n+"] ",arguments[0])e+=s+": "+arguments[0][s]+", ";e=e.slice(0,-2)}else e=arguments[n];t.push(e)}k(i+"\nArguments: "+Array.prototype.slice.call(t).join("")+"\n"+(new Error).stack),a=!1}return r.apply(this,arguments)},r)}var D={};function Y(e,t){null!=h.deprecationHandler&&h.deprecationHandler(e,t),D[e]||(k(t),D[e]=!0)}function x(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function O(e,t){var n,s=u({},e);for(n in t)c(t,n)&&(o(e[n])&&o(t[n])?(s[n]={},u(s[n],e[n]),u(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)c(e,n)&&!c(t,n)&&o(e[n])&&(s[n]=u({},s[n]));return s}function b(e){null!=e&&this.set(e)}h.suppressDeprecationWarnings=!1,h.deprecationHandler=null;var T=Object.keys||function(e){var t,n=[];for(t in e)c(e,t)&&n.push(t);return n};var P={};function W(e,t){var n=e.toLowerCase();P[n]=P[n+"s"]=P[t]=e}function R(e){return"string"==typeof e?P[e]||P[e.toLowerCase()]:void 0}function U(e){var t,n,s={};for(n in e)c(e,n)&&(t=R(n))&&(s[t]=e[n]);return s}var C={};function F(e,t){C[e]=t}function H(t,n){return function(e){return null!=e?(G(this,t,e),h.updateOffset(this,n),this):L(this,t)}}function L(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function G(e,t,n){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](n)}function V(e,t,n){var s=""+Math.abs(e);return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,t-s.length)).toString().substr(1)+s}var j=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,E=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,A={},I={};function N(e,t,n,s){var i="string"==typeof s?function(){return this[s]()}:s;e&&(I[e]=i),t&&(I[t[0]]=function(){return V(i.apply(this,arguments),t[1],t[2])}),n&&(I[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function z(e,t){return e.isValid()?(t=Z(t,e.localeData()),A[t]=A[t]||function(s){for(var e,i=s.match(j),t=0,r=i.length;t<r;t++)I[i[t]]?i[t]=I[i[t]]:i[t]=(e=i[t]).match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"");return function(e){for(var t="",n=0;n<r;n++)t+=i[n]instanceof Function?i[n].call(e,s):i[n];return t}}(t),A[t](e)):e.localeData().invalidDate()}function Z(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(E.lastIndex=0;0<=n&&E.test(e);)e=e.replace(E,s),E.lastIndex=0,--n;return e}var q=/\d/,$=/\d\d/,B=/\d{3}/,J=/\d{4}/,Q=/[+-]?\d{6}/,X=/\d\d?/,K=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,se=/[+-]?\d{1,6}/,ie=/\d+/,re=/[+-]?\d+/,ae=/Z|[+-]\d\d:?\d\d/gi,oe=/Z|[+-]\d\d(?::?\d\d)?/gi,ue=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,le={};function de(e,n,s){le[e]=x(n)?n:function(e,t){return e&&s?s:n}}function he(e,t){return c(le,e)?le[e](t._strict,t._locale):new RegExp(ce(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function ce(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var fe={};function me(e,n){var t,s=n;for("string"==typeof e&&(e=[e]),"number"==typeof n&&(s=function(e,t){t[n]=S(e)}),t=0;t<e.length;t++)fe[e[t]]=s}function _e(e,i){me(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}var ye,ge=0,pe=1,we=2,ve=3,Se=4,Me=5,ke=6,De=7,Ye=8;function xe(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}ye=Array.prototype.indexOf||function(e){for(var t=0;t<this.length;++t)if(this[t]===e)return t;return-1},N("M",["MM",2],"Mo",function(){return this.month()+1}),N("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),N("MMMM",0,0,function(e){return this.localeData().months(this,e)}),W("month","M"),F("month",8),de("M",X),de("MM",X,$),de("MMM",function(e,t){return t.monthsShortRegex(e)}),de("MMMM",function(e,t){return t.monthsRegex(e)}),me(["M","MM"],function(e,t){t[pe]=S(e)-1}),me(["MMM","MMMM"],function(e,t,n,s){s=n._locale.monthsParse(e,s,n._strict);null!=s?t[pe]=s:f(n).invalidMonth=e});var Oe=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,be="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Te="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Pe(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=S(t);else if("number"!=typeof(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),xe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function We(e){return null!=e?(Pe(this,e),h.updateOffset(this,!0),this):L(this,"Month")}var Re=ue;var Ue=ue;function Ce(){function e(e,t){return t.length-e.length}for(var t,n=[],s=[],i=[],r=0;r<12;r++)t=l([2e3,r]),n.push(this.monthsShort(t,"")),s.push(this.months(t,"")),i.push(this.months(t,"")),i.push(this.monthsShort(t,""));for(n.sort(e),s.sort(e),i.sort(e),r=0;r<12;r++)n[r]=ce(n[r]),s[r]=ce(s[r]);for(r=0;r<24;r++)i[r]=ce(i[r]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function Fe(e){return He(e)?366:365}function He(e){return e%4==0&&e%100!=0||e%400==0}N("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),N(0,["YY",2],0,function(){return this.year()%100}),N(0,["YYYY",4],0,"year"),N(0,["YYYYY",5],0,"year"),N(0,["YYYYYY",6,!0],0,"year"),W("year","y"),F("year",1),de("Y",re),de("YY",X,$),de("YYYY",ne,J),de("YYYYY",se,Q),de("YYYYYY",se,Q),me(["YYYYY","YYYYYY"],ge),me("YYYY",function(e,t){t[ge]=2===e.length?h.parseTwoDigitYear(e):S(e)}),me("YY",function(e,t){t[ge]=h.parseTwoDigitYear(e)}),me("Y",function(e,t){t[ge]=parseInt(e,10)}),h.parseTwoDigitYear=function(e){return S(e)+(68<S(e)?1900:2e3)};var Le=H("FullYear",!0);function Ge(e,t,n,s,i,r,a){a=new Date(e,t,n,s,i,r,a);return e<100&&0<=e&&isFinite(a.getFullYear())&&a.setFullYear(e),a}function Ve(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&0<=e&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function je(e,t,n){n=7+t-n;return n-(7+Ve(e,0,n).getUTCDay()-t)%7-1}function Ee(e,t,n,s,i){var r,i=1+7*(t-1)+(7+n-s)%7+je(e,s,i),i=i<=0?Fe(r=e-1)+i:i>Fe(e)?(r=e+1,i-Fe(e)):(r=e,i);return{year:r,dayOfYear:i}}function Ae(e,t,n){var s,i,r=je(e.year(),t,n),r=Math.floor((e.dayOfYear()-r-1)/7)+1;return r<1?s=r+Ie(i=e.year()-1,t,n):r>Ie(e.year(),t,n)?(s=r-Ie(e.year(),t,n),i=e.year()+1):(i=e.year(),s=r),{week:s,year:i}}function Ie(e,t,n){var s=je(e,t,n),n=je(e+1,t,n);return(Fe(e)-s+n)/7}N("w",["ww",2],"wo","week"),N("W",["WW",2],"Wo","isoWeek"),W("week","w"),W("isoWeek","W"),F("week",5),F("isoWeek",5),de("w",X),de("ww",X,$),de("W",X),de("WW",X,$),_e(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=S(e)});N("d",0,"do","day"),N("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),N("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),N("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),N("e",0,0,"weekday"),N("E",0,0,"isoWeekday"),W("day","d"),W("weekday","e"),W("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),de("d",X),de("e",X),de("E",X),de("dd",function(e,t){return t.weekdaysMinRegex(e)}),de("ddd",function(e,t){return t.weekdaysShortRegex(e)}),de("dddd",function(e,t){return t.weekdaysRegex(e)}),_e(["dd","ddd","dddd"],function(e,t,n,s){s=n._locale.weekdaysParse(e,s,n._strict);null!=s?t.d=s:f(n).invalidWeekday=e}),_e(["d","e","E"],function(e,t,n,s){t[s]=S(e)});var Ne="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var qe=ue;var $e=ue;var Be=ue;function Je(){function e(e,t){return t.length-e.length}for(var t,n,s,i=[],r=[],a=[],o=[],u=0;u<7;u++)s=l([2e3,1]).day(u),t=this.weekdaysMin(s,""),n=this.weekdaysShort(s,""),s=this.weekdays(s,""),i.push(t),r.push(n),a.push(s),o.push(t),o.push(n),o.push(s);for(i.sort(e),r.sort(e),a.sort(e),o.sort(e),u=0;u<7;u++)r[u]=ce(r[u]),a[u]=ce(a[u]),o[u]=ce(o[u]);this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Qe(){return this.hours()%12||12}function Xe(e,t){N(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ke(e,t){return t._meridiemParse}N("H",["HH",2],0,"hour"),N("h",["hh",2],0,Qe),N("k",["kk",2],0,function(){return this.hours()||24}),N("hmm",0,0,function(){return""+Qe.apply(this)+V(this.minutes(),2)}),N("hmmss",0,0,function(){return""+Qe.apply(this)+V(this.minutes(),2)+V(this.seconds(),2)}),N("Hmm",0,0,function(){return""+this.hours()+V(this.minutes(),2)}),N("Hmmss",0,0,function(){return""+this.hours()+V(this.minutes(),2)+V(this.seconds(),2)}),Xe("a",!0),Xe("A",!1),W("hour","h"),F("hour",13),de("a",Ke),de("A",Ke),de("H",X),de("h",X),de("HH",X,$),de("hh",X,$),de("hmm",K),de("hmmss",ee),de("Hmm",K),de("Hmmss",ee),me(["H","HH"],ve),me(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),me(["h","hh"],function(e,t,n){t[ve]=S(e),f(n).bigHour=!0}),me("hmm",function(e,t,n){var s=e.length-2;t[ve]=S(e.substr(0,s)),t[Se]=S(e.substr(s)),f(n).bigHour=!0}),me("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ve]=S(e.substr(0,s)),t[Se]=S(e.substr(s,2)),t[Me]=S(e.substr(i)),f(n).bigHour=!0}),me("Hmm",function(e,t,n){var s=e.length-2;t[ve]=S(e.substr(0,s)),t[Se]=S(e.substr(s))}),me("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ve]=S(e.substr(0,s)),t[Se]=S(e.substr(s,2)),t[Me]=S(e.substr(i))});var et,tt=H("Hours",!0),nt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",ordinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:be,monthsShort:Te,week:{dow:0,doy:6},weekdays:Ne,weekdaysMin:Ze,weekdaysShort:ze,meridiemParse:/[ap]\.?m?\.?/i},st={};function it(e){return e&&e.toLowerCase().replace("_","-")}function rt(e){var t;if(!st[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=et._abbr,require("./locale/"+e),at(t)}catch(e){}return st[e]}function at(e,t){var n;return(et=e&&(n=m(t)?ut(e):ot(e,t))?n:et)._abbr}function ot(e,t){if(null===t)return delete st[e],null;var n=nt;return t.abbr=e,null!=st[e]?(Y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=st[e]._config):null!=t.parentLocale&&(null!=st[t.parentLocale]?n=st[t.parentLocale]._config:Y("parentLocaleUndefined","specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/")),st[e]=new b(O(n,t)),at(e),st[e]}function ut(e){var t;if(!(e=e&&e._locale&&e._locale._abbr?e._locale._abbr:e))return et;if(!a(e)){if(t=rt(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=it(e[r]).split("-")).length,n=(n=it(e[r+1]))?n.split("-"):null;0<t;){if(s=rt(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&M(i,n,!0)>=t-1)break;t--}r++}return null}(e)}function lt(e){var t=e._a;return t&&-2===f(e).overflow&&(t=t[pe]<0||11<t[pe]?pe:t[we]<1||t[we]>xe(t[ge],t[pe])?we:t[ve]<0||24<t[ve]||24===t[ve]&&(0!==t[Se]||0!==t[Me]||0!==t[ke])?ve:t[Se]<0||59<t[Se]?Se:t[Me]<0||59<t[Me]?Me:t[ke]<0||999<t[ke]?ke:-1,f(e)._overflowDayOfYear&&(t<ge||we<t)&&(t=we),f(e)._overflowWeeks&&-1===t&&(t=De),f(e)._overflowWeekday&&-1===t&&(t=Ye),f(e).overflow=t),e}var dt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,ht=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,ct=/Z|[+-]\d\d(?::?\d\d)?/,ft=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],mt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],_t=/^\/?Date\((\-?\d+)/i;function yt(e){var t,n,s,i,r,a,o=e._i,u=dt.exec(o)||ht.exec(o);if(u){for(f(e).iso=!0,t=0,n=ft.length;t<n;t++)if(ft[t][1].exec(u[1])){i=ft[t][0],s=!1!==ft[t][2];break}if(null!=i){if(u[3]){for(t=0,n=mt.length;t<n;t++)if(mt[t][1].exec(u[3])){r=(u[2]||" ")+mt[t][0];break}if(null==r)return void(e._isValid=!1)}if(s||null==r){if(u[4]){if(!ct.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),wt(e)}else e._isValid=!1}else e._isValid=!1}else e._isValid=!1}function gt(e,t,n){return null!=e?e:null!=t?t:n}function pt(e){var t,n,s,i,r=[];if(!e._d){for(s=e,i=new Date(h.now()),n=s._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()],e._w&&null==e._a[we]&&null==e._a[pe]&&function(e){var t,n,s,i,r,a,o;null!=(t=e._w).GG||null!=t.W||null!=t.E?(r=1,a=4,n=gt(t.GG,e._a[ge],Ae(Mt(),1,4).year),s=gt(t.W,1),((i=gt(t.E,1))<1||7<i)&&(o=!0)):(r=e._locale._week.dow,a=e._locale._week.doy,n=gt(t.gg,e._a[ge],Ae(Mt(),r,a).year),s=gt(t.w,1),null!=t.d?((i=t.d)<0||6<i)&&(o=!0):null!=t.e?(i=t.e+r,(t.e<0||6<t.e)&&(o=!0)):i=r);s<1||s>Ie(n,r,a)?f(e)._overflowWeeks=!0:null!=o?f(e)._overflowWeekday=!0:(a=Ee(n,s,i,r,a),e._a[ge]=a.year,e._dayOfYear=a.dayOfYear)}(e),e._dayOfYear&&(i=gt(e._a[ge],n[ge]),e._dayOfYear>Fe(i)&&(f(e)._overflowDayOfYear=!0),i=Ve(i,0,e._dayOfYear),e._a[pe]=i.getUTCMonth(),e._a[we]=i.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=r[t]=n[t];for(;t<7;t++)e._a[t]=r[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ve]&&0===e._a[Se]&&0===e._a[Me]&&0===e._a[ke]&&(e._nextDay=!0,e._a[ve]=0),e._d=(e._useUTC?Ve:Ge).apply(null,r),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ve]=24)}}function wt(e){if(e._f!==h.ISO_8601){e._a=[],f(e).empty=!0;for(var t,n,s,i,r,a=""+e._i,o=a.length,u=0,l=Z(e._f,e._locale).match(j)||[],d=0;d<l.length;d++)n=l[d],(t=(a.match(he(n,e))||[])[0])&&(0<(i=a.substr(0,a.indexOf(t))).length&&f(e).unusedInput.push(i),a=a.slice(a.indexOf(t)+t.length),u+=t.length),I[n]?(t?f(e).empty=!1:f(e).unusedTokens.push(n),s=n,r=e,null!=(i=t)&&c(fe,s)&&fe[s](i,r._a,r,s)):e._strict&&!t&&f(e).unusedTokens.push(n);f(e).charsLeftOver=o-u,0<a.length&&f(e).unusedInput.push(a),e._a[ve]<=12&&!0===f(e).bigHour&&0<e._a[ve]&&(f(e).bigHour=void 0),f(e).parsedDateParts=e._a.slice(0),f(e).meridiem=e._meridiem,e._a[ve]=function(e,t,n){if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((n=e.isPM(n))&&t<12&&(t+=12),t=n||12!==t?t:0):t}(e._locale,e._a[ve],e._meridiem),pt(e),lt(e)}else yt(e)}function vt(e){var t=e._i,n=e._f;return e._locale=e._locale||ut(e._l),null===t||void 0===n&&""===t?r({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new p(lt(t)):(a(n)?function(e){var t,n,s,i,r;if(0===e._f.length)return f(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<e._f.length;i++)r=0,t=g({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],wt(t),d(t)&&(r+=f(t).charsLeftOver,r+=10*f(t).unusedTokens.length,f(t).score=r,(null==s||r<s)&&(s=r,n=t));u(e,n||t)}(e):s(t)?e._d=t:n?wt(e):void 0===(n=(t=e)._i)?t._d=new Date(h.now()):s(n)?t._d=new Date(n.valueOf()):"string"==typeof n?function(e){var t=_t.exec(e._i);null===t?(yt(e),!1===e._isValid&&(delete e._isValid,h.createFromInputFallback(e))):e._d=new Date(+t[1])}(t):a(n)?(t._a=i(n.slice(0),function(e){return parseInt(e,10)}),pt(t)):"object"==typeof n?function(e){var t;e._d||(t=U(e._i),e._a=i([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),pt(e))}(t):"number"==typeof n?t._d=new Date(n):h.createFromInputFallback(t),d(e)||(e._d=null),e))}function St(e,t,n,s,i){var r={};return"boolean"==typeof n&&(s=n,n=void 0),(o(e)&&function(e){for(var t in e)return;return 1}(e)||a(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=i,r._l=n,r._i=e,r._f=t,r._strict=s,(r=new p(lt(vt(r=r))))._nextDay&&(r.add(1,"d"),r._nextDay=void 0),r}function Mt(e,t,n,s){return St(e,t,n,s,!1)}h.createFromInputFallback=n("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),h.ISO_8601=function(){};ue=n("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Mt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:r()}),K=n("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Mt.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:r()});function kt(e,t){var n,s;if(!(t=1===t.length&&a(t[0])?t[0]:t).length)return Mt();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}function Dt(e){var t=U(e),n=t.year||0,s=t.quarter||0,i=t.month||0,r=t.week||0,a=t.day||0,o=t.hour||0,u=t.minute||0,e=t.second||0,t=t.millisecond||0;this._milliseconds=+t+1e3*e+6e4*u+1e3*o*60*60,this._days=+a+7*r,this._months=+i+3*s+12*n,this._data={},this._locale=ut(),this._bubble()}function Yt(e){return e instanceof Dt}function xt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ot(e,n){N(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+V(~~(e/60),2)+n+V(~~e%60,2)})}Ot("Z",":"),Ot("ZZ",""),de("Z",oe),de("ZZ",oe),me(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Tt(oe,e)});var bt=/([\+\-]|\d\d)/gi;function Tt(e,t){t=(t||"").match(e)||[],e=((t[t.length-1]||[])+"").match(bt)||["-",0,0],t=60*e[1]+S(e[2]);return"+"===e[0]?t:-t}function Pt(e,t){var n;return t._isUTC?(n=t.clone(),t=(w(e)||s(e)?e:Mt(e)).valueOf()-n.valueOf(),n._d.setTime(n._d.valueOf()+t),h.updateOffset(n,!1),n):Mt(e).local()}function Wt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Rt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}h.updateOffset=function(){};var Ut=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ct=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;function Ft(e,t){var n,s=e,i=null;return Yt(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:"number"==typeof e?(s={},t?s[t]=e:s.milliseconds=e):(i=Ut.exec(e))?(n="-"===i[1]?-1:1,s={y:0,d:S(i[we])*n,h:S(i[ve])*n,m:S(i[Se])*n,s:S(i[Me])*n,ms:S(xt(1e3*i[ke]))*n}):(i=Ct.exec(e))?(n="-"===i[1]?-1:1,s={y:Ht(i[2],n),M:Ht(i[3],n),w:Ht(i[4],n),d:Ht(i[5],n),h:Ht(i[6],n),m:Ht(i[7],n),s:Ht(i[8],n)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(n=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Pt(t,e),e.isBefore(t)?n=Lt(e,t):((n=Lt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Mt(s.from),Mt(s.to)),(s={}).ms=n.milliseconds,s.M=n.months),s=new Dt(s),Yt(e)&&c(e,"_locale")&&(s._locale=e._locale),s}function Ht(e,t){e=e&&parseFloat(e.replace(",","."));return(isNaN(e)?0:e)*t}function Lt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Gt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(Y(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),Vt(this,Ft(e="string"==typeof e?+e:e,t),s),this}}function Vt(e,t,n,s){var i=t._milliseconds,r=xt(t._days),t=xt(t._months);e.isValid()&&(s=null==s||s,i&&e._d.setTime(e._d.valueOf()+i*n),r&&G(e,"Date",L(e,"Date")+r*n),t&&Pe(e,L(e,"Month")+t*n),s&&h.updateOffset(e,r||t))}Ft.fn=Dt.prototype;ee=Gt(1,"add"),be=Gt(-1,"subtract");function jt(e){return void 0===e?this._locale._abbr:(null!=(e=ut(e))&&(this._locale=e),this)}h.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",h.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";Te=n("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function Et(){return this._locale}function At(e,t){N(0,[e,e.length],0,t)}function It(e,t,n,s,i){var r;return null==e?Ae(this,s,i).year:(r=Ie(e,s,i),function(e,t,n,s,i){i=Ee(e,t,n,s,i),i=Ve(i.year,0,i.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}.call(this,e,t=r<t?r:t,n,s,i))}N(0,["gg",2],0,function(){return this.weekYear()%100}),N(0,["GG",2],0,function(){return this.isoWeekYear()%100}),At("gggg","weekYear"),At("ggggg","weekYear"),At("GGGG","isoWeekYear"),At("GGGGG","isoWeekYear"),W("weekYear","gg"),W("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),de("G",re),de("g",re),de("GG",X,$),de("gg",X,$),de("GGGG",ne,J),de("gggg",ne,J),de("GGGGG",se,Q),de("ggggg",se,Q),_e(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=S(e)}),_e(["gg","GG"],function(e,t,n,s){t[s]=h.parseTwoDigitYear(e)}),N("Q",0,"Qo","quarter"),W("quarter","Q"),F("quarter",7),de("Q",q),me("Q",function(e,t){t[pe]=3*(S(e)-1)}),N("D",["DD",2],"Do","date"),W("date","D"),F("date",9),de("D",X),de("DD",X,$),de("Do",function(e,t){return e?t._ordinalParse:t._ordinalParseLenient}),me(["D","DD"],we),me("Do",function(e,t){t[we]=S(e.match(X)[0])});Ne=H("Date",!0);N("DDD",["DDDD",3],"DDDo","dayOfYear"),W("dayOfYear","DDD"),F("dayOfYear",4),de("DDD",te),de("DDDD",B),me(["DDD","DDDD"],function(e,t,n){n._dayOfYear=S(e)}),N("m",["mm",2],0,"minute"),W("minute","m"),F("minute",14),de("m",X),de("mm",X,$),me(["m","mm"],Se);Ze=H("Minutes",!1);N("s",["ss",2],0,"second"),W("second","s"),F("second",15),de("s",X),de("ss",X,$),me(["s","ss"],Me);var Nt,ze=H("Seconds",!1);for(N("S",0,0,function(){return~~(this.millisecond()/100)}),N(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),N(0,["SSS",3],0,"millisecond"),N(0,["SSSS",4],0,function(){return 10*this.millisecond()}),N(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),N(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),N(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),N(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),N(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),W("millisecond","ms"),F("millisecond",16),de("S",te,q),de("SS",te,$),de("SSS",te,B),Nt="SSSS";Nt.length<=9;Nt+="S")de(Nt,ie);function zt(e,t){t[ke]=S(1e3*("0."+e))}for(Nt="S";Nt.length<=9;Nt+="S")me(Nt,zt);ne=H("Milliseconds",!1);N("z",0,0,"zoneAbbr"),N("zz",0,0,"zoneName");J=p.prototype;J.add=ee,J.calendar=function(e,t){var n=e||Mt(),e=Pt(n,this).startOf("day"),e=h.calendarFormat(this,e)||"sameElse",t=t&&(x(t[e])?t[e].call(this,n):t[e]);return this.format(t||this.localeData().calendar(e,this,Mt(n)))},J.clone=function(){return new p(this)},J.diff=function(e,t,n){var s,i;return this.isValid()&&(s=Pt(e,this)).isValid()?(e=6e4*(s.utcOffset()-this.utcOffset()),"year"===(t=R(t))||"month"===t||"quarter"===t?(i=function(e,t){var n,s=12*(t.year()-e.year())+(t.month()-e.month()),i=e.clone().add(s,"months");i=t-i<0?(n=e.clone().add(s-1,"months"),(t-i)/(i-n)):(n=e.clone().add(1+s,"months"),(t-i)/(n-i));return-(s+i)||0}(this,s),"quarter"===t?i/=3:"year"===t&&(i/=12)):(s=this-s,i="second"===t?s/1e3:"minute"===t?s/6e4:"hour"===t?s/36e5:"day"===t?(s-e)/864e5:"week"===t?(s-e)/6048e5:s),n?i:v(i)):NaN},J.endOf=function(e){return void 0===(e=R(e))||"millisecond"===e?this:this.startOf(e="date"===e?"day":e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms")},J.format=function(e){return e=e||(this.isUtc()?h.defaultFormatUtc:h.defaultFormat),e=z(this,e),this.localeData().postformat(e)},J.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Mt(e).isValid())?Ft({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},J.fromNow=function(e){return this.from(Mt(),e)},J.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Mt(e).isValid())?Ft({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},J.toNow=function(e){return this.to(Mt(),e)},J.get=function(e){return x(this[e=R(e)])?this[e]():this},J.invalidAt=function(){return f(this).overflow},J.isAfter=function(e,t){return e=w(e)?e:Mt(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=R(m(t)?"millisecond":t))?this.valueOf()>e.valueOf():e.valueOf()<this.clone().startOf(t).valueOf())},J.isBefore=function(e,t){return e=w(e)?e:Mt(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=R(m(t)?"millisecond":t))?this.valueOf()<e.valueOf():this.clone().endOf(t).valueOf()<e.valueOf())},J.isBetween=function(e,t,n,s){return("("===(s=s||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===s[1]?this.isBefore(t,n):!this.isAfter(t,n))},J.isSame=function(e,t){return e=w(e)?e:Mt(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=R(t||"millisecond"))?this.valueOf()===e.valueOf():(e=e.valueOf(),this.clone().startOf(t).valueOf()<=e&&e<=this.clone().endOf(t).valueOf()))},J.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},J.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},J.isValid=function(){return d(this)},J.lang=Te,J.locale=jt,J.localeData=Et,J.max=K,J.min=ue,J.parsingFlags=function(){return u({},f(this))},J.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t,n=[];for(t in e)n.push({unit:t,priority:C[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=U(e)),s=0;s<n.length;s++)this[n[s].unit](e[n[s].unit]);else if(x(this[e=R(e)]))return this[e](t);return this},J.startOf=function(e){switch(e=R(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},J.subtract=be,J.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},J.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},J.toDate=function(){return new Date(this.valueOf())},J.toISOString=function(){var e=this.clone().utc();return 0<e.year()&&e.year()<=9999?x(Date.prototype.toISOString)?this.toDate().toISOString():z(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):z(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},J.toJSON=function(){return this.isValid()?this.toISOString():null},J.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},J.unix=function(){return Math.floor(this.valueOf()/1e3)},J.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},J.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},J.year=Le,J.isLeapYear=function(){return He(this.year())},J.weekYear=function(e){return It.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},J.isoWeekYear=function(e){return It.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},J.quarter=J.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},J.month=We,J.daysInMonth=function(){return xe(this.year(),this.month())},J.week=J.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},J.isoWeek=J.isoWeeks=function(e){var t=Ae(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},J.weeksInYear=function(){var e=this.localeData()._week;return Ie(this.year(),e.dow,e.doy)},J.isoWeeksInYear=function(){return Ie(this.year(),1,4)},J.date=Ne,J.day=J.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-s,"d")):s},J.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},J.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null==e)return this.day()||7;var t=(t=e,e=this.localeData(),"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t);return this.day(this.day()%7?t:t-7)},J.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},J.hour=J.hours=tt,J.minute=J.minutes=Ze,J.second=J.seconds=ze,J.millisecond=J.milliseconds=ne,J.utcOffset=function(e,t){var n,s=this._offset||0;return this.isValid()?null!=e?("string"==typeof e?e=Tt(oe,e):Math.abs(e)<16&&(e*=60),!this._isUTC&&t&&(n=Wt(this)),this._offset=e,this._isUTC=!0,null!=n&&this.add(n,"m"),s!==e&&(!t||this._changeInProgress?Vt(this,Ft(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,h.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?s:Wt(this):null!=e?this:NaN},J.utc=function(e){return this.utcOffset(0,e)},J.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Wt(this),"m")),this},J.parseZone=function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&(0===Tt(ae,this._i)?this.utcOffset(0,!0):this.utcOffset(Tt(ae,this._i))),this},J.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Mt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},J.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},J.isLocal=function(){return!!this.isValid()&&!this._isUTC},J.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},J.isUtc=Rt,J.isUTC=Rt,J.zoneAbbr=function(){return this._isUTC?"UTC":""},J.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},J.dates=n("dates accessor is deprecated. Use date instead.",Ne),J.months=n("months accessor is deprecated. Use month instead",We),J.years=n("years accessor is deprecated. Use year instead",Le),J.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?(this.utcOffset(e="string"!=typeof e?-e:e,t),this):-this.utcOffset()}),J.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!m(this._isDSTShifted))return this._isDSTShifted;var e,t={};return g(t,this),(t=vt(t))._a?(e=(t._isUTC?l:Mt)(t._a),this._isDSTShifted=this.isValid()&&0<M(t._a,e.toArray())):this._isDSTShifted=!1,this._isDSTShifted});se=J;function Zt(e){return e}Q=b.prototype;function qt(e,t,n,s){var i=ut(),t=l().set(s,t);return i[n](t,e)}function $t(e,t,n){if("number"==typeof e&&(t=e,e=void 0),e=e||"",null!=t)return qt(e,t,n,"month");for(var s=[],i=0;i<12;i++)s[i]=qt(e,i,n,"month");return s}function Bt(e,t,n,s){t=("boolean"==typeof e?"number"==typeof t&&(n=t,t=void 0):(t=e,e=!1,"number"==typeof(n=t)&&(n=t,t=void 0)),t||"");var i=ut(),r=e?i._week.dow:0;if(null!=n)return qt(t,(n+r)%7,s,"day");for(var a=[],o=0;o<7;o++)a[o]=qt(t,(o+r)%7,s,"day");return a}Q.calendar=function(e,t,n){return x(e=this._calendar[e]||this._calendar.sameElse)?e.call(t,n):e},Q.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},Q.invalidDate=function(){return this._invalidDate},Q.ordinal=function(e){return this._ordinal.replace("%d",e)},Q.preparse=Zt,Q.postformat=Zt,Q.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return x(i)?i(e,t,n,s):i.replace(/%d/i,e)},Q.pastFuture=function(e,t){return x(e=this._relativeTime[0<e?"future":"past"])?e(t):e.replace(/%s/i,t)},Q.set=function(e){var t,n;for(n in e)x(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},Q.months=function(e,t){return e?(a(this._months)?this._months:this._months[(this._months.isFormat||Oe).test(t)?"format":"standalone"])[e.month()]:this._months},Q.monthsShort=function(e,t){return e?(a(this._monthsShort)?this._monthsShort:this._monthsShort[Oe.test(t)?"format":"standalone"])[e.month()]:this._monthsShort},Q.monthsParse=function(e,t,n){var s,i;if(this._monthsParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=l([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=ye.call(this._shortMonthsParse,e))?i:null:-1!==(i=ye.call(this._longMonthsParse,e))?i:null:"MMM"===t?-1!==(i=ye.call(this._shortMonthsParse,e))||-1!==(i=ye.call(this._longMonthsParse,e))?i:null:-1!==(i=ye.call(this._longMonthsParse,e))||-1!==(i=ye.call(this._shortMonthsParse,e))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=l([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(i="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},Q.monthsRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Ce.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=Ue),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Q.monthsShortRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Ce.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Re),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Q.week=function(e){return Ae(e,this._week.dow,this._week.doy).week},Q.firstDayOfYear=function(){return this._week.doy},Q.firstDayOfWeek=function(){return this._week.dow},Q.weekdays=function(e,t){return e?(a(this._weekdays)?this._weekdays:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"])[e.day()]:this._weekdays},Q.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},Q.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},Q.weekdaysParse=function(e,t,n){var s,i;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=l([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=ye.call(this._weekdaysParse,e))?i:null:"ddd"===t?-1!==(i=ye.call(this._shortWeekdaysParse,e))?i:null:-1!==(i=ye.call(this._minWeekdaysParse,e))?i:null:"dddd"===t?-1!==(i=ye.call(this._weekdaysParse,e))||-1!==(i=ye.call(this._shortWeekdaysParse,e))||-1!==(i=ye.call(this._minWeekdaysParse,e))?i:null:"ddd"===t?-1!==(i=ye.call(this._shortWeekdaysParse,e))||-1!==(i=ye.call(this._weekdaysParse,e))||-1!==(i=ye.call(this._minWeekdaysParse,e))?i:null:-1!==(i=ye.call(this._minWeekdaysParse,e))||-1!==(i=ye.call(this._weekdaysParse,e))||-1!==(i=ye.call(this._shortWeekdaysParse,e))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=l([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[s]||(i="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},Q.weekdaysRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=qe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Q.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=$e),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Q.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Be),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Q.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Q.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},at("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===S(e%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th")}}),h.lang=n("moment.lang is deprecated. Use moment.locale instead.",at),h.langData=n("moment.langData is deprecated. Use moment.localeData instead.",ut);var Jt=Math.abs;function Qt(e,t,n,s){n=Ft(t,n);return e._milliseconds+=s*n._milliseconds,e._days+=s*n._days,e._months+=s*n._months,e._bubble()}function Xt(e){return e<0?Math.floor(e):Math.ceil(e)}function Kt(e){return 4800*e/146097}function en(e){return 146097*e/4800}function tn(e){return function(){return this.as(e)}}q=tn("ms"),$=tn("s"),te=tn("m"),B=tn("h"),ee=tn("d"),K=tn("w"),ue=tn("M"),be=tn("y");function nn(e){return function(){return this._data[e]}}tt=nn("milliseconds"),Ze=nn("seconds"),ze=nn("minutes"),ne=nn("hours"),Ne=nn("days"),Le=nn("months"),J=nn("years");var sn=Math.round,rn={s:45,m:45,h:22,d:26,M:11};function an(e,t,n){var s=Ft(e).abs(),i=sn(s.as("s")),r=sn(s.as("m")),a=sn(s.as("h")),o=sn(s.as("d")),u=sn(s.as("M")),s=sn(s.as("y")),s=(i<rn.s?["s",i]:r<=1&&["m"])||r<rn.m&&["mm",r]||a<=1&&["h"]||a<rn.h&&["hh",a]||o<=1&&["d"]||o<rn.d&&["dd",o]||u<=1&&["M"]||u<rn.M&&["MM",u]||s<=1&&["y"]||["yy",s];return s[2]=t,s[3]=0<+e,s[4]=n,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,s)}var on=Math.abs;function un(){var e=on(this._milliseconds)/1e3,t=on(this._days),n=on(this._months),s=v(e/60),i=v(s/60);e%=60,s%=60;var r=v(n/12),a=n%=12,n=t,t=i,i=s,s=e,e=this.asSeconds();return e?(e<0?"-":"")+"P"+(r?r+"Y":"")+(a?a+"M":"")+(n?n+"D":"")+(t||i||s?"T":"")+(t?t+"H":"")+(i?i+"M":"")+(s?s+"S":""):"P0D"}Q=Dt.prototype;return Q.abs=function(){var e=this._data;return this._milliseconds=Jt(this._milliseconds),this._days=Jt(this._days),this._months=Jt(this._months),e.milliseconds=Jt(e.milliseconds),e.seconds=Jt(e.seconds),e.minutes=Jt(e.minutes),e.hours=Jt(e.hours),e.months=Jt(e.months),e.years=Jt(e.years),this},Q.add=function(e,t){return Qt(this,e,t,1)},Q.subtract=function(e,t){return Qt(this,e,t,-1)},Q.as=function(e){var t,n,s=this._milliseconds;if("month"===(e=R(e))||"year"===e)return t=this._days+s/864e5,n=this._months+Kt(t),"month"===e?n:n/12;switch(t=this._days+Math.round(en(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},Q.asMilliseconds=q,Q.asSeconds=$,Q.asMinutes=te,Q.asHours=B,Q.asDays=ee,Q.asWeeks=K,Q.asMonths=ue,Q.asYears=be,Q.valueOf=function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*S(this._months/12)},Q._bubble=function(){var e=this._milliseconds,t=this._days,n=this._months,s=this._data;return 0<=e&&0<=t&&0<=n||e<=0&&t<=0&&n<=0||(e+=864e5*Xt(en(n)+t),n=t=0),s.milliseconds=e%1e3,e=v(e/1e3),s.seconds=e%60,e=v(e/60),s.minutes=e%60,e=v(e/60),s.hours=e%24,t+=v(e/24),n+=e=v(Kt(t)),t-=Xt(en(e)),e=v(n/12),n%=12,s.days=t,s.months=n,s.years=e,this},Q.get=function(e){return this[(e=R(e))+"s"]()},Q.milliseconds=tt,Q.seconds=Ze,Q.minutes=ze,Q.hours=ne,Q.days=Ne,Q.weeks=function(){return v(this.days()/7)},Q.months=Le,Q.years=J,Q.humanize=function(e){var t=this.localeData(),n=an(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Q.toISOString=un,Q.toString=un,Q.toJSON=un,Q.locale=jt,Q.localeData=Et,Q.toIsoString=n("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",un),Q.lang=Te,N("X",0,0,"unix"),N("x",0,0,"valueOf"),de("x",re),de("X",/[+-]?\d+(\.\d{1,3})?/),me("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),me("x",function(e,t,n){n._d=new Date(S(e))}),h.version="2.15.1",e=Mt,h.fn=se,h.min=function(){return kt("isBefore",[].slice.call(arguments,0))},h.max=function(){return kt("isAfter",[].slice.call(arguments,0))},h.now=function(){return Date.now?Date.now():+new Date},h.utc=l,h.unix=function(e){return Mt(1e3*e)},h.months=function(e,t){return $t(e,t,"months")},h.isDate=s,h.locale=at,h.invalid=r,h.duration=Ft,h.isMoment=w,h.weekdays=function(e,t,n){return Bt(e,t,n,"weekdays")},h.parseZone=function(){return Mt.apply(null,arguments).parseZone()},h.localeData=ut,h.isDuration=Yt,h.monthsShort=function(e,t){return $t(e,t,"monthsShort")},h.weekdaysMin=function(e,t,n){return Bt(e,t,n,"weekdaysMin")},h.defineLocale=ot,h.updateLocale=function(e,t){return null!=t?((t=new b(t=O(null!=st[e]?st[e]._config:nt,t))).parentLocale=st[e],st[e]=t,at(e)):null!=st[e]&&(null!=st[e].parentLocale?st[e]=st[e].parentLocale:null!=st[e]&&delete st[e]),st[e]},h.locales=function(){return T(st)},h.weekdaysShort=function(e,t,n){return Bt(e,t,n,"weekdaysShort")},h.normalizeUnits=R,h.relativeTimeRounding=function(e){return void 0===e?sn:"function"==typeof e&&(sn=e,!0)},h.relativeTimeThreshold=function(e,t){return void 0!==rn[e]&&(void 0===t?rn[e]:(rn[e]=t,!0))},h.calendarFormat=function(e,t){return(t=e.diff(t,"days",!0))<-6?"sameElse":t<-1?"lastWeek":t<0?"lastDay":t<1?"sameDay":t<2?"nextDay":t<7?"nextWeek":"sameElse"},h.prototype=se,h});
|
@@ -1 +1 @@
|
|
1 |
-
!function(e,n,r){"undefined"!=typeof bpGroupManageMembersSettings&&n.isRestEnabled&&(_.extend(n,_.pick(e,"Backbone","template")),n.Models=n.Models||{},n.Collections=n.Collections||{},n.Views=n.Views||{},n.Models.groupMember=Backbone.Model.extend({defaults:{id:0,name:"",avatar_urls:{},is_admin:!1,is_banned:!1,is_confirmed:!1,is_mod:!1,link:""},options:{path:bpGroupManageMembersSettings.path,type:"POST",data:{},dataType:"json"},initialize:function(){this.on("sync",this.resetRequestOptions,this)},resetRequestOptions:function(){this.options.data={},this.options.path=bpGroupManageMembersSettings.path},sync:function(e,t,i){(i=i||{}).context=this;var s=i.data||{};if(this.options.path=this.options.path.concat("/"+t.get("id")),_.extend(i,this.options),_.extend(i.data,s),"delete"===e||"update"===e)return i.headers="delete"===e?{"X-HTTP-Method-Override":"DELETE"}:{"X-HTTP-Method-Override":"PUT"},n.apiRequest(i)},parse:function(e){return e=_.isArray(e)?_.first(e):e}}),n.Collections.groupMembers=Backbone.Collection.extend({model:n.Models.groupMember,options:{path:bpGroupManageMembersSettings.path,type:"GET",data:{},dataType:"json"},initialize:function(){this.on("reset",function(){this.options.data={}},this)},sync:function(e,t,s){(s=s||{}).context=this;var i=s.data||{};if(_.extend(s,this.options),_.extend(s.data,i),"read"===e){var o=this,r=s.success;return s.success=function(e,t,i){if(_.isUndefined(i)||(o.totalPages=parseInt(i.getResponseHeader("X-WP-TotalPages"),10),o.totalGroupMembers=parseInt(i.getResponseHeader("X-WP-Total"),10)),o.currentPage=s.data.page||1,r)return r.apply(this,arguments)},n.apiRequest(s)}}}),n.View=n.View||n.Backbone.View.extend({prepare:function(){return!_.isUndefined(this.model)&&_.isFunction(this.model.toJSON)?this.model.toJSON():{}}}),n.Views.GroupMemberUpdatingInfo=n.View.extend({tagName:"p",template:n.template("bp-manage-members-updating"),initialize:function(){this.model=new Backbone.Model({type:this.options.value})}}),n.Views.GroupMemberErrorInfo=n.View.extend({tagName:"p",template:n.template("bp-manage-members-error"),initialize:function(){this.model=new Backbone.Model({message:this.options.value})}}),n.Views.GroupsMembersLabel=n.Views.GroupMemberUpdatingInfo.extend({tagName:"label",template:n.template("bp-manage-members-label")}),n.Views.GroupRolesDropDown=n.View.extend({tagName:"select",filters:_.extend({all:{name:bpGroupManageMembersSettings.strings.allMembers}},bpGroupManageMembersSettings.roles),events:{change:"change"},initialize:function(){this.options.omits&&(this.filters=_.omit(this.filters,this.options.omits)),this.$el.html(_.chain(this.filters).map(function(e,t){e=r("<option></option>").val(t).html(e.name)[0];return this.options.currentRole&&t===this.options.currentRole?{el:r(e).prop("selected",!0)}:{el:e}},this).pluck("el").value())},change:function(e){var t=r(e.target).val(),e={roles:[t]};this.collection&&("all"===t?(this.collection.currentRole="",e={exclude_admins:!1}):this.collection.currentRole=t,this.collection.currentPage=1,e.page=1,r("#manage-members-search").val(""),this.collection.fetch({data:e,reset:!0}))}}),n.Views.GroupMembersSearch=n.View.extend({className:"bp-dir-search-form",tagName:"form",template:n.template("bp-manage-members-search"),events:{"click #manage-members-search-submit":"searchMember"},searchMember:function(e){e.preventDefault();e=r("#manage-members-search").val(),e=_.extend(this.collection.options.data,{search:e,page:1});this.collection.currentPage=1,this.collection.currentRole?e.roles=[this.collection.currentRole]:e.exclude_admins=!1,this.collection.fetch({data:e,reset:!0})}}),n.Views.GroupsMembersPagination=n.View.extend({className:"bp-pagination",template:n.template("bp-manage-members-paginate"),events:{"click .group-members-paginate-button":"queryPage"},initialize:function(){this.collection.on("reset",this.setPagination,this)},setPagination:function(e){e=_.pick(e,["currentPage","totalGroupMembers","totalPages"]);1<e.totalPages&&(e.nextPage=e.currentPage+1,e.prevPage=e.currentPage-1),this.model=new Backbone.Model(e),this.render()},queryPage:function(e){e.preventDefault();var t=r(e.currentTarget).data("page"),e=r("#manage-members-search").val(),t=_.extend(this.collection.options.data,{search:e,page:t});this.collection.currentRole?t.roles=[this.collection.currentRole]:t.exclude_admins=!1,this.collection.fetch({data:t,reset:!0})}}),n.Views.GroupMembersNoMatches=n.View.extend({tagName:"tr",template:n.template("bp-manage-members-empty-row")}),n.Views.GroupMembersListRow=n.View.extend({tagName:"tr",template:n.template("bp-manage-members-row"),events:{"click .group-member-actions a":"doMemberAction","change .group-member-edit select":"editMemberRole"},initialize:function(){var t=["is_admin","is_banned","is_confirmed","is_mod"],i=this;_.each(bpGroupManageMembersSettings.roles,function(e){_.isMatch(i.model.attributes,_.pick(e,t))&&i.model.set("role",_.pick(e,["id","name"]),{silent:!0})}),this.model.collection.on("reset",this.clearRow,this)},clearRow:function(){this.views.view.remove()},renderEditForm:function(){var e=this.model.get("id");this.render(),this.views.set("#edit-group-member-"+e,[new n.Views.GroupsMembersLabel({value:e,attributes:{for:"group-member"+e+"-role"}}),new n.Views.GroupRolesDropDown({id:"group-member"+e+"-role",omits:["all","banned"],currentRole:this.model.get("role").id}).render()])},resetRow:function(){return this.model.set("editing",!1),this.render()},getRoleObject:function(e){var t=bpGroupManageMembersSettings.roles;return _.isUndefined(t[e])?{}:_.extend({role:_.pick(t[e],["id","name"])},_.pick(t[e],["is_admin","is_banned","is_confirmed","is_mod"]))},doMemberAction:function(e){e.preventDefault();var t=r(e.target).data("action"),i=this;if("edit"===t)return this.model.set("editing",!0),this.renderEditForm();if("abort"===t)return this.resetRow();if("ban"===t||"unban"===t){e="ban"===t?"banned":"member"
|
1 |
+
!function(e,n,r){"undefined"!=typeof bpGroupManageMembersSettings&&n.isRestEnabled&&(_.extend(n,_.pick(e,"Backbone","template")),n.Models=n.Models||{},n.Collections=n.Collections||{},n.Views=n.Views||{},n.Models.groupMember=Backbone.Model.extend({defaults:{id:0,name:"",avatar_urls:{},is_admin:!1,is_banned:!1,is_confirmed:!1,is_mod:!1,link:""},options:{path:bpGroupManageMembersSettings.path,type:"POST",data:{},dataType:"json"},initialize:function(){this.on("sync",this.resetRequestOptions,this)},resetRequestOptions:function(){this.options.data={},this.options.path=bpGroupManageMembersSettings.path},sync:function(e,t,i){(i=i||{}).context=this;var s=i.data||{};if(this.options.path=this.options.path.concat("/"+t.get("id")),_.extend(i,this.options),_.extend(i.data,s),"delete"===e||"update"===e)return i.headers="delete"===e?{"X-HTTP-Method-Override":"DELETE"}:{"X-HTTP-Method-Override":"PUT"},n.apiRequest(i)},parse:function(e){return e=_.isArray(e)?_.first(e):e}}),n.Collections.groupMembers=Backbone.Collection.extend({model:n.Models.groupMember,options:{path:bpGroupManageMembersSettings.path,type:"GET",data:{},dataType:"json"},initialize:function(){this.on("reset",function(){this.options.data={}},this)},sync:function(e,t,s){(s=s||{}).context=this;var i=s.data||{};if(_.extend(s,this.options),_.extend(s.data,i),"read"===e){var o=this,r=s.success;return s.success=function(e,t,i){if(_.isUndefined(i)||(o.totalPages=parseInt(i.getResponseHeader("X-WP-TotalPages"),10),o.totalGroupMembers=parseInt(i.getResponseHeader("X-WP-Total"),10)),o.currentPage=s.data.page||1,r)return r.apply(this,arguments)},n.apiRequest(s)}}}),n.View=n.View||n.Backbone.View.extend({prepare:function(){return!_.isUndefined(this.model)&&_.isFunction(this.model.toJSON)?this.model.toJSON():{}}}),n.Views.GroupMemberUpdatingInfo=n.View.extend({tagName:"p",template:n.template("bp-manage-members-updating"),initialize:function(){this.model=new Backbone.Model({type:this.options.value})}}),n.Views.GroupMemberErrorInfo=n.View.extend({tagName:"p",template:n.template("bp-manage-members-error"),initialize:function(){this.model=new Backbone.Model({message:this.options.value})}}),n.Views.GroupsMembersLabel=n.Views.GroupMemberUpdatingInfo.extend({tagName:"label",template:n.template("bp-manage-members-label")}),n.Views.GroupRolesDropDown=n.View.extend({tagName:"select",filters:_.extend({all:{name:bpGroupManageMembersSettings.strings.allMembers}},bpGroupManageMembersSettings.roles),events:{change:"change"},initialize:function(){this.options.omits&&(this.filters=_.omit(this.filters,this.options.omits)),this.$el.html(_.chain(this.filters).map(function(e,t){e=r("<option></option>").val(t).html(e.name)[0];return this.options.currentRole&&t===this.options.currentRole?{el:r(e).prop("selected",!0)}:{el:e}},this).pluck("el").value())},change:function(e){var t=r(e.target).val(),e={roles:[t]};this.collection&&("all"===t?(this.collection.currentRole="",e={exclude_admins:!1}):this.collection.currentRole=t,this.collection.currentPage=1,e.page=1,r("#manage-members-search").val(""),this.collection.fetch({data:e,reset:!0}))}}),n.Views.GroupMembersSearch=n.View.extend({className:"bp-dir-search-form",tagName:"form",template:n.template("bp-manage-members-search"),events:{"click #manage-members-search-submit":"searchMember"},searchMember:function(e){e.preventDefault();e=r("#manage-members-search").val(),e=_.extend(this.collection.options.data,{search:e,page:1});this.collection.currentPage=1,this.collection.currentRole?e.roles=[this.collection.currentRole]:e.exclude_admins=!1,this.collection.fetch({data:e,reset:!0})}}),n.Views.GroupsMembersPagination=n.View.extend({className:"bp-pagination",template:n.template("bp-manage-members-paginate"),events:{"click .group-members-paginate-button":"queryPage"},initialize:function(){this.collection.on("reset",this.setPagination,this)},setPagination:function(e){e=_.pick(e,["currentPage","totalGroupMembers","totalPages"]);1<e.totalPages&&(e.nextPage=e.currentPage+1,e.prevPage=e.currentPage-1),this.model=new Backbone.Model(e),this.render()},queryPage:function(e){e.preventDefault();var t=r(e.currentTarget).data("page"),e=r("#manage-members-search").val(),t=_.extend(this.collection.options.data,{search:e,page:t});this.collection.currentRole?t.roles=[this.collection.currentRole]:t.exclude_admins=!1,this.collection.fetch({data:t,reset:!0})}}),n.Views.GroupMembersNoMatches=n.View.extend({tagName:"tr",template:n.template("bp-manage-members-empty-row")}),n.Views.GroupMembersListRow=n.View.extend({tagName:"tr",template:n.template("bp-manage-members-row"),events:{"click .group-member-actions a":"doMemberAction","change .group-member-edit select":"editMemberRole"},initialize:function(){var t=["is_admin","is_banned","is_confirmed","is_mod"],i=this;_.each(bpGroupManageMembersSettings.roles,function(e){_.isMatch(i.model.attributes,_.pick(e,t))&&i.model.set("role",_.pick(e,["id","name"]),{silent:!0})}),this.model.collection.on("reset",this.clearRow,this)},clearRow:function(){this.views.view.remove()},renderEditForm:function(){var e=this.model.get("id");this.render(),this.views.set("#edit-group-member-"+e,[new n.Views.GroupsMembersLabel({value:e,attributes:{for:"group-member"+e+"-role"}}),new n.Views.GroupRolesDropDown({id:"group-member"+e+"-role",omits:["all","banned"],currentRole:this.model.get("role").id}).render()])},resetRow:function(){return this.model.set("editing",!1),this.render()},getRoleObject:function(e){var t=bpGroupManageMembersSettings.roles;return _.isUndefined(t[e])?{}:_.extend({role:_.pick(t[e],["id","name"])},_.pick(t[e],["is_admin","is_banned","is_confirmed","is_mod"]))},doMemberAction:function(e){e.preventDefault();var t=r(e.target).data("action"),i=this;if("edit"===t)return this.model.set("editing",!0),this.renderEditForm();if("abort"===t)return this.resetRow();if("ban"===t||"unban"===t){e=this.getRoleObject("ban"===t?"banned":"member");if(!e)return this.resetRow();this.model.set("managingBan",!0),this.render(),this.views.set("#edit-group-member-"+this.model.get("id"),new n.Views.GroupMemberUpdatingInfo({value:t}).render()),this.model.save(e,{wait:!0,data:{action:t},success:function(e){return i.model.collection.remove(e),i.clearRow()},error:function(e,t){i.views.set("#edit-group-member-"+e.get("id"),new n.Views.GroupMemberErrorInfo({value:t.responseJSON.message}).render()),e.resetRequestOptions(),e.set("managingBan",!1)}})}else"remove"===t&&(this.model.set("removing",!0),this.render(),this.views.set("#edit-group-member-"+this.model.get("id"),new n.Views.GroupMemberUpdatingInfo({value:t}).render()),this.model.destroy({wait:!0,data:{},success:function(){return i.clearRow()},error:function(e,t){i.views.set("#edit-group-member-"+e.get("id"),new n.Views.GroupMemberErrorInfo({value:t.responseJSON.message}).render()),e.resetRequestOptions(),e.set("removing",!1)}}))},editMemberRole:function(e){var t=r(e.target).val(),i=this.getRoleObject(t),s=this.model.get("role").id,e="promote",o=this;if(t===this.model.get("role").id||!i)return this.resetRow();this.views.set("#edit-group-member-"+this.model.get("id"),(new n.Views.GroupMemberUpdatingInfo).render()),this.model.save(i,{wait:!0,data:{action:e="admin"===s||"mod"===s&&"member"===t?"demote":e,role:t},success:function(e){return o.model.collection.currentRole&&t!==o.model.collection.currentRole?(o.model.collection.remove(e),o.clearRow()):o.resetRow()},error:function(e,t){o.views.set("#edit-group-member-"+e.get("id"),new n.Views.GroupMemberErrorInfo({value:t.responseJSON.message}).render()),e.resetRequestOptions(),e.set("editing",!1)}})}}),n.Views.GroupMembersListHeader=n.View.extend({tagName:"thead",template:n.template("bp-manage-members-header")}),n.Views.GroupMembersListTable=n.View.extend({tagName:"tbody",initialize:function(){var e=bpGroupManageMembersSettings.preloaded||{},t=[];this.collection.on("reset",this.addListTableRows,this),e.body&&0<e.body.length?(_.each(e.body,function(e){t.push(new n.Models.groupMember(e))}),this.collection.currentPage=1,e.headers&&e.headers["X-WP-TotalPages"]&&(this.collection.totalPages=parseInt(e.headers["X-WP-TotalPages"],10)),e.headers&&e.headers["X-WP-Total"]&&(this.collection.totalGroupMembers=parseInt(e.headers["X-WP-Total"],10)),this.collection.reset(t)):this.collection.fetch({data:{exclude_admins:!1},reset:!0})},addListTableRows:function(e){var t;!this.views._views||(t=_.findWhere(this.views._views[""],{id:"bp-no-group-members"}))&&t.remove(),e.length?_.each(e.models,function(e){this.views.add(new n.Views.GroupMembersListRow({model:e}))},this):this.views.add(new n.Views.GroupMembersNoMatches({id:"bp-no-group-members"}))}}),n.Views.GroupMembersUI=n.View.extend({className:"group-members",initialize:function(){var e=new n.Collections.groupMembers;this.views.set("#group-roles-filter",[new n.Views.GroupsMembersLabel({attributes:{for:"group-members-role-filter"}}),new n.Views.GroupRolesDropDown({id:"group-members-role-filter",collection:e})]),this.views.set("#group-members-search-form",new n.Views.GroupMembersSearch({id:"group-members-search",collection:e})),this.views.set("#group-members-pagination",new n.Views.GroupsMembersPagination({collection:e})),this.views.set("#group-members-list-table",[new n.Views.GroupMembersListHeader,new n.Views.GroupMembersListTable({collection:e})])}}),n.manageGroupMembersUI=new n.Views.GroupMembersUI({el:"#group-manage-members-ui"}).render())}(window.wp||{},window.bp||{},jQuery);
|
@@ -15,7 +15,7 @@
|
|
15 |
* Description: BuddyPress adds community features to WordPress. Member Profiles, Activity Streams, Direct Messaging, Notifications, and more!
|
16 |
* Author: The BuddyPress Community
|
17 |
* Author URI: https://buddypress.org/
|
18 |
-
* Version: 8.0.0-
|
19 |
* Text Domain: buddypress
|
20 |
* Domain Path: /bp-languages/
|
21 |
* License: GPLv2 or later (license.txt)
|
15 |
* Description: BuddyPress adds community features to WordPress. Member Profiles, Activity Streams, Direct Messaging, Notifications, and more!
|
16 |
* Author: The BuddyPress Community
|
17 |
* Author URI: https://buddypress.org/
|
18 |
+
* Version: 8.0.0-beta2
|
19 |
* Text Domain: buddypress
|
20 |
* Domain Path: /bp-languages/
|
21 |
* License: GPLv2 or later (license.txt)
|
@@ -24,7 +24,7 @@ function bp_members_invitations_action_bulk_manage() {
|
|
24 |
// Get the parameters.
|
25 |
$action = ! empty( $_POST['invitation_bulk_action'] ) ? $_POST['invitation_bulk_action'] : '';
|
26 |
$nonce = ! empty( $_POST['invitations_bulk_nonce'] ) ? $_POST['invitations_bulk_nonce'] : '';
|
27 |
-
$invitations = ! empty( $_POST['
|
28 |
|
29 |
// Bail if no action or no IDs.
|
30 |
if ( ( ! in_array( $action, array( 'cancel', 'resend' ), true ) ) || empty( $invitations ) || empty( $nonce ) ) {
|
@@ -79,4 +79,4 @@ function bp_members_invitations_action_bulk_manage() {
|
|
79 |
// Redirect.
|
80 |
bp_core_redirect( bp_displayed_user_domain() . bp_get_members_invitations_slug() . '/' . bp_current_action() . '/' );
|
81 |
}
|
82 |
-
add_action( 'bp_actions', 'bp_members_invitations_action_bulk_manage' );
|
24 |
// Get the parameters.
|
25 |
$action = ! empty( $_POST['invitation_bulk_action'] ) ? $_POST['invitation_bulk_action'] : '';
|
26 |
$nonce = ! empty( $_POST['invitations_bulk_nonce'] ) ? $_POST['invitations_bulk_nonce'] : '';
|
27 |
+
$invitations = ! empty( $_POST['members_invitations'] ) ? $_POST['members_invitations'] : '';
|
28 |
|
29 |
// Bail if no action or no IDs.
|
30 |
if ( ( ! in_array( $action, array( 'cancel', 'resend' ), true ) ) || empty( $invitations ) || empty( $nonce ) ) {
|
79 |
// Redirect.
|
80 |
bp_core_redirect( bp_displayed_user_domain() . bp_get_members_invitations_slug() . '/' . bp_current_action() . '/' );
|
81 |
}
|
82 |
+
add_action( 'bp_actions', 'bp_members_invitations_action_bulk_manage' );
|
@@ -193,7 +193,7 @@ function bp_members_admin_bar_add_invitations_menu() {
|
|
193 |
return;
|
194 |
}
|
195 |
|
196 |
-
if (
|
197 |
$bp = buddypress();
|
198 |
$invitations_link = trailingslashit( bp_loggedin_user_domain() . bp_get_members_invitations_slug() );
|
199 |
|
@@ -209,13 +209,13 @@ function bp_members_admin_bar_add_invitations_menu() {
|
|
209 |
)
|
210 |
);
|
211 |
|
212 |
-
if ( bp_current_user_can( '
|
213 |
$wp_admin_bar->add_node(
|
214 |
array(
|
215 |
'id' => $bp->my_account_menu_id . '-invitations-send',
|
216 |
'parent' => $bp->my_account_menu_id . '-invitations',
|
217 |
'title' => __( 'Send Invites', 'buddypress' ),
|
218 |
-
'href' => $invitations_link,
|
219 |
'meta' => array(
|
220 |
'class' => 'ab-sub-secondary'
|
221 |
)
|
193 |
return;
|
194 |
}
|
195 |
|
196 |
+
if ( bp_current_user_can( 'bp_members_invitations_view_screens' ) ) {
|
197 |
$bp = buddypress();
|
198 |
$invitations_link = trailingslashit( bp_loggedin_user_domain() . bp_get_members_invitations_slug() );
|
199 |
|
209 |
)
|
210 |
);
|
211 |
|
212 |
+
if ( bp_current_user_can( 'bp_members_invitations_view_send_screen' ) ) {
|
213 |
$wp_admin_bar->add_node(
|
214 |
array(
|
215 |
'id' => $bp->my_account_menu_id . '-invitations-send',
|
216 |
'parent' => $bp->my_account_menu_id . '-invitations',
|
217 |
'title' => __( 'Send Invites', 'buddypress' ),
|
218 |
+
'href' => $invitations_link . 'send-invites/',
|
219 |
'meta' => array(
|
220 |
'class' => 'ab-sub-secondary'
|
221 |
)
|
@@ -149,7 +149,7 @@ function bp_members_user_can_filter( $retval, $user_id, $capability, $site_id, $
|
|
149 |
break;
|
150 |
|
151 |
case 'bp_members_send_invitation':
|
152 |
-
if ( bp_get_members_invitations_allowed() ) {
|
153 |
$retval = true;
|
154 |
}
|
155 |
break;
|
@@ -167,6 +167,14 @@ function bp_members_user_can_filter( $retval, $user_id, $capability, $site_id, $
|
|
167 |
}
|
168 |
}
|
169 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
}
|
171 |
|
172 |
return $retval;
|
149 |
break;
|
150 |
|
151 |
case 'bp_members_send_invitation':
|
152 |
+
if ( is_user_logged_in() && bp_get_members_invitations_allowed() ) {
|
153 |
$retval = true;
|
154 |
}
|
155 |
break;
|
167 |
}
|
168 |
}
|
169 |
break;
|
170 |
+
|
171 |
+
case 'bp_members_invitations_view_screens':
|
172 |
+
$retval = bp_get_members_invitations_allowed() && ( bp_user_can( $user_id, 'bp_members_send_invitation' ) || bp_members_invitations_user_has_sent_invites( $user_id ) );
|
173 |
+
break;
|
174 |
+
|
175 |
+
case 'bp_members_invitations_view_send_screen':
|
176 |
+
$retval = is_user_logged_in() && bp_get_members_invitations_allowed();
|
177 |
+
break;
|
178 |
}
|
179 |
|
180 |
return $retval;
|
@@ -15,9 +15,8 @@ function bp_members_invitations_setup_nav() {
|
|
15 |
return;
|
16 |
}
|
17 |
|
18 |
-
$user_has_access
|
19 |
-
$
|
20 |
-
$user_has_invites = bp_members_invitations_user_has_sent_invites( bp_displayed_user_id() );
|
21 |
|
22 |
/* Add 'Invitations' to the main user profile navigation */
|
23 |
bp_core_new_nav_item(
|
@@ -26,8 +25,8 @@ function bp_members_invitations_setup_nav() {
|
|
26 |
'slug' => bp_get_members_invitations_slug(),
|
27 |
'position' => 80,
|
28 |
'screen_function' => 'members_screen_send_invites',
|
29 |
-
'default_subnav_slug' =>
|
30 |
-
'show_for_displayed_user' => $user_has_access && (
|
31 |
)
|
32 |
);
|
33 |
|
@@ -42,7 +41,7 @@ function bp_members_invitations_setup_nav() {
|
|
42 |
'parent_url' => $parent_link,
|
43 |
'screen_function' => 'members_screen_send_invites',
|
44 |
'position' => 10,
|
45 |
-
'user_has_access' => $user_has_access &&
|
46 |
)
|
47 |
);
|
48 |
|
@@ -54,7 +53,7 @@ function bp_members_invitations_setup_nav() {
|
|
54 |
'parent_url' => $parent_link,
|
55 |
'screen_function' => 'members_screen_list_sent_invites',
|
56 |
'position' => 20,
|
57 |
-
'user_has_access' => $user_has_access && (
|
58 |
)
|
59 |
);
|
60 |
}
|
15 |
return;
|
16 |
}
|
17 |
|
18 |
+
$user_has_access = bp_user_has_access();
|
19 |
+
$default_subnav_slug = ( bp_is_my_profile() && bp_user_can( bp_displayed_user_id(), 'bp_members_invitations_view_send_screen' ) ) ? 'send-invites' : 'list-invites';
|
|
|
20 |
|
21 |
/* Add 'Invitations' to the main user profile navigation */
|
22 |
bp_core_new_nav_item(
|
25 |
'slug' => bp_get_members_invitations_slug(),
|
26 |
'position' => 80,
|
27 |
'screen_function' => 'members_screen_send_invites',
|
28 |
+
'default_subnav_slug' => $default_subnav_slug,
|
29 |
+
'show_for_displayed_user' => $user_has_access && bp_user_can( bp_displayed_user_id(), 'bp_members_invitations_view_screens' )
|
30 |
)
|
31 |
);
|
32 |
|
41 |
'parent_url' => $parent_link,
|
42 |
'screen_function' => 'members_screen_send_invites',
|
43 |
'position' => 10,
|
44 |
+
'user_has_access' => $user_has_access && bp_is_my_profile() && bp_user_can( bp_displayed_user_id(), 'bp_members_invitations_view_send_screen' )
|
45 |
)
|
46 |
);
|
47 |
|
53 |
'parent_url' => $parent_link,
|
54 |
'screen_function' => 'members_screen_list_sent_invites',
|
55 |
'position' => 20,
|
56 |
+
'user_has_access' => $user_has_access && bp_user_can( bp_displayed_user_id(), 'bp_members_invitations_view_screens' )
|
57 |
)
|
58 |
);
|
59 |
}
|
@@ -3291,7 +3291,7 @@ function bp_the_members_invitations_resend_url( $user_id = 0 ) {
|
|
3291 |
$url = add_query_arg( $args, $link );
|
3292 |
|
3293 |
// Add the nonce.
|
3294 |
-
$url = wp_nonce_url( $url, '
|
3295 |
|
3296 |
/**
|
3297 |
* Filters the URL used for resending a single invitation.
|
@@ -3499,4 +3499,4 @@ function bp_members_invitations_bulk_management_dropdown() {
|
|
3499 |
|
3500 |
<input type="submit" id="invitation-bulk-manage" class="button action" value="<?php echo esc_attr_x( 'Apply', 'button', 'buddypress' ); ?>">
|
3501 |
<?php
|
3502 |
-
}
|
3291 |
$url = add_query_arg( $args, $link );
|
3292 |
|
3293 |
// Add the nonce.
|
3294 |
+
$url = wp_nonce_url( $url, 'bp_members_invitation_resend_' . $id );
|
3295 |
|
3296 |
/**
|
3297 |
* Filters the URL used for resending a single invitation.
|
3499 |
|
3500 |
<input type="submit" id="invitation-bulk-manage" class="button action" value="<?php echo esc_attr_x( 'Apply', 'button', 'buddypress' ); ?>">
|
3501 |
<?php
|
3502 |
+
}
|
@@ -144,16 +144,12 @@ class BP_Members_Component extends BP_Component {
|
|
144 |
// Invitations.
|
145 |
if ( is_user_logged_in() && bp_is_user_members_invitations() ) {
|
146 |
// Actions.
|
147 |
-
if (
|
148 |
require $this->path . 'bp-members/actions/invitations-bulk-manage.php';
|
149 |
}
|
150 |
|
151 |
// Screens.
|
152 |
-
|
153 |
-
require $this->path . 'bp-members/screens/list-invites.php';
|
154 |
-
} else {
|
155 |
-
require $this->path . 'bp-members/screens/send-invites.php';
|
156 |
-
}
|
157 |
}
|
158 |
}
|
159 |
|
144 |
// Invitations.
|
145 |
if ( is_user_logged_in() && bp_is_user_members_invitations() ) {
|
146 |
// Actions.
|
147 |
+
if ( isset( $_POST['members_invitations'] ) ) {
|
148 |
require $this->path . 'bp-members/actions/invitations-bulk-manage.php';
|
149 |
}
|
150 |
|
151 |
// Screens.
|
152 |
+
require $this->path . 'bp-members/screens/invitations.php';
|
|
|
|
|
|
|
|
|
153 |
}
|
154 |
}
|
155 |
|
@@ -134,6 +134,10 @@ class BP_REST_Members_Endpoint extends WP_REST_Users_Controller {
|
|
134 |
$args['member_type'] = '';
|
135 |
}
|
136 |
|
|
|
|
|
|
|
|
|
137 |
/**
|
138 |
* Filter the query arguments for the request.
|
139 |
*
|
134 |
$args['member_type'] = '';
|
135 |
}
|
136 |
|
137 |
+
if ( is_null( $args['search_terms'] ) ) {
|
138 |
+
$args['search_terms'] = false;
|
139 |
+
}
|
140 |
+
|
141 |
/**
|
142 |
* Filter the query arguments for the request.
|
143 |
*
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* BuddyPress Members: Invitations screens
|
4 |
+
*
|
5 |
+
* @package BuddyPress
|
6 |
+
* @subpackage MembersScreens
|
7 |
+
* @since 8.0.0
|
8 |
+
*/
|
9 |
+
|
10 |
+
// Exit if accessed directly.
|
11 |
+
defined( 'ABSPATH' ) || exit;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Catch and process the Send Invites page.
|
15 |
+
*
|
16 |
+
* @since 8.0.0
|
17 |
+
*/
|
18 |
+
function members_screen_send_invites() {
|
19 |
+
|
20 |
+
// Chack if there's an invitation to send.
|
21 |
+
if ( isset( $_REQUEST['action'] ) && 'send-invite' === wp_unslash( $_REQUEST['action'] ) ) {
|
22 |
+
$user_id = bp_displayed_user_id();
|
23 |
+
$default_args = array(
|
24 |
+
'invitee_email' => '',
|
25 |
+
'inviter_id' => $user_id,
|
26 |
+
'content' => '',
|
27 |
+
'send_invite' => 1,
|
28 |
+
);
|
29 |
+
|
30 |
+
$invite_args = wp_parse_args( array_map( 'wp_unslash', $_REQUEST ), $default_args );
|
31 |
+
$invite_args = array_intersect_key( $invite_args, $default_args );
|
32 |
+
|
33 |
+
// Check the nonce and delete the invitation.
|
34 |
+
if ( bp_verify_nonce_request( 'bp_members_invitation_send_' . $user_id ) && bp_members_invitations_invite_user( $invite_args ) ) {
|
35 |
+
bp_core_add_message( __( 'Invitation successfully sent!', 'buddypress' ) );
|
36 |
+
} else {
|
37 |
+
bp_core_add_message( __( 'There was a problem sending that invitation. The user could already be a member of the site or have chosen not to receive invitations from this site.', 'buddypress' ), 'error' );
|
38 |
+
}
|
39 |
+
|
40 |
+
// Redirect.
|
41 |
+
bp_core_redirect( bp_get_members_invitations_send_invites_permalink( $user_id ) );
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Fires before the loading of template for the send membership invitations page.
|
46 |
+
*
|
47 |
+
* @since 8.0.0
|
48 |
+
*/
|
49 |
+
do_action( 'members_screen_send_invites' );
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Filters the template used to display the send membership invitations page.
|
53 |
+
*
|
54 |
+
* @since 8.0.0
|
55 |
+
*
|
56 |
+
* @param string $template Path to the send membership invitations template to load.
|
57 |
+
*/
|
58 |
+
bp_core_load_template( apply_filters( 'members_template_send_invites', 'members/single/invitations' ) );
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Catch and process the Pending Invites page.
|
63 |
+
*
|
64 |
+
* @since 8.0.0
|
65 |
+
*/
|
66 |
+
function members_screen_list_sent_invites() {
|
67 |
+
|
68 |
+
// Chack if there's an invitation to cancel or resend.
|
69 |
+
if ( isset( $_GET['action'], $_GET['invitation_id'] ) && $_GET['action'] && $_GET['invitation_id'] ) {
|
70 |
+
$action = wp_unslash( $_GET['action'] );
|
71 |
+
$invitation_id = (int) wp_unslash( $_GET['invitation_id'] );
|
72 |
+
$user_id = bp_displayed_user_id();
|
73 |
+
|
74 |
+
if ( 'cancel' === $action ) {
|
75 |
+
// Check the nonce and delete the invitation.
|
76 |
+
if ( bp_verify_nonce_request( 'bp_members_invitations_cancel_' . $invitation_id ) && bp_members_invitations_delete_by_id( $invitation_id ) ) {
|
77 |
+
bp_core_add_message( __( 'Invitation successfully canceled.', 'buddypress' ) );
|
78 |
+
} else {
|
79 |
+
bp_core_add_message( __( 'There was a problem canceling that invitation.', 'buddypress' ), 'error' );
|
80 |
+
}
|
81 |
+
} elseif ( 'resend' === $action ) {
|
82 |
+
// Check the nonce and resend the invitation.
|
83 |
+
if ( bp_verify_nonce_request( 'bp_members_invitation_resend_' . $invitation_id ) && bp_members_invitation_resend_by_id( $invitation_id ) ) {
|
84 |
+
bp_core_add_message( __( 'Invitation successfully resent.', 'buddypress' ) );
|
85 |
+
} else {
|
86 |
+
bp_core_add_message( __( 'There was a problem resending that invitation.', 'buddypress' ), 'error' );
|
87 |
+
}
|
88 |
+
} else {
|
89 |
+
/**
|
90 |
+
* Hook here to handle custom actions.
|
91 |
+
*
|
92 |
+
* @since 8.0.0
|
93 |
+
*
|
94 |
+
* @param string $action The action name.
|
95 |
+
* @param int $invitation_id The invitation ID.
|
96 |
+
* @param int $user_id The displayed user ID.
|
97 |
+
*/
|
98 |
+
do_action( 'bp_members_invitations_list_invites_action', $action, $invitation_id, $user_id );
|
99 |
+
}
|
100 |
+
|
101 |
+
// Redirect.
|
102 |
+
bp_core_redirect( bp_get_members_invitations_list_invites_permalink( $user_id ) );
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Fires before the loading of template for the send membership invitations page.
|
107 |
+
*
|
108 |
+
* @since 8.0.0
|
109 |
+
*/
|
110 |
+
do_action( 'members_screen_list_sent_invites' );
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Filters the template used to display the send membership invitations page.
|
114 |
+
*
|
115 |
+
* @since 8.0.0
|
116 |
+
*
|
117 |
+
* @param string $template Path to the send membership invitations template to load.
|
118 |
+
*/
|
119 |
+
bp_core_load_template( apply_filters( 'members_template_list_sent_invites', 'members/single/invitations' ) );
|
120 |
+
}
|
@@ -1,80 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Members: Sent Invitations Status
|
4 |
-
*
|
5 |
-
* @package BuddyPress
|
6 |
-
* @subpackage MembersScreens
|
7 |
-
* @since 8.0.0
|
8 |
-
*/
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Catch and process the Send Invites page.
|
12 |
-
*
|
13 |
-
* @since 8.0.0
|
14 |
-
*/
|
15 |
-
function members_screen_list_sent_invites() {
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Fires before the loading of template for the send membership invitations page.
|
19 |
-
*
|
20 |
-
* @since 8.0.0
|
21 |
-
*/
|
22 |
-
do_action( 'members_screen_list_sent_invites' );
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Filters the template used to display the send membership invitations page.
|
26 |
-
*
|
27 |
-
* @since 8.0.0
|
28 |
-
*
|
29 |
-
* @param string $template Path to the send membership invitations template to load.
|
30 |
-
*/
|
31 |
-
bp_core_load_template( apply_filters( 'members_template_list_sent_invites', 'members/single/invitations' ) );
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Handle canceling or resending single invitations.
|
36 |
-
*
|
37 |
-
* @since 8.0.0
|
38 |
-
*
|
39 |
-
* @return bool
|
40 |
-
*/
|
41 |
-
function bp_members_invitations_action_handling() {
|
42 |
-
|
43 |
-
// Bail if not the read screen.
|
44 |
-
if ( ! bp_is_user_members_invitations_list() ) {
|
45 |
-
return false;
|
46 |
-
}
|
47 |
-
|
48 |
-
// Get the action.
|
49 |
-
$action = ! empty( $_GET['action'] ) ? $_GET['action'] : '';
|
50 |
-
$nonce = ! empty( $_GET['_wpnonce'] ) ? $_GET['_wpnonce'] : '';
|
51 |
-
$id = ! empty( $_GET['invitation_id'] ) ? $_GET['invitation_id'] : '';
|
52 |
-
|
53 |
-
// Bail if no action or no ID.
|
54 |
-
if ( empty( $action ) || empty( $id ) ) {
|
55 |
-
return false;
|
56 |
-
}
|
57 |
-
|
58 |
-
if ( 'cancel' === $action ) {
|
59 |
-
// Check the nonce and delete the invitation.
|
60 |
-
if ( bp_verify_nonce_request( 'bp_members_invitations_cancel_' . $id ) && bp_members_invitations_delete_by_id( $id ) ) {
|
61 |
-
bp_core_add_message( __( 'Invitation successfully canceled.', 'buddypress' ) );
|
62 |
-
} else {
|
63 |
-
bp_core_add_message( __( 'There was a problem canceling that invitation.', 'buddypress' ), 'error' );
|
64 |
-
}
|
65 |
-
} else if ( 'resend' === $action ) {
|
66 |
-
// Check the nonce and resend the invitation.
|
67 |
-
if ( bp_verify_nonce_request( 'bp_network_invitation_resend_' . $id ) && bp_members_invitation_resend_by_id( $id ) ) {
|
68 |
-
bp_core_add_message( __( 'Invitation successfully resent.', 'buddypress' ) );
|
69 |
-
} else {
|
70 |
-
bp_core_add_message( __( 'There was a problem resending that invitation.', 'buddypress' ), 'error' );
|
71 |
-
}
|
72 |
-
} else {
|
73 |
-
return false;
|
74 |
-
}
|
75 |
-
|
76 |
-
// Redirect.
|
77 |
-
$user_id = bp_displayed_user_id();
|
78 |
-
bp_core_redirect( bp_get_members_invitations_list_invites_permalink( $user_id ) );
|
79 |
-
}
|
80 |
-
add_action( 'bp_actions', 'bp_members_invitations_action_handling' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,77 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Members: Send Invitations
|
4 |
-
*
|
5 |
-
* @package BuddyPress
|
6 |
-
* @subpackage MembersScreens
|
7 |
-
* @since 8.0.0
|
8 |
-
*/
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Catch and process the Send Invites page.
|
12 |
-
*
|
13 |
-
* @since 8.0.0
|
14 |
-
*/
|
15 |
-
function members_screen_send_invites() {
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Fires before the loading of template for the send membership invitations page.
|
19 |
-
*
|
20 |
-
* @since 8.0.0
|
21 |
-
*/
|
22 |
-
do_action( 'members_screen_send_invites' );
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Filters the template used to display the send membership invitations page.
|
26 |
-
*
|
27 |
-
* @since 8.0.0
|
28 |
-
*
|
29 |
-
* @param string $template Path to the send membership invitations template to load.
|
30 |
-
*/
|
31 |
-
bp_core_load_template( apply_filters( 'members_template_send_invites', 'members/single/invitations' ) );
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Handle sending invitations.
|
36 |
-
*
|
37 |
-
* @since 8.0.0
|
38 |
-
*
|
39 |
-
* @return bool
|
40 |
-
*/
|
41 |
-
function bp_network_invitations_catch_send_action() {
|
42 |
-
|
43 |
-
// Bail if not the read screen.
|
44 |
-
if ( ! bp_is_user_members_invitations_send_screen() ) {
|
45 |
-
return false;
|
46 |
-
}
|
47 |
-
|
48 |
-
// Get the action.
|
49 |
-
$action = ! empty( $_REQUEST['action'] ) ? $_REQUEST['action'] : '';
|
50 |
-
$nonce = ! empty( $_REQUEST['_wpnonce'] ) ? $_REQUEST['_wpnonce'] : '';
|
51 |
-
$email = ! empty( $_REQUEST['invitee_email'] ) ? $_REQUEST['invitee_email'] : '';
|
52 |
-
$message = ! empty( $_REQUEST['invite_message'] ) ? $_REQUEST['invite_message'] : '';
|
53 |
-
|
54 |
-
// Bail if missing required info.
|
55 |
-
if ( ( 'send-invite' !== $action ) ) {
|
56 |
-
return false;
|
57 |
-
}
|
58 |
-
|
59 |
-
$invite_args = array(
|
60 |
-
'invitee_email' => $email,
|
61 |
-
'inviter_id' => bp_displayed_user_id(),
|
62 |
-
'content' => $message,
|
63 |
-
'send_invite' => 1
|
64 |
-
);
|
65 |
-
|
66 |
-
// Check the nonce and delete the invitation.
|
67 |
-
if ( bp_verify_nonce_request( 'bp_members_invitation_send_' . bp_displayed_user_id() ) && bp_members_invitations_invite_user( $invite_args ) ) {
|
68 |
-
bp_core_add_message( __( 'Invitation successfully sent!', 'buddypress' ) );
|
69 |
-
} else {
|
70 |
-
bp_core_add_message( __( 'There was a problem sending that invitation. The user could already be a member of the site or have chosen not to receive invitations from this site.', 'buddypress' ), 'error' );
|
71 |
-
}
|
72 |
-
|
73 |
-
// Redirect.
|
74 |
-
$user_id = bp_displayed_user_id();
|
75 |
-
bp_core_redirect( bp_get_members_invitations_send_invites_permalink( $user_id ) );
|
76 |
-
}
|
77 |
-
add_action( 'bp_actions', 'bp_network_invitations_catch_send_action' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1 +1 @@
|
|
1 |
-
!function(H){H.fn.extend({autocompletebp:function(e,t){var n="string"==typeof e;return(t=H.extend({},H.Autocompleter.defaults,{url:n?e:null,data:n?null:e,delay:n?H.Autocompleter.defaults.delay:10,max:t&&!t.scroll?10:150},t)).highlight=t.highlight||function(e){return e},this.each(function(){new H.Autocompleter(this,t)})},result:function(e){return this.bind("result",e)},search:function(e){return this.trigger("search",[e])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(e){return this.trigger("setOptions",[e])},unautocomplete:function(){return this.trigger("unautocomplete")}}),H.Autocompleter=function(i,r){var t,a,n=38,o=40,l=46,s=9,u=13,c=27,f=188,h=33,d=34,p=H(i).attr("autocomplete","off").addClass(r.inputClass),m="",g=H.Autocompleter.Cache(r),v=0,e={mouseDownOnSelect:!1},C=H.Autocompleter.Select(r,i,b,e);function b(){var e=C.selected();if(!e)return!1;var t,n=e.result;return m=n,r.multiple&&(1<(t=x(p.val())).length&&(n=t.slice(0,t.length-1).join(r.multipleSeparator)+r.multipleSeparator+n),n+=r.multipleSeparator),p.val(n),S(),p.trigger("result",[e.data,e.value]),!0}function w(e,t){var n;a!=l?(n=p.val(),!t&&n==m||((n=y(m=n)).length>=r.minChars?(p.addClass(r.loadingClass),jQuery("#send-to-input").addClass("loading"),k(n=!r.matchCase?n.toLowerCase():n,T,S)):(L(),C.hide()))):C.hide()}function x(e){if(!e)return[""];var e=e.split(H.trim(r.multipleSeparator)),n=[];return H.each(e,function(e,t){H.trim(t)&&(n[e]=H.trim(t))}),n}function y(e){if(!r.multiple)return e;e=x(e);return e[e.length-1]}function S(){C.hide(),clearTimeout(t),L(),r.mustMatch&&p.search(function(e){e||p.val("")})}function T(e,t){var n;t&&t.length&&v?(L(),C.display(t,e),n=t[0].value.split(";"),t.value=n[0],e=e,t=t.value,r.autoFill&&y(p.val()).toLowerCase()==e.toLowerCase()&&8!=a&&(p.val(p.val()+t.substring(y(m).length)),H.Autocompleter.Selection(i,m.length,m.length+t.length)),C.show()):S()}function k(t,n,e){r.matchCase||(t=t.toLowerCase());var a,o=g.load(t);o&&o.length?n(t,o):"string"==typeof r.url&&0<r.url.length?(a={},H.each(r.extraParams,function(e,t){a[e]="function"==typeof t?t():t}),H.ajax({mode:"abort",port:"autocomplete"+i.name,dataType:r.dataType,url:r.url,data:H.extend({q:y(t),limit:r.max,action:"messages_autocomplete_results",cookie:function(){var e,t,n,a,o=document.cookie.split(";"),i={};for(e=0;e<o.length;e++)t=o[e],a=t.indexOf("="),n=jq.trim(unescape(t.slice(0,a))),a=unescape(t.slice(a+1)),0===n.indexOf("bp-")&&(i[n]=a);return encodeURIComponent(jq.param(i))}()},a),success:function(e){e=r.parse&&r.parse(e)||function(e){for(var t=[],n=e.split("\n"),a=0;a<n.length;a++){var o=H.trim(n[a]);o&&(o=o.split("|"),t[t.length]={data:o,value:o[0],result:r.formatResult&&r.formatResult(o,o[0])||o[0]})}return t}(e);g.add(t,e),n(t,e)}})):e(t)}function L(){p.removeClass(r.loadingClass),jQuery("#send-to-input").removeClass("loading")}p.keydown(function(e){switch(a=e.keyCode,e.keyCode){case n:e.preventDefault(),C.visible()?C.prev():w(0,!0);break;case o:e.preventDefault(),C.visible()?C.next():w(0,!0);break;case h:e.preventDefault(),C.visible()?C.pageUp():w(0,!0);break;case d:e.preventDefault(),C.visible()?C.pageDown():w(0,!0);break;case r.multiple&&","==H.trim(r.multipleSeparator)&&f:case s:case u:b()&&(r.multiple||p.blur(),e.preventDefault(),p.focus());break;case c:C.hide();break;default:clearTimeout(t),t=setTimeout(w,r.delay)}}).keypress(function(){}).focus(function(){v++}).blur(function(){v=0,e.mouseDownOnSelect||(clearTimeout(t),t=setTimeout(S,200))}).click(function(){1<v++&&!C.visible()&&w(0,!0)}).bind("search",function(){var o=1<arguments.length?arguments[1]:null;function n(e,t){var n;if(t&&t.length)for(var a=0;a<t.length;a++)if(t[a].result.toLowerCase()==e.toLowerCase()){n=t[a];break}"function"==typeof o?o(n):p.trigger("result",n&&[n.data,n.value])}H.each(x(p.val()),function(e,t){k(t,n,n)})}).bind("flushCache",function(){g.flush()}).bind("setOptions",function(){H.extend(r,arguments[1]),"data"in arguments[1]&&g.populate()}).bind("unautocomplete",function(){C.unbind(),p.unbind()})},H.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:!1,matchSubset:!0,matchContains:!1,cacheLength:10,max:100,mustMatch:!1,extraParams:{},selectFirst:!0,formatItem:function(e){return e[0]},autoFill:!1,width:0,multiple:!1,multipleSeparator:", ",highlight:function(e,t){return e.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+t.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:!0,scrollHeight:250,attachTo:"body"},H.Autocompleter.Cache=function(l){var i={},r=0;function s(e,t){t=(e=!l.matchCase?e.toLowerCase():e).indexOf(t);return-1!=t&&(0==t||l.matchContains)}function u(e,t){r>l.cacheLength&&n(),i[e]||r++,i[e]=t}function e(){if(!l.data)return!1;var e={},t=0;l.url||(l.cacheLength=1),e[""]=[];for(var n=0,a=l.data.length;n<a;n++){var o,i=
|
1 |
+
!function(H){H.fn.extend({autocompletebp:function(e,t){var n="string"==typeof e;return(t=H.extend({},H.Autocompleter.defaults,{url:n?e:null,data:n?null:e,delay:n?H.Autocompleter.defaults.delay:10,max:t&&!t.scroll?10:150},t)).highlight=t.highlight||function(e){return e},this.each(function(){new H.Autocompleter(this,t)})},result:function(e){return this.bind("result",e)},search:function(e){return this.trigger("search",[e])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(e){return this.trigger("setOptions",[e])},unautocomplete:function(){return this.trigger("unautocomplete")}}),H.Autocompleter=function(i,r){var t,a,n=38,o=40,l=46,s=9,u=13,c=27,f=188,h=33,d=34,p=H(i).attr("autocomplete","off").addClass(r.inputClass),m="",g=H.Autocompleter.Cache(r),v=0,e={mouseDownOnSelect:!1},C=H.Autocompleter.Select(r,i,b,e);function b(){var e=C.selected();if(!e)return!1;var t,n=e.result;return m=n,r.multiple&&(1<(t=x(p.val())).length&&(n=t.slice(0,t.length-1).join(r.multipleSeparator)+r.multipleSeparator+n),n+=r.multipleSeparator),p.val(n),S(),p.trigger("result",[e.data,e.value]),!0}function w(e,t){var n;a!=l?(n=p.val(),!t&&n==m||((n=y(m=n)).length>=r.minChars?(p.addClass(r.loadingClass),jQuery("#send-to-input").addClass("loading"),k(n=!r.matchCase?n.toLowerCase():n,T,S)):(L(),C.hide()))):C.hide()}function x(e){if(!e)return[""];var e=e.split(H.trim(r.multipleSeparator)),n=[];return H.each(e,function(e,t){H.trim(t)&&(n[e]=H.trim(t))}),n}function y(e){if(!r.multiple)return e;e=x(e);return e[e.length-1]}function S(){C.hide(),clearTimeout(t),L(),r.mustMatch&&p.search(function(e){e||p.val("")})}function T(e,t){var n;t&&t.length&&v?(L(),C.display(t,e),n=t[0].value.split(";"),t.value=n[0],e=e,t=t.value,r.autoFill&&y(p.val()).toLowerCase()==e.toLowerCase()&&8!=a&&(p.val(p.val()+t.substring(y(m).length)),H.Autocompleter.Selection(i,m.length,m.length+t.length)),C.show()):S()}function k(t,n,e){r.matchCase||(t=t.toLowerCase());var a,o=g.load(t);o&&o.length?n(t,o):"string"==typeof r.url&&0<r.url.length?(a={},H.each(r.extraParams,function(e,t){a[e]="function"==typeof t?t():t}),H.ajax({mode:"abort",port:"autocomplete"+i.name,dataType:r.dataType,url:r.url,data:H.extend({q:y(t),limit:r.max,action:"messages_autocomplete_results",cookie:function(){var e,t,n,a,o=document.cookie.split(";"),i={};for(e=0;e<o.length;e++)t=o[e],a=t.indexOf("="),n=jq.trim(unescape(t.slice(0,a))),a=unescape(t.slice(a+1)),0===n.indexOf("bp-")&&(i[n]=a);return encodeURIComponent(jq.param(i))}()},a),success:function(e){e=r.parse&&r.parse(e)||function(e){for(var t=[],n=e.split("\n"),a=0;a<n.length;a++){var o=H.trim(n[a]);o&&(o=o.split("|"),t[t.length]={data:o,value:o[0],result:r.formatResult&&r.formatResult(o,o[0])||o[0]})}return t}(e);g.add(t,e),n(t,e)}})):e(t)}function L(){p.removeClass(r.loadingClass),jQuery("#send-to-input").removeClass("loading")}p.keydown(function(e){switch(a=e.keyCode,e.keyCode){case n:e.preventDefault(),C.visible()?C.prev():w(0,!0);break;case o:e.preventDefault(),C.visible()?C.next():w(0,!0);break;case h:e.preventDefault(),C.visible()?C.pageUp():w(0,!0);break;case d:e.preventDefault(),C.visible()?C.pageDown():w(0,!0);break;case r.multiple&&","==H.trim(r.multipleSeparator)&&f:case s:case u:b()&&(r.multiple||p.blur(),e.preventDefault(),p.focus());break;case c:C.hide();break;default:clearTimeout(t),t=setTimeout(w,r.delay)}}).keypress(function(){}).focus(function(){v++}).blur(function(){v=0,e.mouseDownOnSelect||(clearTimeout(t),t=setTimeout(S,200))}).click(function(){1<v++&&!C.visible()&&w(0,!0)}).bind("search",function(){var o=1<arguments.length?arguments[1]:null;function n(e,t){var n;if(t&&t.length)for(var a=0;a<t.length;a++)if(t[a].result.toLowerCase()==e.toLowerCase()){n=t[a];break}"function"==typeof o?o(n):p.trigger("result",n&&[n.data,n.value])}H.each(x(p.val()),function(e,t){k(t,n,n)})}).bind("flushCache",function(){g.flush()}).bind("setOptions",function(){H.extend(r,arguments[1]),"data"in arguments[1]&&g.populate()}).bind("unautocomplete",function(){C.unbind(),p.unbind()})},H.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:!1,matchSubset:!0,matchContains:!1,cacheLength:10,max:100,mustMatch:!1,extraParams:{},selectFirst:!0,formatItem:function(e){return e[0]},autoFill:!1,width:0,multiple:!1,multipleSeparator:", ",highlight:function(e,t){return e.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+t.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:!0,scrollHeight:250,attachTo:"body"},H.Autocompleter.Cache=function(l){var i={},r=0;function s(e,t){t=(e=!l.matchCase?e.toLowerCase():e).indexOf(t);return-1!=t&&(0==t||l.matchContains)}function u(e,t){r>l.cacheLength&&n(),i[e]||r++,i[e]=t}function e(){if(!l.data)return!1;var e={},t=0;l.url||(l.cacheLength=1),e[""]=[];for(var n=0,a=l.data.length;n<a;n++){var o,i=l.data[n],r=l.formatItem(i="string"==typeof i?[i]:i,n+1,l.data.length);!1!==r&&(e[o=r.charAt(0).toLowerCase()]||(e[o]=[]),r={value:r,data:i,result:l.formatResult&&l.formatResult(i)||r},e[o].push(r),t++<l.max&&e[""].push(r))}H.each(e,function(e,t){l.cacheLength++,u(e,t)})}function n(){i={},r=0}return setTimeout(e,25),{flush:n,add:u,populate:e,load:function(n){if(!l.cacheLength||!r)return null;if(!l.url&&l.matchContains){var e,a=[];for(e in i)0<e.length&&(t=i[e],H.each(t,function(e,t){s(t.value,n)&&a.push(t)}));return a}if(i[n])return i[n];if(l.matchSubset)for(var t,o=n.length-1;o>=l.minChars;o--)if(t=i[n.substr(0,o)]){a=[];return H.each(t,function(e,t){s(t.value,n)&&(a[a.length]=t)}),a}return null}}},H.Autocompleter.Select=function(o,n,a,i){var r,l,s,u,c,f="ac_over",h=-1,d=!0;function p(e){for(var t=e.target;t&&"LI"!=t.tagName;)t=t.parentNode;return t||[]}function e(e){r.slice(h,h+1).removeClass(),(h+=e)<0?h=r.size()-1:h>=r.size()&&(h=0);var t,e=r.slice(h,h+1).addClass(f);o.scroll&&(r.slice(t=0,h).each(function(){t+=this.offsetHeight}),t+e[0].offsetHeight-c.scrollTop()>c[0].clientHeight?c.scrollTop(t+e[0].offsetHeight-c.innerHeight()):t<c.scrollTop()&&c.scrollTop(t))}function m(){c.empty();for(var e,t,n=(e=l.length,o.max&&o.max<e?o.max:e),a=0;a<n;a++)l[a]&&(!1!==(t=o.formatItem(l[a].data,a+1,n,l[a].value,s))&&(t=H("<li>").html(o.highlight(t,s)).addClass(a%2==0?"ac_event":"ac_odd").appendTo(c)[0],H.data(t,"ac_data",l[a])));r=c.find("li"),o.selectFirst&&(r.slice(0,1).addClass(f),h=0),c.bgiframe()}return{display:function(e,t){d&&(u=H("<div/>").hide().addClass(o.resultsClass).css("position","absolute").appendTo(o.attachTo),c=H("<ul>").appendTo(u).mouseover(function(e){p(e).nodeName&&"LI"==p(e).nodeName.toUpperCase()&&(h=H("li",c).removeClass(f).index(p(e)),H(p(e)).addClass(f))}).click(function(e){return H(p(e)).addClass(f),a(),n.focus(),!1}).mousedown(function(){i.mouseDownOnSelect=!0}).mouseup(function(){i.mouseDownOnSelect=!1}),0<o.width&&u.css("width",o.width),d=!1),l=e,s=t,m()},next:function(){e(1)},prev:function(){e(-1)},pageUp:function(){e(0!=h&&h-8<0?-h:-8)},pageDown:function(){h!=r.size()-1&&h+8>r.size()?e(r.size()-1-h):e(8)},hide:function(){u&&u.hide(),h=-1},visible:function(){return u&&u.is(":visible")},current:function(){return this.visible()&&(r.filter("."+f)[0]||o.selectFirst&&r[0])},show:function(){var e,t=H(n).offset();u.css({width:"string"==typeof o.width||0<o.width?o.width:H(n).width(),top:t.top+n.offsetHeight,left:t.left}).show(),o.scroll&&(c.scrollTop(0),c.css({maxHeight:o.scrollHeight,overflow:"auto"}),H.browser.msie&&void 0===document.body.style.maxHeight&&(e=0,r.each(function(){e+=this.offsetHeight}),t=e>o.scrollHeight,c.css("height",t?o.scrollHeight:e),t||r.width(c.width()-parseInt(r.css("padding-left"))-parseInt(r.css("padding-right")))))},selected:function(){var e=r&&r.filter("."+f).removeClass(f);return e&&e.length&&H.data(e[0],"ac_data")},unbind:function(){u&&u.remove()}}},H.Autocompleter.Selection=function(e,t,n){var a;e.createTextRange?((a=e.createTextRange()).collapse(!0),a.moveStart("character",t),a.moveEnd("character",n),a.select()):e.setSelectionRange?e.setSelectionRange(t,n):e.selectionStart&&(e.selectionStart=t,e.selectionEnd=n),e.focus()}}(jQuery);
|
@@ -36,7 +36,7 @@
|
|
36 |
<tr>
|
37 |
<td class="bulk-select-check">
|
38 |
<label for="<?php bp_the_members_invitation_property( 'id', 'attribute' ); ?>">
|
39 |
-
<input id="<?php bp_the_members_invitation_property( 'id', 'attribute' ); ?>" type="checkbox" name="
|
40 |
<span class="bp-screen-reader-text">
|
41 |
<?php
|
42 |
/* translators: accessibility text */
|
36 |
<tr>
|
37 |
<td class="bulk-select-check">
|
38 |
<label for="<?php bp_the_members_invitation_property( 'id', 'attribute' ); ?>">
|
39 |
+
<input id="<?php bp_the_members_invitation_property( 'id', 'attribute' ); ?>" type="checkbox" name="members_invitations[]" value="<?php bp_the_members_invitation_property( 'id', 'attribute' ); ?>" class="invitation-check">
|
40 |
<span class="bp-screen-reader-text">
|
41 |
<?php
|
42 |
/* translators: accessibility text */
|
@@ -14,6 +14,8 @@
|
|
14 |
?>
|
15 |
</h2>
|
16 |
|
|
|
|
|
17 |
<form class="standard-form members-invitation-form" id="members-invitation-form" method="post">
|
18 |
<p class="description"><?php esc_html_e( 'Fill out the form below to invite a new user to join this site. Upon submission of the form, an email will be sent to the invitee containing a link to accept your invitation. You may also add a custom message to the email.', 'buddypress' ); ?></p>
|
19 |
|
@@ -21,7 +23,7 @@
|
|
21 |
<input id="bp_members_invitation_invitee_email" type="email" name="invitee_email" required="required">
|
22 |
|
23 |
<label for="bp_members_invitation_message"><?php esc_html_e( 'Add a personalized message to the invitation (optional)', 'buddypress' ); ?></label>
|
24 |
-
<textarea id="bp_members_invitation_message" name="
|
25 |
|
26 |
<input type="hidden" name="action" value="send-invite">
|
27 |
|
@@ -30,3 +32,14 @@
|
|
30 |
<input id="submit" type="submit" name="submit" class="submit" value="<?php esc_attr_e( 'Send Invitation', 'buddypress' ) ?>" />
|
31 |
</p>
|
32 |
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
?>
|
15 |
</h2>
|
16 |
|
17 |
+
<?php if ( bp_user_can( bp_displayed_user_id(), 'bp_members_send_invitation' ) ) : ?>
|
18 |
+
|
19 |
<form class="standard-form members-invitation-form" id="members-invitation-form" method="post">
|
20 |
<p class="description"><?php esc_html_e( 'Fill out the form below to invite a new user to join this site. Upon submission of the form, an email will be sent to the invitee containing a link to accept your invitation. You may also add a custom message to the email.', 'buddypress' ); ?></p>
|
21 |
|
23 |
<input id="bp_members_invitation_invitee_email" type="email" name="invitee_email" required="required">
|
24 |
|
25 |
<label for="bp_members_invitation_message"><?php esc_html_e( 'Add a personalized message to the invitation (optional)', 'buddypress' ); ?></label>
|
26 |
+
<textarea id="bp_members_invitation_message" name="content"></textarea>
|
27 |
|
28 |
<input type="hidden" name="action" value="send-invite">
|
29 |
|
32 |
<input id="submit" type="submit" name="submit" class="submit" value="<?php esc_attr_e( 'Send Invitation', 'buddypress' ) ?>" />
|
33 |
</p>
|
34 |
</form>
|
35 |
+
|
36 |
+
<?php else : ?>
|
37 |
+
|
38 |
+
<p class="bp-feedback error">
|
39 |
+
<span class="bp-icon" aria-hidden="true"></span>
|
40 |
+
<span class="bp-help-text">
|
41 |
+
<?php echo apply_filters( 'members_invitations_form_access_restricted', esc_html__( 'Sorry, you are not allowed to send invitations.', 'buddypress' ) ); ?>
|
42 |
+
</span>
|
43 |
+
</p>
|
44 |
+
|
45 |
+
<?php endif; ?>
|
@@ -34,7 +34,7 @@
|
|
34 |
<tr>
|
35 |
<td class="bulk-select-check">
|
36 |
<label for="<?php bp_the_members_invitation_property( 'id', 'attribute' ); ?>">
|
37 |
-
<input id="<?php bp_the_members_invitation_property( 'id', 'attribute' ); ?>" type="checkbox" name="
|
38 |
<span class="bp-screen-reader-text">
|
39 |
<?php
|
40 |
/* translators: accessibility text */
|
34 |
<tr>
|
35 |
<td class="bulk-select-check">
|
36 |
<label for="<?php bp_the_members_invitation_property( 'id', 'attribute' ); ?>">
|
37 |
+
<input id="<?php bp_the_members_invitation_property( 'id', 'attribute' ); ?>" type="checkbox" name="members_invitations[]" value="<?php bp_the_members_invitation_property( 'id', 'attribute' ); ?>" class="invitation-check">
|
38 |
<span class="bp-screen-reader-text">
|
39 |
<?php
|
40 |
/* translators: accessibility text */
|
@@ -13,26 +13,29 @@
|
|
13 |
?>
|
14 |
</h2>
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
<
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
13 |
?>
|
14 |
</h2>
|
15 |
|
16 |
+
<?php if ( bp_user_can( bp_displayed_user_id(), 'bp_members_send_invitation' ) ) : ?>
|
17 |
+
|
18 |
+
<?php bp_nouveau_user_feedback( 'member-invitations-help' ); ?>
|
19 |
+
|
20 |
+
<form class="standard-form network-invitation-form" id="network-invitation-form" method="post">
|
21 |
+
<label for="bp_members_invitation_invitee_email">
|
22 |
+
<?php esc_html_e( 'Email', 'buddypress' ); ?>
|
23 |
+
<span class="bp-required-field-label"><?php esc_html_e( '(required)', 'buddypress' ); ?></span>
|
24 |
+
</label>
|
25 |
+
<input id="bp_members_invitation_invitee_email" type="email" name="invitee_email" required="required">
|
26 |
+
|
27 |
+
<label for="bp_members_invitation_message">
|
28 |
+
<?php esc_html_e( 'Add a personalized message to the invitation (optional)', 'buddypress' ); ?>
|
29 |
+
</label>
|
30 |
+
<textarea id="bp_members_invitation_message" name="content"></textarea>
|
31 |
+
|
32 |
+
<input type="hidden" name="action" value="send-invite">
|
33 |
+
|
34 |
+
<?php bp_nouveau_submit_button( 'member-send-invite' ); ?>
|
35 |
+
</form>
|
36 |
+
|
37 |
+
<?php else : ?>
|
38 |
+
|
39 |
+
<?php bp_nouveau_user_feedback( 'member-invitations-not-allowed' ); ?>
|
40 |
+
|
41 |
+
<?php endif; ?>
|
@@ -3,7 +3,7 @@
|
|
3 |
* BP Nouveau Activity widgets
|
4 |
*
|
5 |
* @since 3.0.0
|
6 |
-
* @version
|
7 |
*/
|
8 |
|
9 |
// Exit if accessed directly.
|
@@ -80,14 +80,18 @@ class BP_Latest_Activities extends WP_Widget {
|
|
80 |
*/
|
81 |
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
|
82 |
|
83 |
-
// Check instance for custom max number of activities to display
|
84 |
if ( ! empty( $instance['max'] ) ) {
|
85 |
$max = (int) $instance['max'];
|
86 |
}
|
87 |
|
88 |
-
// Check instance for custom activity types
|
89 |
if ( ! empty( $instance['type'] ) ) {
|
90 |
-
$type
|
|
|
|
|
|
|
|
|
91 |
$classes = array_map( 'sanitize_html_class', array_merge( $type, array( 'bp-latest-activities' ) ) );
|
92 |
|
93 |
// Add classes to the container
|
@@ -181,6 +185,9 @@ class BP_Latest_Activities extends WP_Widget {
|
|
181 |
$type = array( 'activity_update' );
|
182 |
if ( ! empty( $instance['type'] ) ) {
|
183 |
$type = maybe_unserialize( $instance['type'] );
|
|
|
|
|
|
|
184 |
}
|
185 |
?>
|
186 |
<p>
|
3 |
* BP Nouveau Activity widgets
|
4 |
*
|
5 |
* @since 3.0.0
|
6 |
+
* @version 8.0.0
|
7 |
*/
|
8 |
|
9 |
// Exit if accessed directly.
|
80 |
*/
|
81 |
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
|
82 |
|
83 |
+
// Check instance for custom max number of activities to display.
|
84 |
if ( ! empty( $instance['max'] ) ) {
|
85 |
$max = (int) $instance['max'];
|
86 |
}
|
87 |
|
88 |
+
// Check instance for custom activity types.
|
89 |
if ( ! empty( $instance['type'] ) ) {
|
90 |
+
$type = maybe_unserialize( $instance['type'] );
|
91 |
+
if ( ! is_array( $type ) ) {
|
92 |
+
$type = (array) maybe_unserialize( $type );
|
93 |
+
}
|
94 |
+
|
95 |
$classes = array_map( 'sanitize_html_class', array_merge( $type, array( 'bp-latest-activities' ) ) );
|
96 |
|
97 |
// Add classes to the container
|
185 |
$type = array( 'activity_update' );
|
186 |
if ( ! empty( $instance['type'] ) ) {
|
187 |
$type = maybe_unserialize( $instance['type'] );
|
188 |
+
if ( ! is_array( $type ) ) {
|
189 |
+
$type = (array) maybe_unserialize( $type );
|
190 |
+
}
|
191 |
}
|
192 |
?>
|
193 |
<p>
|
@@ -130,7 +130,7 @@ function bp_nouveau_ajax_querystring( $query_string, $object ) {
|
|
130 |
}
|
131 |
|
132 |
// Single activity.
|
133 |
-
if ( bp_is_single_activity() ) {
|
134 |
$qs = array(
|
135 |
'display_comments=threaded',
|
136 |
'show_hidden=true',
|
@@ -1090,10 +1090,28 @@ function bp_nouveau_get_user_feedback( $feedback_id = '' ) {
|
|
1090 |
'type' => 'info',
|
1091 |
'message' => __( 'Currently only your friends can invite you to groups. Uncheck the box to allow any member to send invites.', 'buddypress' ),
|
1092 |
),
|
1093 |
-
'member-
|
|
|
|
|
|
|
|
|
1094 |
'type' => 'info',
|
1095 |
'message' => __( 'There are no invitations to display.', 'buddypress' ),
|
1096 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1097 |
)
|
1098 |
);
|
1099 |
|
130 |
}
|
131 |
|
132 |
// Single activity.
|
133 |
+
if ( bp_is_single_activity() && 'activity' === $object ) {
|
134 |
$qs = array(
|
135 |
'display_comments=threaded',
|
136 |
'show_hidden=true',
|
1090 |
'type' => 'info',
|
1091 |
'message' => __( 'Currently only your friends can invite you to groups. Uncheck the box to allow any member to send invites.', 'buddypress' ),
|
1092 |
),
|
1093 |
+
'member-invitations-help' => array(
|
1094 |
+
'type' => 'info',
|
1095 |
+
'message' => __( 'Fill out the form below to invite a new user to join this site. Upon submission of the form, an email will be sent to the invitee containing a link to accept your invitation. You may also add a custom message to the email.', 'buddypress' ),
|
1096 |
+
),
|
1097 |
+
'member-invitations-none' => array(
|
1098 |
'type' => 'info',
|
1099 |
'message' => __( 'There are no invitations to display.', 'buddypress' ),
|
1100 |
),
|
1101 |
+
'member-invitations-not-allowed' => array(
|
1102 |
+
'type' => 'error',
|
1103 |
+
/**
|
1104 |
+
* Use this filter to edit the restricted feedback message displayed into the Send invitation form.
|
1105 |
+
*
|
1106 |
+
* @since 8.0.0
|
1107 |
+
*
|
1108 |
+
* @param string $value The restricted feedback message displayed into the Send invitation form.
|
1109 |
+
*/
|
1110 |
+
'message' => apply_filters(
|
1111 |
+
'members_invitations_form_access_restricted',
|
1112 |
+
__( 'Sorry, you are not allowed to send invitations.', 'buddypress' )
|
1113 |
+
),
|
1114 |
+
),
|
1115 |
)
|
1116 |
);
|
1117 |
|
@@ -1,6 +1,7 @@
|
|
1 |
/* global wp, BP_Nouveau, _, Backbone, tinymce, tinyMCE */
|
2 |
/* jshint devel: true */
|
3 |
-
/* @
|
|
|
4 |
window.wp = window.wp || {};
|
5 |
window.bp = window.bp || {};
|
6 |
|
@@ -51,9 +52,14 @@ window.bp = window.bp || {};
|
|
51 |
|
52 |
// Then listen to nav click and load the appropriate view.
|
53 |
$( '#subnav a' ).on( 'click', function( event ) {
|
54 |
-
event.
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
-
|
57 |
|
58 |
// Remove the editor to be sure it will be added dynamically later.
|
59 |
self.removeTinyMCE();
|
@@ -602,11 +608,11 @@ window.bp = window.bp || {};
|
|
602 |
errors.push( 'send_to' );
|
603 |
} else {
|
604 |
usernames = usernames.map( function( username ) {
|
605 |
-
username =
|
606 |
return username;
|
607 |
} );
|
608 |
|
609 |
-
if ( ! usernames || !
|
610 |
errors.push( 'send_to' );
|
611 |
}
|
612 |
|
@@ -1382,12 +1388,13 @@ window.bp = window.bp || {};
|
|
1382 |
|
1383 |
bp.Nouveau.Messages.Router = Backbone.Router.extend( {
|
1384 |
routes: {
|
1385 |
-
'compose/'
|
1386 |
-
'view/:id/': 'viewMessage',
|
1387 |
-
'sentbox/'
|
1388 |
-
'starred/'
|
1389 |
-
'inbox/'
|
1390 |
-
''
|
|
|
1391 |
},
|
1392 |
|
1393 |
composeMessage: function() {
|
@@ -1420,6 +1427,10 @@ window.bp = window.bp || {};
|
|
1420 |
bp.Nouveau.Messages.threadsView();
|
1421 |
},
|
1422 |
|
|
|
|
|
|
|
|
|
1423 |
inboxView: function() {
|
1424 |
bp.Nouveau.Messages.box = 'inbox';
|
1425 |
bp.Nouveau.Messages.threadsView();
|
1 |
/* global wp, BP_Nouveau, _, Backbone, tinymce, tinyMCE */
|
2 |
/* jshint devel: true */
|
3 |
+
/* @since 3.0.0 */
|
4 |
+
/* @version 8.0.0 */
|
5 |
window.wp = window.wp || {};
|
6 |
window.bp = window.bp || {};
|
7 |
|
52 |
|
53 |
// Then listen to nav click and load the appropriate view.
|
54 |
$( '#subnav a' ).on( 'click', function( event ) {
|
55 |
+
var view_id = $( event.target ).prop( 'id' ),
|
56 |
+
supportedView = [ 'inbox', 'starred', 'sentbox', 'compose' ];
|
57 |
+
|
58 |
+
if ( -1 === _.indexOf( supportedView, view_id ) || 'unsupported' === self.box ) {
|
59 |
+
return event;
|
60 |
+
}
|
61 |
|
62 |
+
event.preventDefault();
|
63 |
|
64 |
// Remove the editor to be sure it will be added dynamically later.
|
65 |
self.removeTinyMCE();
|
608 |
errors.push( 'send_to' );
|
609 |
} else {
|
610 |
usernames = usernames.map( function( username ) {
|
611 |
+
username = username.trim();
|
612 |
return username;
|
613 |
} );
|
614 |
|
615 |
+
if ( ! usernames || ! _.isArray( usernames ) ) {
|
616 |
errors.push( 'send_to' );
|
617 |
}
|
618 |
|
1388 |
|
1389 |
bp.Nouveau.Messages.Router = Backbone.Router.extend( {
|
1390 |
routes: {
|
1391 |
+
'compose/' : 'composeMessage',
|
1392 |
+
'view/:id/' : 'viewMessage',
|
1393 |
+
'sentbox/' : 'sentboxView',
|
1394 |
+
'starred/' : 'starredView',
|
1395 |
+
'inbox/' : 'inboxView',
|
1396 |
+
'' : 'inboxView',
|
1397 |
+
'*unSupported': 'unSupported'
|
1398 |
},
|
1399 |
|
1400 |
composeMessage: function() {
|
1427 |
bp.Nouveau.Messages.threadsView();
|
1428 |
},
|
1429 |
|
1430 |
+
unSupported: function() {
|
1431 |
+
bp.Nouveau.Messages.box = 'unsupported';
|
1432 |
+
},
|
1433 |
+
|
1434 |
inboxView: function() {
|
1435 |
bp.Nouveau.Messages.box = 'inbox';
|
1436 |
bp.Nouveau.Messages.threadsView();
|
@@ -1 +1 @@
|
|
1 |
-
window.wp=window.wp||{},window.bp=window.bp||{},function(c,l){"undefined"!=typeof BP_Nouveau&&(_.extend(c,_.pick(wp,"Backbone","ajax","template")),c.Models=c.Models||{},c.Collections=c.Collections||{},c.Views=c.Views||{},c.Nouveau=c.Nouveau||{},c.Nouveau.Messages={start:function(){this.views=new Backbone.Collection,this.threads=new c.Collections.Threads,this.messages=new c.Collections.Messages,this.router=new c.Nouveau.Messages.Router,this.box="inbox",this.setupNav(),Backbone.history.start({pushState:!0,root:BP_Nouveau.messages.rootUrl})},setupNav:function(){var t=this;l("#compose-personal-li").addClass("last"),l("#subnav a").on("click",function(e){e.preventDefault();var s=l(e.target).prop("id");t.removeTinyMCE(),"compose"===s?_.isUndefined(t.views.get("compose"))?t.router.navigate("compose/",{trigger:!0}):((e=t.views.get("compose")).get("view").remove(),t.views.remove({id:"compose",view:e}),"single"===t.box&&(t.box="inbox"),t.router.navigate(t.box+"/",{trigger:!0})):t.box===s&&_.isUndefined(t.views.get("compose"))||(t.clearViews(),t.router.navigate(s+"/",{trigger:!0}))})},removeTinyMCE:function(){"undefined"!=typeof tinymce&&null!==tinymce.get("message_content")&&tinymce.EditorManager.execCommand("mceRemoveEditor",!0,"message_content")},tinyMCEinit:function(){void 0===window.tinyMCE||null===window.tinyMCE.activeEditor||void 0===window.tinyMCE.activeEditor||_.isEmpty(c.mentions)||l(window.tinyMCE.activeEditor.contentDocument.activeElement).atwho("setIframe",l("#message_content_ifr")[0]).bp_mentions({data:[],suffix:" "})},removeFeedback:function(){var e;_.isUndefined(this.views.get("feedback"))||((e=this.views.get("feedback")).get("view").remove(),this.views.remove({id:"feedback",view:e}))},displayFeedback:function(e,s){this.removeFeedback(),e&&(s=new c.Views.Feedback({value:e,type:s||"info"}),this.views.add({id:"feedback",view:s}),s.inject(".bp-messages-feedback"))},clearViews:function(){_.isUndefined(this.views.models)||(_.each(this.views.models,function(e){e.get("view").remove()},this),this.views.reset())},composeView:function(){this.clearViews();var e=new c.Views.messageForm({model:new c.Models.Message});this.views.add({id:"compose",view:e}),e.inject(".bp-messages-content")},threadsView:function(){l("#subnav ul li").each(function(e,s){l(s).removeClass("current selected")}),l("#subnav a#"+this.box).closest("li").addClass("current selected");var e=new c.Views.userThreads({collection:this.threads,box:this.box});this.views.add({id:"threads",view:e}),e.inject(".bp-messages-content"),this.displayFilters(this.threads)},displayFilters:function(e){this.filters=new Backbone.Model({page:1,total_page:0,search_terms:"",box:this.box}),e=new c.Views.messageFilters({model:this.filters,threads:e}),this.views.add({id:"filters",view:e}),e.inject(".bp-messages-filters")},singleView:function(e){this.clearViews(),this.box="single";e=new c.Views.userMessages({collection:this.messages,thread:e});this.views.add({id:"single",view:e}),e.inject(".bp-messages-content")}},c.Models.Message=Backbone.Model.extend({defaults:{send_to:[],subject:"",message_content:"",meta:{}},sendMessage:function(){if(!0!==this.get("sending")){this.set("sending",!0,{silent:!0});var e=c.ajax.post("messages_send_message",_.extend({nonce:BP_Nouveau.messages.nonces.send},this.attributes));return this.set("sending",!1,{silent:!0}),e}}}),c.Models.Thread=Backbone.Model.extend({defaults:{id:0,message_id:0,subject:"",excerpt:"",content:"",unread:!0,sender_name:"",sender_link:"",sender_avatar:"",count:0,date:0,display_date:"",recipients:[]},updateReadState:function(e){return(e=e||{}).data=_.extend(_.pick(this.attributes,["id","message_id"]),{action:"messages_thread_read",nonce:BP_Nouveau.nonces.messages}),c.ajax.send(e)}}),c.Models.messageThread=Backbone.Model.extend({defaults:{id:0,content:"",sender_id:0,sender_name:"",sender_link:"",sender_avatar:"",date:0,display_date:""}}),c.Collections.Threads=Backbone.Collection.extend({model:c.Models.Thread,initialize:function(){this.options={page:1,total_page:0}},sync:function(e,s,t){if((t=t||{}).context=this,t.data=t.data||{},t.data.nonce=BP_Nouveau.nonces.messages,"read"===e)return t.data=_.extend(t.data,{action:"messages_get_user_message_threads"}),c.ajax.send(t)},parse:function(t){return _.isArray(t.threads)||(t.threads=[t.threads]),_.each(t.threads,function(e,s){_.isNull(e)||(t.threads[s].id=e.id,t.threads[s].message_id=e.message_id,t.threads[s].subject=e.subject,t.threads[s].excerpt=e.excerpt,t.threads[s].content=e.content,t.threads[s].unread=e.unread,t.threads[s].sender_name=e.sender_name,t.threads[s].sender_link=e.sender_link,t.threads[s].sender_avatar=e.sender_avatar,t.threads[s].count=e.count,t.threads[s].date=new Date(e.date),t.threads[s].display_date=e.display_date,t.threads[s].recipients=e.recipients,t.threads[s].star_link=e.star_link,t.threads[s].is_starred=e.is_starred)}),_.isUndefined(t.meta)||(this.options.page=t.meta.page,this.options.total_page=t.meta.total_page),c.Nouveau.Messages.box&&(this.options.box=c.Nouveau.Messages.box),_.isUndefined(t.extraContent)||_.extend(this.options,_.pick(t.extraContent,["beforeLoop","afterLoop"])),t.threads},doAction:function(e,s,t){return(t=t||{}).context=this,t.data=t.data||{},t.data=_.extend(t.data,{action:"messages_"+e,nonce:BP_Nouveau.nonces.messages,id:s}),c.ajax.send(t)}}),c.Collections.Messages=Backbone.Collection.extend({model:c.Models.messageThread,options:{},sync:function(e,s,t){return(t=t||{}).context=this,t.data=t.data||{},t.data.nonce=BP_Nouveau.nonces.messages,"read"===e?(t.data=_.extend(t.data,{action:"messages_get_thread_messages"}),c.ajax.send(t)):"create"===e?(t.data=_.extend(t.data,{action:"messages_send_reply",nonce:BP_Nouveau.messages.nonces.send},s||{}),c.ajax.send(t)):void 0},parse:function(t){return _.isArray(t.messages)||(t.messages=[t.messages]),_.each(t.messages,function(e,s){_.isNull(e)||(t.messages[s].id=e.id,t.messages[s].content=e.content,t.messages[s].sender_id=e.sender_id,t.messages[s].sender_name=e.sender_name,t.messages[s].sender_link=e.sender_link,t.messages[s].sender_avatar=e.sender_avatar,t.messages[s].date=new Date(e.date),t.messages[s].display_date=e.display_date,t.messages[s].star_link=e.star_link,t.messages[s].is_starred=e.is_starred)}),_.isUndefined(t.thread)||(this.options.thread_id=t.thread.id,this.options.thread_subject=t.thread.subject,this.options.recipients=t.thread.recipients),t.messages}}),c.Nouveau.Messages.View=c.Backbone.View.extend({inject:function(e){this.render(),l(e).html(this.el),this.views.ready()},prepare:function(){return!_.isUndefined(this.model)&&_.isFunction(this.model.toJSON)?this.model.toJSON():{}}}),c.Views.Feedback=c.Nouveau.Messages.View.extend({tagName:"div",className:"bp-messages bp-user-messages-feedback",template:c.template("bp-messages-feedback"),initialize:function(){this.model=new Backbone.Model({type:this.options.type||"info",message:this.options.value})}}),c.Views.Hook=c.Nouveau.Messages.View.extend({tagName:"div",template:c.template("bp-messages-hook"),initialize:function(){this.model=new Backbone.Model({extraContent:this.options.extraContent}),this.el.className="bp-messages-hook",this.options.className&&(this.el.className+=" "+this.options.className)}}),c.Views.messageEditor=c.Nouveau.Messages.View.extend({template:c.template("bp-messages-editor"),initialize:function(){this.on("ready",this.activateTinyMce,this)},activateTinyMce:function(){"undefined"!=typeof tinymce&&tinymce.EditorManager.execCommand("mceAddEditor",!0,"message_content")}}),c.Views.messageForm=c.Nouveau.Messages.View.extend({tagName:"form",id:"send_message_form",className:"standard-form",template:c.template("bp-messages-form"),events:{"click #bp-messages-send":"sendMessage","click #bp-messages-reset":"resetForm"},initialize:function(){this.resetModel=this.model.clone(),this.views.add("#bp-message-content",new c.Views.messageEditor),this.model.on("change",this.resetFields,this),this.on("ready",this.addMentions,this)},addMentions:function(){var e=l(this.el).find("#send-to-input"),s=c.Nouveau.getLinkParams(null,"r")||null;e.bp_mentions({data:[],suffix:" "}),_.isNull(s)||(e.val("@"+_.escape(s)+" "),e.focus())},resetFields:function(e){_.each(e.previousAttributes(),function(e,s){"message_content"===s?void 0!==tinyMCE.activeEditor&&null!==tinyMCE.activeEditor&&tinyMCE.activeEditor.setContent(""):"meta"!==s&&!1!==e&&l('input[name="'+s+'"]').val("")}),l(this.el).trigger("message:reset",_.pick(e.previousAttributes(),"meta"))},sendMessage:function(e){var t={},a=[],s=this;if(e.preventDefault(),c.Nouveau.Messages.removeFeedback(),_.each(this.$el.serializeArray(),function(e){var s;e.name=e.name.replace("[]",""),-1===_.indexOf(["send_to","subject","message_content"],e.name)?_.isUndefined(t[e.name])?t[e.name]=e.value:(_.isArray(t[e.name])||(t[e.name]=[t[e.name]]),t[e.name].push(e.value)):"send_to"===e.name?(s=e.value.match(/(^|[^@\w\-])@([a-zA-Z0-9_\-]{1,50})\b/g))?((s=s.map(function(e){return e=l.trim(e)}))&&l.isArray(s)||a.push("send_to"),this.model.set("send_to",s,{silent:!0})):a.push("send_to"):("message_content"===e.name&&void 0!==tinyMCE.activeEditor&&(e.value=tinyMCE.activeEditor.getContent()),e.value?this.model.set(e.name,e.value,{silent:!0}):a.push(e.name))},this),a.length){var i="";return _.each(a,function(e){i+=BP_Nouveau.messages.errors[e]+"<br/>"}),void c.Nouveau.Messages.displayFeedback(i,"error")}this.model.set("meta",t,{silent:!0}),this.model.sendMessage().done(function(e){s.model.set(s.resetModel),c.Nouveau.Messages.displayFeedback(e.feedback,e.type),c.Nouveau.Messages.removeTinyMCE();e=c.Nouveau.Messages.views.get("compose");e.get("view").remove(),c.Nouveau.Messages.views.remove({id:"compose",view:e}),c.Nouveau.Messages.router.navigate("sentbox/",{trigger:!0})}).fail(function(e){e.feedback&&c.Nouveau.Messages.displayFeedback(e.feedback,e.type)})},resetForm:function(e){e.preventDefault(),this.model.set(this.resetModel)}}),c.Views.userThreads=c.Nouveau.Messages.View.extend({tagName:"div",events:{"click .subject":"changePreview"},initialize:function(){var e=[new c.Nouveau.Messages.View({tagName:"ul",id:"message-threads",className:"message-lists"}),new c.Views.previewThread({collection:this.collection})];_.each(e,function(e){this.views.add(e)},this),this.requestThreads(),this.collection.on("reset",this.cleanContent,this),this.collection.on("add",this.addThread,this)},requestThreads:function(){this.collection.reset(),c.Nouveau.Messages.displayFeedback(BP_Nouveau.messages.loading,"loading"),this.collection.fetch({data:_.pick(this.options,"box"),success:_.bind(this.threadsFetched,this),error:this.threadsFetchError})},threadsFetched:function(){c.Nouveau.Messages.removeFeedback(),this.collection.options.afterLoop&&this.views.add(new c.Views.Hook({extraContent:this.collection.options.afterLoop,className:"after-messages-loop"}),{at:1}),this.collection.options.beforeLoop&&this.views.add(new c.Views.Hook({extraContent:this.collection.options.beforeLoop,className:"before-messages-loop"}),{at:0}),c.Nouveau.Messages.displayFeedback(BP_Nouveau.messages.howto,"info")},threadsFetchError:function(e,s){c.Nouveau.Messages.displayFeedback(s.feedback,s.type)},cleanContent:function(){_.each(this.views._views["#message-threads"],function(e){e.remove()})},addThread:function(e){var s=this.collection.findWhere({active:!0});_.isUndefined(s)&&e.set("active",!0),this.views.add("#message-threads",new c.Views.userThread({model:e}))},setActiveThread:function(s){s&&_.each(this.collection.models,function(e){e.id===s?e.set("active",!0):e.unset("active")},this)},changePreview:function(e){var s=l(e.currentTarget);e.preventDefault(),c.Nouveau.Messages.removeFeedback(),s.closest(".thread-item").hasClass("selected")?c.Nouveau.Messages.router.navigate("view/"+s.closest(".thread-content").data("thread-id")+"/",{trigger:!0}):(this.setActiveThread(s.closest(".thread-content").data("thread-id")),l(".message-action-view").focus())}}),c.Views.userThread=c.Nouveau.Messages.View.extend({tagName:"li",template:c.template("bp-messages-thread"),className:"thread-item",events:{"click .message-check":"singleSelect"},initialize:function(){var e,s;this.model.get("active")&&(this.el.className+=" selected"),this.model.get("unread")&&(this.el.className+=" unread"),"sentbox"===c.Nouveau.Messages.box?(s="",2===(e=this.model.get("recipients").length)?s=BP_Nouveau.messages.toOthers.one:2<e&&(s=BP_Nouveau.messages.toOthers.more.replace("%d",Number(e-1))),this.model.set({recipientsCount:e,toOthers:s},{silent:!0})):this.model.get("recipientsCount")&&this.model.unset("recipientsCount",{silent:!0}),this.model.on("change:active",this.toggleClass,this),this.model.on("change:unread",this.updateReadState,this),this.model.on("change:checked",this.bulkSelect,this),this.model.on("remove",this.cleanView,this)},toggleClass:function(e){!0===e.get("active")?l(this.el).addClass("selected"):l(this.el).removeClass("selected")},updateReadState:function(e,s){!1===s?l(this.el).removeClass("unread"):l(this.el).addClass("unread")},bulkSelect:function(e){l("#bp-message-thread-"+e.get("id")).length&&l("#bp-message-thread-"+e.get("id")).prop("checked",e.get("checked"))},singleSelect:function(e){e=l(e.currentTarget).prop("checked");this.model.set("checked",e,{silent:!0});var s=!1;_.each(this.model.collection.models,function(e){!0===e.get("checked")&&(s=!0)}),s?(l("#user-messages-bulk-actions").closest(".bulk-actions-wrap").removeClass("bp-hide"),c.Nouveau.Messages.displayFeedback(BP_Nouveau.messages.howtoBulk,"info")):(l("#user-messages-bulk-actions").closest(".bulk-actions-wrap").addClass("bp-hide"),c.Nouveau.Messages.removeFeedback())},cleanView:function(){this.views.view.remove()}}),c.Views.previewThread=c.Nouveau.Messages.View.extend({tagName:"div",id:"thread-preview",template:c.template("bp-messages-preview"),events:{"click .actions button":"doAction","click .actions a":"doAction"},initialize:function(){this.collection.on("change:active",this.setPreview,this),this.collection.on("change:is_starred",this.updatePreview,this),this.collection.on("reset",this.emptyPreview,this),this.collection.on("remove",this.emptyPreview,this)},render:function(){_.isUndefined(this.model)||!0!==this.model.get("active")||c.Nouveau.Messages.View.prototype.render.apply(this,arguments)},setPreview:function(e){var s=this;!0===(this.model=e).get("unread")&&this.model.updateReadState().done(function(){s.model.set("unread",!1)}),this.render()},updatePreview:function(e){!0===e.get("active")&&this.render()},emptyPreview:function(){l(this.el).html("")},doAction:function(e){var s=l(e.currentTarget).data("bp-action"),t=this,a={},i=BP_Nouveau.messages.doingAction;if(!s)return e;e.preventDefault();var n=this.collection.findWhere({active:!0});n.get("id")&&(e=n.get("id"),"view"!==s?("star"!==s&&"unstar"!==s||(a.data={star_nonce:n.get("star_nonce")},e=n.get("starred_id")),_.isUndefined(i[s])||c.Nouveau.Messages.displayFeedback(i[s],"loading"),this.collection.doAction(s,e,a).done(function(e){c.Nouveau.Messages.removeFeedback(),c.Nouveau.Messages.displayFeedback(e.feedback,e.type),"delete"===s||"starred"===t.collection.options.box&&"unstar"===s?(t.collection.remove(n.get("id")),t.collection.fetch({data:_.pick(t.collection.options,["box","search_terms","page"])})):"unstar"===s||"star"===s?(_.each(e.messages,function(e){n.set(e)}),n.set(_.first(e.messages))):e.messages&&n.set(_.first(e.messages))}).fail(function(e){c.Nouveau.Messages.removeFeedback(),c.Nouveau.Messages.displayFeedback(e.feedback,e.type)})):c.Nouveau.Messages.router.navigate("view/"+e+"/",{trigger:!0}))}}),c.Views.Pagination=c.Nouveau.Messages.View.extend({tagName:"li",className:"last filter",template:c.template("bp-messages-paginate")}),c.Views.BulkActions=c.Nouveau.Messages.View.extend({tagName:"div",template:c.template("bp-bulk-actions"),events:{"click #user_messages_select_all":"bulkSelect","click .bulk-apply":"doBulkAction"},bulkSelect:function(e){var s=l(e.currentTarget).prop("checked");s?(l(this.el).find(".bulk-actions-wrap").removeClass("bp-hide").addClass("bp-show"),c.Nouveau.Messages.displayFeedback(BP_Nouveau.messages.howtoBulk,"info")):(l(this.el).find(".bulk-actions-wrap").addClass("bp-hide"),c.Nouveau.Messages.removeFeedback()),_.each(this.collection.models,function(e){e.set("checked",s)})},doBulkAction:function(e){var t=this,s={},a="id",i=BP_Nouveau.messages.doingAction;e.preventDefault();var n,o,d,r=l("#user-messages-bulk-actions").val();r&&(n=this.collection.where({checked:!0}),e=o=_.map(n,function(e){return e.get("id")}),"star"!==r&&"unstar"!==r||(1===(e=_.map(n,function(e){return e.get("starred_id")})).length&&(s.data={star_nonce:n[0].get("star_nonce")}),a="starred_id"),d=_.object(_.map(n,function(e){return[e.get(a),e.get("id")]})),_.isUndefined(i[r])||c.Nouveau.Messages.displayFeedback(i[r],"loading"),this.collection.doAction(r,e,s).done(function(e){c.Nouveau.Messages.removeFeedback(),c.Nouveau.Messages.displayFeedback(e.feedback,e.type),"delete"===r||"starred"===t.collection.options.box&&"unstar"===r?(t.collection.remove(o),t.collection.fetch({data:_.pick(t.collection.options,["box","search_terms","page"])})):e.messages&&_.each(e.messages,function(e,s){t.collection.get(d[s]).set(e)})}).fail(function(e){c.Nouveau.Messages.removeFeedback(),c.Nouveau.Messages.displayFeedback(e.feedback,e.type)}))}}),c.Views.messageFilters=c.Nouveau.Messages.View.extend({tagName:"ul",template:c.template("bp-messages-filters"),events:{"search #user_messages_search":"resetSearchTerms","submit #user_messages_search_form":"setSearchTerms","click #bp-messages-next-page":"nextPage","click #bp-messages-prev-page":"prevPage"},initialize:function(){this.model.on("change",this.filterThreads,this),this.options.threads.on("sync",this.addPaginatation,this)},addPaginatation:function(e){_.each(this.views._views,function(e){_.isUndefined(e)||_.first(e).remove()}),this.views.add(new c.Views.Pagination({model:new Backbone.Model(e.options)})),this.views.add(".user-messages-bulk-actions",new c.Views.BulkActions({model:new Backbone.Model(BP_Nouveau.messages.bulk_actions),collection:e}))},filterThreads:function(){c.Nouveau.Messages.displayFeedback(BP_Nouveau.messages.loading,"loading"),this.options.threads.reset(),_.extend(this.options.threads.options,_.pick(this.model.attributes,["box","search_terms"])),this.options.threads.fetch({data:_.pick(this.model.attributes,["box","search_terms","page"]),success:this.threadsFiltered,error:this.threadsFilterError})},threadsFiltered:function(){c.Nouveau.Messages.removeFeedback()},threadsFilterError:function(e,s){c.Nouveau.Messages.displayFeedback(s.feedback,s.type)},resetSearchTerms:function(e){e.preventDefault(),l(e.target).val()?l(e.target).closest("form").find("[type=submit]").addClass("bp-show").removeClass("bp-hide"):l(e.target).closest("form").submit()},setSearchTerms:function(e){e.preventDefault(),this.model.set({search_terms:l(e.target).find("input[type=search]").val()||"",page:1})},nextPage:function(e){e.preventDefault(),this.model.set("page",this.model.get("page")+1)},prevPage:function(e){e.preventDefault(),this.model.set("page",this.model.get("page")-1)}}),c.Views.userMessagesHeader=c.Nouveau.Messages.View.extend({tagName:"div",template:c.template("bp-messages-single-header"),events:{"click .actions a":"doAction","click .actions button":"doAction"},doAction:function(e){var s=l(e.currentTarget).data("bp-action"),t=this,a={},i=BP_Nouveau.messages.doingAction;if(!s)return e;e.preventDefault(),this.model.get("id")&&("star"!==s&&"unstar"!==s||(a.data={star_nonce:this.model.get("star_nonce")},l(e.currentTarget).addClass("bp-hide"),l(e.currentTarget).parent().find('[data-bp-action="'+{star:"unstar",unstar:"star"}[s]+'"]').removeClass("bp-hide")),_.isUndefined(i[s])||c.Nouveau.Messages.displayFeedback(i[s],"loading"),c.Nouveau.Messages.threads.doAction(s,this.model.get("id"),a).done(function(e){"delete"===s?c.Nouveau.Messages.clearViews():e.messages&&t.model.set(_.first(e.messages)),c.Nouveau.Messages.removeFeedback(),c.Nouveau.Messages.displayFeedback(e.feedback,e.type)}).fail(function(e){c.Nouveau.Messages.removeFeedback(),c.Nouveau.Messages.displayFeedback(e.feedback,e.type)}))}}),c.Views.userMessagesEntry=c.Views.userMessagesHeader.extend({tagName:"li",template:c.template("bp-messages-single-list"),events:{"click [data-bp-action]":"doAction"},initialize:function(){this.model.on("change:is_starred",this.updateMessage,this)},updateMessage:function(e){this.model.get("id")===e.get("id")&&this.render()}}),c.Views.userMessages=c.Nouveau.Messages.View.extend({tagName:"div",template:c.template("bp-messages-single"),initialize:function(){this.requestMessages(),this.reply=new c.Models.messageThread,this.collection.on("add",this.addMessage,this),this.views.add("#bp-message-content",new c.Views.messageEditor)},events:{"click #send_reply_button":"sendReply"},requestMessages:function(){var e={};this.collection.reset(),c.Nouveau.Messages.displayFeedback(BP_Nouveau.messages.loading,"loading"),_.isUndefined(this.options.thread.attributes)?e.id=this.options.thread.id:(e.id=this.options.thread.get("id"),e.js_thread=!_.isEmpty(this.options.thread.get("subject"))),this.collection.fetch({data:e,success:_.bind(this.messagesFetched,this),error:this.messagesFetchError})},messagesFetched:function(e,s){_.isUndefined(s.thread)||(this.options.thread=new Backbone.Model(s.thread)),c.Nouveau.Messages.removeFeedback(),this.views.add("#bp-message-thread-header",new c.Views.userMessagesHeader({model:this.options.thread}))},messagesFetchError:function(e,s){s.feedback&&s.type&&c.Nouveau.Messages.displayFeedback(s.feedback,s.type)},addMessage:function(e){this.views.add("#bp-message-thread-list",new c.Views.userMessagesEntry({model:e}))},addEditor:function(){this.views.add("#bp-message-content",new c.Views.messageEditor)},sendReply:function(e){e.preventDefault(),!0!==this.reply.get("sending")&&(this.reply.set({thread_id:this.options.thread.get("id"),content:tinyMCE.activeEditor.getContent(),sending:!0}),this.collection.sync("create",_.pick(this.reply.attributes,["thread_id","content"]),{success:_.bind(this.replySent,this),error:_.bind(this.replyError,this)}))},replySent:function(e){e=this.collection.parse(e);tinyMCE.activeEditor.setContent(""),this.reply.set("sending",!1),this.collection.add(_.first(e))},replyError:function(e){e.feedback&&e.type&&c.Nouveau.Messages.displayFeedback(e.feedback,e.type)}}),c.Nouveau.Messages.Router=Backbone.Router.extend({routes:{"compose/":"composeMessage","view/:id/":"viewMessage","sentbox/":"sentboxView","starred/":"starredView","inbox/":"inboxView","":"inboxView"},composeMessage:function(){c.Nouveau.Messages.composeView()},viewMessage:function(e){var s;e&&(void 0===(s=c.Nouveau.Messages.threads.get(e))&&((s={}).id=e),c.Nouveau.Messages.singleView(s))},sentboxView:function(){c.Nouveau.Messages.box="sentbox",c.Nouveau.Messages.threadsView()},starredView:function(){c.Nouveau.Messages.box="starred",c.Nouveau.Messages.threadsView()},inboxView:function(){c.Nouveau.Messages.box="inbox",c.Nouveau.Messages.threadsView()}}),c.Nouveau.Messages.start())}(window.bp,jQuery);
|
1 |
+
window.wp=window.wp||{},window.bp=window.bp||{},function(c,u){"undefined"!=typeof BP_Nouveau&&(_.extend(c,_.pick(wp,"Backbone","ajax","template")),c.Models=c.Models||{},c.Collections=c.Collections||{},c.Views=c.Views||{},c.Nouveau=c.Nouveau||{},c.Nouveau.Messages={start:function(){this.views=new Backbone.Collection,this.threads=new c.Collections.Threads,this.messages=new c.Collections.Messages,this.router=new c.Nouveau.Messages.Router,this.box="inbox",this.setupNav(),Backbone.history.start({pushState:!0,root:BP_Nouveau.messages.rootUrl})},setupNav:function(){var t=this;u("#compose-personal-li").addClass("last"),u("#subnav a").on("click",function(e){var s=u(e.target).prop("id");if(-1===_.indexOf(["inbox","starred","sentbox","compose"],s)||"unsupported"===t.box)return e;e.preventDefault(),t.removeTinyMCE(),"compose"===s?_.isUndefined(t.views.get("compose"))?t.router.navigate("compose/",{trigger:!0}):((e=t.views.get("compose")).get("view").remove(),t.views.remove({id:"compose",view:e}),"single"===t.box&&(t.box="inbox"),t.router.navigate(t.box+"/",{trigger:!0})):t.box===s&&_.isUndefined(t.views.get("compose"))||(t.clearViews(),t.router.navigate(s+"/",{trigger:!0}))})},removeTinyMCE:function(){"undefined"!=typeof tinymce&&null!==tinymce.get("message_content")&&tinymce.EditorManager.execCommand("mceRemoveEditor",!0,"message_content")},tinyMCEinit:function(){void 0===window.tinyMCE||null===window.tinyMCE.activeEditor||void 0===window.tinyMCE.activeEditor||_.isEmpty(c.mentions)||u(window.tinyMCE.activeEditor.contentDocument.activeElement).atwho("setIframe",u("#message_content_ifr")[0]).bp_mentions({data:[],suffix:" "})},removeFeedback:function(){var e;_.isUndefined(this.views.get("feedback"))||((e=this.views.get("feedback")).get("view").remove(),this.views.remove({id:"feedback",view:e}))},displayFeedback:function(e,s){this.removeFeedback(),e&&(s=new c.Views.Feedback({value:e,type:s||"info"}),this.views.add({id:"feedback",view:s}),s.inject(".bp-messages-feedback"))},clearViews:function(){_.isUndefined(this.views.models)||(_.each(this.views.models,function(e){e.get("view").remove()},this),this.views.reset())},composeView:function(){this.clearViews();var e=new c.Views.messageForm({model:new c.Models.Message});this.views.add({id:"compose",view:e}),e.inject(".bp-messages-content")},threadsView:function(){u("#subnav ul li").each(function(e,s){u(s).removeClass("current selected")}),u("#subnav a#"+this.box).closest("li").addClass("current selected");var e=new c.Views.userThreads({collection:this.threads,box:this.box});this.views.add({id:"threads",view:e}),e.inject(".bp-messages-content"),this.displayFilters(this.threads)},displayFilters:function(e){this.filters=new Backbone.Model({page:1,total_page:0,search_terms:"",box:this.box}),e=new c.Views.messageFilters({model:this.filters,threads:e}),this.views.add({id:"filters",view:e}),e.inject(".bp-messages-filters")},singleView:function(e){this.clearViews(),this.box="single";e=new c.Views.userMessages({collection:this.messages,thread:e});this.views.add({id:"single",view:e}),e.inject(".bp-messages-content")}},c.Models.Message=Backbone.Model.extend({defaults:{send_to:[],subject:"",message_content:"",meta:{}},sendMessage:function(){if(!0!==this.get("sending")){this.set("sending",!0,{silent:!0});var e=c.ajax.post("messages_send_message",_.extend({nonce:BP_Nouveau.messages.nonces.send},this.attributes));return this.set("sending",!1,{silent:!0}),e}}}),c.Models.Thread=Backbone.Model.extend({defaults:{id:0,message_id:0,subject:"",excerpt:"",content:"",unread:!0,sender_name:"",sender_link:"",sender_avatar:"",count:0,date:0,display_date:"",recipients:[]},updateReadState:function(e){return(e=e||{}).data=_.extend(_.pick(this.attributes,["id","message_id"]),{action:"messages_thread_read",nonce:BP_Nouveau.nonces.messages}),c.ajax.send(e)}}),c.Models.messageThread=Backbone.Model.extend({defaults:{id:0,content:"",sender_id:0,sender_name:"",sender_link:"",sender_avatar:"",date:0,display_date:""}}),c.Collections.Threads=Backbone.Collection.extend({model:c.Models.Thread,initialize:function(){this.options={page:1,total_page:0}},sync:function(e,s,t){if((t=t||{}).context=this,t.data=t.data||{},t.data.nonce=BP_Nouveau.nonces.messages,"read"===e)return t.data=_.extend(t.data,{action:"messages_get_user_message_threads"}),c.ajax.send(t)},parse:function(t){return _.isArray(t.threads)||(t.threads=[t.threads]),_.each(t.threads,function(e,s){_.isNull(e)||(t.threads[s].id=e.id,t.threads[s].message_id=e.message_id,t.threads[s].subject=e.subject,t.threads[s].excerpt=e.excerpt,t.threads[s].content=e.content,t.threads[s].unread=e.unread,t.threads[s].sender_name=e.sender_name,t.threads[s].sender_link=e.sender_link,t.threads[s].sender_avatar=e.sender_avatar,t.threads[s].count=e.count,t.threads[s].date=new Date(e.date),t.threads[s].display_date=e.display_date,t.threads[s].recipients=e.recipients,t.threads[s].star_link=e.star_link,t.threads[s].is_starred=e.is_starred)}),_.isUndefined(t.meta)||(this.options.page=t.meta.page,this.options.total_page=t.meta.total_page),c.Nouveau.Messages.box&&(this.options.box=c.Nouveau.Messages.box),_.isUndefined(t.extraContent)||_.extend(this.options,_.pick(t.extraContent,["beforeLoop","afterLoop"])),t.threads},doAction:function(e,s,t){return(t=t||{}).context=this,t.data=t.data||{},t.data=_.extend(t.data,{action:"messages_"+e,nonce:BP_Nouveau.nonces.messages,id:s}),c.ajax.send(t)}}),c.Collections.Messages=Backbone.Collection.extend({model:c.Models.messageThread,options:{},sync:function(e,s,t){return(t=t||{}).context=this,t.data=t.data||{},t.data.nonce=BP_Nouveau.nonces.messages,"read"===e?(t.data=_.extend(t.data,{action:"messages_get_thread_messages"}),c.ajax.send(t)):"create"===e?(t.data=_.extend(t.data,{action:"messages_send_reply",nonce:BP_Nouveau.messages.nonces.send},s||{}),c.ajax.send(t)):void 0},parse:function(t){return _.isArray(t.messages)||(t.messages=[t.messages]),_.each(t.messages,function(e,s){_.isNull(e)||(t.messages[s].id=e.id,t.messages[s].content=e.content,t.messages[s].sender_id=e.sender_id,t.messages[s].sender_name=e.sender_name,t.messages[s].sender_link=e.sender_link,t.messages[s].sender_avatar=e.sender_avatar,t.messages[s].date=new Date(e.date),t.messages[s].display_date=e.display_date,t.messages[s].star_link=e.star_link,t.messages[s].is_starred=e.is_starred)}),_.isUndefined(t.thread)||(this.options.thread_id=t.thread.id,this.options.thread_subject=t.thread.subject,this.options.recipients=t.thread.recipients),t.messages}}),c.Nouveau.Messages.View=c.Backbone.View.extend({inject:function(e){this.render(),u(e).html(this.el),this.views.ready()},prepare:function(){return!_.isUndefined(this.model)&&_.isFunction(this.model.toJSON)?this.model.toJSON():{}}}),c.Views.Feedback=c.Nouveau.Messages.View.extend({tagName:"div",className:"bp-messages bp-user-messages-feedback",template:c.template("bp-messages-feedback"),initialize:function(){this.model=new Backbone.Model({type:this.options.type||"info",message:this.options.value})}}),c.Views.Hook=c.Nouveau.Messages.View.extend({tagName:"div",template:c.template("bp-messages-hook"),initialize:function(){this.model=new Backbone.Model({extraContent:this.options.extraContent}),this.el.className="bp-messages-hook",this.options.className&&(this.el.className+=" "+this.options.className)}}),c.Views.messageEditor=c.Nouveau.Messages.View.extend({template:c.template("bp-messages-editor"),initialize:function(){this.on("ready",this.activateTinyMce,this)},activateTinyMce:function(){"undefined"!=typeof tinymce&&tinymce.EditorManager.execCommand("mceAddEditor",!0,"message_content")}}),c.Views.messageForm=c.Nouveau.Messages.View.extend({tagName:"form",id:"send_message_form",className:"standard-form",template:c.template("bp-messages-form"),events:{"click #bp-messages-send":"sendMessage","click #bp-messages-reset":"resetForm"},initialize:function(){this.resetModel=this.model.clone(),this.views.add("#bp-message-content",new c.Views.messageEditor),this.model.on("change",this.resetFields,this),this.on("ready",this.addMentions,this)},addMentions:function(){var e=u(this.el).find("#send-to-input"),s=c.Nouveau.getLinkParams(null,"r")||null;e.bp_mentions({data:[],suffix:" "}),_.isNull(s)||(e.val("@"+_.escape(s)+" "),e.focus())},resetFields:function(e){_.each(e.previousAttributes(),function(e,s){"message_content"===s?void 0!==tinyMCE.activeEditor&&null!==tinyMCE.activeEditor&&tinyMCE.activeEditor.setContent(""):"meta"!==s&&!1!==e&&u('input[name="'+s+'"]').val("")}),u(this.el).trigger("message:reset",_.pick(e.previousAttributes(),"meta"))},sendMessage:function(e){var t={},a=[],s=this;if(e.preventDefault(),c.Nouveau.Messages.removeFeedback(),_.each(this.$el.serializeArray(),function(e){var s;e.name=e.name.replace("[]",""),-1===_.indexOf(["send_to","subject","message_content"],e.name)?_.isUndefined(t[e.name])?t[e.name]=e.value:(_.isArray(t[e.name])||(t[e.name]=[t[e.name]]),t[e.name].push(e.value)):"send_to"===e.name?(s=e.value.match(/(^|[^@\w\-])@([a-zA-Z0-9_\-]{1,50})\b/g))?((s=s.map(function(e){return e=e.trim()}))&&_.isArray(s)||a.push("send_to"),this.model.set("send_to",s,{silent:!0})):a.push("send_to"):("message_content"===e.name&&void 0!==tinyMCE.activeEditor&&(e.value=tinyMCE.activeEditor.getContent()),e.value?this.model.set(e.name,e.value,{silent:!0}):a.push(e.name))},this),a.length){var i="";return _.each(a,function(e){i+=BP_Nouveau.messages.errors[e]+"<br/>"}),void c.Nouveau.Messages.displayFeedback(i,"error")}this.model.set("meta",t,{silent:!0}),this.model.sendMessage().done(function(e){s.model.set(s.resetModel),c.Nouveau.Messages.displayFeedback(e.feedback,e.type),c.Nouveau.Messages.removeTinyMCE();e=c.Nouveau.Messages.views.get("compose");e.get("view").remove(),c.Nouveau.Messages.views.remove({id:"compose",view:e}),c.Nouveau.Messages.router.navigate("sentbox/",{trigger:!0})}).fail(function(e){e.feedback&&c.Nouveau.Messages.displayFeedback(e.feedback,e.type)})},resetForm:function(e){e.preventDefault(),this.model.set(this.resetModel)}}),c.Views.userThreads=c.Nouveau.Messages.View.extend({tagName:"div",events:{"click .subject":"changePreview"},initialize:function(){var e=[new c.Nouveau.Messages.View({tagName:"ul",id:"message-threads",className:"message-lists"}),new c.Views.previewThread({collection:this.collection})];_.each(e,function(e){this.views.add(e)},this),this.requestThreads(),this.collection.on("reset",this.cleanContent,this),this.collection.on("add",this.addThread,this)},requestThreads:function(){this.collection.reset(),c.Nouveau.Messages.displayFeedback(BP_Nouveau.messages.loading,"loading"),this.collection.fetch({data:_.pick(this.options,"box"),success:_.bind(this.threadsFetched,this),error:this.threadsFetchError})},threadsFetched:function(){c.Nouveau.Messages.removeFeedback(),this.collection.options.afterLoop&&this.views.add(new c.Views.Hook({extraContent:this.collection.options.afterLoop,className:"after-messages-loop"}),{at:1}),this.collection.options.beforeLoop&&this.views.add(new c.Views.Hook({extraContent:this.collection.options.beforeLoop,className:"before-messages-loop"}),{at:0}),c.Nouveau.Messages.displayFeedback(BP_Nouveau.messages.howto,"info")},threadsFetchError:function(e,s){c.Nouveau.Messages.displayFeedback(s.feedback,s.type)},cleanContent:function(){_.each(this.views._views["#message-threads"],function(e){e.remove()})},addThread:function(e){var s=this.collection.findWhere({active:!0});_.isUndefined(s)&&e.set("active",!0),this.views.add("#message-threads",new c.Views.userThread({model:e}))},setActiveThread:function(s){s&&_.each(this.collection.models,function(e){e.id===s?e.set("active",!0):e.unset("active")},this)},changePreview:function(e){var s=u(e.currentTarget);e.preventDefault(),c.Nouveau.Messages.removeFeedback(),s.closest(".thread-item").hasClass("selected")?c.Nouveau.Messages.router.navigate("view/"+s.closest(".thread-content").data("thread-id")+"/",{trigger:!0}):(this.setActiveThread(s.closest(".thread-content").data("thread-id")),u(".message-action-view").focus())}}),c.Views.userThread=c.Nouveau.Messages.View.extend({tagName:"li",template:c.template("bp-messages-thread"),className:"thread-item",events:{"click .message-check":"singleSelect"},initialize:function(){var e,s;this.model.get("active")&&(this.el.className+=" selected"),this.model.get("unread")&&(this.el.className+=" unread"),"sentbox"===c.Nouveau.Messages.box?(s="",2===(e=this.model.get("recipients").length)?s=BP_Nouveau.messages.toOthers.one:2<e&&(s=BP_Nouveau.messages.toOthers.more.replace("%d",Number(e-1))),this.model.set({recipientsCount:e,toOthers:s},{silent:!0})):this.model.get("recipientsCount")&&this.model.unset("recipientsCount",{silent:!0}),this.model.on("change:active",this.toggleClass,this),this.model.on("change:unread",this.updateReadState,this),this.model.on("change:checked",this.bulkSelect,this),this.model.on("remove",this.cleanView,this)},toggleClass:function(e){!0===e.get("active")?u(this.el).addClass("selected"):u(this.el).removeClass("selected")},updateReadState:function(e,s){!1===s?u(this.el).removeClass("unread"):u(this.el).addClass("unread")},bulkSelect:function(e){u("#bp-message-thread-"+e.get("id")).length&&u("#bp-message-thread-"+e.get("id")).prop("checked",e.get("checked"))},singleSelect:function(e){e=u(e.currentTarget).prop("checked");this.model.set("checked",e,{silent:!0});var s=!1;_.each(this.model.collection.models,function(e){!0===e.get("checked")&&(s=!0)}),s?(u("#user-messages-bulk-actions").closest(".bulk-actions-wrap").removeClass("bp-hide"),c.Nouveau.Messages.displayFeedback(BP_Nouveau.messages.howtoBulk,"info")):(u("#user-messages-bulk-actions").closest(".bulk-actions-wrap").addClass("bp-hide"),c.Nouveau.Messages.removeFeedback())},cleanView:function(){this.views.view.remove()}}),c.Views.previewThread=c.Nouveau.Messages.View.extend({tagName:"div",id:"thread-preview",template:c.template("bp-messages-preview"),events:{"click .actions button":"doAction","click .actions a":"doAction"},initialize:function(){this.collection.on("change:active",this.setPreview,this),this.collection.on("change:is_starred",this.updatePreview,this),this.collection.on("reset",this.emptyPreview,this),this.collection.on("remove",this.emptyPreview,this)},render:function(){_.isUndefined(this.model)||!0!==this.model.get("active")||c.Nouveau.Messages.View.prototype.render.apply(this,arguments)},setPreview:function(e){var s=this;!0===(this.model=e).get("unread")&&this.model.updateReadState().done(function(){s.model.set("unread",!1)}),this.render()},updatePreview:function(e){!0===e.get("active")&&this.render()},emptyPreview:function(){u(this.el).html("")},doAction:function(e){var s=u(e.currentTarget).data("bp-action"),t=this,a={},i=BP_Nouveau.messages.doingAction;if(!s)return e;e.preventDefault();var n=this.collection.findWhere({active:!0});n.get("id")&&(e=n.get("id"),"view"!==s?("star"!==s&&"unstar"!==s||(a.data={star_nonce:n.get("star_nonce")},e=n.get("starred_id")),_.isUndefined(i[s])||c.Nouveau.Messages.displayFeedback(i[s],"loading"),this.collection.doAction(s,e,a).done(function(e){c.Nouveau.Messages.removeFeedback(),c.Nouveau.Messages.displayFeedback(e.feedback,e.type),"delete"===s||"starred"===t.collection.options.box&&"unstar"===s?(t.collection.remove(n.get("id")),t.collection.fetch({data:_.pick(t.collection.options,["box","search_terms","page"])})):"unstar"===s||"star"===s?(_.each(e.messages,function(e){n.set(e)}),n.set(_.first(e.messages))):e.messages&&n.set(_.first(e.messages))}).fail(function(e){c.Nouveau.Messages.removeFeedback(),c.Nouveau.Messages.displayFeedback(e.feedback,e.type)})):c.Nouveau.Messages.router.navigate("view/"+e+"/",{trigger:!0}))}}),c.Views.Pagination=c.Nouveau.Messages.View.extend({tagName:"li",className:"last filter",template:c.template("bp-messages-paginate")}),c.Views.BulkActions=c.Nouveau.Messages.View.extend({tagName:"div",template:c.template("bp-bulk-actions"),events:{"click #user_messages_select_all":"bulkSelect","click .bulk-apply":"doBulkAction"},bulkSelect:function(e){var s=u(e.currentTarget).prop("checked");s?(u(this.el).find(".bulk-actions-wrap").removeClass("bp-hide").addClass("bp-show"),c.Nouveau.Messages.displayFeedback(BP_Nouveau.messages.howtoBulk,"info")):(u(this.el).find(".bulk-actions-wrap").addClass("bp-hide"),c.Nouveau.Messages.removeFeedback()),_.each(this.collection.models,function(e){e.set("checked",s)})},doBulkAction:function(e){var t=this,s={},a="id",i=BP_Nouveau.messages.doingAction;e.preventDefault();var n,o,d,r=u("#user-messages-bulk-actions").val();r&&(n=this.collection.where({checked:!0}),e=o=_.map(n,function(e){return e.get("id")}),"star"!==r&&"unstar"!==r||(1===(e=_.map(n,function(e){return e.get("starred_id")})).length&&(s.data={star_nonce:n[0].get("star_nonce")}),a="starred_id"),d=_.object(_.map(n,function(e){return[e.get(a),e.get("id")]})),_.isUndefined(i[r])||c.Nouveau.Messages.displayFeedback(i[r],"loading"),this.collection.doAction(r,e,s).done(function(e){c.Nouveau.Messages.removeFeedback(),c.Nouveau.Messages.displayFeedback(e.feedback,e.type),"delete"===r||"starred"===t.collection.options.box&&"unstar"===r?(t.collection.remove(o),t.collection.fetch({data:_.pick(t.collection.options,["box","search_terms","page"])})):e.messages&&_.each(e.messages,function(e,s){t.collection.get(d[s]).set(e)})}).fail(function(e){c.Nouveau.Messages.removeFeedback(),c.Nouveau.Messages.displayFeedback(e.feedback,e.type)}))}}),c.Views.messageFilters=c.Nouveau.Messages.View.extend({tagName:"ul",template:c.template("bp-messages-filters"),events:{"search #user_messages_search":"resetSearchTerms","submit #user_messages_search_form":"setSearchTerms","click #bp-messages-next-page":"nextPage","click #bp-messages-prev-page":"prevPage"},initialize:function(){this.model.on("change",this.filterThreads,this),this.options.threads.on("sync",this.addPaginatation,this)},addPaginatation:function(e){_.each(this.views._views,function(e){_.isUndefined(e)||_.first(e).remove()}),this.views.add(new c.Views.Pagination({model:new Backbone.Model(e.options)})),this.views.add(".user-messages-bulk-actions",new c.Views.BulkActions({model:new Backbone.Model(BP_Nouveau.messages.bulk_actions),collection:e}))},filterThreads:function(){c.Nouveau.Messages.displayFeedback(BP_Nouveau.messages.loading,"loading"),this.options.threads.reset(),_.extend(this.options.threads.options,_.pick(this.model.attributes,["box","search_terms"])),this.options.threads.fetch({data:_.pick(this.model.attributes,["box","search_terms","page"]),success:this.threadsFiltered,error:this.threadsFilterError})},threadsFiltered:function(){c.Nouveau.Messages.removeFeedback()},threadsFilterError:function(e,s){c.Nouveau.Messages.displayFeedback(s.feedback,s.type)},resetSearchTerms:function(e){e.preventDefault(),u(e.target).val()?u(e.target).closest("form").find("[type=submit]").addClass("bp-show").removeClass("bp-hide"):u(e.target).closest("form").submit()},setSearchTerms:function(e){e.preventDefault(),this.model.set({search_terms:u(e.target).find("input[type=search]").val()||"",page:1})},nextPage:function(e){e.preventDefault(),this.model.set("page",this.model.get("page")+1)},prevPage:function(e){e.preventDefault(),this.model.set("page",this.model.get("page")-1)}}),c.Views.userMessagesHeader=c.Nouveau.Messages.View.extend({tagName:"div",template:c.template("bp-messages-single-header"),events:{"click .actions a":"doAction","click .actions button":"doAction"},doAction:function(e){var s=u(e.currentTarget).data("bp-action"),t=this,a={},i=BP_Nouveau.messages.doingAction;if(!s)return e;e.preventDefault(),this.model.get("id")&&("star"!==s&&"unstar"!==s||(a.data={star_nonce:this.model.get("star_nonce")},u(e.currentTarget).addClass("bp-hide"),u(e.currentTarget).parent().find('[data-bp-action="'+{star:"unstar",unstar:"star"}[s]+'"]').removeClass("bp-hide")),_.isUndefined(i[s])||c.Nouveau.Messages.displayFeedback(i[s],"loading"),c.Nouveau.Messages.threads.doAction(s,this.model.get("id"),a).done(function(e){"delete"===s?c.Nouveau.Messages.clearViews():e.messages&&t.model.set(_.first(e.messages)),c.Nouveau.Messages.removeFeedback(),c.Nouveau.Messages.displayFeedback(e.feedback,e.type)}).fail(function(e){c.Nouveau.Messages.removeFeedback(),c.Nouveau.Messages.displayFeedback(e.feedback,e.type)}))}}),c.Views.userMessagesEntry=c.Views.userMessagesHeader.extend({tagName:"li",template:c.template("bp-messages-single-list"),events:{"click [data-bp-action]":"doAction"},initialize:function(){this.model.on("change:is_starred",this.updateMessage,this)},updateMessage:function(e){this.model.get("id")===e.get("id")&&this.render()}}),c.Views.userMessages=c.Nouveau.Messages.View.extend({tagName:"div",template:c.template("bp-messages-single"),initialize:function(){this.requestMessages(),this.reply=new c.Models.messageThread,this.collection.on("add",this.addMessage,this),this.views.add("#bp-message-content",new c.Views.messageEditor)},events:{"click #send_reply_button":"sendReply"},requestMessages:function(){var e={};this.collection.reset(),c.Nouveau.Messages.displayFeedback(BP_Nouveau.messages.loading,"loading"),_.isUndefined(this.options.thread.attributes)?e.id=this.options.thread.id:(e.id=this.options.thread.get("id"),e.js_thread=!_.isEmpty(this.options.thread.get("subject"))),this.collection.fetch({data:e,success:_.bind(this.messagesFetched,this),error:this.messagesFetchError})},messagesFetched:function(e,s){_.isUndefined(s.thread)||(this.options.thread=new Backbone.Model(s.thread)),c.Nouveau.Messages.removeFeedback(),this.views.add("#bp-message-thread-header",new c.Views.userMessagesHeader({model:this.options.thread}))},messagesFetchError:function(e,s){s.feedback&&s.type&&c.Nouveau.Messages.displayFeedback(s.feedback,s.type)},addMessage:function(e){this.views.add("#bp-message-thread-list",new c.Views.userMessagesEntry({model:e}))},addEditor:function(){this.views.add("#bp-message-content",new c.Views.messageEditor)},sendReply:function(e){e.preventDefault(),!0!==this.reply.get("sending")&&(this.reply.set({thread_id:this.options.thread.get("id"),content:tinyMCE.activeEditor.getContent(),sending:!0}),this.collection.sync("create",_.pick(this.reply.attributes,["thread_id","content"]),{success:_.bind(this.replySent,this),error:_.bind(this.replyError,this)}))},replySent:function(e){e=this.collection.parse(e);tinyMCE.activeEditor.setContent(""),this.reply.set("sending",!1),this.collection.add(_.first(e))},replyError:function(e){e.feedback&&e.type&&c.Nouveau.Messages.displayFeedback(e.feedback,e.type)}}),c.Nouveau.Messages.Router=Backbone.Router.extend({routes:{"compose/":"composeMessage","view/:id/":"viewMessage","sentbox/":"sentboxView","starred/":"starredView","inbox/":"inboxView","":"inboxView","*unSupported":"unSupported"},composeMessage:function(){c.Nouveau.Messages.composeView()},viewMessage:function(e){var s;e&&(void 0===(s=c.Nouveau.Messages.threads.get(e))&&((s={}).id=e),c.Nouveau.Messages.singleView(s))},sentboxView:function(){c.Nouveau.Messages.box="sentbox",c.Nouveau.Messages.threadsView()},starredView:function(){c.Nouveau.Messages.box="starred",c.Nouveau.Messages.threadsView()},unSupported:function(){c.Nouveau.Messages.box="unsupported"},inboxView:function(){c.Nouveau.Messages.box="inbox",c.Nouveau.Messages.threadsView()}}),c.Nouveau.Messages.start())}(window.bp,jQuery);
|
@@ -9,7 +9,7 @@ msgstr ""
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2021-
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
"X-Domain: buddypress\n"
|
@@ -752,14 +752,14 @@ msgstr ""
|
|
752 |
#: bp-friends/bp-friends-functions.php:962
|
753 |
#: bp-friends/bp-friends-notifications.php:256
|
754 |
#: bp-groups/bp-groups-notifications.php:1143
|
755 |
-
#: bp-members/bp-members-filters.php:
|
756 |
#: bp-members/bp-members-notifications.php:198
|
757 |
#: bp-members/classes/class-bp-members-invitations-list-table.php:457
|
758 |
#: bp-members/classes/class-bp-members-invitations-list-table.php:472
|
759 |
#: bp-messages/bp-messages-notifications.php:267
|
760 |
#: bp-settings/bp-settings-functions.php:135
|
761 |
#: bp-templates/bp-legacy/buddypress/members/register.php:319
|
762 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
763 |
#: bp-xprofile/classes/class-bp-xprofile-field-type-checkbox-acceptance.php:367
|
764 |
msgid "Yes"
|
765 |
msgstr ""
|
@@ -770,14 +770,14 @@ msgstr ""
|
|
770 |
#: bp-friends/bp-friends-functions.php:962
|
771 |
#: bp-friends/bp-friends-notifications.php:257
|
772 |
#: bp-groups/bp-groups-notifications.php:1144
|
773 |
-
#: bp-members/bp-members-filters.php:
|
774 |
#: bp-members/bp-members-notifications.php:199
|
775 |
#: bp-members/classes/class-bp-members-invitations-list-table.php:459
|
776 |
#: bp-members/classes/class-bp-members-invitations-list-table.php:474
|
777 |
#: bp-messages/bp-messages-notifications.php:268
|
778 |
#: bp-settings/bp-settings-functions.php:136
|
779 |
#: bp-templates/bp-legacy/buddypress/members/register.php:320
|
780 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
781 |
#: bp-xprofile/classes/class-bp-xprofile-field-type-checkbox-acceptance.php:357
|
782 |
msgid "No"
|
783 |
msgstr ""
|
@@ -857,7 +857,7 @@ msgstr ""
|
|
857 |
#: bp-members/bp-members-template.php:827
|
858 |
#: bp-members/bp-members-template.php:1584
|
859 |
#: bp-members/bp-members-template.php:1639
|
860 |
-
#: bp-members/classes/class-bp-members-component.php:
|
861 |
#: bp-messages/bp-messages-template.php:727
|
862 |
#: bp-messages/classes/class-bp-messages-component.php:410
|
863 |
#: bp-notifications/classes/class-bp-notifications-component.php:294
|
@@ -916,7 +916,6 @@ msgstr ""
|
|
916 |
#: bp-activity/bp-activity-template.php:2772
|
917 |
#: bp-core/admin/bp-core-admin-functions.php:1185
|
918 |
#: bp-core/admin/bp-core-admin-slugs.php:150
|
919 |
-
#: bp-core/admin/bp-core-admin-slugs.php:233
|
920 |
#: bp-groups/classes/class-bp-groups-list-table.php:611
|
921 |
#: bp-members/bp-members-template.php:1073
|
922 |
#: bp-templates/bp-legacy/buddypress-functions.php:317
|
@@ -1222,7 +1221,7 @@ msgstr ""
|
|
1222 |
#: bp-activity/classes/class-bp-rest-activity-endpoint.php:71
|
1223 |
#: bp-activity/classes/class-bp-rest-activity-endpoint.php:109
|
1224 |
#: bp-activity/classes/class-bp-rest-activity-endpoint.php:1273
|
1225 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
1226 |
msgid "A unique numeric ID for the activity."
|
1227 |
msgstr ""
|
1228 |
|
@@ -1311,12 +1310,12 @@ msgid "Allowed HTML content for the activity."
|
|
1311 |
msgstr ""
|
1312 |
|
1313 |
#: bp-activity/classes/class-bp-rest-activity-endpoint.php:1336
|
1314 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
1315 |
msgid "Content for the activity, as it exists in the database."
|
1316 |
msgstr ""
|
1317 |
|
1318 |
#: bp-activity/classes/class-bp-rest-activity-endpoint.php:1341
|
1319 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
1320 |
msgid "HTML content for the activity, transformed for display."
|
1321 |
msgstr ""
|
1322 |
|
@@ -1348,7 +1347,7 @@ msgstr ""
|
|
1348 |
#: bp-activity/classes/class-bp-rest-activity-endpoint.php:1396
|
1349 |
#: bp-blogs/classes/class-bp-rest-blogs-endpoint.php:686
|
1350 |
#: bp-groups/classes/class-bp-rest-groups-endpoint.php:1271
|
1351 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
1352 |
msgid "Avatar URL with full image size (%1$d x %2$d pixels)."
|
1353 |
msgstr ""
|
1354 |
|
@@ -1356,7 +1355,7 @@ msgstr ""
|
|
1356 |
#: bp-activity/classes/class-bp-rest-activity-endpoint.php:1404
|
1357 |
#: bp-blogs/classes/class-bp-rest-blogs-endpoint.php:694
|
1358 |
#: bp-groups/classes/class-bp-rest-groups-endpoint.php:1279
|
1359 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
1360 |
msgid "Avatar URL with thumb image size (%1$d x %2$d pixels)."
|
1361 |
msgstr ""
|
1362 |
|
@@ -1365,13 +1364,13 @@ msgid "Avatar URLs for the author of the activity."
|
|
1365 |
msgstr ""
|
1366 |
|
1367 |
#: bp-activity/classes/class-bp-rest-activity-endpoint.php:1442
|
1368 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
1369 |
msgid "Ensure result set excludes specific IDs."
|
1370 |
msgstr ""
|
1371 |
|
1372 |
#: bp-activity/classes/class-bp-rest-activity-endpoint.php:1451
|
1373 |
#: bp-blogs/classes/class-bp-rest-blogs-endpoint.php:743
|
1374 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
1375 |
#: bp-members/classes/class-bp-rest-signup-endpoint.php:1017
|
1376 |
msgid "Ensure result set includes specific IDs."
|
1377 |
msgstr ""
|
@@ -1743,8 +1742,8 @@ msgstr ""
|
|
1743 |
#: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:663
|
1744 |
#: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:254
|
1745 |
#: bp-members/classes/class-bp-rest-attachments-member-cover-endpoint.php:333
|
1746 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
1747 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
1748 |
#: bp-messages/classes/class-bp-rest-messages-endpoint.php:185
|
1749 |
#: bp-messages/classes/class-bp-rest-messages-endpoint.php:375
|
1750 |
msgid "Sorry, you are not allowed to perform this action."
|
@@ -2395,7 +2394,7 @@ msgid "Associate a WordPress Page with each BuddyPress component directory."
|
|
2395 |
msgstr ""
|
2396 |
|
2397 |
#: bp-core/admin/bp-core-admin-slugs.php:143
|
2398 |
-
#: bp-core/admin/bp-core-admin-slugs.php:
|
2399 |
msgid "- None -"
|
2400 |
msgstr ""
|
2401 |
|
@@ -2408,18 +2407,34 @@ msgstr ""
|
|
2408 |
msgid "Registration"
|
2409 |
msgstr ""
|
2410 |
|
2411 |
-
#: bp-core/admin/bp-core-admin-slugs.php:
|
2412 |
msgid "Associate WordPress Pages with the following BuddyPress Registration pages."
|
2413 |
msgstr ""
|
2414 |
|
|
|
|
|
|
|
|
|
2415 |
#. translators: %s: the link to the Network settings page
|
2416 |
-
#: bp-core/admin/bp-core-admin-slugs.php:
|
2417 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2418 |
msgstr ""
|
2419 |
|
2420 |
-
#. translators: %s: the link to the Site
|
2421 |
-
#: bp-core/admin/bp-core-admin-slugs.php:
|
2422 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2423 |
msgstr ""
|
2424 |
|
2425 |
#: bp-core/admin/bp-core-admin-tools.php:22
|
@@ -2595,7 +2610,7 @@ msgstr ""
|
|
2595 |
#: bp-core/classes/class-bp-admin.php:416
|
2596 |
#: bp-groups/classes/class-bp-groups-component.php:573
|
2597 |
#: bp-members/bp-members-adminbar.php:204
|
2598 |
-
#: bp-members/bp-members-invitations.php:
|
2599 |
#: bp-templates/bp-legacy/buddypress/members/single/invitations/list-invites.php:16
|
2600 |
#: bp-templates/bp-nouveau/buddypress/members/single/invitations/list-invites.php:15
|
2601 |
msgid "Invitations"
|
@@ -4850,7 +4865,7 @@ msgstr ""
|
|
4850 |
#: bp-members/classes/class-bp-members-list-table.php:150
|
4851 |
#: bp-members/classes/class-bp-members-ms-list-table.php:137
|
4852 |
#: bp-templates/bp-legacy/buddypress/members/register.php:85
|
4853 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
4854 |
msgid "Username"
|
4855 |
msgstr ""
|
4856 |
|
@@ -4868,7 +4883,7 @@ msgstr ""
|
|
4868 |
#: bp-members/classes/class-bp-core-recently-active-widget.php:151
|
4869 |
#: bp-members/classes/class-bp-core-whos-online-widget.php:150
|
4870 |
#: bp-messages/classes/class-bp-messages-sitewide-notices-widget.php:116
|
4871 |
-
#: bp-templates/bp-nouveau/includes/activity/widgets.php:
|
4872 |
msgid "Title:"
|
4873 |
msgstr ""
|
4874 |
|
@@ -6119,10 +6134,10 @@ msgstr ""
|
|
6119 |
#: bp-templates/bp-legacy/buddypress/members/single/profile/edit.php:113
|
6120 |
#: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:47
|
6121 |
#: bp-templates/bp-legacy/buddypress/members/single/settings/notifications.php:40
|
6122 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
6123 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
6124 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
6125 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
6126 |
#: bp-templates/bp-nouveau/includes/groups/template-tags.php:358
|
6127 |
msgid "Save Changes"
|
6128 |
msgstr ""
|
@@ -7286,8 +7301,8 @@ msgstr ""
|
|
7286 |
#: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:438
|
7287 |
#: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:165
|
7288 |
#: bp-members/classes/class-bp-rest-attachments-member-cover-endpoint.php:155
|
7289 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
7290 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
7291 |
#: bp-messages/classes/class-bp-rest-messages-endpoint.php:197
|
7292 |
#: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:160
|
7293 |
#: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:290
|
@@ -7736,7 +7751,7 @@ msgid "Avatar URLs for the group."
|
|
7736 |
msgstr ""
|
7737 |
|
7738 |
#: bp-groups/classes/class-bp-rest-groups-endpoint.php:1318
|
7739 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
7740 |
msgid "Shorthand for certain orderby/order combinations."
|
7741 |
msgstr ""
|
7742 |
|
@@ -8065,19 +8080,19 @@ msgstr ""
|
|
8065 |
#: bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php:44
|
8066 |
#: bp-templates/bp-nouveau/buddypress/members/single/settings/data.php:66
|
8067 |
#: bp-templates/bp-nouveau/buddypress/members/single/settings/delete-account.php:12
|
8068 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
8069 |
msgid "Delete Account"
|
8070 |
msgstr ""
|
8071 |
|
8072 |
#: bp-members/bp-members-adminbar.php:217
|
8073 |
-
#: bp-members/bp-members-invitations.php:
|
8074 |
#: bp-templates/bp-legacy/buddypress/groups/single/send-invites.php:31
|
8075 |
#: bp-templates/bp-nouveau/includes/groups/functions.php:136
|
8076 |
msgid "Send Invites"
|
8077 |
msgstr ""
|
8078 |
|
8079 |
#: bp-members/bp-members-adminbar.php:230
|
8080 |
-
#: bp-members/bp-members-invitations.php:
|
8081 |
#: bp-templates/bp-nouveau/includes/groups/functions.php:130
|
8082 |
msgid "Pending Invites"
|
8083 |
msgstr ""
|
@@ -8089,40 +8104,40 @@ msgid "View Profile"
|
|
8089 |
msgstr ""
|
8090 |
|
8091 |
#. translators: %s: The log in link `<a href="login_url">log in</a>`
|
8092 |
-
#: bp-members/bp-members-filters.php:
|
8093 |
msgid "Welcome! You are already a member of this site. Please %s to continue."
|
8094 |
msgstr ""
|
8095 |
|
8096 |
-
#: bp-members/bp-members-filters.php:
|
8097 |
-
#: bp-members/bp-members-filters.php:
|
8098 |
msgid "log in"
|
8099 |
msgstr ""
|
8100 |
|
8101 |
#. translators: %s: The comma separated list of inviters display names
|
8102 |
-
#: bp-members/bp-members-filters.php:
|
8103 |
msgid "Welcome! You’ve been invited to join the site by the following user: %s."
|
8104 |
msgid_plural "Welcome! You’ve been invited to join the site by the following users: %s."
|
8105 |
msgstr[0] ""
|
8106 |
msgstr[1] ""
|
8107 |
|
8108 |
-
#: bp-members/bp-members-filters.php:
|
8109 |
msgid "Welcome! You’ve been invited to join the site. "
|
8110 |
msgstr ""
|
8111 |
|
8112 |
-
#: bp-members/bp-members-filters.php:
|
8113 |
msgid "Member registration is allowed by invitation only."
|
8114 |
msgstr ""
|
8115 |
|
8116 |
-
#: bp-members/bp-members-filters.php:
|
8117 |
msgid "It looks like there is a problem with your invitation. Please try again."
|
8118 |
msgstr ""
|
8119 |
|
8120 |
#. translators: 1: The log in link `<a href="login_url">log in</a>`. 2: The lost password link `<a href="lost_password_url">log in</a>`
|
8121 |
-
#: bp-members/bp-members-filters.php:
|
8122 |
msgid "Welcome! You are already a member of this site. Please %1$s to continue. If you have forgotten your password, you can %2$s."
|
8123 |
msgstr ""
|
8124 |
|
8125 |
-
#: bp-members/bp-members-filters.php:
|
8126 |
msgid "reset it"
|
8127 |
msgstr ""
|
8128 |
|
@@ -8369,7 +8384,7 @@ msgstr ""
|
|
8369 |
msgid "You may not register a member type with this name."
|
8370 |
msgstr ""
|
8371 |
|
8372 |
-
#: bp-members/bp-members-invitations.php:
|
8373 |
#: bp-members/screens/activate.php:106
|
8374 |
msgid "Your account is now active!"
|
8375 |
msgstr ""
|
@@ -8935,7 +8950,7 @@ msgstr ""
|
|
8935 |
#: bp-members/classes/class-bp-members-ms-list-table.php:310
|
8936 |
#: bp-settings/classes/class-bp-settings-component.php:164
|
8937 |
#: bp-settings/classes/class-bp-settings-component.php:261
|
8938 |
-
#: bp-templates/bp-nouveau/buddypress/members/single/invitations/send-invites.php:
|
8939 |
msgid "Email"
|
8940 |
msgstr ""
|
8941 |
|
@@ -9088,59 +9103,59 @@ msgstr[1] ""
|
|
9088 |
msgid "Not yet notified"
|
9089 |
msgstr ""
|
9090 |
|
9091 |
-
#: bp-members/classes/class-bp-members-component.php:
|
9092 |
msgid "Search Members..."
|
9093 |
msgstr ""
|
9094 |
|
9095 |
-
#: bp-members/classes/class-bp-members-component.php:
|
9096 |
msgctxt "Profile header sub menu"
|
9097 |
msgid "Change Profile Photo"
|
9098 |
msgstr ""
|
9099 |
|
9100 |
-
#: bp-members/classes/class-bp-members-component.php:
|
9101 |
msgctxt "Profile header sub menu"
|
9102 |
msgid "Change Cover Image"
|
9103 |
msgstr ""
|
9104 |
|
9105 |
-
#: bp-members/classes/class-bp-members-component.php:
|
9106 |
msgctxt "Member profile main navigation"
|
9107 |
msgid "Profile"
|
9108 |
msgstr ""
|
9109 |
|
9110 |
-
#: bp-members/classes/class-bp-members-component.php:
|
9111 |
msgctxt "Member profile view"
|
9112 |
msgid "View"
|
9113 |
msgstr ""
|
9114 |
|
9115 |
-
#: bp-members/classes/class-bp-members-component.php:
|
9116 |
#: bp-templates/bp-nouveau/includes/members/functions.php:516
|
9117 |
msgctxt "Member Home page"
|
9118 |
msgid "Home"
|
9119 |
msgstr ""
|
9120 |
|
9121 |
-
#: bp-members/classes/class-bp-members-component.php:
|
9122 |
msgctxt "My Account Profile sub nav"
|
9123 |
msgid "Change Profile Photo"
|
9124 |
msgstr ""
|
9125 |
|
9126 |
-
#: bp-members/classes/class-bp-members-component.php:
|
9127 |
msgctxt "My Account Profile sub nav"
|
9128 |
msgid "Change Cover Image"
|
9129 |
msgstr ""
|
9130 |
|
9131 |
-
#: bp-members/classes/class-bp-members-component.php:
|
9132 |
#: bp-xprofile/classes/class-bp-xprofile-component.php:338
|
9133 |
msgctxt "My Account Profile"
|
9134 |
msgid "Profile"
|
9135 |
msgstr ""
|
9136 |
|
9137 |
-
#: bp-members/classes/class-bp-members-component.php:
|
9138 |
#: bp-xprofile/classes/class-bp-xprofile-component.php:346
|
9139 |
msgctxt "My Account Profile sub nav"
|
9140 |
msgid "View"
|
9141 |
msgstr ""
|
9142 |
|
9143 |
-
#: bp-members/classes/class-bp-members-component.php:
|
9144 |
msgid "You"
|
9145 |
msgstr ""
|
9146 |
|
@@ -9218,7 +9233,7 @@ msgid "Select invitation: %s"
|
|
9218 |
msgstr ""
|
9219 |
|
9220 |
#: bp-members/classes/class-bp-members-invitations-list-table.php:354
|
9221 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
9222 |
msgid "Send"
|
9223 |
msgstr ""
|
9224 |
|
@@ -9285,7 +9300,7 @@ msgid "Account Activated"
|
|
9285 |
msgstr ""
|
9286 |
|
9287 |
#: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:70
|
9288 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9289 |
msgid "A unique numeric ID for the Member."
|
9290 |
msgstr ""
|
9291 |
|
@@ -9341,125 +9356,125 @@ msgstr ""
|
|
9341 |
msgid "Reassign the deleted member's posts and links to this user ID."
|
9342 |
msgstr ""
|
9343 |
|
9344 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9345 |
msgid "Sorry, you are not allowed to view members with the edit context."
|
9346 |
msgstr ""
|
9347 |
|
9348 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9349 |
msgid "Sorry, you are not allowed to view members."
|
9350 |
msgstr ""
|
9351 |
|
9352 |
#. translators: %s: transport method name
|
9353 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9354 |
msgid "'%s' Transport Method not implemented."
|
9355 |
msgstr ""
|
9356 |
|
9357 |
#. translators: %s: transport method name
|
9358 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9359 |
msgid "'%s' Transport method not implemented."
|
9360 |
msgstr ""
|
9361 |
|
9362 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9363 |
msgid "No extended profile data available as the component is inactive"
|
9364 |
msgstr ""
|
9365 |
|
9366 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9367 |
msgid "The data for the user was not found."
|
9368 |
msgstr ""
|
9369 |
|
9370 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9371 |
msgid "Assign a member type to a member, use a comma separated list of member types to assign more than one."
|
9372 |
msgstr ""
|
9373 |
|
9374 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9375 |
msgid "The email address for the member."
|
9376 |
msgstr ""
|
9377 |
|
9378 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9379 |
msgid "Display name for the member."
|
9380 |
msgstr ""
|
9381 |
|
9382 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9383 |
msgid "The name used for that user in @-mentions."
|
9384 |
msgstr ""
|
9385 |
|
9386 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9387 |
msgid "Profile URL of the member."
|
9388 |
msgstr ""
|
9389 |
|
9390 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9391 |
msgid "An alphanumeric identifier for the Member."
|
9392 |
msgstr ""
|
9393 |
|
9394 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9395 |
msgid "Member types associated with the member."
|
9396 |
msgstr ""
|
9397 |
|
9398 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9399 |
msgid "Registration date for the member."
|
9400 |
msgstr ""
|
9401 |
|
9402 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9403 |
msgid "Password for the member (never included)."
|
9404 |
msgstr ""
|
9405 |
|
9406 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9407 |
msgid "Roles assigned to the member."
|
9408 |
msgstr ""
|
9409 |
|
9410 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9411 |
msgid "All capabilities assigned to the user."
|
9412 |
msgstr ""
|
9413 |
|
9414 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9415 |
msgid "Any extra capabilities assigned to the user."
|
9416 |
msgstr ""
|
9417 |
|
9418 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9419 |
msgid "Member XProfile groups and its fields."
|
9420 |
msgstr ""
|
9421 |
|
9422 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9423 |
msgid "Friendship relation with, current, logged in user."
|
9424 |
msgstr ""
|
9425 |
|
9426 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9427 |
msgid "Slug of the friendship status with current logged in user."
|
9428 |
msgstr ""
|
9429 |
|
9430 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9431 |
msgid "Last date the member was active on the site."
|
9432 |
msgstr ""
|
9433 |
|
9434 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9435 |
msgid "The content of the latest activity posted by the member."
|
9436 |
msgstr ""
|
9437 |
|
9438 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9439 |
msgid "Total number of friends for the member."
|
9440 |
msgstr ""
|
9441 |
|
9442 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9443 |
msgid "Avatar URLs for the member."
|
9444 |
msgstr ""
|
9445 |
|
9446 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9447 |
msgid "Limit results to friends of a user."
|
9448 |
msgstr ""
|
9449 |
|
9450 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9451 |
msgid "Pass IDs of users to limit result set."
|
9452 |
msgstr ""
|
9453 |
|
9454 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9455 |
msgid "Whether to fetch extra BP data about the returned members."
|
9456 |
msgstr ""
|
9457 |
|
9458 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9459 |
msgid "Limit results set to certain type(s)."
|
9460 |
msgstr ""
|
9461 |
|
9462 |
-
#: bp-members/classes/class-bp-rest-members-endpoint.php:
|
9463 |
msgid "Limit results set to a certain XProfile field."
|
9464 |
msgstr ""
|
9465 |
|
@@ -9567,19 +9582,27 @@ msgstr ""
|
|
9567 |
msgid "the sign-up has already been activated."
|
9568 |
msgstr ""
|
9569 |
|
9570 |
-
#: bp-members/screens/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9571 |
msgid "Invitation successfully canceled."
|
9572 |
msgstr ""
|
9573 |
|
9574 |
-
#: bp-members/screens/
|
9575 |
msgid "There was a problem canceling that invitation."
|
9576 |
msgstr ""
|
9577 |
|
9578 |
-
#: bp-members/screens/
|
9579 |
msgid "Invitation successfully resent."
|
9580 |
msgstr ""
|
9581 |
|
9582 |
-
#: bp-members/screens/
|
9583 |
msgid "There was a problem resending that invitation."
|
9584 |
msgstr ""
|
9585 |
|
@@ -9591,14 +9614,6 @@ msgstr ""
|
|
9591 |
msgid "This is a required field"
|
9592 |
msgstr ""
|
9593 |
|
9594 |
-
#: bp-members/screens/send-invites.php:68
|
9595 |
-
msgid "Invitation successfully sent!"
|
9596 |
-
msgstr ""
|
9597 |
-
|
9598 |
-
#: bp-members/screens/send-invites.php:70
|
9599 |
-
msgid "There was a problem sending that invitation. The user could already be a member of the site or have chosen not to receive invitations from this site."
|
9600 |
-
msgstr ""
|
9601 |
-
|
9602 |
#: bp-messages/actions/bulk-delete.php:31
|
9603 |
msgid "There was an error deleting messages."
|
9604 |
msgstr ""
|
@@ -10989,8 +11004,8 @@ msgstr ""
|
|
10989 |
|
10990 |
#: bp-templates/bp-legacy/buddypress/assets/_attachments/avatars/camera.php:26
|
10991 |
#: bp-templates/bp-legacy/buddypress/members/single/settings/capabilities.php:30
|
10992 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
10993 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
10994 |
#: bp-xprofile/classes/class-bp-xprofile-field.php:1238
|
10995 |
#: bp-xprofile/classes/class-bp-xprofile-group.php:836
|
10996 |
msgid "Save"
|
@@ -11578,14 +11593,14 @@ msgstr ""
|
|
11578 |
#: bp-templates/bp-legacy/buddypress/members/register.php:119
|
11579 |
#: bp-templates/bp-legacy/buddypress/members/register.php:281
|
11580 |
#: bp-templates/bp-legacy/buddypress/members/register.php:297
|
11581 |
-
#: bp-templates/bp-nouveau/buddypress/members/single/invitations/send-invites.php:
|
11582 |
#: bp-templates/bp-nouveau/includes/template-tags.php:2445
|
11583 |
#: bp-xprofile/bp-xprofile-template.php:1445
|
11584 |
msgid "(required)"
|
11585 |
msgstr ""
|
11586 |
|
11587 |
#: bp-templates/bp-legacy/buddypress/members/register.php:96
|
11588 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
11589 |
msgid "Email Address"
|
11590 |
msgstr ""
|
11591 |
|
@@ -11636,7 +11651,7 @@ msgid "Blog URL"
|
|
11636 |
msgstr ""
|
11637 |
|
11638 |
#: bp-templates/bp-legacy/buddypress/members/register.php:297
|
11639 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
11640 |
msgid "Site Title"
|
11641 |
msgstr ""
|
11642 |
|
@@ -11645,12 +11660,12 @@ msgid "Privacy: I would like my site to appear in search engines, and in public
|
|
11645 |
msgstr ""
|
11646 |
|
11647 |
#: bp-templates/bp-legacy/buddypress/members/register.php:357
|
11648 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
11649 |
msgid "Complete Sign Up"
|
11650 |
msgstr ""
|
11651 |
|
11652 |
#: bp-templates/bp-legacy/buddypress/members/register.php:394
|
11653 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
11654 |
msgid "You have successfully created your account! To begin using this site you will need to activate your account via the email we have just sent to your address."
|
11655 |
msgstr ""
|
11656 |
|
@@ -11742,7 +11757,7 @@ msgid "Select this invitation"
|
|
11742 |
msgstr ""
|
11743 |
|
11744 |
#: bp-templates/bp-legacy/buddypress/members/single/invitations/list-invites.php:44
|
11745 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
11746 |
msgid "There are no invitations to display."
|
11747 |
msgstr ""
|
11748 |
|
@@ -11751,26 +11766,31 @@ msgstr ""
|
|
11751 |
msgid "Send Invitations"
|
11752 |
msgstr ""
|
11753 |
|
11754 |
-
#: bp-templates/bp-legacy/buddypress/members/single/invitations/send-invites.php:
|
11755 |
-
#: bp-templates/bp-nouveau/
|
11756 |
msgid "Fill out the form below to invite a new user to join this site. Upon submission of the form, an email will be sent to the invitee containing a link to accept your invitation. You may also add a custom message to the email."
|
11757 |
msgstr ""
|
11758 |
|
11759 |
-
#: bp-templates/bp-legacy/buddypress/members/single/invitations/send-invites.php:
|
11760 |
msgid "Email address of new user"
|
11761 |
msgstr ""
|
11762 |
|
11763 |
-
#: bp-templates/bp-legacy/buddypress/members/single/invitations/send-invites.php:
|
11764 |
-
#: bp-templates/bp-nouveau/buddypress/members/single/invitations/send-invites.php:
|
11765 |
msgid "Add a personalized message to the invitation (optional)"
|
11766 |
msgstr ""
|
11767 |
|
11768 |
#. translators: accessibility text
|
11769 |
-
#: bp-templates/bp-legacy/buddypress/members/single/invitations/send-invites.php:
|
11770 |
#: bp-templates/bp-nouveau/buddypress/members/single/invitations/send-invites.php:12
|
11771 |
msgid "Send Invitation"
|
11772 |
msgstr ""
|
11773 |
|
|
|
|
|
|
|
|
|
|
|
11774 |
#. translators: accessibility text
|
11775 |
#: bp-templates/bp-legacy/buddypress/members/single/messages.php:44
|
11776 |
msgid "Messages inbox"
|
@@ -11879,17 +11899,17 @@ msgid "Send Reply"
|
|
11879 |
msgstr ""
|
11880 |
|
11881 |
#: bp-templates/bp-legacy/buddypress/members/single/notifications/feedback-no-notifications.php:17
|
11882 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
11883 |
msgid "You have no unread notifications."
|
11884 |
msgstr ""
|
11885 |
|
11886 |
#: bp-templates/bp-legacy/buddypress/members/single/notifications/feedback-no-notifications.php:21
|
11887 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
11888 |
msgid "This member has no unread notifications."
|
11889 |
msgstr ""
|
11890 |
|
11891 |
#: bp-templates/bp-legacy/buddypress/members/single/notifications/feedback-no-notifications.php:29
|
11892 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
11893 |
msgid "You have no notifications."
|
11894 |
msgstr ""
|
11895 |
|
@@ -12041,7 +12061,7 @@ msgid "Data Erase"
|
|
12041 |
msgstr ""
|
12042 |
|
12043 |
#: bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php:17
|
12044 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
12045 |
msgid "Deleting your account will delete all of the content you have created. It will be completely irrecoverable."
|
12046 |
msgstr ""
|
12047 |
|
@@ -12850,15 +12870,15 @@ msgid "(BuddyPress) Latest Activities"
|
|
12850 |
msgstr ""
|
12851 |
|
12852 |
#: bp-templates/bp-nouveau/includes/activity/widgets.php:62
|
12853 |
-
#: bp-templates/bp-nouveau/includes/activity/widgets.php:
|
12854 |
msgid "Latest updates"
|
12855 |
msgstr ""
|
12856 |
|
12857 |
-
#: bp-templates/bp-nouveau/includes/activity/widgets.php:
|
12858 |
msgid "Maximum amount to display:"
|
12859 |
msgstr ""
|
12860 |
|
12861 |
-
#: bp-templates/bp-nouveau/includes/activity/widgets.php:
|
12862 |
msgid "Type:"
|
12863 |
msgstr ""
|
12864 |
|
@@ -13166,27 +13186,27 @@ msgstr ""
|
|
13166 |
msgid "Currently only your friends can invite you to groups. Uncheck the box to allow any member to send invites."
|
13167 |
msgstr ""
|
13168 |
|
13169 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
13170 |
msgid "Loading your updates. Please wait."
|
13171 |
msgstr ""
|
13172 |
|
13173 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
13174 |
msgid "Loading your blogs. Please wait."
|
13175 |
msgstr ""
|
13176 |
|
13177 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
13178 |
msgid "Loading your friends. Please wait."
|
13179 |
msgstr ""
|
13180 |
|
13181 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
13182 |
msgid "Loading your groups. Please wait."
|
13183 |
msgstr ""
|
13184 |
|
13185 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
13186 |
msgid "Site URL"
|
13187 |
msgstr ""
|
13188 |
|
13189 |
-
#: bp-templates/bp-nouveau/includes/functions.php:
|
13190 |
msgctxt "button"
|
13191 |
msgid "Post"
|
13192 |
msgstr ""
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2021-05-20T17:27:37+00:00\n"
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
"X-Domain: buddypress\n"
|
752 |
#: bp-friends/bp-friends-functions.php:962
|
753 |
#: bp-friends/bp-friends-notifications.php:256
|
754 |
#: bp-groups/bp-groups-notifications.php:1143
|
755 |
+
#: bp-members/bp-members-filters.php:346
|
756 |
#: bp-members/bp-members-notifications.php:198
|
757 |
#: bp-members/classes/class-bp-members-invitations-list-table.php:457
|
758 |
#: bp-members/classes/class-bp-members-invitations-list-table.php:472
|
759 |
#: bp-messages/bp-messages-notifications.php:267
|
760 |
#: bp-settings/bp-settings-functions.php:135
|
761 |
#: bp-templates/bp-legacy/buddypress/members/register.php:319
|
762 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1226
|
763 |
#: bp-xprofile/classes/class-bp-xprofile-field-type-checkbox-acceptance.php:367
|
764 |
msgid "Yes"
|
765 |
msgstr ""
|
770 |
#: bp-friends/bp-friends-functions.php:962
|
771 |
#: bp-friends/bp-friends-notifications.php:257
|
772 |
#: bp-groups/bp-groups-notifications.php:1144
|
773 |
+
#: bp-members/bp-members-filters.php:346
|
774 |
#: bp-members/bp-members-notifications.php:199
|
775 |
#: bp-members/classes/class-bp-members-invitations-list-table.php:459
|
776 |
#: bp-members/classes/class-bp-members-invitations-list-table.php:474
|
777 |
#: bp-messages/bp-messages-notifications.php:268
|
778 |
#: bp-settings/bp-settings-functions.php:136
|
779 |
#: bp-templates/bp-legacy/buddypress/members/register.php:320
|
780 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1234
|
781 |
#: bp-xprofile/classes/class-bp-xprofile-field-type-checkbox-acceptance.php:357
|
782 |
msgid "No"
|
783 |
msgstr ""
|
857 |
#: bp-members/bp-members-template.php:827
|
858 |
#: bp-members/bp-members-template.php:1584
|
859 |
#: bp-members/bp-members-template.php:1639
|
860 |
+
#: bp-members/classes/class-bp-members-component.php:670
|
861 |
#: bp-messages/bp-messages-template.php:727
|
862 |
#: bp-messages/classes/class-bp-messages-component.php:410
|
863 |
#: bp-notifications/classes/class-bp-notifications-component.php:294
|
916 |
#: bp-activity/bp-activity-template.php:2772
|
917 |
#: bp-core/admin/bp-core-admin-functions.php:1185
|
918 |
#: bp-core/admin/bp-core-admin-slugs.php:150
|
|
|
919 |
#: bp-groups/classes/class-bp-groups-list-table.php:611
|
920 |
#: bp-members/bp-members-template.php:1073
|
921 |
#: bp-templates/bp-legacy/buddypress-functions.php:317
|
1221 |
#: bp-activity/classes/class-bp-rest-activity-endpoint.php:71
|
1222 |
#: bp-activity/classes/class-bp-rest-activity-endpoint.php:109
|
1223 |
#: bp-activity/classes/class-bp-rest-activity-endpoint.php:1273
|
1224 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:932
|
1225 |
msgid "A unique numeric ID for the activity."
|
1226 |
msgstr ""
|
1227 |
|
1310 |
msgstr ""
|
1311 |
|
1312 |
#: bp-activity/classes/class-bp-rest-activity-endpoint.php:1336
|
1313 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:937
|
1314 |
msgid "Content for the activity, as it exists in the database."
|
1315 |
msgstr ""
|
1316 |
|
1317 |
#: bp-activity/classes/class-bp-rest-activity-endpoint.php:1341
|
1318 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:942
|
1319 |
msgid "HTML content for the activity, transformed for display."
|
1320 |
msgstr ""
|
1321 |
|
1347 |
#: bp-activity/classes/class-bp-rest-activity-endpoint.php:1396
|
1348 |
#: bp-blogs/classes/class-bp-rest-blogs-endpoint.php:686
|
1349 |
#: bp-groups/classes/class-bp-rest-groups-endpoint.php:1271
|
1350 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:964
|
1351 |
msgid "Avatar URL with full image size (%1$d x %2$d pixels)."
|
1352 |
msgstr ""
|
1353 |
|
1355 |
#: bp-activity/classes/class-bp-rest-activity-endpoint.php:1404
|
1356 |
#: bp-blogs/classes/class-bp-rest-blogs-endpoint.php:694
|
1357 |
#: bp-groups/classes/class-bp-rest-groups-endpoint.php:1279
|
1358 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:972
|
1359 |
msgid "Avatar URL with thumb image size (%1$d x %2$d pixels)."
|
1360 |
msgstr ""
|
1361 |
|
1364 |
msgstr ""
|
1365 |
|
1366 |
#: bp-activity/classes/class-bp-rest-activity-endpoint.php:1442
|
1367 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:1053
|
1368 |
msgid "Ensure result set excludes specific IDs."
|
1369 |
msgstr ""
|
1370 |
|
1371 |
#: bp-activity/classes/class-bp-rest-activity-endpoint.php:1451
|
1372 |
#: bp-blogs/classes/class-bp-rest-blogs-endpoint.php:743
|
1373 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:1044
|
1374 |
#: bp-members/classes/class-bp-rest-signup-endpoint.php:1017
|
1375 |
msgid "Ensure result set includes specific IDs."
|
1376 |
msgstr ""
|
1742 |
#: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:663
|
1743 |
#: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:254
|
1744 |
#: bp-members/classes/class-bp-rest-attachments-member-cover-endpoint.php:333
|
1745 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:239
|
1746 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:315
|
1747 |
#: bp-messages/classes/class-bp-rest-messages-endpoint.php:185
|
1748 |
#: bp-messages/classes/class-bp-rest-messages-endpoint.php:375
|
1749 |
msgid "Sorry, you are not allowed to perform this action."
|
2394 |
msgstr ""
|
2395 |
|
2396 |
#: bp-core/admin/bp-core-admin-slugs.php:143
|
2397 |
+
#: bp-core/admin/bp-core-admin-slugs.php:244
|
2398 |
msgid "- None -"
|
2399 |
msgstr ""
|
2400 |
|
2407 |
msgid "Registration"
|
2408 |
msgstr ""
|
2409 |
|
2410 |
+
#: bp-core/admin/bp-core-admin-slugs.php:192
|
2411 |
msgid "Associate WordPress Pages with the following BuddyPress Registration pages."
|
2412 |
msgstr ""
|
2413 |
|
2414 |
+
#: bp-core/admin/bp-core-admin-slugs.php:193
|
2415 |
+
msgid "These pages will only be reachable by users who are not logged in."
|
2416 |
+
msgstr ""
|
2417 |
+
|
2418 |
#. translators: %s: the link to the Network settings page
|
2419 |
+
#: bp-core/admin/bp-core-admin-slugs.php:201
|
2420 |
+
msgctxt "Disabled registration message for multisite config"
|
2421 |
+
msgid "Registration is currently disabled. Before associating a page is allowed, please enable registration by selecting either the \"User accounts may be registered\" or \"Both sites and user accounts can be registered\" option on %s."
|
2422 |
+
msgstr ""
|
2423 |
+
|
2424 |
+
#: bp-core/admin/bp-core-admin-slugs.php:205
|
2425 |
+
msgctxt "Link text for the Multisite’s network settings page"
|
2426 |
+
msgid "this page"
|
2427 |
msgstr ""
|
2428 |
|
2429 |
+
#. translators: %s: the link to the Site general options page
|
2430 |
+
#: bp-core/admin/bp-core-admin-slugs.php:215
|
2431 |
+
msgctxt "Disabled registration message for regular site config"
|
2432 |
+
msgid "Registration is currently disabled. Before associating a page is allowed, please enable registration by clicking on the \"Anyone can register\" checkbox on %s."
|
2433 |
+
msgstr ""
|
2434 |
+
|
2435 |
+
#: bp-core/admin/bp-core-admin-slugs.php:219
|
2436 |
+
msgctxt "Link text for the Site’s general options page"
|
2437 |
+
msgid "this page"
|
2438 |
msgstr ""
|
2439 |
|
2440 |
#: bp-core/admin/bp-core-admin-tools.php:22
|
2610 |
#: bp-core/classes/class-bp-admin.php:416
|
2611 |
#: bp-groups/classes/class-bp-groups-component.php:573
|
2612 |
#: bp-members/bp-members-adminbar.php:204
|
2613 |
+
#: bp-members/bp-members-invitations.php:24
|
2614 |
#: bp-templates/bp-legacy/buddypress/members/single/invitations/list-invites.php:16
|
2615 |
#: bp-templates/bp-nouveau/buddypress/members/single/invitations/list-invites.php:15
|
2616 |
msgid "Invitations"
|
4865 |
#: bp-members/classes/class-bp-members-list-table.php:150
|
4866 |
#: bp-members/classes/class-bp-members-ms-list-table.php:137
|
4867 |
#: bp-templates/bp-legacy/buddypress/members/register.php:85
|
4868 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1190
|
4869 |
msgid "Username"
|
4870 |
msgstr ""
|
4871 |
|
4883 |
#: bp-members/classes/class-bp-core-recently-active-widget.php:151
|
4884 |
#: bp-members/classes/class-bp-core-whos-online-widget.php:150
|
4885 |
#: bp-messages/classes/class-bp-messages-sitewide-notices-widget.php:116
|
4886 |
+
#: bp-templates/bp-nouveau/includes/activity/widgets.php:194
|
4887 |
msgid "Title:"
|
4888 |
msgstr ""
|
4889 |
|
6134 |
#: bp-templates/bp-legacy/buddypress/members/single/profile/edit.php:113
|
6135 |
#: bp-templates/bp-legacy/buddypress/members/single/settings/general.php:47
|
6136 |
#: bp-templates/bp-legacy/buddypress/members/single/settings/notifications.php:40
|
6137 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1301
|
6138 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1332
|
6139 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1343
|
6140 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1354
|
6141 |
#: bp-templates/bp-nouveau/includes/groups/template-tags.php:358
|
6142 |
msgid "Save Changes"
|
6143 |
msgstr ""
|
7301 |
#: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:438
|
7302 |
#: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:165
|
7303 |
#: bp-members/classes/class-bp-rest-attachments-member-cover-endpoint.php:155
|
7304 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:250
|
7305 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:328
|
7306 |
#: bp-messages/classes/class-bp-rest-messages-endpoint.php:197
|
7307 |
#: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:160
|
7308 |
#: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:290
|
7751 |
msgstr ""
|
7752 |
|
7753 |
#: bp-groups/classes/class-bp-rest-groups-endpoint.php:1318
|
7754 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:1018
|
7755 |
msgid "Shorthand for certain orderby/order combinations."
|
7756 |
msgstr ""
|
7757 |
|
8080 |
#: bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php:44
|
8081 |
#: bp-templates/bp-nouveau/buddypress/members/single/settings/data.php:66
|
8082 |
#: bp-templates/bp-nouveau/buddypress/members/single/settings/delete-account.php:12
|
8083 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1322
|
8084 |
msgid "Delete Account"
|
8085 |
msgstr ""
|
8086 |
|
8087 |
#: bp-members/bp-members-adminbar.php:217
|
8088 |
+
#: bp-members/bp-members-invitations.php:38
|
8089 |
#: bp-templates/bp-legacy/buddypress/groups/single/send-invites.php:31
|
8090 |
#: bp-templates/bp-nouveau/includes/groups/functions.php:136
|
8091 |
msgid "Send Invites"
|
8092 |
msgstr ""
|
8093 |
|
8094 |
#: bp-members/bp-members-adminbar.php:230
|
8095 |
+
#: bp-members/bp-members-invitations.php:50
|
8096 |
#: bp-templates/bp-nouveau/includes/groups/functions.php:130
|
8097 |
msgid "Pending Invites"
|
8098 |
msgstr ""
|
8104 |
msgstr ""
|
8105 |
|
8106 |
#. translators: %s: The log in link `<a href="login_url">log in</a>`
|
8107 |
+
#: bp-members/bp-members-filters.php:232
|
8108 |
msgid "Welcome! You are already a member of this site. Please %s to continue."
|
8109 |
msgstr ""
|
8110 |
|
8111 |
+
#: bp-members/bp-members-filters.php:236
|
8112 |
+
#: bp-members/bp-members-filters.php:308
|
8113 |
msgid "log in"
|
8114 |
msgstr ""
|
8115 |
|
8116 |
#. translators: %s: The comma separated list of inviters display names
|
8117 |
+
#: bp-members/bp-members-filters.php:259
|
8118 |
msgid "Welcome! You’ve been invited to join the site by the following user: %s."
|
8119 |
msgid_plural "Welcome! You’ve been invited to join the site by the following users: %s."
|
8120 |
msgstr[0] ""
|
8121 |
msgstr[1] ""
|
8122 |
|
8123 |
+
#: bp-members/bp-members-filters.php:263
|
8124 |
msgid "Welcome! You’ve been invited to join the site. "
|
8125 |
msgstr ""
|
8126 |
|
8127 |
+
#: bp-members/bp-members-filters.php:293
|
8128 |
msgid "Member registration is allowed by invitation only."
|
8129 |
msgstr ""
|
8130 |
|
8131 |
+
#: bp-members/bp-members-filters.php:297
|
8132 |
msgid "It looks like there is a problem with your invitation. Please try again."
|
8133 |
msgstr ""
|
8134 |
|
8135 |
#. translators: 1: The log in link `<a href="login_url">log in</a>`. 2: The lost password link `<a href="lost_password_url">log in</a>`
|
8136 |
+
#: bp-members/bp-members-filters.php:304
|
8137 |
msgid "Welcome! You are already a member of this site. Please %1$s to continue. If you have forgotten your password, you can %2$s."
|
8138 |
msgstr ""
|
8139 |
|
8140 |
+
#: bp-members/bp-members-filters.php:313
|
8141 |
msgid "reset it"
|
8142 |
msgstr ""
|
8143 |
|
8384 |
msgid "You may not register a member type with this name."
|
8385 |
msgstr ""
|
8386 |
|
8387 |
+
#: bp-members/bp-members-invitations.php:135
|
8388 |
#: bp-members/screens/activate.php:106
|
8389 |
msgid "Your account is now active!"
|
8390 |
msgstr ""
|
8950 |
#: bp-members/classes/class-bp-members-ms-list-table.php:310
|
8951 |
#: bp-settings/classes/class-bp-settings-component.php:164
|
8952 |
#: bp-settings/classes/class-bp-settings-component.php:261
|
8953 |
+
#: bp-templates/bp-nouveau/buddypress/members/single/invitations/send-invites.php:22
|
8954 |
msgid "Email"
|
8955 |
msgstr ""
|
8956 |
|
9103 |
msgid "Not yet notified"
|
9104 |
msgstr ""
|
9105 |
|
9106 |
+
#: bp-members/classes/class-bp-members-component.php:191
|
9107 |
msgid "Search Members..."
|
9108 |
msgstr ""
|
9109 |
|
9110 |
+
#: bp-members/classes/class-bp-members-component.php:343
|
9111 |
msgctxt "Profile header sub menu"
|
9112 |
msgid "Change Profile Photo"
|
9113 |
msgstr ""
|
9114 |
|
9115 |
+
#: bp-members/classes/class-bp-members-component.php:356
|
9116 |
msgctxt "Profile header sub menu"
|
9117 |
msgid "Change Cover Image"
|
9118 |
msgstr ""
|
9119 |
|
9120 |
+
#: bp-members/classes/class-bp-members-component.php:414
|
9121 |
msgctxt "Member profile main navigation"
|
9122 |
msgid "Profile"
|
9123 |
msgstr ""
|
9124 |
|
9125 |
+
#: bp-members/classes/class-bp-members-component.php:439
|
9126 |
msgctxt "Member profile view"
|
9127 |
msgid "View"
|
9128 |
msgstr ""
|
9129 |
|
9130 |
+
#: bp-members/classes/class-bp-members-component.php:453
|
9131 |
#: bp-templates/bp-nouveau/includes/members/functions.php:516
|
9132 |
msgctxt "Member Home page"
|
9133 |
msgid "Home"
|
9134 |
msgstr ""
|
9135 |
|
9136 |
+
#: bp-members/classes/class-bp-members-component.php:551
|
9137 |
msgctxt "My Account Profile sub nav"
|
9138 |
msgid "Change Profile Photo"
|
9139 |
msgstr ""
|
9140 |
|
9141 |
+
#: bp-members/classes/class-bp-members-component.php:562
|
9142 |
msgctxt "My Account Profile sub nav"
|
9143 |
msgid "Change Cover Image"
|
9144 |
msgstr ""
|
9145 |
|
9146 |
+
#: bp-members/classes/class-bp-members-component.php:607
|
9147 |
#: bp-xprofile/classes/class-bp-xprofile-component.php:338
|
9148 |
msgctxt "My Account Profile"
|
9149 |
msgid "Profile"
|
9150 |
msgstr ""
|
9151 |
|
9152 |
+
#: bp-members/classes/class-bp-members-component.php:615
|
9153 |
#: bp-xprofile/classes/class-bp-xprofile-component.php:346
|
9154 |
msgctxt "My Account Profile sub nav"
|
9155 |
msgid "View"
|
9156 |
msgstr ""
|
9157 |
|
9158 |
+
#: bp-members/classes/class-bp-members-component.php:664
|
9159 |
msgid "You"
|
9160 |
msgstr ""
|
9161 |
|
9233 |
msgstr ""
|
9234 |
|
9235 |
#: bp-members/classes/class-bp-members-invitations-list-table.php:354
|
9236 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1373
|
9237 |
msgid "Send"
|
9238 |
msgstr ""
|
9239 |
|
9300 |
msgstr ""
|
9301 |
|
9302 |
#: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:70
|
9303 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:807
|
9304 |
msgid "A unique numeric ID for the Member."
|
9305 |
msgstr ""
|
9306 |
|
9356 |
msgid "Reassign the deleted member's posts and links to this user ID."
|
9357 |
msgstr ""
|
9358 |
|
9359 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:261
|
9360 |
msgid "Sorry, you are not allowed to view members with the edit context."
|
9361 |
msgstr ""
|
9362 |
|
9363 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:349
|
9364 |
msgid "Sorry, you are not allowed to view members."
|
9365 |
msgstr ""
|
9366 |
|
9367 |
#. translators: %s: transport method name
|
9368 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:406
|
9369 |
msgid "'%s' Transport Method not implemented."
|
9370 |
msgstr ""
|
9371 |
|
9372 |
#. translators: %s: transport method name
|
9373 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:427
|
9374 |
msgid "'%s' Transport method not implemented."
|
9375 |
msgstr ""
|
9376 |
|
9377 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:676
|
9378 |
msgid "No extended profile data available as the component is inactive"
|
9379 |
msgstr ""
|
9380 |
|
9381 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:717
|
9382 |
msgid "The data for the user was not found."
|
9383 |
msgstr ""
|
9384 |
|
9385 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:741
|
9386 |
msgid "Assign a member type to a member, use a comma separated list of member types to assign more than one."
|
9387 |
msgstr ""
|
9388 |
|
9389 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:760
|
9390 |
msgid "The email address for the member."
|
9391 |
msgstr ""
|
9392 |
|
9393 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:813
|
9394 |
msgid "Display name for the member."
|
9395 |
msgstr ""
|
9396 |
|
9397 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:821
|
9398 |
msgid "The name used for that user in @-mentions."
|
9399 |
msgstr ""
|
9400 |
|
9401 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:830
|
9402 |
msgid "Profile URL of the member."
|
9403 |
msgstr ""
|
9404 |
|
9405 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:837
|
9406 |
msgid "An alphanumeric identifier for the Member."
|
9407 |
msgstr ""
|
9408 |
|
9409 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:846
|
9410 |
msgid "Member types associated with the member."
|
9411 |
msgstr ""
|
9412 |
|
9413 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:856
|
9414 |
msgid "Registration date for the member."
|
9415 |
msgstr ""
|
9416 |
|
9417 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:863
|
9418 |
msgid "Password for the member (never included)."
|
9419 |
msgstr ""
|
9420 |
|
9421 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:872
|
9422 |
msgid "Roles assigned to the member."
|
9423 |
msgstr ""
|
9424 |
|
9425 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:880
|
9426 |
msgid "All capabilities assigned to the user."
|
9427 |
msgstr ""
|
9428 |
|
9429 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:886
|
9430 |
msgid "Any extra capabilities assigned to the user."
|
9431 |
msgstr ""
|
9432 |
|
9433 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:892
|
9434 |
msgid "Member XProfile groups and its fields."
|
9435 |
msgstr ""
|
9436 |
|
9437 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:898
|
9438 |
msgid "Friendship relation with, current, logged in user."
|
9439 |
msgstr ""
|
9440 |
|
9441 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:904
|
9442 |
msgid "Slug of the friendship status with current logged in user."
|
9443 |
msgstr ""
|
9444 |
|
9445 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:911
|
9446 |
msgid "Last date the member was active on the site."
|
9447 |
msgstr ""
|
9448 |
|
9449 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:927
|
9450 |
msgid "The content of the latest activity posted by the member."
|
9451 |
msgstr ""
|
9452 |
|
9453 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:952
|
9454 |
msgid "Total number of friends for the member."
|
9455 |
msgstr ""
|
9456 |
|
9457 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:979
|
9458 |
msgid "Avatar URLs for the member."
|
9459 |
msgstr ""
|
9460 |
|
9461 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:1027
|
9462 |
msgid "Limit results to friends of a user."
|
9463 |
msgstr ""
|
9464 |
|
9465 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:1035
|
9466 |
msgid "Pass IDs of users to limit result set."
|
9467 |
msgstr ""
|
9468 |
|
9469 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:1062
|
9470 |
msgid "Whether to fetch extra BP data about the returned members."
|
9471 |
msgstr ""
|
9472 |
|
9473 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:1070
|
9474 |
msgid "Limit results set to certain type(s)."
|
9475 |
msgstr ""
|
9476 |
|
9477 |
+
#: bp-members/classes/class-bp-rest-members-endpoint.php:1079
|
9478 |
msgid "Limit results set to a certain XProfile field."
|
9479 |
msgstr ""
|
9480 |
|
9582 |
msgid "the sign-up has already been activated."
|
9583 |
msgstr ""
|
9584 |
|
9585 |
+
#: bp-members/screens/invitations.php:35
|
9586 |
+
msgid "Invitation successfully sent!"
|
9587 |
+
msgstr ""
|
9588 |
+
|
9589 |
+
#: bp-members/screens/invitations.php:37
|
9590 |
+
msgid "There was a problem sending that invitation. The user could already be a member of the site or have chosen not to receive invitations from this site."
|
9591 |
+
msgstr ""
|
9592 |
+
|
9593 |
+
#: bp-members/screens/invitations.php:77
|
9594 |
msgid "Invitation successfully canceled."
|
9595 |
msgstr ""
|
9596 |
|
9597 |
+
#: bp-members/screens/invitations.php:79
|
9598 |
msgid "There was a problem canceling that invitation."
|
9599 |
msgstr ""
|
9600 |
|
9601 |
+
#: bp-members/screens/invitations.php:84
|
9602 |
msgid "Invitation successfully resent."
|
9603 |
msgstr ""
|
9604 |
|
9605 |
+
#: bp-members/screens/invitations.php:86
|
9606 |
msgid "There was a problem resending that invitation."
|
9607 |
msgstr ""
|
9608 |
|
9614 |
msgid "This is a required field"
|
9615 |
msgstr ""
|
9616 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9617 |
#: bp-messages/actions/bulk-delete.php:31
|
9618 |
msgid "There was an error deleting messages."
|
9619 |
msgstr ""
|
11004 |
|
11005 |
#: bp-templates/bp-legacy/buddypress/assets/_attachments/avatars/camera.php:26
|
11006 |
#: bp-templates/bp-legacy/buddypress/members/single/settings/capabilities.php:30
|
11007 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1311
|
11008 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1363
|
11009 |
#: bp-xprofile/classes/class-bp-xprofile-field.php:1238
|
11010 |
#: bp-xprofile/classes/class-bp-xprofile-group.php:836
|
11011 |
msgid "Save"
|
11593 |
#: bp-templates/bp-legacy/buddypress/members/register.php:119
|
11594 |
#: bp-templates/bp-legacy/buddypress/members/register.php:281
|
11595 |
#: bp-templates/bp-legacy/buddypress/members/register.php:297
|
11596 |
+
#: bp-templates/bp-nouveau/buddypress/members/single/invitations/send-invites.php:23
|
11597 |
#: bp-templates/bp-nouveau/includes/template-tags.php:2445
|
11598 |
#: bp-xprofile/bp-xprofile-template.php:1445
|
11599 |
msgid "(required)"
|
11600 |
msgstr ""
|
11601 |
|
11602 |
#: bp-templates/bp-legacy/buddypress/members/register.php:96
|
11603 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1198
|
11604 |
msgid "Email Address"
|
11605 |
msgstr ""
|
11606 |
|
11651 |
msgstr ""
|
11652 |
|
11653 |
#: bp-templates/bp-legacy/buddypress/members/register.php:297
|
11654 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1218
|
11655 |
msgid "Site Title"
|
11656 |
msgstr ""
|
11657 |
|
11660 |
msgstr ""
|
11661 |
|
11662 |
#: bp-templates/bp-legacy/buddypress/members/register.php:357
|
11663 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1291
|
11664 |
msgid "Complete Sign Up"
|
11665 |
msgstr ""
|
11666 |
|
11667 |
#: bp-templates/bp-legacy/buddypress/members/register.php:394
|
11668 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1126
|
11669 |
msgid "You have successfully created your account! To begin using this site you will need to activate your account via the email we have just sent to your address."
|
11670 |
msgstr ""
|
11671 |
|
11757 |
msgstr ""
|
11758 |
|
11759 |
#: bp-templates/bp-legacy/buddypress/members/single/invitations/list-invites.php:44
|
11760 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1099
|
11761 |
msgid "There are no invitations to display."
|
11762 |
msgstr ""
|
11763 |
|
11766 |
msgid "Send Invitations"
|
11767 |
msgstr ""
|
11768 |
|
11769 |
+
#: bp-templates/bp-legacy/buddypress/members/single/invitations/send-invites.php:20
|
11770 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1095
|
11771 |
msgid "Fill out the form below to invite a new user to join this site. Upon submission of the form, an email will be sent to the invitee containing a link to accept your invitation. You may also add a custom message to the email."
|
11772 |
msgstr ""
|
11773 |
|
11774 |
+
#: bp-templates/bp-legacy/buddypress/members/single/invitations/send-invites.php:22
|
11775 |
msgid "Email address of new user"
|
11776 |
msgstr ""
|
11777 |
|
11778 |
+
#: bp-templates/bp-legacy/buddypress/members/single/invitations/send-invites.php:25
|
11779 |
+
#: bp-templates/bp-nouveau/buddypress/members/single/invitations/send-invites.php:28
|
11780 |
msgid "Add a personalized message to the invitation (optional)"
|
11781 |
msgstr ""
|
11782 |
|
11783 |
#. translators: accessibility text
|
11784 |
+
#: bp-templates/bp-legacy/buddypress/members/single/invitations/send-invites.php:32
|
11785 |
#: bp-templates/bp-nouveau/buddypress/members/single/invitations/send-invites.php:12
|
11786 |
msgid "Send Invitation"
|
11787 |
msgstr ""
|
11788 |
|
11789 |
+
#: bp-templates/bp-legacy/buddypress/members/single/invitations/send-invites.php:41
|
11790 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1112
|
11791 |
+
msgid "Sorry, you are not allowed to send invitations."
|
11792 |
+
msgstr ""
|
11793 |
+
|
11794 |
#. translators: accessibility text
|
11795 |
#: bp-templates/bp-legacy/buddypress/members/single/messages.php:44
|
11796 |
msgid "Messages inbox"
|
11899 |
msgstr ""
|
11900 |
|
11901 |
#: bp-templates/bp-legacy/buddypress/members/single/notifications/feedback-no-notifications.php:17
|
11902 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1134
|
11903 |
msgid "You have no unread notifications."
|
11904 |
msgstr ""
|
11905 |
|
11906 |
#: bp-templates/bp-legacy/buddypress/members/single/notifications/feedback-no-notifications.php:21
|
11907 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1131
|
11908 |
msgid "This member has no unread notifications."
|
11909 |
msgstr ""
|
11910 |
|
11911 |
#: bp-templates/bp-legacy/buddypress/members/single/notifications/feedback-no-notifications.php:29
|
11912 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1137
|
11913 |
msgid "You have no notifications."
|
11914 |
msgstr ""
|
11915 |
|
12061 |
msgstr ""
|
12062 |
|
12063 |
#: bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php:17
|
12064 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1142
|
12065 |
msgid "Deleting your account will delete all of the content you have created. It will be completely irrecoverable."
|
12066 |
msgstr ""
|
12067 |
|
12870 |
msgstr ""
|
12871 |
|
12872 |
#: bp-templates/bp-nouveau/includes/activity/widgets.php:62
|
12873 |
+
#: bp-templates/bp-nouveau/includes/activity/widgets.php:175
|
12874 |
msgid "Latest updates"
|
12875 |
msgstr ""
|
12876 |
|
12877 |
+
#: bp-templates/bp-nouveau/includes/activity/widgets.php:199
|
12878 |
msgid "Maximum amount to display:"
|
12879 |
msgstr ""
|
12880 |
|
12881 |
+
#: bp-templates/bp-nouveau/includes/activity/widgets.php:203
|
12882 |
msgid "Type:"
|
12883 |
msgstr ""
|
12884 |
|
13186 |
msgid "Currently only your friends can invite you to groups. Uncheck the box to allow any member to send invites."
|
13187 |
msgstr ""
|
13188 |
|
13189 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1144
|
13190 |
msgid "Loading your updates. Please wait."
|
13191 |
msgstr ""
|
13192 |
|
13193 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1146
|
13194 |
msgid "Loading your blogs. Please wait."
|
13195 |
msgstr ""
|
13196 |
|
13197 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1148
|
13198 |
msgid "Loading your friends. Please wait."
|
13199 |
msgstr ""
|
13200 |
|
13201 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1150
|
13202 |
msgid "Loading your groups. Please wait."
|
13203 |
msgstr ""
|
13204 |
|
13205 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1210
|
13206 |
msgid "Site URL"
|
13207 |
msgstr ""
|
13208 |
|
13209 |
+
#: bp-templates/bp-nouveau/includes/functions.php:1384
|
13210 |
msgctxt "button"
|
13211 |
msgid "Post"
|
13212 |
msgstr ""
|
@@ -303,7 +303,7 @@ class BuddyPress {
|
|
303 |
|
304 |
/** Versions **********************************************************/
|
305 |
|
306 |
-
$this->version = '8.0.0-
|
307 |
$this->db_version = 12850;
|
308 |
|
309 |
/** Loading ***********************************************************/
|
303 |
|
304 |
/** Versions **********************************************************/
|
305 |
|
306 |
+
$this->version = '8.0.0-beta2';
|
307 |
$this->db_version = 12850;
|
308 |
|
309 |
/** Loading ***********************************************************/
|
@@ -33,7 +33,9 @@
|
|
33 |
"require-dev": {
|
34 |
"phpcompatibility/phpcompatibility-wp": "^2.1.0",
|
35 |
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
|
36 |
-
"
|
|
|
|
|
37 |
"phpunit/phpunit": "^7.5"
|
38 |
}
|
39 |
}
|
33 |
"require-dev": {
|
34 |
"phpcompatibility/phpcompatibility-wp": "^2.1.0",
|
35 |
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
|
36 |
+
"squizlabs/php_codesniffer" : "^3.5.4",
|
37 |
+
"wp-coding-standards/wpcs": "*",
|
38 |
+
"wp-phpunit/wp-phpunit": "^5.7",
|
39 |
"phpunit/phpunit": "^7.5"
|
40 |
}
|
41 |
}
|