PageSourceSearch

https://justclimb.hk/wp-content/plugins/booking-activities/js/booking-system-dialogs.min.js?ver=1.16.7

js justclimb.hk collected 2026-10-07 00:35:44 UTC 7,936 bytes, 16 lines download raw bytes

1function bookacti_dialog_choose_group_of_events(d,L,b){var B=d.attr("id"),I=$j("#"+B+"-choose-group-of-events-dialog"),u=$j("#"+B+"-groups-of-events-list"),c=bookacti.booking_system[B],J=c.multiple_bookings,E=c.bookings_only,n=c.past_events,M=c.past_events_bookable,F=moment.utc(bookacti_localized.current_time);u.data("booking-system-id",B);u.empty();if(c.groups_single_events){var m="";if(E)m=bookacti_get_bookings_number_for_a_single_grouped_event(d,b,L),m=m+" "+(1===m?bookacti_localized.booking:bookacti_localized.bookings);
2else{var p=bookacti_get_event_availability(d,b);m=p+" "+(1===p?bookacti_localized.avail:bookacti_localized.avails)}var v=!0;"undefined"!==typeof b.is_available&&(b.is_available||(v=!1));"undefined"!==typeof b.extendedProps&&"undefined"!==typeof b.extendedProps.is_available&&(b.extendedProps.is_available||(v=!1));if(n){n=moment.utc(b.start).clone();var h=moment.utc(b.end).clone();M||!n.isBefore(F)||bookacti_localized.started_events_bookable&&h.isAfter(F)||(v=!1)}h="undefined"!==typeof b.groupId?parseInt(b.groupId):
3parseInt(b.id);if(v&&"undefined"!==typeof c.events_data[h]){n=v=!1;var e=parseInt(c.events_data[h].activity_id),k=c.activities_data[e].settings;("undefined"===typeof k.min_bookings_per_user?0:k.min_bookings_per_user?parseInt(k.min_bookings_per_user):0)<=p&&(n=!0);p=max_users_ok=!0;e="undefined"===typeof k.max_bookings_per_user?0:k.max_bookings_per_user?parseInt(k.max_bookings_per_user):0;k="undefined"===typeof k.max_users_per_event?0:k.max_users_per_event?parseInt(k.max_users_per_event):0;if(e||k){var C=
4moment.utc(b.start).clone().locale("en").format("YYYY-MM-DD HH:mm:ss");"undefined"!==typeof c.bookings[h]&&"undefined"!==typeof c.bookings[h][C]&&(h=c.bookings[h][C],C=parseInt(h.current_user_bookings),k&&0===C&&parseInt(h.distinct_users)>=k&&(max_users_ok=!1),e&&C>=e&&(p=!1))}n&&p&&max_users_ok&&(v=!0)}n=$j("<div></div>",{});p=$j("<div></div>",{id:"bookacti-group-of-events-option-single","class":"bookacti-group-of-events-option","data-group-id":0,"data-group-date":"","data-show-events":0});v=$j("<input />",
5{id:"bookacti-group-of-events-single",type:"radio",name:"group_of_events",value:"single",disabled:!E&&!v});m={html:bookacti_localized.single_event+' <span class="bookacti-group-availability" >('+m+")</span>","for":"bookacti-group-of-events-single"};d.trigger("bookacti_choose_group_dialog_group_label",[m,0,"",b]);m=$j("<label></label>",m);h=$j("<ul></ul>",{id:"bookacti-group-of-events-list-single","class":"bookacti-group-of-events-list bookacti-custom-scrollbar","data-group-id":0,"data-group-date":""});
6e=bookacti_format_event_duration(b.start,b.end);e={title:"undefined"!==typeof b.title?b.title:"",duration:e,quantity:1};d.trigger("bookacti_group_of_events_list_data",[e,b]);e={html:'<span class="bookacti-booking-event-duration" >'+e.duration+'</span><span class="bookacti-booking-event-title-separator" > - </span><span class="bookacti-booking-event-title" >'+e.title+"</span>"};d.trigger("bookacti_group_of_events_list_element_data",[e,b]);e=$j("<li></li>",e);p.append(v);p.append(m);n.append(p);h.append(e);
7n.append(h);u.append(n)}$j.each(L,function(a,w){if("undefined"===typeof c.groups_data[a])return!0;var q=c.groups_data[a],A=parseInt(q.category_id),f=c.group_categories_data[A].settings,N=parseInt(bookacti_localized.started_groups_bookable);"undefined"!==typeof f.started_groups_bookable&&0<=$j.inArray(f.started_groups_bookable,[0,1,"0","1",!0,!1])&&(N=$j.isNumeric(f.started_groups_bookable)?parseInt(f.started_groups_bookable):f.started_groups_bookable?1:0);$j.each(w,function(g,G){var l,H,r,x;var t=
8l=H=r=x=0;"undefined"!==typeof c.groups_bookings[a]&&"undefined"!==typeof c.groups_bookings[a][g]&&(t=c.groups_bookings[a][g].is_available,l=c.groups_bookings[a][g].availability,H=c.groups_bookings[a][g].quantity,r=c.groups_bookings[a][g].current_user_bookings,x=c.groups_bookings[a][g].distinct_users);t=t&&0<l;var y=moment.utc(G[0].start).clone(),D=moment.utc(G[G.length-1].end).clone();M||!y.isBefore(F)||N&&D.isAfter(F)||(t=!1);if(t){y=t=!1;("undefined"===typeof f.min_bookings_per_user?0:f.min_bookings_per_user?
9parseInt(f.min_bookings_per_user):0)<=l&&0<l&&(y=!0);D="undefined"===typeof f.max_users_per_event?0:f.max_users_per_event?parseInt(f.max_users_per_event):0;var K="undefined"===typeof f.max_bookings_per_user?0:f.max_bookings_per_user?parseInt(f.max_bookings_per_user):0,O=max_users_ok=!0;if(K||D)r=parseInt(r),D&&0===r&&parseInt(x)>=D&&(max_users_ok=!1),K&&r>=K&&(O=!1);y&&O&&max_users_ok&&(t=!0)}x=$j("<div></div>",{});r=$j("<div></div>",{id:"bookacti-group-of-events-option-"+a+"_"+g,"class":"bookacti-group-of-events-option",
10"data-group-id":a,"data-group-date":g,"data-show-events":0});t=$j("<input />",{id:"bookacti-group-of-events-"+a+"_"+g,type:"radio",name:"group_of_events",disabled:!E&&!t,value:a+"_"+g});
10y="";y=E?H+" "+(1===H?bookacti_localized.booking:bookacti_localized.bookings):l+" "+(1===l?bookacti_localized.avail:bookacti_localized.avails);l={html:q.title+' <span class="bookacti-group-availability" >('+y+")</span>","for":"bookacti-group-of-events-"+a+"_"+g};d.trigger("bookacti_choose_group_dialog_group_label",
11[l,a,g,b]);l=$j("<label></label>",l);var P=$j("<ul></ul>",{id:"bookacti-group-of-events-list-"+a+"_"+g,"class":"bookacti-group-of-events-list bookacti-custom-scrollbar","data-group-id":a,"data-group-date":g});$j.each(G,function(Q,z){Q=z.start.substr(0,10)===z.end.substr(0,10);var R=moment.utc(z.start).locale(bookacti_localized.current_lang_code),S=moment.utc(z.end).locale(bookacti_localized.current_lang_code),T=R.formatPHP(bookacti_localized.date_format)+bookacti_localized.dates_separator+S.formatPHP(bookacti_localized.date_format);
12Q&&(T=R.formatPHP(bookacti_localized.date_format)+bookacti_localized.date_time_separator+S.formatPHP(bookacti_localized.time_format));z=$j("<li></li>",{html:'<span class="bookacti-booking-event-duration" >'+T+'</span><span class="bookacti-booking-event-title-separator" > - </span><span class="bookacti-booking-event-title" >'+z.title+"</span>"});P.append(z)});r.append(t);r.append(l);x.append(r);x.append(P);u.append(x)})});u.find('input[name="group_of_events"]').on("change",function(){var a=$j(this).val(),
13w="single"!==a?parseInt(a.substr(0,a.indexOf("_"))):0,q="single"!==a?a.substr(a.indexOf("_")+1):"",A=$j("#"+B+"-choose-group-of-events-dialog .bookacti-groups-of-events-list");A.find(".bookacti-group-of-events-option:not(#bookacti-group-of-events-option-"+a+")").data("show-events",0).attr("data-show-events",0);A.find(".bookacti-group-of-events-list:not(#bookacti-group-of-events-list-"+a+")").hide(200);A.find("#bookacti-group-of-events-option-"+a).data("show-events",1).attr("data-show-events",1);A.find("#bookacti-group-of-events-list-"+
14a).show(200);a={click:!0};$j(this).is(":disabled")&&(a.click=!1);d.trigger("bookacti_trigger_group_of_events_preview",[a,w,q,b]);a.click&&(J?bookacti_unpick_events(d,b):bookacti_unpick_all_events(d),bookacti_pick_events(d,b,w,q),d.trigger("bookacti_group_of_events_preview",[w,q,b]))});u.find('input[name="group_of_events"]:not([disabled]):first').prop("checked",!0).trigger("change");d.find(".fc-toolbar button:focus").blur();I.dialog({beforeClose:function(){},close:function(){"undefined"!==typeof u.find('input[type="radio"]:checked').val()||
15J||bookacti_unpick_all_events(d)}});I.dialog("option","buttons",[{text:bookacti_localized.dialog_button_ok,click:function(){var a=u.find('input[type="radio"]:checked').val();if("undefined"!==typeof a){var w={click:!0};u.find('input[type="radio"]:checked').is(":disabled")&&(w.click=!1);var q="single"!==a?parseInt(a.substr(0,a.indexOf("_"))):0;a="single"!==a?a.substr(a.indexOf("_")+1):"";d.trigger("bookacti_trigger_group_of_events_click",[w,q,a,b]);w.click&&(J?bookacti_unpick_events(d,b):bookacti_unpick_all_events(d),
16bookacti_pick_events(d,b,q,a),d.trigger("bookacti_group_of_events_chosen",[q,a,b]))}$j(this).dialog("close")}}]);I.dialog("open")};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.