Plugin Directory

Changeset 3722621


Ignore:
Timestamp:
10/01/2026 08:07:43 AM (8 weeks ago)
Author:
j__3rk
Message:

Update to version 4.6.11 from GitHub

Location:
video-conferencing-with-zoom-api
Files:
30 edited
1 copied

Legend:

Unmodified
Added
Removed
  • video-conferencing-with-zoom-api/tags/4.6.11/README.txt

    r3673430 r3722621  
    33Tags: zoom video conference, video conference, web conferencing, online meetings, webinars
    44Donate link: https://www.paypal.com/donate?hosted_button_id=2UCQKR868M9WE
    5 Requires at least: 5.0
     5Requires at least: 6.0
    66Tested up to: 7.1.0
    7 Stable tag: 4.6.10
     7Stable tag: 4.6.11
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    … …  
    161161
    162162== Changelog ==
     163= 4.6.11 =
     164* Security Fix: Added authorization capability checks to AJAX handlers.
     165* Security Fix: Removed administrative nonce exposure from public templates.
     166* Counter: Fixed counter-timezone miscalculation for Mountain Time Zone.
    163167= 4.6.10 =
    164168* Security: Shortcode - Fixed a potential XSS vulnerability.
  • video-conferencing-with-zoom-api/tags/4.6.11/assets/admin/js/script.js

    r3054964 r3722621  
    411411        type: $(e.currentTarget).data('type'),
    412412        post_id: post_id ? post_id : false,
    413         action: 'state_change',
     413        action: 'vczapi_meeting_state_change',
    414414        accss: zvc_ajax.zvc_security
    415415      };
  • video-conferencing-with-zoom-api/tags/4.6.11/assets/admin/js/script.min.js

    r3054964 r3722621  
    1 !function(){"use strict";!function(e){var t={},i={onReady:function(){this.setupDOM(),this.eventListeners(),this.initializeDependencies()},setupDOM:function(){t.changeSelectType=e(".zvc-hacking-select"),t.dateTimePicker=e("#datetimepicker"),t.goToAccordionEl=e(".vczapi-go-to-open-accordion"),t.reportsDatePicker=e("#reports_date"),t.zoomAccountDatepicker=e(".zoom_account_datepicker"),t.meetingListDTable=e("#zvc_users_list_table, #zvc_meetings_list_table"),t.meetingListTableCheck=e("#zvc_meetings_list_table"),t.usersListTable=e("#vczapi-get-host-users-wp"),t.meetingListTbl=t.meetingListTableCheck.find("input[type=checkbox]"),t.cover=e("#zvc-cover"),t.changeMeetingState=e(".vczapi-meeting-state-change"),t.endMeetingEl=e(".vczapi-meeting-state-end_meeting"),t.show_on_meeting_delete_error=e(".show_on_meeting_delete_error"),t.toggleTriggerElement=e(".vczapi-toggle-trigger"),this.$manualHostID=e(".vczapi-admin-hostID-manually-add"),t.accordionElement=e(".vczapi-admin-accordion"),t.connectBox=e(".vczapi-connect-box")},eventListeners:function(){t.toggleTriggerElement.on("click",this.togglePasswordText.bind(this)),t.accordionElement.on("click",".vczapi-admin-accordion--header",this.toggleAccordion.bind(this)),t.goToAccordionEl.on("click",this.expandAccordion.bind(this)),t.meetingListTableCheck.find("#checkall").on("click",this.meetingListTableCheck),e("#bulk_delete_meeting_listings").on("click",this.bulkDeleteMeetings),e(".zvc-meetings-form").find('input[name="password"]').on("keypress",this.meetingPassword),e(".delete-meeting").on("click",this.deleteMetting),e(".zvc-dismiss-message").on("click",this.dismissNotice.bind(this)),e(".check-api-connection").on("click",this.checkConnection.bind(this)),e(t.changeMeetingState).on("click",this.meetingStateChange.bind(this)),this.$manualHostID.on("click",this.showManualHostIDField.bind(this)),t.endMeetingEl.on("click",this.endMeeting.bind(this))},endMeeting:function(t){t.preventDefault();let i=t.target.getAttribute("data-id"),a={action:"vczapi_end_meeting",access:zvc_ajax.zvc_security,meeting_id:i};confirm("Are you sure you want to end this meeting")&&e.post(zvc_ajax.ajaxurl,a).done((function(e){location.reload()}))},expandAccordion:function(t){t.preventDefault();let i=e(t.currentTarget),a=e(i.attr("href"));void 0!==a&&a.length>0&&(a.addClass("expanded"),e("html,body").animate({scrollTop:a.offset().top},1e3),a.focus())},toggleAccordion:function(t){t.preventDefault(),e(t.currentTarget).parent().toggleClass("expanded")},togglePasswordText:function(t){t.preventDefault();let i=e(t.currentTarget),a=e(i.data("element"));0===i.data("visible")?(a.attr("type","text"),i.data("visible",1),i.text("Hide")):(a.attr("type","password"),i.data("visible",0),i.text("Show"))},showManualHostIDField:function(t){t.preventDefault(),e(".vczapi-admin-post-type-host-selector").select2("destroy").remove(),e(".vczapi-manually-hostid-wrap").before('<input type="text" placeholder="'+zvc_ajax.lang.host_id_search+'" class="regular-text vczapi-search-host-id" name="userId" required>').remove()},datePickers:function(){if(t.dateTimePicker.length>0){var i=new Date,a=i.getMonth()+1,s=i.getDate(),n=i.getHours()+":"+i.getMinutes()+":"+i.getSeconds(),c=i.getFullYear()+"-"+(a<10?"0":"")+a+"-"+(s<10?"0":"")+s+" "+n,r=t.dateTimePicker.data("existingdate");r&&(c=r),t.dateTimePicker.datetimepicker({value:c,step:15,minDate:0,format:"Y-m-d H:i"})}t.reportsDatePicker.length>0&&t.reportsDatePicker.datepicker({changeMonth:!0,changeYear:!1,showButtonPanel:!0,dateFormat:"MM yy"}).focus((function(){var t=e(this);e(".ui-datepicker-calendar").detach(),e(".ui-datepicker-close").click((function(){var i=e("#ui-datepicker-div .ui-datepicker-month :selected").val(),a=e("#ui-datepicker-div .ui-datepicker-year").html();t.datepicker("setDate",new Date(a,i,1))}))})),e("#vczapi-check-recording-date").length>0&&e("#vczapi-check-recording-date").datepicker({changeMonth:!0,changeYear:!0,showButtonPanel:!0,dateFormat:"MM yy",beforeShow:function(t,i){setTimeout((function(){i.dpDiv.css({top:e("#vczapi-check-recording-date").offset().top+35,left:e("#vczapi-check-recording-date").offset().left})}),0)}}).focus((function(){var t=e(this);e(".ui-datepicker-calendar").detach(),e(".ui-datepicker-close").click((function(){var i=e("#ui-datepicker-div .ui-datepicker-month :selected").val(),a=e("#ui-datepicker-div .ui-datepicker-year :selected").val();t.datepicker("setDate",new Date(a,i,1))}))})),t.zoomAccountDatepicker.length>0&&t.zoomAccountDatepicker.datepicker({dateFormat:"yy-mm-dd"})},initializeDependencies:function(){t.changeSelectType.length>0&&t.changeSelectType.select2(),this.datePickers(),t.meetingListDTable.length>0&&t.meetingListDTable.dataTable({pageLength:25,columnDefs:[{targets:0,orderable:!1}]}),t.usersListTable.length>0&&t.usersListTable.dataTable({processing:!0,serverSide:!0,pageLength:25,ajax:{url:ajaxurl+"?action=get_assign_host_id&security="+zvc_ajax.zvc_security},columns:[{data:"id"},{data:"email"},{data:"name"},{data:"host_id"}],drawCallback:function(t){e(".vczapi-get-zoom-hosts").select2({ajax:{url:ajaxurl+"?action=vczapi_get_zoom_host_query",type:"GET",dataType:"json",delay:200,cache:!0},allowClear:!0,placeholder:"Filter a zoom user by email ID or host ID...",width:"100%"}).on("select2:select",(function(t){e(".vczapi-host-email-field-"+e(this).data("userid")).length>0?e(".vczapi-host-email-field-"+e(this).data("userid")).val(t.params.data.text):e('<input type="hidden" class="vczapi-host-email-field-'+e(this).data("userid")+'" name="zoom_host_email['+e(this).data("userid")+']" value="'+t.params.data.text+'" />').insertAfter(this)}))}}),e("#vczapi-select-wp-user-for-host").length>0&&e("#vczapi-select-wp-user-for-host").select2({ajax:{url:ajaxurl+"?action=vczapi_get_wp_users",type:"GET",dataType:"json"},placeholder:"Select a WordPress User",width:"300px"})},meetingListTableCheck:function(){e(this).is(":checked")?t.meetingListTbl.each((function(){e(this).prop("checked",!0)})):t.meetingListTbl.each((function(){e(this).prop("checked",!1)}))},bulkDeleteMeetings:function(){if(1!=confirm("Confirm bulk delete these Meeting?"))return!1;var i=[];t.meetingListTableCheck.find("input.checkthis").each((function(){e(this).is(":checked")&&i.push(e(this).val())}));var a=e(this).data("type");if(i){var s={meetings_id:i,type:a,action:"zvc_bulk_meetings_delete",security:zvc_ajax.zvc_security};t.cover.show(),e.post(zvc_ajax.ajaxurl,s).done((function(e){t.cover.fadeOut("slow"),1==e.error?t.show_on_meeting_delete_error.show().html("<p>"+e.msg+"</p>"):(t.show_on_meeting_delete_error.show().html("<p>"+e.msg+"</p>"),location.reload())}))}},meetingPassword:function(t){if(!/([a-zA-Z0-9])+/.test(String.fromCharCode(t.which)))return!1;var i=e(this).val(),a=e(this).data("maxlength");a>0&&e(this).val(i.substr(0,a))},deleteMetting:function(){var i=e(this).data("meetingid"),a=e(this).data("type");if(1!=confirm("Confirm Delete this Meeting?"))return!1;var s={meeting_id:i,type:a,action:"zvc_delete_meeting",security:zvc_ajax.zvc_security};t.cover.show(),e.post(zvc_ajax.ajaxurl,s).done((function(e){t.cover.fadeOut("slow"),1==e.error?t.show_on_meeting_delete_error.show().html("<p>"+e.msg+"</p>"):(t.show_on_meeting_delete_error.show().html("<p>"+e.msg+"</p>"),location.reload())}))},dismissNotice:function(t){t.preventDefault(),e(t.currentTarget).closest(".notice-success").hide(),e.post(zvc_ajax.ajaxurl,{action:"zoom_dimiss_notice"}).done((function(e){console.log(e)}))},checkConnection:function(i){i.preventDefault(),t.connectBox.html("<pre>Making demo request to Zoom Servers... Please wait.</pre>"),e.post(zvc_ajax.ajaxurl,{action:"check_connection",security:zvc_ajax.zvc_security,type:"oAuth"}).done((function(e){e.success?t.connectBox.append(`<pre style="color:green;">${e.data.msg}</pre>`):t.connectBox.append(`<pre style="color:red;">${e.data.msg}</pre>`)}))},meetingStateChange:function(t){t.preventDefault();var i=e(t.currentTarget).data("state"),a=e(t.currentTarget).data("postid"),s={id:e(t.currentTarget).data("id"),state:i,type:e(t.currentTarget).data("type"),post_id:a||!1,action:"state_change",accss:zvc_ajax.zvc_security};if("resume"===i)this.changeState(s);else if("end"===i){if(!confirm(zvc_ajax.lang.confirm_end))return;this.changeState(s)}},changeState:function(t){e.post(zvc_ajax.ajaxurl,t).done((function(e){location.reload()}))}},a={init:function(){this.cacheDOM(),this.evntHandlers()},cacheDOM:function(){this.notificationWrapper=e(".vczapi-status-notification"),this.syncUserId=e(".vczapi-sync-user-id")},evntHandlers:function(){this.syncUserId.on("change",this.fetchMeetingsByUser.bind(this))},fetchMeetingsByUser:function(t){t.preventDefault();var i=this,a=e(this.syncUserId).val(),s={user_id:a,action:"vczapi_sync_user",type:"check"},n=e(".results");n.html("<p>"+vczapi_sync_i10n.before_sync+"</p>"),e.post(ajaxurl,s).done((function(t){if(t.success){var s='<div class="vczapi-sync-details">';s+="<p><strong>"+vczapi_sync_i10n.total_records_found+":</strong> "+t.data.total_records+"</p>",s+="<p><strong>"+vczapi_sync_i10n.total_not_synced_records+":</strong> "+_.size(t.data.meetings)+" (Only listing Scheduled Meetings)</p>",s+='<select class="vczapi-choose-meetings-to-sync-select2" name="sync-meeting-ids[]" multiple="multiple">',e(t.data.meetings).each((function(e,t){s+='<option value="'+t.id+'">'+t.topic+"</option>"})),s+="</select>",setTimeout((function(){e(".vczapi-choose-meetings-to-sync-select2").select2({maximumSelectionLength:10,placeholder:vczapi_sync_i10n.select2_placeholder})}),100),s+='<p><a href="javascript:void(0);" class="vczapi-sync-meeting button button-primary" data-userid="'+a+'">'+vczapi_sync_i10n.sync_btn+"</a></p>",s+="</div>",n.html(s),e(".vczapi-sync-meeting").on("click",i.syncMeeting.bind(i))}else n.html("<p>"+t.data+"</p>")}))},syncMeeting:function(t){t.preventDefault(),e(t.currentTarget).attr("disabled","disabled");var i=e(".vczapi-choose-meetings-to-sync-select2").val();_.size(i)>0?(this.notificationWrapper.show().html("<p>"+vczapi_sync_i10n.sync_start+"</p>").removeClass("vczapi-error"),this.doSync(0,i)):(this.notificationWrapper.show().html("<p>"+vczapi_sync_i10n.sync_error+"</p>").addClass("vczapi-error"),e(t.currentTarget).removeAttr("disabled"))},doSync:function(t,i){var s=this,n={action:"vczapi_sync_user",type:"sync",meeting_id:i[t]};e.post(ajaxurl,n).done((function(n){t++,s.notificationWrapper.show().append("<p> "+n.data.msg+"</p>"),t<_.size(i)?a.doSync(t,i):n.success?(s.notificationWrapper.show().append("<p>"+vczapi_sync_i10n.sync_completed+"</p>"),e(".vczapi-sync-meeting").removeAttr("disabled")):(s.notificationWrapper.show().append("<p>"+n.data.msg+"</p>"),e(".vczapi-sync-meeting").removeAttr("disabled"))}))}};const s={init:function(){this.cacheDOM(),this.evntHandlers()},cacheDOM:function(){this.meetingSelector=e("#vczapi-admin-meeting-ype"),this.hideOnWebinarSelector=e(".vczapi-admin-hide-on-webinar"),this.showOnWebinarSelector=e(".vczapi-admin-show-on-webinar")},evntHandlers:function(){this.meetingSelector.on("change",this.webinarElementsShow.bind(this))},webinarElementsShow:function(t){"2"===e(t.currentTarget).val()?(this.hideOnWebinarSelector.hide(),this.showOnWebinarSelector.show()):(this.hideOnWebinarSelector.show(),this.showOnWebinarSelector.hide())}},n={init:function(){this.cacheDOM(),void 0!==this.$wizardWrapper&&this.$wizardWrapper.length>0&&this.eventListeners()},cacheDOM:function(){this.$wizardOverlay=e(".vczapi-migrate-to-s2sOauth--overlay"),this.$wizardWrapper=e(".vczapi-migrate-to-s2sOauth"),this.$s2sOauthForm=e("#vczapi-s2sOauthCredentials-wizard-form"),this.$appSDKForm=e("#vczapi-s2soauth-app-sdk-form"),this.$messageWrapper=this.$wizardWrapper.find(".vczapi-migrate-to-s2sOauth--message")},eventListeners:function(){this.maybeTriggerMigrationWizard(),this.$wizardWrapper.find(".next-step").on("click",this.navigateToStep.bind(this)),this.$s2sOauthForm.on("submit",this.s2sOauthFormHandler.bind(this)),this.$appSDKForm.on("submit",this.appSDKFormHandler.bind(this)),e("body").on("click",this.maybeCloseWizard.bind(this))},maybeCloseWizard:function(t){const i=t.target;e(i)[0]===this.$wizardOverlay[0]&&this.$wizardOverlay.removeClass("expanded")},showMessage:function(e,t="text"){const i="show-message "+("success"===e?"success-message":"error-message");this.$wizardWrapper.find(".vczapi-migrate-to-s2sOauth--message").removeClass(["error-message","success-message"]),this.$wizardWrapper.find(".vczapi-migrate-to-s2sOauth--message").addClass(i).text(t)},s2sOauthFormHandler:function(t){t.preventDefault();const i=e(t.target).serialize();e.ajax({type:"POST",url:ajaxurl+"?action=vczapi_save_oauth_credentials",context:this,data:i,beforeSend:function(){this.$s2sOauthForm.find("input").prop("disabled",!0),this.$s2sOauthForm.addClass("submitting")},success:function(e){this.$s2sOauthForm.find("input").prop("disabled",!1),this.$s2sOauthForm.removeClass("submitting"),e.hasOwnProperty("success")&&e.success?(this.showMessage("success",e?.data.message),this.$wizardWrapper.find(".next-step").attr("disabled",!1)):this.showMessage("error",e?.data.message)},error:function(e,t,i){console.log("Error thrown",i)}})},appSDKFormHandler:function(t){t.preventDefault();const i=e(t.target).serialize();e.ajax({type:"POST",url:ajaxurl+"?action=vczapi_save_app_sdk_credentials",context:this,data:i,beforeSend:function(){this.$appSDKForm.find("input").prop("disabled",!0),this.$appSDKForm.addClass("submitting")},success:function(e){this.$appSDKForm.find("input").prop("disabled",!1),this.$appSDKForm.removeClass("submitting"),e.hasOwnProperty("success")&&e.success?(this.showMessage("success",e?.data.message),this.$wizardWrapper.find(".next-step").attr("disabled",!1)):this.showMessage("error",e?.data.message)},error:function(e,t,i){console.log("Error thrown",i)}})},maybeTriggerMigrationWizard:function(){let e=this.getSearchParameters();e.hasOwnProperty("page")&&"zoom-video-conferencing-settings"===e.page&&e.hasOwnProperty("migrate")&&"now"===e.migrate&&this.$wizardOverlay.addClass("expanded")},getSearchParameters:function(){let e=window.location.search.substring(1);return null!=e&&""!==e?this.transformToAssocArray(e):{}},transformToAssocArray:function(e){for(var t={},i=e.split("&"),a=0;a<i.length;a++){var s=i[a].split("=");t[s[0]]=s[1]}return t},navigateToStep:function(t){t.preventDefault();let i=e(t.currentTarget),a=i.data("step"),s=i.data("final_step");if(void 0===a)console.log("Error no steps defined");else{let e=this,t=e.$wizardWrapper.find(".step-"+a);if(t.length>0){let n=parseInt(a)+1;this.$wizardWrapper.find(".step.active").removeClass("active").fadeOut("slow",(function(){t.addClass("active").fadeIn("slow"),i.data("step",n),i.attr("disabled",!0),n>parseInt(s)&&i.hide(),e.$messageWrapper.removeClass("show-message")}))}else i.hide()}}},c={init:function(){e(".vczapi-dismiss-admin-notice").on("click",this.dismissNotice.bind(this))},dismissNotice:function(t){t.preventDefault();let i=e(t.target),a=i.data("id"),s=i.data("security");e.ajax({type:"POST",url:ajaxurl,data:{action:"vczapi_dismiss_admin_notice",option:a,security:s},beforeSend:function(){i.parents(".vczapi-notice").length>0&&i.parents(".vczapi-notice").fadeOut()},success:function(e){e.hasOwnProperty("success")&&e.success&&console.log(e)}})}};e((function(){n.init(),c.init(),i.onReady(),a.init(),s.init()}))}(jQuery)}();
     1!function(){"use strict";!function(e){var t={},i={onReady:function(){this.setupDOM(),this.eventListeners(),this.initializeDependencies()},setupDOM:function(){t.changeSelectType=e(".zvc-hacking-select"),t.dateTimePicker=e("#datetimepicker"),t.goToAccordionEl=e(".vczapi-go-to-open-accordion"),t.reportsDatePicker=e("#reports_date"),t.zoomAccountDatepicker=e(".zoom_account_datepicker"),t.meetingListDTable=e("#zvc_users_list_table, #zvc_meetings_list_table"),t.meetingListTableCheck=e("#zvc_meetings_list_table"),t.usersListTable=e("#vczapi-get-host-users-wp"),t.meetingListTbl=t.meetingListTableCheck.find("input[type=checkbox]"),t.cover=e("#zvc-cover"),t.changeMeetingState=e(".vczapi-meeting-state-change"),t.endMeetingEl=e(".vczapi-meeting-state-end_meeting"),t.show_on_meeting_delete_error=e(".show_on_meeting_delete_error"),t.toggleTriggerElement=e(".vczapi-toggle-trigger"),this.$manualHostID=e(".vczapi-admin-hostID-manually-add"),t.accordionElement=e(".vczapi-admin-accordion"),t.connectBox=e(".vczapi-connect-box")},eventListeners:function(){t.toggleTriggerElement.on("click",this.togglePasswordText.bind(this)),t.accordionElement.on("click",".vczapi-admin-accordion--header",this.toggleAccordion.bind(this)),t.goToAccordionEl.on("click",this.expandAccordion.bind(this)),t.meetingListTableCheck.find("#checkall").on("click",this.meetingListTableCheck),e("#bulk_delete_meeting_listings").on("click",this.bulkDeleteMeetings),e(".zvc-meetings-form").find('input[name="password"]').on("keypress",this.meetingPassword),e(".delete-meeting").on("click",this.deleteMetting),e(".zvc-dismiss-message").on("click",this.dismissNotice.bind(this)),e(".check-api-connection").on("click",this.checkConnection.bind(this)),e(t.changeMeetingState).on("click",this.meetingStateChange.bind(this)),this.$manualHostID.on("click",this.showManualHostIDField.bind(this)),t.endMeetingEl.on("click",this.endMeeting.bind(this))},endMeeting:function(t){t.preventDefault();let i=t.target.getAttribute("data-id"),a={action:"vczapi_end_meeting",access:zvc_ajax.zvc_security,meeting_id:i};confirm("Are you sure you want to end this meeting")&&e.post(zvc_ajax.ajaxurl,a).done((function(e){location.reload()}))},expandAccordion:function(t){t.preventDefault();let i=e(t.currentTarget),a=e(i.attr("href"));void 0!==a&&a.length>0&&(a.addClass("expanded"),e("html,body").animate({scrollTop:a.offset().top},1e3),a.focus())},toggleAccordion:function(t){t.preventDefault(),e(t.currentTarget).parent().toggleClass("expanded")},togglePasswordText:function(t){t.preventDefault();let i=e(t.currentTarget),a=e(i.data("element"));0===i.data("visible")?(a.attr("type","text"),i.data("visible",1),i.text("Hide")):(a.attr("type","password"),i.data("visible",0),i.text("Show"))},showManualHostIDField:function(t){t.preventDefault(),e(".vczapi-admin-post-type-host-selector").select2("destroy").remove(),e(".vczapi-manually-hostid-wrap").before('<input type="text" placeholder="'+zvc_ajax.lang.host_id_search+'" class="regular-text vczapi-search-host-id" name="userId" required>').remove()},datePickers:function(){if(t.dateTimePicker.length>0){var i=new Date,a=i.getMonth()+1,s=i.getDate(),n=i.getHours()+":"+i.getMinutes()+":"+i.getSeconds(),c=i.getFullYear()+"-"+(a<10?"0":"")+a+"-"+(s<10?"0":"")+s+" "+n,r=t.dateTimePicker.data("existingdate");r&&(c=r),t.dateTimePicker.datetimepicker({value:c,step:15,minDate:0,format:"Y-m-d H:i"})}t.reportsDatePicker.length>0&&t.reportsDatePicker.datepicker({changeMonth:!0,changeYear:!1,showButtonPanel:!0,dateFormat:"MM yy"}).focus((function(){var t=e(this);e(".ui-datepicker-calendar").detach(),e(".ui-datepicker-close").click((function(){var i=e("#ui-datepicker-div .ui-datepicker-month :selected").val(),a=e("#ui-datepicker-div .ui-datepicker-year").html();t.datepicker("setDate",new Date(a,i,1))}))})),e("#vczapi-check-recording-date").length>0&&e("#vczapi-check-recording-date").datepicker({changeMonth:!0,changeYear:!0,showButtonPanel:!0,dateFormat:"MM yy",beforeShow:function(t,i){setTimeout((function(){i.dpDiv.css({top:e("#vczapi-check-recording-date").offset().top+35,left:e("#vczapi-check-recording-date").offset().left})}),0)}}).focus((function(){var t=e(this);e(".ui-datepicker-calendar").detach(),e(".ui-datepicker-close").click((function(){var i=e("#ui-datepicker-div .ui-datepicker-month :selected").val(),a=e("#ui-datepicker-div .ui-datepicker-year :selected").val();t.datepicker("setDate",new Date(a,i,1))}))})),t.zoomAccountDatepicker.length>0&&t.zoomAccountDatepicker.datepicker({dateFormat:"yy-mm-dd"})},initializeDependencies:function(){t.changeSelectType.length>0&&t.changeSelectType.select2(),this.datePickers(),t.meetingListDTable.length>0&&t.meetingListDTable.dataTable({pageLength:25,columnDefs:[{targets:0,orderable:!1}]}),t.usersListTable.length>0&&t.usersListTable.dataTable({processing:!0,serverSide:!0,pageLength:25,ajax:{url:ajaxurl+"?action=get_assign_host_id&security="+zvc_ajax.zvc_security},columns:[{data:"id"},{data:"email"},{data:"name"},{data:"host_id"}],drawCallback:function(t){e(".vczapi-get-zoom-hosts").select2({ajax:{url:ajaxurl+"?action=vczapi_get_zoom_host_query",type:"GET",dataType:"json",delay:200,cache:!0},allowClear:!0,placeholder:"Filter a zoom user by email ID or host ID...",width:"100%"}).on("select2:select",(function(t){e(".vczapi-host-email-field-"+e(this).data("userid")).length>0?e(".vczapi-host-email-field-"+e(this).data("userid")).val(t.params.data.text):e('<input type="hidden" class="vczapi-host-email-field-'+e(this).data("userid")+'" name="zoom_host_email['+e(this).data("userid")+']" value="'+t.params.data.text+'" />').insertAfter(this)}))}}),e("#vczapi-select-wp-user-for-host").length>0&&e("#vczapi-select-wp-user-for-host").select2({ajax:{url:ajaxurl+"?action=vczapi_get_wp_users",type:"GET",dataType:"json"},placeholder:"Select a WordPress User",width:"300px"})},meetingListTableCheck:function(){e(this).is(":checked")?t.meetingListTbl.each((function(){e(this).prop("checked",!0)})):t.meetingListTbl.each((function(){e(this).prop("checked",!1)}))},bulkDeleteMeetings:function(){if(1!=confirm("Confirm bulk delete these Meeting?"))return!1;var i=[];t.meetingListTableCheck.find("input.checkthis").each((function(){e(this).is(":checked")&&i.push(e(this).val())}));var a=e(this).data("type");if(i){var s={meetings_id:i,type:a,action:"zvc_bulk_meetings_delete",security:zvc_ajax.zvc_security};t.cover.show(),e.post(zvc_ajax.ajaxurl,s).done((function(e){t.cover.fadeOut("slow"),1==e.error?t.show_on_meeting_delete_error.show().html("<p>"+e.msg+"</p>"):(t.show_on_meeting_delete_error.show().html("<p>"+e.msg+"</p>"),location.reload())}))}},meetingPassword:function(t){if(!/([a-zA-Z0-9])+/.test(String.fromCharCode(t.which)))return!1;var i=e(this).val(),a=e(this).data("maxlength");a>0&&e(this).val(i.substr(0,a))},deleteMetting:function(){var i=e(this).data("meetingid"),a=e(this).data("type");if(1!=confirm("Confirm Delete this Meeting?"))return!1;var s={meeting_id:i,type:a,action:"zvc_delete_meeting",security:zvc_ajax.zvc_security};t.cover.show(),e.post(zvc_ajax.ajaxurl,s).done((function(e){t.cover.fadeOut("slow"),1==e.error?t.show_on_meeting_delete_error.show().html("<p>"+e.msg+"</p>"):(t.show_on_meeting_delete_error.show().html("<p>"+e.msg+"</p>"),location.reload())}))},dismissNotice:function(t){t.preventDefault(),e(t.currentTarget).closest(".notice-success").hide(),e.post(zvc_ajax.ajaxurl,{action:"zoom_dimiss_notice"}).done((function(e){console.log(e)}))},checkConnection:function(i){i.preventDefault(),t.connectBox.html("<pre>Making demo request to Zoom Servers... Please wait.</pre>"),e.post(zvc_ajax.ajaxurl,{action:"check_connection",security:zvc_ajax.zvc_security,type:"oAuth"}).done((function(e){e.success?t.connectBox.append(`<pre style="color:green;">${e.data.msg}</pre>`):t.connectBox.append(`<pre style="color:red;">${e.data.msg}</pre>`)}))},meetingStateChange:function(t){t.preventDefault();var i=e(t.currentTarget).data("state"),a=e(t.currentTarget).data("postid"),s={id:e(t.currentTarget).data("id"),state:i,type:e(t.currentTarget).data("type"),post_id:a||!1,action:"vczapi_meeting_state_change",accss:zvc_ajax.zvc_security};if("resume"===i)this.changeState(s);else if("end"===i){if(!confirm(zvc_ajax.lang.confirm_end))return;this.changeState(s)}},changeState:function(t){e.post(zvc_ajax.ajaxurl,t).done((function(e){location.reload()}))}},a={init:function(){this.cacheDOM(),this.evntHandlers()},cacheDOM:function(){this.notificationWrapper=e(".vczapi-status-notification"),this.syncUserId=e(".vczapi-sync-user-id")},evntHandlers:function(){this.syncUserId.on("change",this.fetchMeetingsByUser.bind(this))},fetchMeetingsByUser:function(t){t.preventDefault();var i=this,a=e(this.syncUserId).val(),s={user_id:a,action:"vczapi_sync_user",type:"check"},n=e(".results");n.html("<p>"+vczapi_sync_i10n.before_sync+"</p>"),e.post(ajaxurl,s).done((function(t){if(t.success){var s='<div class="vczapi-sync-details">';s+="<p><strong>"+vczapi_sync_i10n.total_records_found+":</strong> "+t.data.total_records+"</p>",s+="<p><strong>"+vczapi_sync_i10n.total_not_synced_records+":</strong> "+_.size(t.data.meetings)+" (Only listing Scheduled Meetings)</p>",s+='<select class="vczapi-choose-meetings-to-sync-select2" name="sync-meeting-ids[]" multiple="multiple">',e(t.data.meetings).each((function(e,t){s+='<option value="'+t.id+'">'+t.topic+"</option>"})),s+="</select>",setTimeout((function(){e(".vczapi-choose-meetings-to-sync-select2").select2({maximumSelectionLength:10,placeholder:vczapi_sync_i10n.select2_placeholder})}),100),s+='<p><a href="javascript:void(0);" class="vczapi-sync-meeting button button-primary" data-userid="'+a+'">'+vczapi_sync_i10n.sync_btn+"</a></p>",s+="</div>",n.html(s),e(".vczapi-sync-meeting").on("click",i.syncMeeting.bind(i))}else n.html("<p>"+t.data+"</p>")}))},syncMeeting:function(t){t.preventDefault(),e(t.currentTarget).attr("disabled","disabled");var i=e(".vczapi-choose-meetings-to-sync-select2").val();_.size(i)>0?(this.notificationWrapper.show().html("<p>"+vczapi_sync_i10n.sync_start+"</p>").removeClass("vczapi-error"),this.doSync(0,i)):(this.notificationWrapper.show().html("<p>"+vczapi_sync_i10n.sync_error+"</p>").addClass("vczapi-error"),e(t.currentTarget).removeAttr("disabled"))},doSync:function(t,i){var s=this,n={action:"vczapi_sync_user",type:"sync",meeting_id:i[t]};e.post(ajaxurl,n).done((function(n){t++,s.notificationWrapper.show().append("<p> "+n.data.msg+"</p>"),t<_.size(i)?a.doSync(t,i):n.success?(s.notificationWrapper.show().append("<p>"+vczapi_sync_i10n.sync_completed+"</p>"),e(".vczapi-sync-meeting").removeAttr("disabled")):(s.notificationWrapper.show().append("<p>"+n.data.msg+"</p>"),e(".vczapi-sync-meeting").removeAttr("disabled"))}))}};const s={init:function(){this.cacheDOM(),this.evntHandlers()},cacheDOM:function(){this.meetingSelector=e("#vczapi-admin-meeting-ype"),this.hideOnWebinarSelector=e(".vczapi-admin-hide-on-webinar"),this.showOnWebinarSelector=e(".vczapi-admin-show-on-webinar")},evntHandlers:function(){this.meetingSelector.on("change",this.webinarElementsShow.bind(this))},webinarElementsShow:function(t){"2"===e(t.currentTarget).val()?(this.hideOnWebinarSelector.hide(),this.showOnWebinarSelector.show()):(this.hideOnWebinarSelector.show(),this.showOnWebinarSelector.hide())}},n={init:function(){this.cacheDOM(),void 0!==this.$wizardWrapper&&this.$wizardWrapper.length>0&&this.eventListeners()},cacheDOM:function(){this.$wizardOverlay=e(".vczapi-migrate-to-s2sOauth--overlay"),this.$wizardWrapper=e(".vczapi-migrate-to-s2sOauth"),this.$s2sOauthForm=e("#vczapi-s2sOauthCredentials-wizard-form"),this.$appSDKForm=e("#vczapi-s2soauth-app-sdk-form"),this.$messageWrapper=this.$wizardWrapper.find(".vczapi-migrate-to-s2sOauth--message")},eventListeners:function(){this.maybeTriggerMigrationWizard(),this.$wizardWrapper.find(".next-step").on("click",this.navigateToStep.bind(this)),this.$s2sOauthForm.on("submit",this.s2sOauthFormHandler.bind(this)),this.$appSDKForm.on("submit",this.appSDKFormHandler.bind(this)),e("body").on("click",this.maybeCloseWizard.bind(this))},maybeCloseWizard:function(t){const i=t.target;e(i)[0]===this.$wizardOverlay[0]&&this.$wizardOverlay.removeClass("expanded")},showMessage:function(e,t="text"){const i="show-message "+("success"===e?"success-message":"error-message");this.$wizardWrapper.find(".vczapi-migrate-to-s2sOauth--message").removeClass(["error-message","success-message"]),this.$wizardWrapper.find(".vczapi-migrate-to-s2sOauth--message").addClass(i).text(t)},s2sOauthFormHandler:function(t){t.preventDefault();const i=e(t.target).serialize();e.ajax({type:"POST",url:ajaxurl+"?action=vczapi_save_oauth_credentials",context:this,data:i,beforeSend:function(){this.$s2sOauthForm.find("input").prop("disabled",!0),this.$s2sOauthForm.addClass("submitting")},success:function(e){this.$s2sOauthForm.find("input").prop("disabled",!1),this.$s2sOauthForm.removeClass("submitting"),e.hasOwnProperty("success")&&e.success?(this.showMessage("success",e?.data.message),this.$wizardWrapper.find(".next-step").attr("disabled",!1)):this.showMessage("error",e?.data.message)},error:function(e,t,i){console.log("Error thrown",i)}})},appSDKFormHandler:function(t){t.preventDefault();const i=e(t.target).serialize();e.ajax({type:"POST",url:ajaxurl+"?action=vczapi_save_app_sdk_credentials",context:this,data:i,beforeSend:function(){this.$appSDKForm.find("input").prop("disabled",!0),this.$appSDKForm.addClass("submitting")},success:function(e){this.$appSDKForm.find("input").prop("disabled",!1),this.$appSDKForm.removeClass("submitting"),e.hasOwnProperty("success")&&e.success?(this.showMessage("success",e?.data.message),this.$wizardWrapper.find(".next-step").attr("disabled",!1)):this.showMessage("error",e?.data.message)},error:function(e,t,i){console.log("Error thrown",i)}})},maybeTriggerMigrationWizard:function(){let e=this.getSearchParameters();e.hasOwnProperty("page")&&"zoom-video-conferencing-settings"===e.page&&e.hasOwnProperty("migrate")&&"now"===e.migrate&&this.$wizardOverlay.addClass("expanded")},getSearchParameters:function(){let e=window.location.search.substring(1);return null!=e&&""!==e?this.transformToAssocArray(e):{}},transformToAssocArray:function(e){for(var t={},i=e.split("&"),a=0;a<i.length;a++){var s=i[a].split("=");t[s[0]]=s[1]}return t},navigateToStep:function(t){t.preventDefault();let i=e(t.currentTarget),a=i.data("step"),s=i.data("final_step");if(void 0===a)console.log("Error no steps defined");else{let e=this,t=e.$wizardWrapper.find(".step-"+a);if(t.length>0){let n=parseInt(a)+1;this.$wizardWrapper.find(".step.active").removeClass("active").fadeOut("slow",(function(){t.addClass("active").fadeIn("slow"),i.data("step",n),i.attr("disabled",!0),n>parseInt(s)&&i.hide(),e.$messageWrapper.removeClass("show-message")}))}else i.hide()}}},c={init:function(){e(".vczapi-dismiss-admin-notice").on("click",this.dismissNotice.bind(this))},dismissNotice:function(t){t.preventDefault();let i=e(t.target),a=i.data("id"),s=i.data("security");e.ajax({type:"POST",url:ajaxurl,data:{action:"vczapi_dismiss_admin_notice",option:a,security:s},beforeSend:function(){i.parents(".vczapi-notice").length>0&&i.parents(".vczapi-notice").fadeOut()},success:function(e){e.hasOwnProperty("success")&&e.success&&console.log(e)}})}};e((function(){n.init(),c.init(),i.onReady(),a.init(),s.init()}))}(jQuery)}();
  • video-conferencing-with-zoom-api/tags/4.6.11/assets/public/js/join-via-browser.js

    r2868664 r3722621  
    1212    countDown: function () {
    1313      var clock = this.$timer;
    14       if (clock.length > 0) {
    15         var valueDate = clock.data('date');
    16         var mtgTimezone = clock.data('tz');
     14      if (!clock.length) {
     15        return;
     16      }
     17      var valueDate = clock.data('date');
     18      var mtgTimezone = clock.data('tz');
     19      var userTimezone = moment.tz.guess();
     20      if (userTimezone === 'Asia/Katmandu') {
     21        userTimezone = 'Asia/Kathmandu';
     22      }
    1723
    18         // var dateFormat = moment(valueDate).format('MMM D, YYYY HH:mm:ss');
     24      // Meeting time in the meeting timezone
     25      var meetingTime = moment.tz(valueDate, mtgTimezone);
    1926
    20         var user_timezone = moment.tz.guess();
    21         if (user_timezone === 'Asia/Katmandu') {
    22           user_timezone = 'Asia/Kathmandu';
     27      // Meeting time converted to the user's timezone
     28      var userMeetingTime = meetingTime.clone().tz(userTimezone);
     29
     30      // Check time difference
     31      var diffTime = userMeetingTime.diff(moment());
     32      var lang = document.documentElement.lang;
     33      $('.sidebar-start-time').html(userMeetingTime.clone().locale(lang).format('LLLL'));
     34      var second = 1000;
     35      var minute = second * 60;
     36      var hour = minute * 60;
     37      var day = hour * 24;
     38
     39      // Meeting has already started
     40      if (diffTime <= 0) {
     41        $(clock).remove();
     42        return;
     43      }
     44      var countDown = userMeetingTime.valueOf();
     45      var x = setInterval(function () {
     46        var distance = countDown - Date.now();
     47        var days = Math.floor(distance / day);
     48        var hours = Math.floor(distance % day / hour);
     49        var minutes = Math.floor(distance % hour / minute);
     50        var seconds = Math.floor(distance % minute / second);
     51        var daysEl = document.getElementById('dpn-zvc-timer-days');
     52        var hoursEl = document.getElementById('dpn-zvc-timer-hours');
     53        var minutesEl = document.getElementById('dpn-zvc-timer-minutes');
     54        var secondsEl = document.getElementById('dpn-zvc-timer-seconds');
     55        if (daysEl) {
     56          daysEl.innerText = Math.max(0, days);
    2357        }
    24 
    25         //Converting Timezones to locals
    26         var source_timezone = moment.tz(valueDate, mtgTimezone).format();
    27         var converted_timezone = moment.tz(source_timezone, user_timezone).format('MMM D, YYYY HH:mm:ss');
    28         var convertedTimezonewithoutFormat = moment.tz(source_timezone, user_timezone).format();
    29 
    30         //Check Time Difference for Validations
    31         var currentTime = moment().unix();
    32         var eventTime = moment(convertedTimezonewithoutFormat).unix();
    33         var diffTime = eventTime - currentTime;
    34         var lang = document.documentElement.lang;
    35         $('.sidebar-start-time').html(moment.parseZone(convertedTimezonewithoutFormat).locale(lang).format('LLLL'));
    36         var second = 1000,
    37           minute = second * 60,
    38           hour = minute * 60,
    39           day = hour * 24;
    40 
    41         // if time to countdown
    42         if (diffTime > 0) {
    43           var countDown = new Date(converted_timezone).getTime();
    44           var x = setInterval(function () {
    45             var now = new Date().getTime();
    46             var distance = countDown - now;
    47             document.getElementById('dpn-zvc-timer-days').innerText = Math.floor(distance / day);
    48             document.getElementById('dpn-zvc-timer-hours').innerText = Math.floor(distance % day / hour);
    49             document.getElementById('dpn-zvc-timer-minutes').innerText = Math.floor(distance % hour / minute);
    50             document.getElementById('dpn-zvc-timer-seconds').innerText = Math.floor(distance % minute / second);
    51             if (distance < 0) {
    52               clearInterval(x);
    53               location.reload();
    54             }
    55           }, second);
    56         } else {
    57           // location.reload();
    58           $(clock).remove();
     58        if (hoursEl) {
     59          hoursEl.innerText = Math.max(0, hours);
    5960        }
    60       }
     61        if (minutesEl) {
     62          minutesEl.innerText = Math.max(0, minutes);
     63        }
     64        if (secondsEl) {
     65          secondsEl.innerText = Math.max(0, seconds);
     66        }
     67        if (distance <= 0) {
     68          clearInterval(x);
     69          location.reload();
     70        }
     71      }, second);
    6172    }
    6273  };
  • video-conferencing-with-zoom-api/tags/4.6.11/assets/public/js/join-via-browser.min.js

    r2868664 r3722621  
    1 jQuery((function(e){({init:function(){this.cacheVariables(),this.countDown()},cacheVariables:function(){this.$timer=e("#dpn-zvc-timer")},countDown:function(){var t=this.$timer;if(t.length>0){var n=t.data("date"),m=t.data("tz"),a=moment.tz.guess();"Asia/Katmandu"===a&&(a="Asia/Kathmandu");var o=moment.tz(n,m).format(),i=moment.tz(o,a).format("MMM D, YYYY HH:mm:ss"),r=moment.tz(o,a).format(),c=moment().unix(),d=moment(r).unix()-c,l=document.documentElement.lang;e(".sidebar-start-time").html(moment.parseZone(r).locale(l).format("LLLL"));var s=36e5,u=24*s;if(d>0)var f=new Date(i).getTime(),h=setInterval((function(){var e=(new Date).getTime(),t=f-e;document.getElementById("dpn-zvc-timer-days").innerText=Math.floor(t/u),document.getElementById("dpn-zvc-timer-hours").innerText=Math.floor(t%u/s),document.getElementById("dpn-zvc-timer-minutes").innerText=Math.floor(t%s/6e4),document.getElementById("dpn-zvc-timer-seconds").innerText=Math.floor(t%6e4/1e3),t<0&&(clearInterval(h),location.reload())}),1e3);else e(t).remove()}}}).init()}));
     1jQuery((function(t){({init:function(){this.cacheVariables(),this.countDown()},cacheVariables:function(){this.$timer=t("#dpn-zvc-timer")},countDown:function(){var e=this.$timer;if(e.length){var n=e.data("date"),a=e.data("tz"),o=moment.tz.guess();"Asia/Katmandu"===o&&(o="Asia/Kathmandu");var i=moment.tz(n,a).clone().tz(o),m=i.diff(moment()),r=document.documentElement.lang;t(".sidebar-start-time").html(i.clone().locale(r).format("LLLL"));var c=36e5,d=24*c;if(m<=0)t(e).remove();else var l=i.valueOf(),u=setInterval((function(){var t=l-Date.now(),e=Math.floor(t/d),n=Math.floor(t%d/c),a=Math.floor(t%c/6e4),o=Math.floor(t%6e4/1e3),i=document.getElementById("dpn-zvc-timer-days"),m=document.getElementById("dpn-zvc-timer-hours"),r=document.getElementById("dpn-zvc-timer-minutes"),s=document.getElementById("dpn-zvc-timer-seconds");i&&(i.innerText=Math.max(0,e)),m&&(m.innerText=Math.max(0,n)),r&&(r.innerText=Math.max(0,a)),s&&(s.innerText=Math.max(0,o)),t<=0&&(clearInterval(u),location.reload())}),1e3)}}}).init()}));
  • video-conferencing-with-zoom-api/tags/4.6.11/assets/public/js/public.js

    r2927761 r3722621  
    2121    countDownTimerMoment: function () {
    2222      var clock = this.$timer;
    23       if (clock.length > 0) {
    24         var valueDate = clock.data('date');
    25         var mtgTimezone = clock.data('tz');
    26         var mtgState = clock.data('state');
     23      if (!clock.length) {
     24        return;
     25      }
     26      var valueDate = clock.data('date');
     27      var mtgTimezone = clock.data('tz');
     28      var mtgState = clock.data('state');
     29      var userTimezone = moment.tz.guess();
     30      if (userTimezone === 'Asia/Katmandu') {
     31        userTimezone = 'Asia/Kathmandu';
     32      }
    2733
    28         // var dateFormat = moment(valueDate).format('MMM D, YYYY HH:mm:ss');
    29         var user_timezone = moment.tz.guess();
    30         if (user_timezone === 'Asia/Katmandu') {
    31           user_timezone = 'Asia/Kathmandu';
     34      // Meeting time in the meeting timezone
     35      var meetingTime = moment.tz(valueDate, mtgTimezone);
     36
     37      // Meeting time converted to user's timezone
     38      var userMeetingTime = meetingTime.clone().tz(userTimezone);
     39
     40      // Check time difference
     41      var diffTime = userMeetingTime.diff(moment());
     42      var lang = document.documentElement.lang;
     43      var dateFormat = zvc_strings.date_format !== '' ? zvc_strings.date_format : 'LLLL';
     44      $('.sidebar-start-time').html(userMeetingTime.clone().locale(lang).format(dateFormat));
     45      $('.vczapi-single-meeting-timezone').html(userTimezone);
     46      var second = 1000;
     47      var minute = second * 60;
     48      var hour = minute * 60;
     49      var day = hour * 24;
     50      if (mtgState === 'ended') {
     51        $(clock).html('<div class="dpn-zvc-meeting-ended">' + '<h3>' + zvc_strings.meeting_ended + '</h3>' + '</div>');
     52        return;
     53      }
     54      if (diffTime <= 0) {
     55        $(clock).remove();
     56        return;
     57      }
     58      var countDown = userMeetingTime.valueOf();
     59      var x = setInterval(function () {
     60        var distance = countDown - Date.now();
     61        if (distance <= 0) {
     62          clearInterval(x);
     63          $(clock).html('<div class="dpn-zvc-meeting-ended">' + '<h3>' + zvc_strings.meeting_starting + '</h3>' + '</div>');
     64          return;
    3265        }
    33 
    34         //Converting Timezones to locals
    35         var source_timezone = moment.tz(valueDate, mtgTimezone).format();
    36         var converted_timezone = moment.tz(source_timezone, user_timezone).format('MMM D, YYYY HH:mm:ss');
    37         var convertedTimezonewithoutFormat = moment.tz(source_timezone, user_timezone).format();
    38         let meetingUTCTime = moment.utc(source_timezone).valueOf();
    39         let usersDate = new Date(meetingUTCTime);
    40 
    41         //Check Time Difference for Validations
    42         var currentTime = moment().unix();
    43         var eventTime = moment(convertedTimezonewithoutFormat).unix();
    44         var diffTime = eventTime - currentTime;
    45         var lang = document.documentElement.lang;
    46         var dateFormat = zvc_strings.date_format !== '' ? zvc_strings.date_format : 'LLLL';
    47         $('.sidebar-start-time').html(moment.parseZone(usersDate).locale(lang).format(dateFormat));
    48         $('.vczapi-single-meeting-timezone').html(user_timezone);
    49         var second = 1000,
    50           minute = second * 60,
    51           hour = minute * 60,
    52           day = hour * 24;
    53         if (mtgState === 'ended') {
    54           $(clock).html('<div class=\'dpn-zvc-meeting-ended\'><h3>' + zvc_strings.meeting_ended + '</h3></div>');
    55         } else {
    56           // if time to countdown
    57           if (diffTime > 0) {
    58             var countDown = new Date(converted_timezone).getTime();
    59             var x = setInterval(function () {
    60               var now = new Date().getTime();
    61               var distance = countDown - now;
    62               document.getElementById('dpn-zvc-timer-days').innerText = Math.floor(distance / day);
    63               document.getElementById('dpn-zvc-timer-hours').innerText = Math.floor(distance % day / hour);
    64               document.getElementById('dpn-zvc-timer-minutes').innerText = Math.floor(distance % hour / minute);
    65               document.getElementById('dpn-zvc-timer-seconds').innerText = Math.floor(distance % minute / second);
    66               if (distance < 0) {
    67                 clearInterval(x);
    68                 $(clock).html('<div class=\'dpn-zvc-meeting-ended\'><h3>' + zvc_strings.meeting_starting + '</h3></div>');
    69               }
    70             }, second);
    71           } else {
    72             $(clock).remove();
    73           }
     66        var days = Math.floor(distance / day);
     67        var hours = Math.floor(distance % day / hour);
     68        var minutes = Math.floor(distance % hour / minute);
     69        var seconds = Math.floor(distance % minute / second);
     70        var daysEl = document.getElementById('dpn-zvc-timer-days');
     71        var hoursEl = document.getElementById('dpn-zvc-timer-hours');
     72        var minutesEl = document.getElementById('dpn-zvc-timer-minutes');
     73        var secondsEl = document.getElementById('dpn-zvc-timer-seconds');
     74        if (daysEl) {
     75          daysEl.innerText = days;
    7476        }
    75       }
     77        if (hoursEl) {
     78          hoursEl.innerText = hours;
     79        }
     80        if (minutesEl) {
     81          minutesEl.innerText = minutes;
     82        }
     83        if (secondsEl) {
     84          secondsEl.innerText = seconds;
     85        }
     86      }, second);
    7687    },
    7788    /**
    … …  
    146157        type: $(e.currentTarget).data('type'),
    147158        post_id: post_id ? post_id : false,
    148         action: 'state_change',
    149         accss: vczapi_state.zvc_security
     159        action: 'vczapi_meeting_state_change',
     160        nonce: vczapi_state.nonce
    150161      };
    151162      if (state === 'resume') {
  • video-conferencing-with-zoom-api/tags/4.6.11/assets/public/js/public.min.js

    r2927761 r3722621  
    1 !function(){"use strict";jQuery((function(t){({init:function(){this.cacheVariables(),this.countDownTimerMoment(),this.evntLoaders()},cacheVariables:function(){this.$timer=t("#dpn-zvc-timer"),this.changeMeetingState=t(".vczapi-meeting-state-change")},evntLoaders:function(){t(document).ready(this.setTimezone.bind(this)),t(this.changeMeetingState).on("click",this.meetingStateChange.bind(this))},countDownTimerMoment:function(){var e=this.$timer;if(e.length>0){var a=e.data("date"),n=e.data("tz"),i=e.data("state"),o=moment.tz.guess();"Asia/Katmandu"===o&&(o="Asia/Kathmandu");var r=moment.tz(a,n).format(),d=moment.tz(r,o).format("MMM D, YYYY HH:mm:ss"),s=moment.tz(r,o).format();let f=moment.utc(r).valueOf(),z=new Date(f);var m=moment().unix(),c=moment(s).unix()-m,g=document.documentElement.lang,v=""!==zvc_strings.date_format?zvc_strings.date_format:"LLLL";t(".sidebar-start-time").html(moment.parseZone(z).locale(g).format(v)),t(".vczapi-single-meeting-timezone").html(o);var u=36e5,l=24*u;if("ended"===i)t(e).html("<div class='dpn-zvc-meeting-ended'><h3>"+zvc_strings.meeting_ended+"</h3></div>");else if(c>0)var h=new Date(d).getTime(),_=setInterval((function(){var a=(new Date).getTime(),n=h-a;document.getElementById("dpn-zvc-timer-days").innerText=Math.floor(n/l),document.getElementById("dpn-zvc-timer-hours").innerText=Math.floor(n%l/u),document.getElementById("dpn-zvc-timer-minutes").innerText=Math.floor(n%u/6e4),document.getElementById("dpn-zvc-timer-seconds").innerText=Math.floor(n%6e4/1e3),n<0&&(clearInterval(_),t(e).html("<div class='dpn-zvc-meeting-ended'><h3>"+zvc_strings.meeting_starting+"</h3></div>"))}),1e3);else t(e).remove()}},setTimezone:function(){var e=moment.tz.guess();"Asia/Katmandu"===e&&(e="Asia/Kathmandu");try{if(void 0!==typeof mtg_data&&"single-meeting"===mtg_data.page){t(".dpn-zvc-sidebar-content").after('<div class="dpn-zvc-sidebar-box remove-sidebar-loder-text"><p>Loading..Please wait..</p></div>');var a={action:"set_timezone",user_timezone:e,post_id:mtg_data.post_id,mtg_timezone:mtg_data.timezone,start_date:mtg_data.start_date,meeting_type:mtg_data.meeting_type,type:"page"};t.post(mtg_data.ajaxurl,a).done((function(e){e.success?t(".dpn-zvc-sidebar-content").after(e.data):t(".dpn-zvc-sidebar-content").after('<div class="dpn-zvc-sidebar-box vczapi-no-longer-valid">'+e.data+"</div>"),t(".remove-sidebar-loder-text").remove()}))}if(void 0!==typeof mtg_data&&"shortcode"===mtg_data.type){var n={action:"set_timezone",user_timezone:e,mtg_timezone:mtg_data.timezone,join_uri:mtg_data.join_uri,browser_url:mtg_data.browser_url,start_date:mtg_data.start_date,type:"shortcode"};t(".zvc-table-shortcode-duration").after('<tr class="remove-shortcode-loder-text"><td colspan="2">Loading.. Please wait..</td></tr>'),t.post(mtg_data.ajaxurl,n).done((function(e){e.success?t(".zvc-table-shortcode-duration").after(e.data):t(".zvc-table-shortcode-duration").after('<tr><td colspan="2">'+e.data+"</td></tr>"),t(".remove-shortcode-loder-text").remove()}))}}catch(t){}},meetingStateChange:function(e){e.preventDefault();var a=t(e.currentTarget).data("state"),n=t(e.currentTarget).data("postid"),i={id:t(e.currentTarget).data("id"),state:a,type:t(e.currentTarget).data("type"),post_id:n||!1,action:"state_change",accss:vczapi_state.zvc_security};if("resume"===a)this.changeState(i);else if("end"===a){if(!confirm(vczapi_state.lang.confirm_end))return;this.changeState(i)}},changeState:function(e){t.post(vczapi_state.ajaxurl,e).done((function(t){location.reload()}))}}).init()}))}();
     1!function(){"use strict";jQuery((function(t){({init:function(){this.cacheVariables(),this.countDownTimerMoment(),this.evntLoaders()},cacheVariables:function(){this.$timer=t("#dpn-zvc-timer"),this.changeMeetingState=t(".vczapi-meeting-state-change")},evntLoaders:function(){t(document).ready(this.setTimezone.bind(this)),t(this.changeMeetingState).on("click",this.meetingStateChange.bind(this))},countDownTimerMoment:function(){var e=this.$timer;if(e.length){var a=e.data("date"),n=e.data("tz"),i=e.data("state"),o=moment.tz.guess();"Asia/Katmandu"===o&&(o="Asia/Kathmandu");var d=moment.tz(a,n).clone().tz(o),r=d.diff(moment()),s=document.documentElement.lang,c=""!==zvc_strings.date_format?zvc_strings.date_format:"LLLL";t(".sidebar-start-time").html(d.clone().locale(s).format(c)),t(".vczapi-single-meeting-timezone").html(o);var m=36e5,g=24*m;if("ended"!==i)if(r<=0)t(e).remove();else var v=d.valueOf(),l=setInterval((function(){var a=v-Date.now();if(a<=0)return clearInterval(l),void t(e).html('<div class="dpn-zvc-meeting-ended"><h3>'+zvc_strings.meeting_starting+"</h3></div>");var n=Math.floor(a/g),i=Math.floor(a%g/m),o=Math.floor(a%m/6e4),d=Math.floor(a%6e4/1e3),r=document.getElementById("dpn-zvc-timer-days"),s=document.getElementById("dpn-zvc-timer-hours"),c=document.getElementById("dpn-zvc-timer-minutes"),u=document.getElementById("dpn-zvc-timer-seconds");r&&(r.innerText=n),s&&(s.innerText=i),c&&(c.innerText=o),u&&(u.innerText=d)}),1e3);else t(e).html('<div class="dpn-zvc-meeting-ended"><h3>'+zvc_strings.meeting_ended+"</h3></div>")}},setTimezone:function(){var e=moment.tz.guess();"Asia/Katmandu"===e&&(e="Asia/Kathmandu");try{if(void 0!==typeof mtg_data&&"single-meeting"===mtg_data.page){t(".dpn-zvc-sidebar-content").after('<div class="dpn-zvc-sidebar-box remove-sidebar-loder-text"><p>Loading..Please wait..</p></div>');var a={action:"set_timezone",user_timezone:e,post_id:mtg_data.post_id,mtg_timezone:mtg_data.timezone,start_date:mtg_data.start_date,meeting_type:mtg_data.meeting_type,type:"page"};t.post(mtg_data.ajaxurl,a).done((function(e){e.success?t(".dpn-zvc-sidebar-content").after(e.data):t(".dpn-zvc-sidebar-content").after('<div class="dpn-zvc-sidebar-box vczapi-no-longer-valid">'+e.data+"</div>"),t(".remove-sidebar-loder-text").remove()}))}if(void 0!==typeof mtg_data&&"shortcode"===mtg_data.type){var n={action:"set_timezone",user_timezone:e,mtg_timezone:mtg_data.timezone,join_uri:mtg_data.join_uri,browser_url:mtg_data.browser_url,start_date:mtg_data.start_date,type:"shortcode"};t(".zvc-table-shortcode-duration").after('<tr class="remove-shortcode-loder-text"><td colspan="2">Loading.. Please wait..</td></tr>'),t.post(mtg_data.ajaxurl,n).done((function(e){e.success?t(".zvc-table-shortcode-duration").after(e.data):t(".zvc-table-shortcode-duration").after('<tr><td colspan="2">'+e.data+"</td></tr>"),t(".remove-shortcode-loder-text").remove()}))}}catch(t){}},meetingStateChange:function(e){e.preventDefault();var a=t(e.currentTarget).data("state"),n=t(e.currentTarget).data("postid"),i={id:t(e.currentTarget).data("id"),state:a,type:t(e.currentTarget).data("type"),post_id:n||!1,action:"vczapi_meeting_state_change",nonce:vczapi_state.nonce};if("resume"===a)this.changeState(i);else if("end"===a){if(!confirm(vczapi_state.lang.confirm_end))return;this.changeState(i)}},changeState:function(e){t.post(vczapi_state.ajaxurl,e).done((function(t){location.reload()}))}}).init()}))}();
  • video-conferencing-with-zoom-api/tags/4.6.11/assets/vendor/zoom/websdk/zoom-meeting.bundle.js

    r3565576 r3722621  
    1 "use strict";(self.webpackChunkvideo_conferencing_with_zoom_api=self.webpackChunkvideo_conferencing_with_zoom_api||[]).push([[721],{631:(e,n,t)=>{var i=t(114);const o={meetingID:atob(zvc_ajx.meeting_id),redirectTo:zvc_ajx.redirect_page,password:!1!==zvc_ajx.meeting_pwd&&atob(zvc_ajx.meeting_pwd),infoContainer:document.querySelector(".vczapi-zoom-browser-meeting--info__browser"),init:function(){this.initSDK(),this.eventHandlers(),zvc_ajx.enable_direct_join_via_browser&&this.handleJoinOnInit()},initSDK:function(){i.ZoomMtg.preLoadWasm(),i.ZoomMtg.prepareWebSDK()},eventHandlers:function(){let e=document.getElementById("vczapi-zoom-browser-meeting-join-mtg");null!=e&&(e.onclick=this.handleJoinMeetingButton.bind(this))},handleJoinOnInit:function(){const e=zvc_ajx.user_name,n=zvc_ajx.user_mail,t=this.password;this.handleJoinMeeting(e,t,n)},loader:function(){const e=document.createElement("span");return e.id="zvc-cover",e},generateSignature:async function(){const e=new FormData;return e.append("action","get_auth"),e.append("noncce",zvc_ajx.zvc_security),e.append("meeting_id",parseInt(this.meetingID)),(await fetch(zvc_ajx.ajaxurl,{method:"POST",body:e,credentials:"same-origin"})).json()},removeLoader:function(){null!==document.getElementById("zvc-cover")&&document.getElementById("zvc-cover").remove()},handleJoinMeeting:function(e,n,t,i){null==this.meetingID&&""===this.meetingID||this.generateSignature().then((o=>{if(o.success){document.getElementById("zmmtg-root").style.display="block",this.removeLoader();const a={name:null!==e?e:"",password:null!==n?n:"",email:null!==t?t:"",locale:i};this.prepBeforeJoin(o,a)}}))},handleJoinMeetingButton:function(e){e.preventDefault(),document.body.appendChild(this.loader());const n=document.getElementById("vczapi-jvb-display-name"),t=document.getElementById("vczapi-jvb-email"),i=document.getElementById("meeting_password"),o=document.querySelector(".meeting-locale");if(null!==n&&(null===n.value||""===n.value))return this.infoContainer.innerHTML="Name is a Required field!",this.infoContainer.style.color="red",this.removeLoader(),!1;if(null!==t&&(null===t.value||""===t.value))return this.infoContainer.innerHTML="Email is a Required field!",this.infoContainer.style.color="red",this.removeLoader(),!1;if(null!==i&&(null===i.value||""===i.value))return this.infoContainer.innerHTML="Validation: Password is Required!",this.infoContainer.style.color="red",this.removeLoader(),!1;const a=null!==n?n.value:"",r=null!==i?i.value:"",l=null!==t?t.value:"",s=null!==o.value?o.value:"en-US";this.handleJoinMeeting(a,r,l,s)},prepBeforeJoin:function(e,n){const t=e.data.sig,i=document.getElementById("vczapi-zoom-browser-meeting");null!==i&&i.remove();const o={lang:n.locale,leaveUrl:this.redirectTo};let a={meetingNumber:parseInt(this.meetingID),userName:n.name,signature:t,userEmail:n.email,passWord:n.password?n.password:this.password,success:function(e){console.log("Join Meeting Success")},error:function(e){console.log(e)}};const r=new URLSearchParams(window.location.search),l=Object.fromEntries(r.entries());null!==l.tk&&(a.tk=l.tk),window.location!==window.parent.location&&(o.leaveUrl=window.location.href),this.joinMeeting(o,a)},joinMeeting:function(e,n){i.ZoomMtg.i18n.load(e.lang),i.ZoomMtg.init({leaveUrl:e.leaveUrl,isSupportAV:!0,meetingInfo:zvc_ajx.meetingInfo,disableInvite:zvc_ajx.disableInvite,disableRecord:zvc_ajx.disableRecord,disableJoinAudio:zvc_ajx.disableJoinAudio,isSupportChat:zvc_ajx.isSupportChat,isSupportQA:zvc_ajx.isSupportQA,isSupportBreakout:zvc_ajx.isSupportBreakout,isSupportCC:zvc_ajx.isSupportCC,screenShare:zvc_ajx.screenShare,success:function(){i.ZoomMtg.join(n)},error:function(e){console.log(e)}})}};document.addEventListener("DOMContentLoaded",o.init())}},e=>{e(e.s=631)}]);
     1"use strict";(self.webpackChunkvideo_conferencing_with_zoom_api=self.webpackChunkvideo_conferencing_with_zoom_api||[]).push([[721],{631:(e,n,t)=>{var i=t(114);const o={meetingID:atob(zvc_ajx.meeting_id),redirectTo:zvc_ajx.redirect_page,password:!1!==zvc_ajx.meeting_pwd&&atob(zvc_ajx.meeting_pwd),infoContainer:document.querySelector(".vczapi-zoom-browser-meeting--info__browser"),init:function(){this.initSDK(),this.eventHandlers(),zvc_ajx.enable_direct_join_via_browser&&this.handleJoinOnInit()},initSDK:function(){i.ZoomMtg.preLoadWasm(),i.ZoomMtg.prepareWebSDK()},eventHandlers:function(){let e=document.getElementById("vczapi-zoom-browser-meeting-join-mtg");null!=e&&(e.onclick=this.handleJoinMeetingButton.bind(this))},handleJoinOnInit:function(){const e=zvc_ajx.user_name,n=zvc_ajx.user_mail,t=this.password;this.handleJoinMeeting(e,t,n)},loader:function(){const e=document.createElement("span");return e.id="zvc-cover",e},generateSignature:async function(){const e=new FormData;return e.append("action","vczapi_jvb_get_auth"),e.append("meeting_id",parseInt(this.meetingID)),e.append("nonce",zvc_ajx.nonce),(await fetch(zvc_ajx.ajaxurl,{method:"POST",body:e,credentials:"same-origin"})).json()},removeLoader:function(){null!==document.getElementById("zvc-cover")&&document.getElementById("zvc-cover").remove()},handleJoinMeeting:function(e,n,t,i){null==this.meetingID&&""===this.meetingID||this.generateSignature().then((o=>{if(o.success){document.getElementById("zmmtg-root").style.display="block",this.removeLoader();const a={name:null!==e?e:"",password:null!==n?n:"",email:null!==t?t:"",locale:i};this.prepBeforeJoin(o,a)}}))},handleJoinMeetingButton:function(e){e.preventDefault(),document.body.appendChild(this.loader());const n=document.getElementById("vczapi-jvb-display-name"),t=document.getElementById("vczapi-jvb-email"),i=document.getElementById("meeting_password"),o=document.querySelector(".meeting-locale");if(null!==n&&(null===n.value||""===n.value))return this.infoContainer.innerHTML="Name is a Required field!",this.infoContainer.style.color="red",this.removeLoader(),!1;if(null!==t&&(null===t.value||""===t.value))return this.infoContainer.innerHTML="Email is a Required field!",this.infoContainer.style.color="red",this.removeLoader(),!1;if(null!==i&&(null===i.value||""===i.value))return this.infoContainer.innerHTML="Validation: Password is Required!",this.infoContainer.style.color="red",this.removeLoader(),!1;const a=null!==n?n.value:"",r=null!==i?i.value:"",l=null!==t?t.value:"",s=null!==o.value?o.value:"en-US";this.handleJoinMeeting(a,r,l,s)},prepBeforeJoin:function(e,n){const t=e.data.sig,i=document.getElementById("vczapi-zoom-browser-meeting");null!==i&&i.remove();const o={lang:n.locale,leaveUrl:this.redirectTo};let a={meetingNumber:parseInt(this.meetingID),userName:n.name,signature:t,userEmail:n.email,passWord:n.password?n.password:this.password,success:function(e){console.log("Join Meeting Success")},error:function(e){console.log(e)}};const r=new URLSearchParams(window.location.search),l=Object.fromEntries(r.entries());null!==l.tk&&(a.tk=l.tk),window.location!==window.parent.location&&(o.leaveUrl=window.location.href),this.joinMeeting(o,a)},joinMeeting:function(e,n){i.ZoomMtg.i18n.load(e.lang),i.ZoomMtg.init({leaveUrl:e.leaveUrl,isSupportAV:!0,meetingInfo:zvc_ajx.meetingInfo,disableInvite:zvc_ajx.disableInvite,disableRecord:zvc_ajx.disableRecord,disableJoinAudio:zvc_ajx.disableJoinAudio,isSupportChat:zvc_ajx.isSupportChat,isSupportQA:zvc_ajx.isSupportQA,isSupportBreakout:zvc_ajx.isSupportBreakout,isSupportCC:zvc_ajx.isSupportCC,screenShare:zvc_ajx.screenShare,success:function(){i.ZoomMtg.join(n)},error:function(e){console.log(e)}})}};document.addEventListener("DOMContentLoaded",o.init())}},e=>{e(e.s=631)}]);
  • video-conferencing-with-zoom-api/tags/4.6.11/build/index.asset.php

    r3666609 r3722621  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render', 'wp-url'), 'version' => 'cd4b67e80c6d93d50bd9');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render', 'wp-url'), 'version' => '65af9c185fd989b98081');
  • video-conferencing-with-zoom-api/tags/4.6.11/build/index.js

    r3666609 r3722621  
    1 !function(){"use strict";var e,t={231:function(e,t,n){var o=window.wp.blocks;function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:String(t)}function a(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function l(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function u(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);l=!0);}catch(e){u=!0,r=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var p=window.wp.i18n,d=window.lodash,f=window.wp.url,h=window.wp.blockEditor,v=window.wp.serverSideRender,m=n.n(v),g=window.wp.components,b=window.wp.element,y=window.wp.apiFetch,w=n.n(y);function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},O.apply(this,arguments)}var x=window.React;function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function j(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,i(o.key),o)}}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function P(e){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},P(e)}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}var M=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),E=Math.abs,I=String.fromCharCode,D=Object.assign;function V(e){return e.trim()}function z(e,t,n){return e.replace(t,n)}function R(e,t){return e.indexOf(t)}function A(e,t){return 0|e.charCodeAt(t)}function T(e,t,n){return e.slice(t,n)}function F(e){return e.length}function L(e){return e.length}function N(e,t){return t.push(e),e}var B=1,H=1,$=0,U=0,W=0,G="";function Y(e,t,n,o,r,i,a){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:B,column:H,length:a,return:""}}function Z(e,t){return D(Y("",null,null,"",null,null,0),e,{length:-e.length},t)}function q(){return W=U>0?A(G,--U):0,H--,10===W&&(H=1,B--),W}function J(){return W=U<$?A(G,U++):0,H++,10===W&&(H=1,B++),W}function X(){return A(G,U)}function K(){return U}function Q(e,t){return T(G,e,t)}function ee(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function te(e){return B=H=1,$=F(G=e),U=0,[]}function ne(e){return G="",e}function oe(e){return V(Q(U-1,ae(91===e?e+2:40===e?e+1:e)))}function re(e){for(;(W=X())&&W<33;)J();return ee(e)>2||ee(W)>3?"":" "}function ie(e,t){for(;--t&&J()&&!(W<48||W>102||W>57&&W<65||W>70&&W<97););return Q(e,K()+(t<6&&32==X()&&32==J()))}function ae(e){for(;J();)switch(W){case e:return U;case 34:case 39:34!==e&&39!==e&&ae(W);break;case 40:41===e&&ae(e);break;case 92:J()}return U}function se(e,t){for(;J()&&e+W!==57&&(e+W!==84||47!==X()););return"/*"+Q(t,U-1)+"*"+I(47===e?e:J())}function le(e){for(;!ee(X());)J();return Q(e,U)}var ue="-ms-",ce="-moz-",pe="-webkit-",de="comm",fe="rule",he="decl",ve="@keyframes";function me(e,t){for(var n="",o=L(e),r=0;r<o;r++)n+=t(e[r],r,e,t)||"";return n}function ge(e,t,n,o){switch(e.type){case"@import":case he:return e.return=e.return||e.value;case de:return"";case ve:return e.return=e.value+"{"+me(e.children,o)+"}";case fe:e.value=e.props.join(",")}return F(n=me(e.children,o))?e.return=e.value+"{"+n+"}":""}function be(e){return ne(ye("",null,null,null,[""],e=te(e),0,[0],e))}function ye(e,t,n,o,r,i,a,s,l){for(var u=0,c=0,p=a,d=0,f=0,h=0,v=1,m=1,g=1,b=0,y="",w=r,O=i,x=o,S=y;m;)switch(h=b,b=J()){case 40:if(108!=h&&58==A(S,p-1)){-1!=R(S+=z(oe(b),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:S+=oe(b);break;case 9:case 10:case 13:case 32:S+=re(h);break;case 92:S+=ie(K()-1,7);continue;case 47:switch(X()){case 42:case 47:N(Oe(se(J(),K()),t,n),l);break;default:S+="/"}break;case 123*v:s[u++]=F(S)*g;case 125*v:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+c:-1==g&&(S=z(S,/\f/g,"")),f>0&&F(S)-p&&N(f>32?xe(S+";",o,n,p-1):xe(z(S," ","")+";",o,n,p-2),l);break;case 59:S+=";";default:if(N(x=we(S,t,n,u,c,r,s,y,w=[],O=[],p),i),123===b)if(0===c)ye(S,t,x,x,w,i,p,s,O);else switch(99===d&&110===A(S,3)?100:d){case 100:case 109:case 115:ye(e,x,x,o&&N(we(e,x,x,0,0,r,s,y,r,w=[],p),O),r,O,p,s,o?w:O);break;default:ye(S,x,x,x,[""],O,0,s,O)}}u=c=f=0,v=g=1,y=S="",p=a;break;case 58:p=1+F(S),f=h;default:if(v<1)if(123==b)--v;else if(125==b&&0==v++&&125==q())continue;switch(S+=I(b),b*v){case 38:g=c>0?1:(S+="\f",-1);break;case 44:s[u++]=(F(S)-1)*g,g=1;break;case 64:45===X()&&(S+=oe(J())),d=X(),c=p=F(y=S+=le(K())),b++;break;case 45:45===h&&2==F(S)&&(v=0)}}return i}function we(e,t,n,o,r,i,a,s,l,u,c){for(var p=r-1,d=0===r?i:[""],f=L(d),h=0,v=0,m=0;h<o;++h)for(var g=0,b=T(e,p+1,p=E(v=a[h])),y=e;g<f;++g)(y=V(v>0?d[g]+" "+b:z(b,/&\f/g,d[g])))&&(l[m++]=y);return Y(e,t,n,0===r?fe:s,l,u,c)}function Oe(e,t,n){return Y(e,t,n,de,I(W),T(e,2,-2),0)}function xe(e,t,n,o){return Y(e,t,n,he,T(e,0,o),T(e,o+1,-1),o)}var Se=function(e,t,n){for(var o=0,r=0;o=r,r=X(),38===o&&12===r&&(t[n]=1),!ee(r);)J();return Q(e,U)},Ce=new WeakMap,je=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Ce.get(n))&&!o){Ce.set(e,!0);for(var r=[],i=function(e,t){return ne(function(e,t){var n=-1,o=44;do{switch(ee(o)){case 0:38===o&&12===X()&&(t[n]=1),e[n]+=Se(U-1,t,n);break;case 2:e[n]+=oe(o);break;case 4:if(44===o){e[++n]=58===X()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=I(o)}}while(o=J());return e}(te(e),t))}(t,r),a=n.props,s=0,l=0;s<i.length;s++)for(var u=0;u<a.length;u++,l++)e.props[l]=r[s]?i[s].replace(/&\f/g,a[u]):a[u]+" "+i[s]}}},ke=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Pe(e,t){switch(function(e,t){return 45^A(e,0)?(((t<<2^A(e,0))<<2^A(e,1))<<2^A(e,2))<<2^A(e,3):0}(e,t)){case 5103:return pe+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return pe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return pe+e+ce+e+ue+e+e;case 6828:case 4268:return pe+e+ue+e+e;case 6165:return pe+e+ue+"flex-"+e+e;case 5187:return pe+e+z(e,/(\w+).+(:[^]+)/,pe+"box-$1$2"+ue+"flex-$1$2")+e;case 5443:return pe+e+ue+"flex-item-"+z(e,/flex-|-self/,"")+e;case 4675:return pe+e+ue+"flex-line-pack"+z(e,/align-content|flex-|-self/,"")+e;case 5548:return pe+e+ue+z(e,"shrink","negative")+e;case 5292:return pe+e+ue+z(e,"basis","preferred-size")+e;case 6060:return pe+"box-"+z(e,"-grow","")+pe+e+ue+z(e,"grow","positive")+e;case 4554:return pe+z(e,/([^-])(transform)/g,"$1"+pe+"$2")+e;case 6187:return z(z(z(e,/(zoom-|grab)/,pe+"$1"),/(image-set)/,pe+"$1"),e,"")+e;case 5495:case 3959:return z(e,/(image-set\([^]*)/,pe+"$1$`$1");case 4968:return z(z(e,/(.+:)(flex-)?(.*)/,pe+"box-pack:$3"+ue+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+pe+e+e;case 4095:case 3583:case 4068:case 2532:return z(e,/(.+)-inline(.+)/,pe+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(F(e)-1-t>6)switch(A(e,t+1)){case 109:if(45!==A(e,t+4))break;case 102:return z(e,/(.+:)(.+)-([^]+)/,"$1"+pe+"$2-$3$1"+ce+(108==A(e,t+3)?"$3":"$2-$3"))+e;case 115:return~R(e,"stretch")?Pe(z(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==A(e,t+1))break;case 6444:switch(A(e,F(e)-3-(~R(e,"!important")&&10))){case 107:return z(e,":",":"+pe)+e;case 101:return z(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+pe+(45===A(e,14)?"inline-":"")+"box$3$1"+pe+"$2$3$1"+ue+"$2box$3")+e}break;case 5936:switch(A(e,t+11)){case 114:return pe+e+ue+z(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return pe+e+ue+z(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return pe+e+ue+z(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return pe+e+ue+e+e}return e}var _e=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case he:e.return=Pe(e.value,e.length);break;case ve:return me([Z(e,{value:z(e.value,"@","@"+pe)})],o);case fe:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return me([Z(e,{props:[z(t,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return me([Z(e,{props:[z(t,/:(plac\w+)/,":"+pe+"input-$1")]}),Z(e,{props:[z(t,/:(plac\w+)/,":-moz-$1")]}),Z(e,{props:[z(t,/:(plac\w+)/,ue+"input-$1")]})],o)}return""}))}}],Me=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o,r,i=e.stylisPlugins||_e,a={},s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,u,c,p,d=[ge,(p=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&p(e)})],f=(u=[je,ke].concat(i,d),c=L(u),function(e,t,n,o){for(var r="",i=0;i<c;i++)r+=u[i](e,t,n,o)||"";return r});r=function(e,t,n,o){l=n,me(be(e?e+"{"+t.styles+"}":t.styles),f),o&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new M({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:r};return h.sheet.hydrate(s),h},Ee=function(e,t,n){var o=e.key+"-"+t.name;!1===n&&void 0===e.registered[o]&&(e.registered[o]=t.styles)},Ie=function(e){for(var t,n=0,o=0,r=e.length;r>=4;++o,r-=4)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(r){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(o)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},De={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ve=/[A-Z]|^ms/g,ze=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Re=function(e){return 45===e.charCodeAt(1)},Ae=function(e){return null!=e&&"boolean"!=typeof e},Te=function(e){var t=Object.create(null);return function(e){return void 0===t[e]&&(t[e]=Re(n=e)?n:n.replace(Ve,"-$&").toLowerCase()),t[e];var n}}(),Fe=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(ze,(function(e,t,n){return Ne={name:t,styles:n,next:Ne},t}))}return 1===De[e]||Re(e)||"number"!=typeof t||0===t?t:t+"px"};function Le(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Ne={name:n.name,styles:n.styles,next:Ne},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)Ne={name:o.name,styles:o.styles,next:Ne},o=o.next;return n.styles+";"}return function(e,t,n){var o="";if(Array.isArray(n))for(var r=0;r<n.length;r++)o+=Le(e,t,n[r])+";";else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?o+=i+"{"+t[a]+"}":Ae(a)&&(o+=Te(i)+":"+Fe(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=Le(e,t,a);switch(i){case"animation":case"animationName":o+=Te(i)+":"+s+";";break;default:o+=i+"{"+s+"}"}}else for(var l=0;l<a.length;l++)Ae(a[l])&&(o+=Te(i)+":"+Fe(i,a[l])+";")}return o}(e,t,n);case"function":if(void 0!==e){var r=Ne,i=n(e);return Ne=r,Le(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var Ne,Be=/label:\s*([^\s;\n{]+)\s*(;|$)/g,He=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o=!0,r="";Ne=void 0;var i=e[0];null==i||void 0===i.raw?(o=!1,r+=Le(n,t,i)):r+=i[0];for(var a=1;a<e.length;a++)r+=Le(n,t,e[a]),o&&(r+=i[a]);Be.lastIndex=0;for(var s,l="";null!==(s=Be.exec(r));)l+="-"+s[1];return{name:Ie(r)+l,styles:r,next:Ne}},$e=!!x.useInsertionEffect&&x.useInsertionEffect||function(e){return e()},Ue={}.hasOwnProperty,We=(0,x.createContext)("undefined"!=typeof HTMLElement?Me({key:"css"}):null);We.Provider;var Ge=function(e){return(0,x.forwardRef)((function(t,n){var o=(0,x.useContext)(We);return e(t,o,n)}))},Ye=(0,x.createContext)({}),Ze="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",qe=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;return Ee(t,n,o),$e((function(){return function(e,t,n){Ee(e,t,n);var o=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var r=t;do{e.insert(t===r?"."+o:"",r,e.sheet,!0),r=r.next}while(void 0!==r)}}(t,n,o)})),null},Je=Ge((function(e,t,n){var o=e.css;"string"==typeof o&&void 0!==t.registered[o]&&(o=t.registered[o]);var r=e[Ze],i=[o],a="";"string"==typeof e.className?a=function(e,t,n){var o="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):o+=n+" "})),o}(t.registered,i,e.className):null!=e.className&&(a=e.className+" ");var s=He(i,void 0,(0,x.useContext)(Ye));a+=t.key+"-"+s.name;var l={};for(var u in e)Ue.call(e,u)&&"css"!==u&&u!==Ze&&(l[u]=e[u]);return l.ref=n,l.className=a,(0,x.createElement)(x.Fragment,null,(0,x.createElement)(qe,{cache:t,serialized:s,isStringTag:"string"==typeof r}),(0,x.createElement)(r,l))}));n(679);var Xe=function(e,t){var n=arguments;if(null==t||!Ue.call(t,"css"))return x.createElement.apply(void 0,n);var o=n.length,r=new Array(o);r[0]=Je,r[1]=function(e,t){var n={};for(var o in t)Ue.call(t,o)&&(n[o]=t[o]);return n[Ze]=e,n}(e,t);for(var i=2;i<o;i++)r[i]=n[i];return x.createElement.apply(null,r)};function Ke(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return He(t)}function Qe(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var et=window.ReactDOM;Math.min,Math.max;function tt(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function nt(e){return tt(e).getComputedStyle(e)}function ot(e){return e instanceof tt(e).Node}function rt(e){return ot(e)?(e.nodeName||"").toLowerCase():""}let it;function at(e){return e instanceof tt(e).HTMLElement}function st(e){return e instanceof tt(e).Element}function lt(e){return"undefined"!=typeof ShadowRoot&&(e instanceof tt(e).ShadowRoot||e instanceof ShadowRoot)}function ut(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=nt(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function ct(){return/^((?!chrome|android).)*safari/i.test(function(){if(it)return it;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(it=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),it):navigator.userAgent}())}["top","right","bottom","left"].reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]),Math.min,Math.max;const pt=Math.round;function dt(e){return st(e)?e:e.contextElement}const ft={x:1,y:1};function ht(e){const t=dt(e);if(!at(t))return ft;const n=t.getBoundingClientRect(),{width:o,height:r,fallback:i}=function(e){const t=nt(e);let n=parseFloat(t.width),o=parseFloat(t.height);const r=at(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,s=pt(n)!==i||pt(o)!==a;return s&&(n=i,o=a),{width:n,height:o,fallback:s}}(t);let a=(i?pt(n.width):n.width)/o,s=(i?pt(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}function vt(e,t,n,o){var r,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),s=dt(e);let l=ft;t&&(o?st(o)&&(l=ht(o)):l=ht(e));const u=s?tt(s):window,c=ct()&&n;let p=(a.left+(c&&(null==(r=u.visualViewport)?void 0:r.offsetLeft)||0))/l.x,d=(a.top+(c&&(null==(i=u.visualViewport)?void 0:i.offsetTop)||0))/l.y,f=a.width/l.x,h=a.height/l.y;if(s){const e=tt(s),t=o&&st(o)?tt(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=ht(n),t=n.getBoundingClientRect(),o=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(o.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(o.paddingTop))*e.y,p*=e.x,d*=e.y,f*=e.x,h*=e.y,p+=t.x,d+=t.y,n=tt(n).frameElement}}return v={width:f,height:h,x:p,y:d},{...v,top:v.y,left:v.x,right:v.x+v.width,bottom:v.y+v.height};var v}function mt(e){if("html"===rt(e))return e;const t=e.assignedSlot||e.parentNode||lt(e)&&e.host||function(e){return((ot(e)?e.ownerDocument:e.document)||window.document).documentElement}(e);return lt(t)?t.host:t}function gt(e){const t=mt(e);return function(e){return["html","body","#document"].includes(rt(e))}(t)?t.ownerDocument.body:at(t)&&ut(t)?t:gt(t)}function bt(e,t){var n;void 0===t&&(t=[]);const o=gt(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=tt(o);return r?t.concat(i,i.visualViewport||[],ut(o)?o:[]):t.concat(o,bt(o))}var yt=x.useLayoutEffect,wt=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Ot=function(){};function xt(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function St(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];var i=[].concat(o);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(xt(e,a)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var Ct=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===r(e)&&null!==e?[e]:[];var t},jt=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,C({},Qe(e,wt))},kt=function(e,t,n){var o=e.cx,r=e.getStyles,i=e.getClassNames,a=e.className;return{css:r(t,e),className:o(null!=n?n:{},i(t,e),a)}};function Pt(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function _t(e){return Pt(e)?window.pageYOffset:e.scrollTop}function Mt(e,t){Pt(e)?window.scrollTo(0,t):e.scrollTop=t}function Et(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ot,r=_t(e),i=t-r,a=0;!function t(){var s,l=(s=a+=10,i*((s=s/n-1)*s*s+1)+r);Mt(e,l),a<n?window.requestAnimationFrame(t):o(e)}()}function It(e,t){var n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),r=t.offsetHeight/3;o.bottom+r>n.bottom?Mt(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight)):o.top-r<n.top&&Mt(e,Math.max(t.offsetTop-r,0))}function Dt(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var Vt=!1,zt={get passive(){return Vt=!0}},Rt="undefined"!=typeof window?window:{};Rt.addEventListener&&Rt.removeEventListener&&(Rt.addEventListener("p",Ot,zt),Rt.removeEventListener("p",Ot,!1));var At=Vt;function Tt(e){return null!=e}function Ft(e,t,n){return e?t:n}var Lt=["children","innerProps"],Nt=["children","innerProps"];var Bt,Ht,$t,Ut=function(e){return"auto"===e?"bottom":e},Wt=(0,x.createContext)(null),Gt=function(e){var t=e.children,n=e.minMenuHeight,o=e.maxMenuHeight,r=e.menuPlacement,i=e.menuPosition,a=e.menuShouldScrollIntoView,s=e.theme,l=((0,x.useContext)(Wt)||{}).setPortalPlacement,u=(0,x.useRef)(null),p=c((0,x.useState)(o),2),d=p[0],f=p[1],h=c((0,x.useState)(null),2),v=h[0],m=h[1],g=s.spacing.controlHeight;return yt((function(){var e=u.current;if(e){var t="fixed"===i,s=function(e){var t=e.maxHeight,n=e.menuEl,o=e.minHeight,r=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,o=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var r=e;r=r.parentElement;)if(t=getComputedStyle(r),(!n||"static"!==t.position)&&o.test(t.overflow+t.overflowY+t.overflowX))return r;return document.documentElement}(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var c,p=l.getBoundingClientRect().height,d=n.getBoundingClientRect(),f=d.bottom,h=d.height,v=d.top,m=n.offsetParent.getBoundingClientRect().top,g=a||Pt(c=l)?window.innerHeight:c.clientHeight,b=_t(l),y=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),O=m-w,x=g-v,S=O+b,C=p-b-v,j=f-g+b+y,k=b+v-w,P=160;switch(r){case"auto":case"bottom":if(x>=h)return{placement:"bottom",maxHeight:t};if(C>=h&&!a)return i&&Et(l,j,P),{placement:"bottom",maxHeight:t};if(!a&&C>=o||a&&x>=o)return i&&Et(l,j,P),{placement:"bottom",maxHeight:a?x-y:C-y};if("auto"===r||a){var _=t,M=a?O:S;return M>=o&&(_=Math.min(M-y-s,t)),{placement:"top",maxHeight:_}}if("bottom"===r)return i&&Mt(l,j),{placement:"bottom",maxHeight:t};break;case"top":if(O>=h)return{placement:"top",maxHeight:t};if(S>=h&&!a)return i&&Et(l,k,P),{placement:"top",maxHeight:t};if(!a&&S>=o||a&&O>=o){var E=t;return(!a&&S>=o||a&&O>=o)&&(E=a?O-w:S-w),i&&Et(l,k,P),{placement:"top",maxHeight:E}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return u}({maxHeight:o,menuEl:e,minHeight:n,placement:r,shouldScroll:a&&!t,isFixedPosition:t,controlHeight:g});f(s.maxHeight),m(s.placement),null==l||l(s.placement)}}),[o,r,i,a,n,l,g]),t({ref:u,placerProps:C(C({},e),{},{placement:v||Ut(r),maxHeight:d})})},Yt=function(e,t){var n=e.theme,o=n.spacing.baseUnit,r=n.colors;return C({textAlign:"center"},t?{}:{color:r.neutral40,padding:"".concat(2*o,"px ").concat(3*o,"px")})},Zt=Yt,qt=Yt,Jt=["size"],Xt=["innerProps","isRtl","size"],Kt={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Qt=function(e){var t=e.size,n=Qe(e,Jt);return Xe("svg",O({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Kt},n))},en=function(e){return Xe(Qt,O({size:20},e),Xe("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},tn=function(e){return Xe(Qt,O({size:20},e),Xe("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},nn=function(e,t){var n=e.isFocused,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return C({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*r,":hover":{color:n?i.neutral80:i.neutral40}})},on=nn,rn=nn,an=function(){var e=Ke.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Bt||(Ht=["\n  0%, 80%, 100% { opacity: 0; }\n  40% { opacity: 1; }\n"],$t||($t=Ht.slice(0)),Bt=Object.freeze(Object.defineProperties(Ht,{raw:{value:Object.freeze($t)}})))),sn=function(e){var t=e.delay,n=e.offset;return Xe("span",{css:Ke({animation:"".concat(an," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},ln=["data"],un=["innerRef","isDisabled","isHidden","inputClassName"],cn={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},pn={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":C({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},cn)},dn=function(e){return C({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},cn)},fn=function(e){var t=e.children,n=e.innerProps;return Xe("div",n,t)},hn={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Xe("div",O({},kt(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Xe(en,null))},Control:function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Xe("div",O({ref:r},kt(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":o,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Xe("div",O({},kt(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Xe(tn,null))},DownChevron:tn,CrossIcon:en,Group:function(e){var t=e.children,n=e.cx,o=e.getStyles,r=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,u=e.theme,c=e.selectProps;return Xe("div",O({},kt(e,"group",{group:!0}),s),Xe(i,O({},a,{selectProps:c,theme:u,getStyles:o,getClassNames:r,cx:n}),l),Xe("div",null,t))},GroupHeading:function(e){var t=jt(e);t.data;var n=Qe(t,ln);return Xe("div",O({},kt(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Xe("div",O({},kt(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Xe("span",O({},t,kt(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,o=jt(e),r=o.innerRef,i=o.isDisabled,a=o.isHidden,s=o.inputClassName,l=Qe(o,un);return Xe("div",O({},kt(e,"input",{"input-container":!0}),{"data-value":n||""}),Xe("input",O({className:t({input:!0},s),ref:r,style:dn(a),disabled:i},l)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,o=e.size,r=void 0===o?4:o,i=Qe(e,Xt);return Xe("div",O({},kt(C(C({},i),{},{innerProps:t,isRtl:n,size:r}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Xe(sn,{delay:0,offset:n}),Xe(sn,{delay:160,offset:!0}),Xe(sn,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,o=e.innerProps;return Xe("div",O({},kt(e,"menu",{menu:!0}),{ref:n},o),t)},MenuList:function(e){var t=e.children,n=e.innerProps,o=e.innerRef,r=e.isMulti;return Xe("div",O({},kt(e,"menuList",{"menu-list":!0,"menu-list--is-multi":r}),{ref:o},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,o=e.controlElement,r=e.innerProps,i=e.menuPlacement,a=e.menuPosition,s=(0,x.useRef)(null),l=(0,x.useRef)(null),u=c((0,x.useState)(Ut(i)),2),p=u[0],d=u[1],f=(0,x.useMemo)((function(){return{setPortalPlacement:d}}),[]),h=c((0,x.useState)(null),2),v=h[0],m=h[1],g=(0,x.useCallback)((function(){if(o){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(o),t="fixed"===a?0:window.pageYOffset,n=e[p]+t;n===(null==v?void 0:v.offset)&&e.left===(null==v?void 0:v.rect.left)&&e.width===(null==v?void 0:v.rect.width)||m({offset:n,rect:e})}}),[o,a,p,null==v?void 0:v.offset,null==v?void 0:v.rect.left,null==v?void 0:v.rect.width]);yt((function(){g()}),[g]);var b=(0,x.useCallback)((function(){"function"==typeof l.current&&(l.current(),l.current=null),o&&s.current&&(l.current=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=o,l=r||i?[...st(e)?bt(e):e.contextElement?bt(e.contextElement):[],...bt(t)]:[];l.forEach((e=>{const t=!st(e)&&e.toString().includes("V");!r||s&&!t||e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));let u,c=null;a&&(c=new ResizeObserver((()=>{n()})),st(e)&&!s&&c.observe(e),st(e)||!e.contextElement||s||c.observe(e.contextElement),c.observe(t));let p=s?vt(e):null;return s&&function t(){const o=vt(e);!p||o.x===p.x&&o.y===p.y&&o.width===p.width&&o.height===p.height||n(),p=o,u=requestAnimationFrame(t)}(),n(),()=>{var e;l.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=c)||e.disconnect(),c=null,s&&cancelAnimationFrame(u)}}(o,s.current,g,{elementResize:"ResizeObserver"in window}))}),[o,g]);yt((function(){b()}),[b]);var y=(0,x.useCallback)((function(e){s.current=e,b()}),[b]);if(!t&&"fixed"!==a||!v)return null;var w=Xe("div",O({ref:y},kt(C(C({},e),{},{offset:v.offset,position:a,rect:v.rect}),"menuPortal",{"menu-portal":!0}),r),n);return Xe(Wt.Provider,{value:f},t?(0,et.createPortal)(w,t):w)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,o=e.innerProps,r=Qe(e,Nt);return Xe("div",O({},kt(C(C({},r),{},{children:n,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,o=e.innerProps,r=Qe(e,Lt);return Xe("div",O({},kt(C(C({},r),{},{children:n,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),n)},MultiValue:function(e){var t=e.children,n=e.components,o=e.data,r=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,u=n.Label,c=n.Remove;return Xe(l,{data:o,innerProps:C(C({},kt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),r),selectProps:s},Xe(u,{data:o,innerProps:C({},kt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),Xe(c,{data:o,innerProps:C(C({},kt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},MultiValueContainer:fn,MultiValueLabel:fn,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Xe("div",O({role:"button"},n),t||Xe(en,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.innerRef,a=e.innerProps;return Xe("div",O({},kt(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":o,"option--is-selected":r}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Xe("div",O({},kt(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,o=e.isDisabled,r=e.isRtl;return Xe("div",O({},kt(e,"container",{"--is-disabled":o,"--is-rtl":r}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,o=e.innerProps;return Xe("div",O({},kt(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),o),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,o=e.isMulti,r=e.hasValue;return Xe("div",O({},kt(e,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":r}),n),t)}},vn=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function mn(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((o=e[n])===(r=t[n])||vn(o)&&vn(r)))return!1;var o,r;return!0}for(var gn={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},bn=function(e){return Xe("span",O({css:gn},e))},yn={guidance:function(e){var t=e.isSearchable,n=e.isMulti,o=e.tabSelectsValue,r=e.context,i=e.isInitialFocus;switch(r){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,o=void 0===n?"":n,r=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(r.length>1?"s":""," ").concat(r.join(","),", selected.");case"select-option":return"option ".concat(o,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,o=e.options,r=e.label,i=void 0===r?"":r,a=e.selectValue,s=e.isDisabled,l=e.isSelected,u=e.isAppleDevice,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(c(a,n),".");if("menu"===t&&u){var p=s?" disabled":"",d="".concat(l?" selected":"").concat(p);return"".concat(i).concat(d,", ").concat(c(o,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},wn=function(e){var t=e.ariaSelection,n=e.focusedOption,o=e.focusedValue,r=e.focusableOptions,i=e.isFocused,a=e.selectValue,s=e.selectProps,l=e.id,u=e.isAppleDevice,c=s.ariaLiveMessages,p=s.getOptionLabel,d=s.inputValue,f=s.isMulti,h=s.isOptionDisabled,v=s.isSearchable,m=s.menuIsOpen,g=s.options,b=s.screenReaderStatus,y=s.tabSelectsValue,w=s.isLoading,O=s["aria-label"],S=s["aria-live"],j=(0,x.useMemo)((function(){return C(C({},yn),c||{})}),[c]),k=(0,x.useMemo)((function(){var e,n="";if(t&&j.onChange){var o=t.option,r=t.options,i=t.removedValue,s=t.removedValues,l=t.value,u=i||o||(e=l,Array.isArray(e)?null:e),c=u?p(u):"",d=r||s||void 0,f=d?d.map(p):[],v=C({isDisabled:u&&h(u,a),label:c,labels:f},t);n=j.onChange(v)}return n}),[t,j,h,a,p]),P=(0,x.useMemo)((function(){var e="",t=n||o,i=!!(n&&a&&a.includes(n));if(t&&j.onFocus){var s={focused:t,label:p(t),isDisabled:h(t,a),isSelected:i,options:r,context:t===n?"menu":"value",selectValue:a,isAppleDevice:u};e=j.onFocus(s)}return e}),[n,o,p,h,j,r,a,u]),_=(0,x.useMemo)((function(){var e="";if(m&&g.length&&!w&&j.onFilter){var t=b({count:r.length});e=j.onFilter({inputValue:d,resultsMessage:t})}return e}),[r,d,m,j,g,b,w]),M="initial-input-focus"===(null==t?void 0:t.action),E=(0,x.useMemo)((function(){var e="";if(j.guidance){var t=o?"value":m?"menu":"input";e=j.guidance({"aria-label":O,context:t,isDisabled:n&&h(n,a),isMulti:f,isSearchable:v,tabSelectsValue:y,isInitialFocus:M})}return e}),[O,n,o,f,h,v,m,j,a,y,M]),I=Xe(x.Fragment,null,Xe("span",{id:"aria-selection"},k),Xe("span",{id:"aria-focused"},P),Xe("span",{id:"aria-results"},_),Xe("span",{id:"aria-guidance"},E));return Xe(x.Fragment,null,Xe(bn,{id:l},M&&I),Xe(bn,{"aria-live":S,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!M&&I))},On=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],xn=new RegExp("["+On.map((function(e){return e.letters})).join("")+"]","g"),Sn={},Cn=0;Cn<On.length;Cn++)for(var jn=On[Cn],kn=0;kn<jn.letters.length;kn++)Sn[jn.letters[kn]]=jn.base;var Pn=function(e){return e.replace(xn,(function(e){return Sn[e]}))},Mn=function(e,t){void 0===t&&(t=mn);var n=null;function o(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var i=e.apply(this,o);return n={lastResult:i,lastArgs:o,lastThis:this},i}return o.clear=function(){n=null},o}(Pn),En=function(e){return e.replace(/^\s+|\s+$/g,"")},In=function(e){return"".concat(e.label," ").concat(e.value)},Dn=["innerRef"];function Vn(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var r=Object.entries(e).filter((function(e){var t=c(e,1)[0];return!n.includes(t)}));return r.reduce((function(e,t){var n=c(t,2),o=n[0],r=n[1];return e[o]=r,e}),{})}(Qe(e,Dn),"onExited","in","enter","exit","appear");return Xe("input",O({ref:t},n,{css:Ke({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var zn=["boxSizing","height","overflow","paddingRight","position"],Rn={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function An(e){e.preventDefault()}function Tn(e){e.stopPropagation()}function Fn(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Ln(){return"ontouchstart"in window||navigator.maxTouchPoints}var Nn=!("undefined"==typeof window||!window.document||!window.document.createElement),Bn=0,Hn={capture:!1,passive:!1},$n=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},Un={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Wn(e){var t=e.children,n=e.lockEnabled,o=e.captureEnabled,r=function(e){var t=e.isEnabled,n=e.onBottomArrive,o=e.onBottomLeave,r=e.onTopArrive,i=e.onTopLeave,a=(0,x.useRef)(!1),s=(0,x.useRef)(!1),l=(0,x.useRef)(0),u=(0,x.useRef)(null),c=(0,x.useCallback)((function(e,t){if(null!==u.current){var l=u.current,c=l.scrollTop,p=l.scrollHeight,d=l.clientHeight,f=u.current,h=t>0,v=p-d-c,m=!1;v>t&&a.current&&(o&&o(e),a.current=!1),h&&s.current&&(i&&i(e),s.current=!1),h&&t>v?(n&&!a.current&&n(e),f.scrollTop=p,m=!0,a.current=!0):!h&&-t>c&&(r&&!s.current&&r(e),f.scrollTop=0,m=!0,s.current=!0),m&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,o,r,i]),p=(0,x.useCallback)((function(e){c(e,e.deltaY)}),[c]),d=(0,x.useCallback)((function(e){l.current=e.changedTouches[0].clientY}),[]),f=(0,x.useCallback)((function(e){var t=l.current-e.changedTouches[0].clientY;c(e,t)}),[c]),h=(0,x.useCallback)((function(e){if(e){var t=!!At&&{passive:!1};e.addEventListener("wheel",p,t),e.addEventListener("touchstart",d,t),e.addEventListener("touchmove",f,t)}}),[f,d,p]),v=(0,x.useCallback)((function(e){e&&(e.removeEventListener("wheel",p,!1),e.removeEventListener("touchstart",d,!1),e.removeEventListener("touchmove",f,!1))}),[f,d,p]);return(0,x.useEffect)((function(){if(t){var e=u.current;return h(e),function(){v(e)}}}),[t,h,v]),function(e){u.current=e}}({isEnabled:void 0===o||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,o=void 0===n||n,r=(0,x.useRef)({}),i=(0,x.useRef)(null),a=(0,x.useCallback)((function(e){if(Nn){var t=document.body,n=t&&t.style;if(o&&zn.forEach((function(e){var t=n&&n[e];r.current[e]=t})),o&&Bn<1){var i=parseInt(r.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+i||0;Object.keys(Rn).forEach((function(e){var t=Rn[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&Ln()&&(t.addEventListener("touchmove",An,Hn),e&&(e.addEventListener("touchstart",Fn,Hn),e.addEventListener("touchmove",Tn,Hn))),Bn+=1}}),[o]),s=(0,x.useCallback)((function(e){if(Nn){var t=document.body,n=t&&t.style;Bn=Math.max(Bn-1,0),o&&Bn<1&&zn.forEach((function(e){var t=r.current[e];n&&(n[e]=t)})),t&&Ln()&&(t.removeEventListener("touchmove",An,Hn),e&&(e.removeEventListener("touchstart",Fn,Hn),e.removeEventListener("touchmove",Tn,Hn)))}}),[o]);return(0,x.useEffect)((function(){if(t){var e=i.current;return a(e),function(){s(e)}}}),[t,a,s]),function(e){i.current=e}}({isEnabled:n});return Xe(x.Fragment,null,n&&Xe("div",{onClick:$n,css:Un}),t((function(e){r(e),i(e)})))}var Gn={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Yn=function(e){var t=e.name,n=e.onFocus;return Xe("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Gn,value:"",onChange:function(){}})};function Zn(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function qn(){return Zn(/^Mac/i)}var Jn={clearIndicator:rn,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.theme,i=r.colors,a=r.borderRadius;return C({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:r.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:o?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:o?i.primary:i.neutral30}})},dropdownIndicator:on,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,o=n.colors,r=n.spacing;return C({label:"group",cursor:"default",display:"block"},t?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*r.baseUnit,paddingRight:3*r.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return C({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r})},input:function(e,t){var n=e.isDisabled,o=e.value,r=e.theme,i=r.spacing,a=r.colors;return C(C({visibility:n?"hidden":"visible",transform:o?"translateZ(0)":""},pn),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,o=e.size,r=e.theme,i=r.colors,a=r.spacing.baseUnit;return C({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:qt,menu:function(e,t){var n,o=e.placement,r=e.theme,i=r.borderRadius,s=r.spacing,l=r.colors;return C((a(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(o),"100%"),a(n,"position","absolute"),a(n,"width","100%"),a(n,"zIndex",1),n),t?{}:{backgroundColor:l.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},menuList:function(e,t){var n=e.maxHeight,o=e.theme.spacing.baseUnit;return C({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:o,paddingTop:o})},menuPortal:function(e){var t=e.rect,n=e.offset,o=e.position;return{left:t.left,position:o,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors;return C({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:r/2,margin:o.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,o=n.borderRadius,r=n.colors,i=e.cropWithEllipsis;return C({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:o/2,color:r.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors,a=e.isFocused;return C({alignItems:"center",display:"flex"},t?{}:{borderRadius:r/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:Zt,option:function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return C({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:r?s.primary:o?s.primary25:"transparent",color:n?s.neutral20:r?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:r?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,o=n.spacing,r=n.colors;return C({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:r.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing,i=o.colors;return C({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,o=e.isMulti,r=e.hasValue,i=e.selectProps.controlShouldRenderValue;return C({alignItems:"center",display:o&&r&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},Xn={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Kn={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Dt(),captureMenuScroll:!Dt(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=C({ignoreCase:!0,ignoreAccents:!0,stringify:In,trim:!0,matchFrom:"any"},undefined),o=n.ignoreCase,r=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?En(t):t,u=a?En(i(e)):i(e);return o&&(l=l.toLowerCase(),u=u.toLowerCase()),r&&(l=Mn(l),u=Pn(u)),"start"===s?u.substr(0,l.length)===l:u.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Qn(e,t,n,o){return{type:"option",data:t,isDisabled:so(e,t,n),isSelected:lo(e,t,n),label:io(e,t),value:ao(e,t),index:o}}function eo(e,t){return e.options.map((function(n,o){if("options"in n){var r=n.options.map((function(n,o){return Qn(e,n,t,o)})).filter((function(t){return oo(e,t)}));return r.length>0?{type:"group",data:n,options:r,index:o}:void 0}var i=Qn(e,n,t,o);return oo(e,i)?i:void 0})).filter(Tt)}function to(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,u(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function no(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,u(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function oo(e,t){var n=e.inputValue,o=void 0===n?"":n,r=t.data,i=t.isSelected,a=t.label,s=t.value;return(!co(e)||!i)&&uo(e,{label:a,value:s,data:r},o)}var ro=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},io=function(e,t){return e.getOptionLabel(t)},ao=function(e,t){return e.getOptionValue(t)};function so(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function lo(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var o=ao(e,t);return n.some((function(t){return ao(e,t)===o}))}function uo(e,t,n){return!e.filterOption||e.filterOption(t,n)}var co=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},po=1,fo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(l,e);var t,n,o,i,a,s=(t=l,n=_(),function(){var e,o=P(t);if(n){var i=P(this).constructor;e=Reflect.construct(o,arguments,i)}else e=o.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=s.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.isAppleDevice=qn()||Zn(/^iPhone/i)||Zn(/^iPad/i)||qn()&&navigator.maxTouchPoints>1,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var o=t.props,r=o.onChange,i=o.name;n.name=i,t.ariaOnChange(e,n),r(e,n)},t.setValue=function(e,n,o){var r=t.props,i=r.closeMenuOnSelect,a=r.isMulti,s=r.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(t.setState({inputIsHiddenAfterUpdate:!a}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:o})},t.selectOption=function(e){var n=t.props,o=n.blurInputOnSelect,r=n.isMulti,i=n.name,a=t.state.selectValue,s=r&&t.isOptionSelected(e,a),l=t.isOptionDisabled(e,a);if(s){var c=t.getOptionValue(e);t.setValue(a.filter((function(e){return t.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void t.ariaOnChange(e,{action:"select-option",option:e,name:i});r?t.setValue([].concat(u(a),[e]),"select-option",e):t.setValue(e,"select-option")}o&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,o=t.state.selectValue,r=t.getOptionValue(e),i=o.filter((function(e){return t.getOptionValue(e)!==r})),a=Ft(n,i,i[0]||null);t.onChange(a,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange(Ft(t.props.isMulti,[],null),{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,o=n[n.length-1],r=n.slice(0,n.length-1),i=Ft(e,r,r[0]||null);o&&t.onChange(i,{action:"pop-value",removedValue:o})},t.getFocusedOptionId=function(e){return ro(t.state.focusableOptionsWithIds,e)},t.getFocusableOptionsWithIds=function(){return no(eo(t.props,t.state.selectValue),t.getElementId("option"))},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return St.apply(void 0,[t.props.classNamePrefix].concat(n))},t.getOptionLabel=function(e){return io(t.props,e)},t.getOptionValue=function(e){return ao(t.props,e)},t.getStyles=function(e,n){var o=t.props.unstyled,r=Jn[e](n,o);r.boxSizing="border-box";var i=t.props.styles[e];return i?i(r,n):r},t.getClassNames=function(e,n){var o,r;return null===(o=(r=t.props.classNames)[e])||void 0===o?void 0:o.call(r,n)},t.getElementId=function(e){return"".concat(t.state.instancePrefix,"-").concat(e)},t.getComponents=function(){return e=t.props,C(C({},hn),e.components);var e},t.buildCategorizedOptions=function(){return eo(t.props,t.state.selectValue)},t.getCategorizedOptions=function(){return t.props.menuIsOpen?t.buildCategorizedOptions():[]},t.buildFocusableOptions=function(){return to(t.buildCategorizedOptions())},t.getFocusableOptions=function(){return t.props.menuIsOpen?t.buildFocusableOptions():[]},t.ariaOnChange=function(e,n){t.setState({ariaSelection:C({value:e},n)})},t.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),t.focusInput())},t.onMenuMouseMove=function(e){t.blockOptionHover=!1},t.onControlMouseDown=function(e){if(!e.defaultPrevented){var n=t.props.openMenuOnClick;t.state.isFocused?t.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&t.onMenuClose():n&&t.openMenu("first"):(n&&(t.openAfterFocus=!0),t.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},t.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||t.props.isDisabled)){var n=t.props,o=n.isMulti,r=n.menuIsOpen;t.focusInput(),r?(t.setState({inputIsHiddenAfterUpdate:!o}),t.onMenuClose()):t.openMenu("first"),e.preventDefault()}},t.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(t.clearValue(),e.preventDefault(),t.openAfterFocus=!1,"touchend"===e.type?t.focusInput():setTimeout((function(){return t.focusInput()})))},t.onScroll=function(e){"boolean"==typeof t.props.closeMenuOnScroll?e.target instanceof HTMLElement&&Pt(e.target)&&t.props.onMenuClose():"function"==typeof t.props.closeMenuOnScroll&&t.props.closeMenuOnScroll(e)&&t.props.onMenuClose()},t.onCompositionStart=function(){t.isComposing=!0},t.onCompositionEnd=function(){t.isComposing=!1},t.onTouchStart=function(e){var n=e.touches,o=n&&n.item(0);o&&(t.initialTouchX=o.clientX,t.initialTouchY=o.clientY,t.userIsDragging=!1)},t.onTouchMove=function(e){var n=e.touches,o=n&&n.item(0);if(o){var r=Math.abs(o.clientX-t.initialTouchX),i=Math.abs(o.clientY-t.initialTouchY);t.userIsDragging=r>5||i>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=t.props.inputValue,o=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(o,{action:"input-change",prevInputValue:n}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var n=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:n}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){if(!t.blockOptionHover&&t.state.focusedOption!==e){var n=t.getFocusableOptions().indexOf(e);t.setState({focusedOption:e,focusedOptionId:n>-1?t.getFocusedOptionId(e):null})}},t.shouldHideSelectedOptions=function(){return co(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var n=t.props,o=n.isMulti,r=n.backspaceRemovesValue,i=n.escapeClearsValue,a=n.inputValue,s=n.isClearable,l=n.isDisabled,u=n.menuIsOpen,c=n.onKeyDown,p=n.tabSelectsValue,d=n.openMenuOnFocus,f=t.state,h=f.focusedOption,v=f.focusedValue,m=f.selectValue;if(!(l||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!o||a)return;t.focusValue("previous");break;case"ArrowRight":if(!o||a)return;t.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(v)t.removeValue(v);else{if(!r)return;o?t.popValue():s&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!u||!p||!h||d&&t.isOptionSelected(h,m))return;t.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(u){if(!h)return;if(t.isComposing)return;t.selectOption(h);break}return;case"Escape":u?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:a}),t.onMenuClose()):s&&i&&t.clearValue();break;case" ":if(a)return;if(!u){t.openMenu("first");break}if(!h)return;t.selectOption(h);break;case"ArrowUp":u?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":u?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!u)return;t.focusOption("pageup");break;case"PageDown":if(!u)return;t.focusOption("pagedown");break;case"Home":if(!u)return;t.focusOption("first");break;case"End":if(!u)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.state.instancePrefix="react-select-"+(t.props.instanceId||++po),t.state.selectValue=Ct(e.value),e.menuIsOpen&&t.state.selectValue.length){var n=t.getFocusableOptionsWithIds(),o=t.buildFocusableOptions(),r=o.indexOf(t.state.selectValue[0]);t.state.focusableOptionsWithIds=n,t.state.focusedOption=o[r],t.state.focusedOptionId=ro(n,o[r])}return t}return o=l,i=[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&It(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,o=t.menuIsOpen,r=this.state.isFocused;(r&&!n&&e.isDisabled||r&&o&&!e.menuIsOpen)&&this.focusInput(),r&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):r||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(It(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,o=n.selectValue,r=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(o[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(r&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,o=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var r=n.indexOf(o);o||(r=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===r?0:-1===r?i:r-1;break;case"next":r>-1&&r<i&&(a=r+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,o=this.getFocusableOptions();if(o.length){var r=0,i=o.indexOf(n);n||(i=-1),"up"===e?r=i>0?i-1:o.length-1:"down"===e?r=(i+1)%o.length:"pageup"===e?(r=i-t)<0&&(r=0):"pagedown"===e?(r=i+t)>o.length-1&&(r=o.length-1):"last"===e&&(r=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[r],focusedValue:null,focusedOptionId:this.getFocusedOptionId(o[r])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Xn):C(C({},Xn),this.props.theme):Xn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,o=this.getClassNames,r=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,u=s.isRtl,c=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:o,getValue:r,hasValue:this.hasValue(),isMulti:l,isRtl:u,options:c,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return so(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return lo(this.props,e,t)}},{key:"filterOption",value:function(e,t){return uo(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,o=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:o})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,o=e.inputId,r=e.inputValue,i=e.tabIndex,a=e.form,s=e.menuIsOpen,l=e.required,u=this.getComponents().Input,c=this.state,p=c.inputIsHidden,d=c.ariaSelection,f=this.commonProps,h=o||this.getElementId("input"),v=C(C(C({"aria-autocomplete":"list","aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":l,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},s&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==d?void 0:d.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?x.createElement(u,O({},f,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:h,innerRef:this.getInputRef,isDisabled:t,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:a,type:"text",value:r},v)):x.createElement(Vn,O({id:h,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ot,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:a,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,o=t.MultiValueContainer,r=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,s=t.Placeholder,l=this.commonProps,u=this.props,c=u.controlShouldRenderValue,p=u.isDisabled,d=u.isMulti,f=u.inputValue,h=u.placeholder,v=this.state,m=v.selectValue,g=v.focusedValue,b=v.isFocused;if(!this.hasValue()||!c)return f?null:x.createElement(s,O({},l,{key:"placeholder",isDisabled:p,isFocused:b,innerProps:{id:this.getElementId("placeholder")}}),h);if(d)return m.map((function(t,a){var s=t===g,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return x.createElement(n,O({},l,{components:{Container:o,Label:r,Remove:i},isFocused:s,isDisabled:p,key:u,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(f)return null;var y=m[0];return x.createElement(a,O({},l,{data:y,isDisabled:p}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,r=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||r)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return x.createElement(e,O({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,r=n.isLoading,i=this.state.isFocused;return e&&r?x.createElement(e,O({},t,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:i})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var o=this.commonProps,r=this.props.isDisabled,i=this.state.isFocused;return x.createElement(n,O({},o,{isDisabled:r,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,o=this.state.isFocused,r={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return x.createElement(e,O({},t,{innerProps:r,isDisabled:n,isFocused:o}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,o=t.GroupHeading,r=t.Menu,i=t.MenuList,a=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,u=t.Option,c=this.commonProps,p=this.state.focusedOption,d=this.props,f=d.captureMenuScroll,h=d.inputValue,v=d.isLoading,m=d.loadingMessage,g=d.minMenuHeight,b=d.maxMenuHeight,y=d.menuIsOpen,w=d.menuPlacement,S=d.menuPosition,C=d.menuPortalTarget,j=d.menuShouldBlockScroll,k=d.menuShouldScrollIntoView,P=d.noOptionsMessage,_=d.onMenuScrollToTop,M=d.onMenuScrollToBottom;if(!y)return null;var E,I=function(t,n){var o=t.type,r=t.data,i=t.isDisabled,a=t.isSelected,s=t.label,l=t.value,d=p===r,f=i?void 0:function(){return e.onOptionHover(r)},h=i?void 0:function(){return e.selectOption(r)},v="".concat(e.getElementId("option"),"-").concat(n),m={id:v,onClick:h,onMouseMove:f,onMouseOver:f,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:a};return x.createElement(u,O({},c,{innerProps:m,data:r,isDisabled:i,isSelected:a,key:v,label:s,type:o,value:l,isFocused:d,innerRef:d?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())E=this.getCategorizedOptions().map((function(t){if("group"===t.type){var r=t.data,i=t.options,a=t.index,s="".concat(e.getElementId("group"),"-").concat(a),l="".concat(s,"-heading");return x.createElement(n,O({},c,{key:s,data:r,options:i,Heading:o,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return I(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return I(t,"".concat(t.index))}));else if(v){var D=m({inputValue:h});if(null===D)return null;E=x.createElement(s,c,D)}else{var V=P({inputValue:h});if(null===V)return null;E=x.createElement(l,c,V)}var z={minMenuHeight:g,maxMenuHeight:b,menuPlacement:w,menuPosition:S,menuShouldScrollIntoView:k},R=x.createElement(Gt,O({},c,z),(function(t){var n=t.ref,o=t.placerProps,a=o.placement,s=o.maxHeight;return x.createElement(r,O({},c,z,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:a}),x.createElement(Wn,{captureEnabled:f,onTopArrive:_,onBottomArrive:M,lockEnabled:j},(function(t){return x.createElement(i,O({},c,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":c.isMulti,id:e.getElementId("listbox")},isLoading:v,maxHeight:s,focusedOption:p}),E)})))}));return C||"fixed"===S?x.createElement(a,O({},c,{appendTo:C,controlElement:this.controlRef,menuPlacement:w,menuPosition:S}),R):R}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,o=t.isDisabled,r=t.isMulti,i=t.name,a=t.required,s=this.state.selectValue;if(a&&!this.hasValue()&&!o)return x.createElement(Yn,{name:i,onFocus:this.onValueInputFocus});if(i&&!o){if(r){if(n){var l=s.map((function(t){return e.getOptionValue(t)})).join(n);return x.createElement("input",{name:i,type:"hidden",value:l})}var u=s.length>0?s.map((function(t,n){return x.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):x.createElement("input",{name:i,type:"hidden",value:""});return x.createElement("div",null,u)}var c=s[0]?this.getOptionValue(s[0]):"";return x.createElement("input",{name:i,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,o=t.focusedOption,r=t.focusedValue,i=t.isFocused,a=t.selectValue,s=this.getFocusableOptions();return x.createElement(wn,O({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:o,focusedValue:r,isFocused:i,selectValue:a,focusableOptions:s,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,o=e.SelectContainer,r=e.ValueContainer,i=this.props,a=i.className,s=i.id,l=i.isDisabled,u=i.menuIsOpen,c=this.state.isFocused,p=this.commonProps=this.getCommonProps();return x.createElement(o,O({},p,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:c}),this.renderLiveRegion(),x.createElement(t,O({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:c,menuIsOpen:u}),x.createElement(r,O({},p,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),x.createElement(n,O({},p,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],a=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,o=t.clearFocusValueOnUpdate,r=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,u=e.options,c=e.value,p=e.menuIsOpen,d=e.inputValue,f=e.isMulti,h=Ct(c),v={};if(n&&(c!==n.value||u!==n.options||p!==n.menuIsOpen||d!==n.inputValue)){var m=p?function(e,t){return to(eo(e,t))}(e,h):[],g=p?no(eo(e,h),"".concat(l,"-option")):[],b=o?function(e,t){var n=e.focusedValue,o=e.selectValue.indexOf(n);if(o>-1){if(t.indexOf(n)>-1)return n;if(o<t.length)return t[o]}return null}(t,h):null,y=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,m);v={selectValue:h,focusedOption:y,focusedOptionId:ro(g,y),focusableOptionsWithIds:g,focusedValue:b,clearFocusValueOnUpdate:!1}}var w=null!=r&&e!==n?{inputIsHidden:r,inputIsHiddenAfterUpdate:void 0}:{},O=i,x=a&&s;return a&&!x&&(O={value:Ft(f,h,h[0]||null),options:h,action:"initial-input-focus"},x=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(O=null),C(C(C({},v),w),{},{prevProps:e,ariaSelection:O,prevWasFocused:x})}}],i&&j(o.prototype,i),a&&j(o,a),Object.defineProperty(o,"prototype",{writable:!1}),l}(x.Component);fo.defaultProps=Kn;var ho=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function vo(e){var t=e.defaultInputValue,n=void 0===t?"":t,o=e.defaultMenuIsOpen,r=void 0!==o&&o,i=e.defaultValue,a=void 0===i?null:i,s=e.inputValue,l=e.menuIsOpen,u=e.onChange,p=e.onInputChange,d=e.onMenuClose,f=e.onMenuOpen,h=e.value,v=Qe(e,ho),m=c((0,x.useState)(void 0!==s?s:n),2),g=m[0],b=m[1],y=c((0,x.useState)(void 0!==l?l:r),2),w=y[0],O=y[1],S=c((0,x.useState)(void 0!==h?h:a),2),j=S[0],k=S[1],P=(0,x.useCallback)((function(e,t){"function"==typeof u&&u(e,t),k(e)}),[u]),_=(0,x.useCallback)((function(e,t){var n;"function"==typeof p&&(n=p(e,t)),b(void 0!==n?n:e)}),[p]),M=(0,x.useCallback)((function(){"function"==typeof f&&f(),O(!0)}),[f]),E=(0,x.useCallback)((function(){"function"==typeof d&&d(),O(!1)}),[d]),I=void 0!==s?s:g,D=void 0!==l?l:w,V=void 0!==h?h:j;return C(C({},v),{},{inputValue:I,menuIsOpen:D,onChange:P,onInputChange:_,onMenuClose:E,onMenuOpen:M,value:V})}var mo=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"],go=(0,x.forwardRef)((function(e,t){var n=function(e){var t=e.defaultOptions,n=void 0!==t&&t,o=e.cacheOptions,r=void 0!==o&&o,i=e.loadOptions;e.options;var s=e.isLoading,l=void 0!==s&&s,u=e.onInputChange,p=e.filterOption,d=void 0===p?null:p,f=Qe(e,mo),h=f.inputValue,v=(0,x.useRef)(void 0),m=(0,x.useRef)(!1),g=c((0,x.useState)(Array.isArray(n)?n:void 0),2),b=g[0],y=g[1],w=c((0,x.useState)(void 0!==h?h:""),2),O=w[0],S=w[1],j=c((0,x.useState)(!0===n),2),k=j[0],P=j[1],_=c((0,x.useState)(void 0),2),M=_[0],E=_[1],I=c((0,x.useState)([]),2),D=I[0],V=I[1],z=c((0,x.useState)(!1),2),R=z[0],A=z[1],T=c((0,x.useState)({}),2),F=T[0],L=T[1],N=c((0,x.useState)(void 0),2),B=N[0],H=N[1],$=c((0,x.useState)(void 0),2),U=$[0],W=$[1];r!==U&&(L({}),W(r)),n!==B&&(y(Array.isArray(n)?n:void 0),H(n)),(0,x.useEffect)((function(){return m.current=!0,function(){m.current=!1}}),[]);var G=(0,x.useCallback)((function(e,t){if(!i)return t();var n=i(e,t);n&&"function"==typeof n.then&&n.then(t,(function(){return t()}))}),[i]);(0,x.useEffect)((function(){!0===n&&G(O,(function(e){m.current&&(y(e||[]),P(!!v.current))}))}),[]);var Y=(0,x.useCallback)((function(e,t){var n=function(e,t,n){if(n){var o=n(e,t);if("string"==typeof o)return o}return e}(e,t,u);if(!n)return v.current=void 0,S(""),E(""),V([]),P(!1),void A(!1);if(r&&F[n])S(n),E(n),V(F[n]),P(!1),A(!1);else{var o=v.current={};S(n),P(!0),A(!M),G(n,(function(e){m&&o===v.current&&(v.current=void 0,P(!1),E(n),V(e||[]),A(!1),L(e?C(C({},F),{},a({},n,e)):F))}))}}),[r,G,M,F,u]),Z=R?[]:O&&M?D:b||[];return C(C({},f),{},{options:Z,isLoading:k||l,onInputChange:Y,filterOption:d})}(e),o=vo(n);return x.createElement(fo,O({ref:t},o))})),bo=go,yo=window.ReactJSXRuntime;function wo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Oo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wo(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function So(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xo(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Co(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function jo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Co(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Co(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,o.registerBlockType)("vczapi/list-meetings",{apiVersion:2,edit:function(e){e.className;var t=e.attributes,n=e.setAttributes,o=(e.isSelected,t.shortcodeType),r=t.orderBy,i=t.postsToShow,a=t.displayType,s=t.showPastMeeting,l=t.showFilter,v=t.selectedCategory,y=t.selectedAuthor,O=t.columns,x=t.preview,S=(0,b.useRef)(),C=c((0,b.useState)([]),2),j=C[0],k=C[1],P=c((0,b.useState)([]),2),_=P[0],M=P[1];return(0,b.useEffect)((function(){S.current=!0,w()({path:"/wp/v2/zoom_meeting_cats"}).then((function(e){if(!0===S.current){var t=e.length>0?e.map((function(e,t){return{label:e.name+" ("+e.count+")",value:e.slug}})):[];k((function(e){return[].concat(u(e),u(t))}))}})).catch((function(){!0===S.current&&k([])}));var e={per_page:10,who:"authors"};0!==y&&(e.include=y);var t=(0,f.addQueryArgs)("/wp/v2/users",e);return w()({path:t}).then((function(e){if(!0===S.current){var t=e.length>0?e.map((function(e,t){return{label:e.name,value:e.id}})):[];M((function(e){return[].concat(u(e),u(t))}))}})).catch((function(){})),function(){S.current=!1}}),[]),x?(0,yo.jsx)(b.Fragment,{children:(0,yo.jsx)(m(),{block:"vczapi/list-meetings",attributes:{columns:O,displayType:a,postsToShow:i,orderBy:r,shortcodeType:o,showFilter:l,selectedCategory:v,selectedAuthor:y}})}):(0,yo.jsxs)(yo.Fragment,{children:[(0,yo.jsx)(h.InspectorControls,{children:(0,yo.jsxs)(g.PanelBody,{title:"Settings",initialOpen:!0,children:[S.current&&(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Show Meeting or Webinar","video-conferencing-with-zoom-api"),value:o,options:[{label:"Meeting",value:"meeting"},{label:"Webinar",value:"webinar"}],help:"Determines whether to show Meeting or Webinar",onChange:function(e){return n({shortcodeType:e})}}),S.current&&(0,yo.jsxs)(yo.Fragment,{children:[(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Type of Meeting/Webinar to Show","video-conferencing-with-zoom-api"),value:a,onChange:function(e){return n({displayType:e})},options:[{label:"Show All",value:""},{label:"Upcoming",value:"upcoming"},{label:"Past",value:"past"}],help:"Show All,Upcoming or Past Meeting - default All"}),"upcoming"===a&&(0,yo.jsx)(g.CheckboxControl,{label:(0,p.__)("Show Meeting that have started","video-conferencing-with-zoom-api"),checked:s,onChange:function(e){return n({showPastMeeting:e})},help:"will show meetings that have passed meeting start time - upto 30 minutes after the meeting was scheduled to start."})]}),S.current&&(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Show Filter","video-conferencing-with-zoom-api"),value:l,options:[{label:"Yes",value:"yes"},{label:"No",value:"no"}],onChange:function(e){n({showFilter:e})}}),S.current&&(0,yo.jsx)(g.RangeControl,{label:(0,p.__)("Columns","video-conferencing-with-zoom-api"),value:O,help:"how many columns in the grid. Default value is 3. Users can use 1 or 2 or 3 or 4 - Any value upper than 4 will take 3 column value.",onChange:function(e){n({columns:e})},min:1,max:4}),S.current&&(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Order By","video-conferencing-with-zoom-api"),value:r,options:[{label:"Default Sorting",value:""},{label:"Ascending",value:"ASC"},{label:"Descending",value:"DESC"}],onChange:function(e){n({orderBy:e})}}),S.current&&(0,yo.jsxs)(yo.Fragment,{children:[(0,yo.jsx)("span",{children:(0,p.__)("Category","video-conferencing-with-zoom-api")}),(0,yo.jsx)(bo,{cacheOptions:!0,defaultOptions:j,isMulti:!0,isClearable:!0,placeholder:(0,p.__)("Select categories - default All categories are shown","video-conferencing-with-zoom-api"),onChange:function(e,t){var o=t.action;if("clear"===o)return n({selectedCategory:[]}),[];if("remove-value"===o)return n({selectedCategory:e}),e;if("select-option"===o){var r=(0,d.unionBy)(v,e,"value");n({selectedCategory:r}),M((function(t){return(0,d.unionBy)(t,[e],"value")}))}},defaultValue:(0,d.intersectionWith)(j,v,d.isEqual),className:"components-base-control"})]}),S.current&&(0,yo.jsxs)(yo.Fragment,{children:[(0,yo.jsx)("span",{children:(0,p.__)("Author","video-conferencing-with-zoom-api")}),(0,yo.jsx)(bo,{cacheOptions:!0,defaultOptions:_,noResultsText:!0,loadOptions:(0,d.debounce)((function(e,t){var n={per_page:5,who:"authors"};""!==e&&(n.search=e);var o=(0,f.addQueryArgs)("/wp/v2/users",n);return w()({path:o}).then((function(e){!0===S.current&&t(e.length>0?e.map((function(e,t){return{label:e.name,value:e.id}})):[])})).catch((function(){t([])}))}),800),isClearable:!0,placeholder:(0,p.__)("Select Author - Default All Authors are shown","video-conferencing-with-zoom-api"),onChange:function(e,t){var o=t.action;"clear"===o?n({selectedAuthor:0}):"remove-value"===o?n({selectedAuthor:e}):(n({selectedAuthor:e.value}),M((function(t){return(0,d.unionBy)(t,[e],"value")})))},defaultValue:_.filter((function(e){return e.value===y})),className:"components-base-control"})]}),S.current&&(0,yo.jsx)(g.RangeControl,{label:(0,p.__)("Number of Meetings/Webinars to show","video-conferencing-with-zoom-api"),value:i,onChange:function(e){return n({postsToShow:e})},min:1,max:100})]})}),(0,yo.jsx)("div",Oo(Oo({},(0,h.useBlockProps)()),{},{children:(0,yo.jsx)(g.Disabled,{children:(0,yo.jsx)(m(),{block:"vczapi/list-meetings",attributes:{columns:O,displayType:a,postsToShow:i,orderBy:r,shortcodeType:o,showFilter:l,selectedCategory:v,selectedAuthor:y}})})}))]})},example:{attributes:{preview:!0,columns:2,postsToShow:2}}}),(0,o.registerBlockType)("vczapi/show-meeting-post",{apiVersion:2,edit:function(e){var t=e.attributes,n=e.setAttributes,o=t.postID,r=t.preview,i=t.template,a=t.countdown,s=t.description,l=t.details,u=c((0,b.useState)([]),2),f=u[0],v=u[1],y=c((0,b.useState)([]),2),O=y[0],x=y[1],S=c((0,b.useState)(!1),2),C=S[0],j=S[1],k=c((0,b.useState)(!1),2),P=k[0],_=k[1],M=(0,b.useRef)(),E=(0,d.debounce)((function(e){e?(j(!0),w()({path:"/wp/v2/zoom_meetings?per_page=5&search="+e}).then((function(e){if(!0===M.current){var t=e.length>0?e.map((function(e){return{label:e.title.rendered,value:e.id}})):[];x(t),j(!1)}})).catch((function(){!0===M.current&&(x([]),j(!1))}))):x([])}),400),I=[{icon:P?"no":"edit",title:P?"Close":"Edit",subscript:"Edit",onClick:function(){_((function(e){return!e}))}}];if((0,b.useEffect)((function(){M.current=!0;var e="/wp/v2/zoom_meetings?per_page=5";return e=0!==o?e+"&include="+o:e,w()({path:e}).then((function(e){if(!0===M.current){var t=e.length>0?e.map((function(e){return{label:e.title.rendered,value:e.id}})):[];v(t)}})),function(){M.current=!1}}),[]),r)return(0,yo.jsx)("img",{src:vczapi_blocks.embed_post_preview,alt:"Embed Zoom post"});var D=O.length>0?O:f;return(0,yo.jsxs)("div",So(So({},(0,h.useBlockProps)()),{},{children:[(0,yo.jsx)(h.BlockControls,{children:(0,yo.jsx)(g.ToolbarGroup,{controls:I})}),!M.current&&(0,yo.jsx)(g.Spinner,{}),(0===o||P)&&(0,yo.jsxs)(g.Placeholder,{children:[(0,yo.jsx)("h2",{children:(0,p.__)("Zoom -  Show Meeting Post","video-conferencing-with-zoom-api")}),(0,yo.jsxs)("div",{className:"vczapi-blocks-form",children:[(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.ComboboxControl,{label:(0,p.__)("Select Meeting to Show","video-conferencing-with-zoom-api"),value:o||null,options:D,onFilterValueChange:E,isLoading:C,onChange:function(e){n({postID:Number(e)}),_(!1)}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Template","video-conferencing-with-zoom-api"),value:i,options:[{label:"Default",value:"none"},{label:"Boxed",value:"boxed"}],onChange:function(e){n({template:e})}})}),"boxed"!==i&&(0,yo.jsxs)(yo.Fragment,{children:[(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.CheckboxControl,{label:(0,p.__)("Display Countdown?","video-conferencing-with-zoom-api"),checked:a,onChange:function(e){n({countdown:e})}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.CheckboxControl,{label:(0,p.__)("Display Description?","video-conferencing-with-zoom-api"),checked:s,onChange:function(e){n({description:e})}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.CheckboxControl,{label:(0,p.__)("Display Details Section?","video-conferencing-with-zoom-api"),checked:l,onChange:function(e){n({details:e})}})})]})]})]}),0!==o&&!P&&(0,yo.jsx)(g.Disabled,{children:(0,yo.jsx)(m(),{block:"vczapi/show-meeting-post",attributes:{postID:o,template:i,description:s,countdown:a,details:l}})})]}))},example:{attributes:{preview:!0}}}),(0,o.registerBlockType)("vczapi/show-live-meeting",{apiVersion:2,edit:function(e){e.className;var t=e.attributes,n=e.setAttributes,o=t.host,i=t.selectedMeeting,a=t.link_only,s=t.preview,l=t.shouldShow,f=(0,b.useRef)(),v=c((0,b.useState)(!1),2),y=v[0],w=v[1],O=c((0,b.useState)([]),2),x=O[0],S=O[1],C=c((0,b.useState)(o||null),2),j=C[0],k=C[1],P=c((0,b.useState)((null==l?void 0:l.value)||l||"meeting"),2),_=P[0],M=P[1],E=c((0,b.useState)(i||{}),2),I=E[0],D=E[1],V=c((0,b.useState)([]),2),z=V[0],R=V[1],A=c((0,b.useState)(!1),2),T=A[0],F=A[1],L=c((0,b.useState)(1),2),N=L[0],B=L[1],H=c((0,b.useState)(1),2),$=H[0],U=H[1],W=c((0,b.useState)(!1),2),G=W[0],Y=W[1],Z=(0,d.debounce)((function(e){F(!0);var t=e?encodeURIComponent(e):"";fetch(ajaxurl+"?action=vczapi_get_zoom_hosts&host="+t).then((function(e){return e.json()})).then((function(e){if(f.current&&Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text,value:String(e.value||e.id)}}));R(t),F(!1)}})).catch((function(){f.current&&F(!1)}))}),300),q=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||"undefined"===e)return[];var o=ajaxurl+"?action=vczapi_get_live_meetings&host_id="+e+"&show="+t;n.hasOwnProperty("page_number")&&"undefined"!==n.page_number&&(o+="&page_number="+n.page_number),Y(!0),fetch(o).then((function(e){return e.json()})).then((function(e){if(f.current){var t=parseFloat(e.total_records)/parseFloat(e.page_size);if(t>1){var n=Math.round(t);B(n)}else B(1);S(e.formatted_meetings||[]),Y(!1)}})).catch((function(){f.current&&Y(!1)}))},J=function(e){var t=e.numberOfPages,n=[];if(t>1){for(var o=function(e){var t=e===$?"selected":"";n.push((0,yo.jsx)(g.Button,{className:t,onClick:function(){var t=(null==j?void 0:j.value)||j;q(t,_,{page_number:e}),U(e)},children:e},e))},r=1;r<=t;r++)o(r);return(0,yo.jsx)("div",{className:"vczapi-blocks-pagination",children:n})}return""};if((0,b.useEffect)((function(){f.current=!0,F(!0),fetch(ajaxurl+"?action=vczapi_get_zoom_hosts&host=").then((function(e){return e.json()})).then((function(e){if(f.current&&Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text,value:String(e.value||e.id)}}));R(t),F(!1)}})).catch((function(){f.current&&F(!1)}));var e=(null==o?void 0:o.value)||o;return e&&q(e,_),function(){f.current=!1}}),[]),s)return(0,yo.jsx)("img",{src:vczapi_blocks.direct_meeting_preview_image,alt:"Direct Meeting from Zoom"});var X=x.map((function(e){return{label:e.label,value:JSON.stringify(e)}}));return(0,yo.jsxs)("div",jo(jo({},(0,h.useBlockProps)()),{},{children:[(0,yo.jsx)(h.BlockControls,{children:(0,yo.jsx)(g.ToolbarGroup,{children:(0,yo.jsx)(g.ToolbarButton,{icon:y?"no":"edit",title:y?"Close":"Edit",subscript:"Edit",onClick:function(){w((function(e){return!e}))}})})}),(void 0===i||y)&&(0,yo.jsxs)(g.Placeholder,{children:[(0,yo.jsxs)("div",{className:"vczapi-label-header",children:[(0,yo.jsx)("h2",{children:(0,p.__)("Zoom - Show Meeting directly from Zoom","video-conferencing-with-zoom-api")}),(0,yo.jsx)("div",{children:(0,yo.jsx)("p",{children:(0,p.__)("Get a meeting directly from Zoom","video-conferencing-with-zoom-api")})})]}),(0,yo.jsxs)("div",{className:"vczapi-blocks-form",children:[void 0!==i&&i.hasOwnProperty("value")&&(0,yo.jsx)("div",{className:"vczapi-blocks-form--selected-meeting",children:(0,yo.jsxs)("h4",{children:["Currently Selected Meeting: ",(0,yo.jsx)("strong",{children:i.label})]})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.RadioControl,{className:"radio-inline",label:"Link Only",selected:a,options:[{label:"Yes",value:"yes"},{label:"No",value:"no"}],onChange:function(e){n({link_only:e})}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Would you like to show a Meeting or Webinar","video-conferencing-with-zoom-api"),value:_,options:[{label:"Meeting",value:"meeting"},{label:"Webinar",value:"webinar"}],onChange:function(e){M(e);var t=(null==j?void 0:j.value)||j;t&&(S([]),q(t,e))}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.ComboboxControl,{label:(0,p.__)("Select A Host","video-conferencing-with-zoom-api"),help:(0,p.__)("Click to view available hosts or start typing to filter","video-conferencing-with-zoom-api"),value:null!=j&&j.value?String(j.value):"string"==typeof j?j:"",options:z,onFilterValueChange:Z,isLoading:T,onChange:function(e){if(e){var t=z.find((function(t){return String(t.value)===String(e)}))||{value:e,label:e};n({host:t}),k(t),q(e,_)}}})}),G&&(void 0===x||0===x.length)&&(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.Spinner,{})}),void 0!==x&&x.length>0&&(0,yo.jsxs)("div",{className:"vczapi-blocks-form--group",children:[(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Select A Meeting : ","video-conferencing-with-zoom-api")+(N>1?" (use pagination below if necessary)":""),value:JSON.stringify(I),options:[{label:(0,p.__)("Select a meeting","video-conferencing-with-zoom-api"),value:"{}"}].concat(u(X)),disabled:G,onChange:function(e){"{}"!==e&&D(JSON.parse(e))}}),(0,yo.jsx)(J,{numberOfPages:N})]}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.Button,{isPrimary:!0,onClick:function(){if(!I.hasOwnProperty("value"))return alert("Meeting Needs to be selected"),!1;n({selectedMeeting:I}),n({shouldShow:"object"===r(_)?_:{label:_,value:_}}),w(!1)},children:(0,p.__)("Save","video-conferencing-with-zoom-api")})})]})]}),void 0!==i&&i.hasOwnProperty("value")&&!y&&(0,yo.jsx)(g.Disabled,{children:(0,yo.jsx)(m(),{block:"vczapi/show-live-meeting",attributes:{link_only:a,selectedMeeting:i,shouldShow:l}})})]}))},example:{attributes:{preview:!0}}});var ko=(0,x.forwardRef)((function(e,t){var n=vo(e);return x.createElement(fo,O({ref:t},n))}));function Po(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function _o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Po(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Po(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Eo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mo(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Io(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Do(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Io(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Io(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Vo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function zo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vo(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,o.registerBlockType)("vczapi/list-host-meetings",{apiVersion:2,edit:function(e){e.className;var t=e.attributes,n=e.setAttributes,o=t.host,r=t.shouldShow,i=t.preview,a=b.useRef,s=c((0,b.useState)(!1),2),l=s[0],u=s[1];return(0,b.useEffect)((function(){return a.current=!0,function(){a.current=!1}}),[]),i?(0,yo.jsx)("img",{src:vczapi_blocks.list_host_meetings_preview_image,alt:"List Host meetings"}):(0,yo.jsxs)("div",_o(_o({},(0,h.useBlockProps)()),{},{children:[(0,yo.jsx)(h.BlockControls,{children:(0,yo.jsx)(g.ToolbarGroup,{children:(0,yo.jsx)(g.ToolbarButton,{icon:l?"no":"edit",title:l?"Close":"Edit",subscript:"Edit",onClick:function(){u((function(e){return!e}))}})})}),(void 0===o||l)&&(0,yo.jsxs)(g.Placeholder,{children:[(0,yo.jsx)("h2",{children:(0,p.__)("Zoom -  List Meetings/Webinars based on HOST","video-conferencing-with-zoom")}),(0,yo.jsxs)("div",{className:"vczapi-blocks-form",children:[(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(ko,{className:"vczapi-blocks-form--select",defaultValue:r,options:[{label:"Meeting",value:"meeting"},{label:"Webinar",value:"webinar"}],onChange:function(e,t){"select-option"===t.action&&n({shouldShow:e})}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(bo,{className:"vczapi-blocks-form--select",defaultOptions:!0,noResultsText:(0,p.__)("No options found","video-conferencing-with-zoom-api"),loadOptions:(0,d.debounce)((function(e,t){fetch("admin-ajax.php?action=vczapi_get_zoom_hosts&host="+e).then((function(e){return e.json()})).then((function(e){t(e)})).catch((function(){t([])}))}),800),defaultValue:o,onChange:function(e,t){"select-option"===t.action&&n({host:e})}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.Button,{isPrimary:!0,onClick:function(){u(!1)},children:(0,p.__)("Save","video-conferencing-with-zoom-api")})})]})]}),void 0!==o&&o.hasOwnProperty("value")&&!l&&(0,yo.jsx)(m(),{block:"vczapi/list-host-meetings",attributes:{host:o,shouldShow:r}})]}))},example:{attributes:{preview:!0}}}),(0,o.registerBlockType)("vczapi/join-via-browser",{apiVersion:2,edit:function(e){e.className;var t=e.attributes,n=e.setAttributes,o=t.host,i=t.selectedMeeting,a=t.disable_countdown,s=t.login_required,l=t.preview,f=t.shouldShow,v=t.passcode,y=(0,b.useRef)(),w=c((0,b.useState)(!1),2),O=w[0],x=w[1],S=c((0,b.useState)([]),2),C=S[0],j=S[1],k=c((0,b.useState)(o||null),2),P=k[0],_=k[1],M=c((0,b.useState)((null==f?void 0:f.value)||f||"meeting"),2),E=M[0],I=M[1],D=c((0,b.useState)(i||{}),2),V=D[0],z=D[1],R=c((0,b.useState)([]),2),A=R[0],T=R[1],F=c((0,b.useState)(!1),2),L=F[0],N=F[1],B=c((0,b.useState)(1),2),H=B[0],$=B[1],U=c((0,b.useState)(1),2),W=U[0],G=U[1],Y=c((0,b.useState)(!1),2),Z=Y[0],q=Y[1],J=(0,d.debounce)((function(e){N(!0);var t=e?encodeURIComponent(e):"";fetch(ajaxurl+"?action=vczapi_get_zoom_hosts&host="+t).then((function(e){return e.json()})).then((function(e){if(y.current&&Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text,value:String(e.value||e.id)}}));T(t),N(!1)}})).catch((function(){y.current&&N(!1)}))}),300),X=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||"undefined"===e)return[];var o="object"===r(t)?t.value:t,i=ajaxurl+"?action=vczapi_get_live_meetings&host_id="+e+"&show="+o;n.hasOwnProperty("page_number")&&"undefined"!==n.page_number&&(i+="&page_number="+n.page_number),q(!0),fetch(i).then((function(e){return e.json()})).then((function(e){if(y.current){var t=parseFloat(e.total_records)/parseFloat(e.page_size);if(t>1){var n=Math.round(t);$(n)}else $(1);j(e.formatted_meetings||[]),q(!1)}})).catch((function(){y.current&&q(!1)}))},K=function(e){var t=e.numberOfPages,n=[];if(t>1){for(var o=function(e){var t=e===W?"selected":"";n.push((0,yo.jsx)(g.Button,{className:t,onClick:function(){var t=(null==P?void 0:P.value)||P;X(t,E,{page_number:e}),G(e)},children:e},e))},r=1;r<=t;r++)o(r);return(0,yo.jsx)("div",{className:"vczapi-blocks-pagination",children:n})}return""};if((0,b.useEffect)((function(){y.current=!0,N(!0),fetch(ajaxurl+"?action=vczapi_get_zoom_hosts&host=").then((function(e){return e.json()})).then((function(e){if(y.current&&Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text,value:String(e.value||e.id)}}));T(t),N(!1)}})).catch((function(){y.current&&N(!1)}));var e=(null==o?void 0:o.value)||o;return e&&X(e,E),function(){y.current=!1}}),[]),l)return(0,yo.jsx)("img",{src:vczapi_blocks.join_via_browser,alt:"Direct Meeting from Zoom"});var Q=C.map((function(e){return{label:e.label,value:JSON.stringify(e)}}));return(0,yo.jsxs)("div",Eo(Eo({},(0,h.useBlockProps)()),{},{children:[(0,yo.jsx)(h.BlockControls,{children:(0,yo.jsx)(g.ToolbarGroup,{children:(0,yo.jsx)(g.ToolbarButton,{icon:O?"no":"edit",title:O?"Close":"Edit",subscript:"Edit",onClick:function(){x((function(e){return!e}))}})})}),(void 0===i||O)&&(0,yo.jsxs)(g.Placeholder,{children:[(0,yo.jsxs)("div",{className:"vczapi-label-header",children:[(0,yo.jsx)("h2",{children:(0,p.__)("Zoom - Embed Join Via A Browser","video-conferencing-with-zoom-api")}),(0,yo.jsx)("div",{children:(0,yo.jsx)("p",{children:(0,p.__)("Embed Join via a browser","video-conferencing-with-zoom-api")})})]}),(0,yo.jsxs)("div",{className:"vczapi-blocks-form",children:[void 0!==i&&i.hasOwnProperty("value")&&(0,yo.jsx)("div",{className:"vczapi-blocks-form--selected-meeting",children:(0,yo.jsxs)("h4",{children:["Currently Selected Meeting: ",(0,yo.jsx)("strong",{children:i.label})]})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.TextControl,{className:"text-input",label:(0,p.__)("Passcode (Set password of your meeting to automatically let users join without needing them to enter password.)","video-conferencing-with-zoom-api"),value:v,onChange:function(e){n({passcode:e})}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.RadioControl,{className:"radio-inline",label:"Disable Countdown",selected:a,options:[{label:"Yes",value:"yes"},{label:"No",value:"no"}],onChange:function(e){n({disable_countdown:e})}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.RadioControl,{className:"radio-inline",label:"Login Required",selected:s,options:[{label:"Yes",value:"yes"},{label:"No",value:"no"}],onChange:function(e){n({login_required:e})}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Would you like to show a Meeting or Webinar","video-conferencing-with-zoom-api"),value:E,options:[{label:"Meeting",value:"meeting"},{label:"Webinar",value:"webinar"}],onChange:function(e){I(e);var t=(null==P?void 0:P.value)||P;t&&(j([]),X(t,e))}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.ComboboxControl,{label:(0,p.__)("Select A Host","video-conferencing-with-zoom-api"),help:(0,p.__)("Click to view available hosts or start typing to filter","video-conferencing-with-zoom-api"),value:null!=P&&P.value?String(P.value):"string"==typeof P?P:"",options:A,onFilterValueChange:J,isLoading:L,onChange:function(e){if(e){var t=A.find((function(t){return String(t.value)===String(e)}))||{value:e,label:e};n({host:t}),_(t),X(e,E)}}})}),Z&&(void 0===C||0===C.length)&&(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.Spinner,{})}),void 0!==C&&C.length>0&&(0,yo.jsxs)("div",{className:"vczapi-blocks-form--group",children:[(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Select A Meeting : ","video-conferencing-with-zoom-api")+(H>1?" (use pagination below if necessary)":""),value:JSON.stringify(V),options:[{label:(0,p.__)("Select a meeting","video-conferencing-with-zoom-api"),value:"{}"}].concat(u(Q)),disabled:Z,onChange:function(e){"{}"!==e&&z(JSON.parse(e))}}),(0,yo.jsx)(K,{numberOfPages:H})]}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.Button,{isPrimary:!0,onClick:function(){if(!V.hasOwnProperty("value"))return alert("Meeting Needs to be selected"),!1;n({selectedMeeting:V}),n({shouldShow:"object"===r(E)?E:{label:E,value:E}}),x(!1)},children:(0,p.__)("Save","video-conferencing-with-zoom-api")})})]})]}),void 0!==i&&i.hasOwnProperty("value")&&!O&&(0,yo.jsx)(g.Disabled,{children:(0,yo.jsx)(m(),{block:"vczapi/join-via-browser",attributes:{selectedMeeting:i,login_required:s,disable_countdown:a,passcode:v,shouldShow:f}})})]}))},example:{attributes:{preview:!0}}}),(0,o.registerBlockType)("vczapi/recordings",{apiVersion:2,edit:function(e){e.className;var t=e.attributes,n=e.setAttributes,o=t.host,i=t.selectedMeeting,a=t.downloadable,s=t.preview,l=t.shouldShow,f=t.showBy,v=(0,b.useRef)(),y=c((0,b.useState)(!1),2),w=y[0],O=y[1],x=c((0,b.useState)([]),2),S=x[0],C=x[1],j=c((0,b.useState)(o||null),2),k=j[0],P=j[1],_=c((0,b.useState)((null==l?void 0:l.value)||l||"meeting"),2),M=_[0],E=_[1],I=c((0,b.useState)(i||{}),2),D=I[0],V=I[1],z=c((0,b.useState)([]),2),R=z[0],A=z[1],T=c((0,b.useState)(!1),2),F=T[0],L=T[1],N=c((0,b.useState)(1),2),B=N[0],H=N[1],$=c((0,b.useState)(1),2),U=$[0],W=$[1],G=c((0,b.useState)(!1),2),Y=G[0],Z=G[1],q=(0,d.debounce)((function(e){L(!0);var t=e?encodeURIComponent(e):"";fetch(ajaxurl+"?action=vczapi_get_zoom_hosts&host="+t).then((function(e){return e.json()})).then((function(e){if(v.current&&Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text,value:String(e.value||e.id)}}));A(t),L(!1)}})).catch((function(){v.current&&L(!1)}))}),300),J=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||"undefined"===e)return[];var o="object"===r(t)?t.value:t,i=ajaxurl+"?action=vczapi_get_live_meetings&host_id="+e+"&show="+o;n.hasOwnProperty("page_number")&&"undefined"!==n.page_number&&(i+="&page_number="+n.page_number),Z(!0),fetch(i).then((function(e){return e.json()})).then((function(e){if(v.current){var t=parseFloat(e.total_records)/parseFloat(e.page_size);if(t>1){var n=Math.round(t);H(n)}else H(1);C(e.formatted_meetings||[]),Z(!1)}})).catch((function(){v.current&&Z(!1)}))},X=function(e){var t=e.numberOfPages,n=[];if(t>1){for(var o=function(e){var t=e===U?"selected":"";n.push((0,yo.jsx)(g.Button,{className:t,onClick:function(){var t=(null==k?void 0:k.value)||k;J(t,M,{page_number:e}),W(e)},children:e},e))},r=1;r<=t;r++)o(r);return(0,yo.jsx)("div",{className:"vczapi-blocks-pagination",children:n})}return""};if((0,b.useEffect)((function(){v.current=!0,L(!0),fetch(ajaxurl+"?action=vczapi_get_zoom_hosts&host=").then((function(e){return e.json()})).then((function(e){if(v.current&&Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text,value:String(e.value||e.id)}}));A(t),L(!1)}})).catch((function(){v.current&&L(!1)}));var e=(null==o?void 0:o.value)||o;return e&&"meeting"===f&&J(e,M),function(){v.current=!1}}),[]),s)return(0,yo.jsx)("img",{src:vczapi_blocks.recordings_preview,alt:"Zoom Recordings"});var K=S.map((function(e){return{label:e.label,value:JSON.stringify(e)}}));return(0,yo.jsxs)("div",Do(Do({},(0,h.useBlockProps)()),{},{children:[(0,yo.jsx)(h.BlockControls,{children:(0,yo.jsx)(g.ToolbarGroup,{children:(0,yo.jsx)(g.ToolbarButton,{icon:w?"no":"edit",title:w?"Close":"Edit",subscript:"Edit",onClick:function(){O((function(e){return!e}))}})})}),(void 0===i||void 0===o||w)&&(0,yo.jsxs)(g.Placeholder,{children:[(0,yo.jsxs)("div",{className:"vczapi-label-header",children:[(0,yo.jsx)("h2",{children:(0,p.__)("Zoom - Show Recordings","video-conferencing-with-zoom-api")}),(0,yo.jsx)("div",{children:(0,yo.jsx)("p",{children:(0,p.__)("Show recordings from Zoom","video-conferencing-with-zoom-api")})})]}),(0,yo.jsxs)("div",{className:"vczapi-blocks-form",children:[void 0!==i&&i.hasOwnProperty("value")&&(0,yo.jsx)("div",{className:"vczapi-blocks-form--selected-meeting",children:(0,yo.jsxs)("h4",{children:["Currently Selected Meeting: ",(0,yo.jsx)("strong",{children:i.label})]})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.RadioControl,{className:"radio-inline",label:(0,p.__)("Show Recordings by","video-conferencing-with-zoom-api"),options:[{label:"Host",value:"host"},{label:"Meeting",value:"meeting"}],selected:f,onChange:function(e){v.current&&n({showBy:e})}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.ComboboxControl,{label:(0,p.__)("Select A Host","video-conferencing-with-zoom-api"),help:(0,p.__)("Click to view available hosts or start typing to filter","video-conferencing-with-zoom-api"),value:null!=k&&k.value?String(k.value):"string"==typeof k?k:"",options:R,onFilterValueChange:q,isLoading:F,onChange:function(e){if(e){var t=R.find((function(t){return String(t.value)===String(e)}))||{value:e,label:e};v.current&&(P(t),"meeting"===f&&J(e,M))}}})}),"meeting"===f&&(0,yo.jsxs)(yo.Fragment,{children:[(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Would you like to show a Meeting or Webinar","video-conferencing-with-zoom-api"),value:M,options:[{label:"Meeting",value:"meeting"},{label:"Webinar",value:"webinar"}],onChange:function(e){E(e);var t=(null==k?void 0:k.value)||k;t&&v.current&&(C([]),J(t,e))}})}),Y&&(void 0===S||0===S.length)&&(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.Spinner,{})}),void 0!==S&&S.length>0&&(0,yo.jsxs)("div",{className:"vczapi-blocks-form--group",children:[(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Select A Meeting : ","video-conferencing-with-zoom-api")+(B>1?" (use pagination below if necessary)":""),value:JSON.stringify(D),options:[{label:(0,p.__)("Select a meeting","video-conferencing-with-zoom-api"),value:"{}"}].concat(u(K)),disabled:Y,onChange:function(e){"{}"!==e&&v.current&&V(JSON.parse(e))}}),(0,yo.jsx)(X,{numberOfPages:B})]})]}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.ToggleControl,{className:"toggle-inline",label:"Downloadable",checked:a,onChange:function(e){v.current&&n({downloadable:e})}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.Button,{isPrimary:!0,onClick:function(){return"host"!==f||k&&("object"!==r(k)||k.value)?"meeting"!==f||D.hasOwnProperty("value")?void(v.current&&(n({selectedMeeting:D}),n({host:k}),n({shouldShow:"object"===r(M)?M:{label:M,value:M}}),O(!1))):(alert("Meeting Needs to be selected"),!1):(alert("Host Needs to be selected"),!1)},children:(0,p.__)("Save","video-conferencing-with-zoom-api")})})]})]}),("host"===f&&void 0!==o||"meeting"===f&&void 0!==i)&&!w&&(0,yo.jsx)(g.Disabled,{children:(0,yo.jsx)(m(),{block:"vczapi/recordings",attributes:{downloadable:a,host:o,selectedMeeting:i,showBy:f}})})]}))}}),(0,o.registerBlockType)("vczapi/single-zoom-meeting",{apiVersion:2,edit:function(e){return(0,yo.jsx)("div",zo(zo({},(0,h.useBlockProps)()),{},{children:(0,yo.jsxs)("div",{class:"vczapi-singleMeetingSkeleton",children:[(0,yo.jsx)("h5",{children:" Please do not remove this block, this block is used to display single meeting page for FSE Themes"}),(0,yo.jsx)("img",{alt:"Zoom Meeting Single Page Outline",src:vczapi_blocks.single_zoom_meeting_page})]})}))}})},679:function(e,t,n){var o=n(864),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return o.isMemo(e)?a:s[e.$$typeof]||r}s[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[o.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,o){if("string"!=typeof n){if(h){var r=f(n);r&&r!==h&&e(t,r,o)}var a=c(n);p&&(a=a.concat(p(n)));for(var s=l(t),v=l(n),m=0;m<a.length;++m){var g=a[m];if(!(i[g]||o&&o[g]||v&&v[g]||s&&s[g])){var b=d(n,g);try{u(t,g,b)}catch(e){}}}}return t}},921:function(e,t){var n="function"==typeof Symbol&&Symbol.for,o=n?Symbol.for("react.element"):60103,r=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function O(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case c:case p:case i:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case u:case d:case m:case v:case l:return e;default:return t}}case r:return t}}}function x(e){return O(e)===p}t.AsyncMode=c,t.ConcurrentMode=p,t.ContextConsumer=u,t.ContextProvider=l,t.Element=o,t.ForwardRef=d,t.Fragment=i,t.Lazy=m,t.Memo=v,t.Portal=r,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return x(e)||O(e)===c},t.isConcurrentMode=x,t.isContextConsumer=function(e){return O(e)===u},t.isContextProvider=function(e){return O(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return O(e)===d},t.isFragment=function(e){return O(e)===i},t.isLazy=function(e){return O(e)===m},t.isMemo=function(e){return O(e)===v},t.isPortal=function(e){return O(e)===r},t.isProfiler=function(e){return O(e)===s},t.isStrictMode=function(e){return O(e)===a},t.isSuspense=function(e){return O(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===p||e===s||e===a||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===b||e.$$typeof===y||e.$$typeof===w||e.$$typeof===g)},t.typeOf=O},864:function(e,t,n){e.exports=n(921)}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.m=t,e=[],o.O=function(t,n,r,i){if(!n){var a=1/0;for(c=0;c<e.length;c++){n=e[c][0],r=e[c][1],i=e[c][2];for(var s=!0,l=0;l<n.length;l++)(!1&i||a>=i)&&Object.keys(o.O).every((function(e){return o.O[e](n[l])}))?n.splice(l--,1):(s=!1,i<a&&(a=i));if(s){e.splice(c--,1);var u=r();void 0!==u&&(t=u)}}return t}i=i||0;for(var c=e.length;c>0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[n,r,i]},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={826:0,431:0};o.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,i,a=n[0],s=n[1],l=n[2],u=0;if(a.some((function(t){return 0!==e[t]}))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(l)var c=l(o)}for(t&&t(n);u<a.length;u++)i=a[u],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(c)},n=self.webpackChunkvideo_conferencing_with_zoom_api=self.webpackChunkvideo_conferencing_with_zoom_api||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var r=o.O(void 0,[431],(function(){return o(231)}));r=o.O(r)}();
     1!function(){"use strict";var e,t={772:function(e,t,n){var o=window.wp.blocks;function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:String(t)}function a(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function l(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function c(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return s}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var d=window.wp.i18n,p=window.lodash,f=window.wp.url,v=window.wp.blockEditor,h=window.wp.serverSideRender,m=n.n(h),g=window.wp.components,b=window.wp.element,y=window.wp.apiFetch,w=n.n(y);function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},O.apply(this,arguments)}var x=window.React;function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function j(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,i(o.key),o)}}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function P(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(P=function(){return!!e})()}var M=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),E=Math.abs,z=String.fromCharCode,I=Object.assign;function D(e){return e.trim()}function V(e,t,n){return e.replace(t,n)}function R(e,t){return e.indexOf(t)}function A(e,t){return 0|e.charCodeAt(t)}function T(e,t,n){return e.slice(t,n)}function F(e){return e.length}function L(e){return e.length}function N(e,t){return t.push(e),e}var B=1,H=1,$=0,U=0,W=0,G="";function Y(e,t,n,o,r,i,a){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:B,column:H,length:a,return:""}}function Z(e,t){return I(Y("",null,null,"",null,null,0),e,{length:-e.length},t)}function q(){return W=U>0?A(G,--U):0,H--,10===W&&(H=1,B--),W}function J(){return W=U<$?A(G,U++):0,H++,10===W&&(H=1,B++),W}function X(){return A(G,U)}function K(){return U}function Q(e,t){return T(G,e,t)}function ee(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function te(e){return B=H=1,$=F(G=e),U=0,[]}function ne(e){return G="",e}function oe(e){return D(Q(U-1,ae(91===e?e+2:40===e?e+1:e)))}function re(e){for(;(W=X())&&W<33;)J();return ee(e)>2||ee(W)>3?"":" "}function ie(e,t){for(;--t&&J()&&!(W<48||W>102||W>57&&W<65||W>70&&W<97););return Q(e,K()+(t<6&&32==X()&&32==J()))}function ae(e){for(;J();)switch(W){case e:return U;case 34:case 39:34!==e&&39!==e&&ae(W);break;case 40:41===e&&ae(e);break;case 92:J()}return U}function se(e,t){for(;J()&&e+W!==57&&(e+W!==84||47!==X()););return"/*"+Q(t,U-1)+"*"+z(47===e?e:J())}function le(e){for(;!ee(X());)J();return Q(e,U)}var ce="-ms-",ue="-moz-",de="-webkit-",pe="comm",fe="rule",ve="decl",he="@keyframes";function me(e,t){for(var n="",o=L(e),r=0;r<o;r++)n+=t(e[r],r,e,t)||"";return n}function ge(e,t,n,o){switch(e.type){case"@import":case ve:return e.return=e.return||e.value;case pe:return"";case he:return e.return=e.value+"{"+me(e.children,o)+"}";case fe:e.value=e.props.join(",")}return F(n=me(e.children,o))?e.return=e.value+"{"+n+"}":""}function be(e){return ne(ye("",null,null,null,[""],e=te(e),0,[0],e))}function ye(e,t,n,o,r,i,a,s,l){for(var c=0,u=0,d=a,p=0,f=0,v=0,h=1,m=1,g=1,b=0,y="",w=r,O=i,x=o,S=y;m;)switch(v=b,b=J()){case 40:if(108!=v&&58==A(S,d-1)){-1!=R(S+=V(oe(b),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:S+=oe(b);break;case 9:case 10:case 13:case 32:S+=re(v);break;case 92:S+=ie(K()-1,7);continue;case 47:switch(X()){case 42:case 47:N(Oe(se(J(),K()),t,n),l);break;default:S+="/"}break;case 123*h:s[c++]=F(S)*g;case 125*h:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+u:-1==g&&(S=V(S,/\f/g,"")),f>0&&F(S)-d&&N(f>32?xe(S+";",o,n,d-1):xe(V(S," ","")+";",o,n,d-2),l);break;case 59:S+=";";default:if(N(x=we(S,t,n,c,u,r,s,y,w=[],O=[],d),i),123===b)if(0===u)ye(S,t,x,x,w,i,d,s,O);else switch(99===p&&110===A(S,3)?100:p){case 100:case 109:case 115:ye(e,x,x,o&&N(we(e,x,x,0,0,r,s,y,r,w=[],d),O),r,O,d,s,o?w:O);break;default:ye(S,x,x,x,[""],O,0,s,O)}}c=u=f=0,h=g=1,y=S="",d=a;break;case 58:d=1+F(S),f=v;default:if(h<1)if(123==b)--h;else if(125==b&&0==h++&&125==q())continue;switch(S+=z(b),b*h){case 38:g=u>0?1:(S+="\f",-1);break;case 44:s[c++]=(F(S)-1)*g,g=1;break;case 64:45===X()&&(S+=oe(J())),p=X(),u=d=F(y=S+=le(K())),b++;break;case 45:45===v&&2==F(S)&&(h=0)}}return i}function we(e,t,n,o,r,i,a,s,l,c,u){for(var d=r-1,p=0===r?i:[""],f=L(p),v=0,h=0,m=0;v<o;++v)for(var g=0,b=T(e,d+1,d=E(h=a[v])),y=e;g<f;++g)(y=D(h>0?p[g]+" "+b:V(b,/&\f/g,p[g])))&&(l[m++]=y);return Y(e,t,n,0===r?fe:s,l,c,u)}function Oe(e,t,n){return Y(e,t,n,pe,z(W),T(e,2,-2),0)}function xe(e,t,n,o){return Y(e,t,n,ve,T(e,0,o),T(e,o+1,-1),o)}var Se=function(e,t,n){for(var o=0,r=0;o=r,r=X(),38===o&&12===r&&(t[n]=1),!ee(r);)J();return Q(e,U)},Ce=new WeakMap,je=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Ce.get(n))&&!o){Ce.set(e,!0);for(var r=[],i=function(e,t){return ne(function(e,t){var n=-1,o=44;do{switch(ee(o)){case 0:38===o&&12===X()&&(t[n]=1),e[n]+=Se(U-1,t,n);break;case 2:e[n]+=oe(o);break;case 4:if(44===o){e[++n]=58===X()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=z(o)}}while(o=J());return e}(te(e),t))}(t,r),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=r[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},ke=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function _e(e,t){switch(function(e,t){return 45^A(e,0)?(((t<<2^A(e,0))<<2^A(e,1))<<2^A(e,2))<<2^A(e,3):0}(e,t)){case 5103:return de+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return de+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return de+e+ue+e+ce+e+e;case 6828:case 4268:return de+e+ce+e+e;case 6165:return de+e+ce+"flex-"+e+e;case 5187:return de+e+V(e,/(\w+).+(:[^]+)/,de+"box-$1$2"+ce+"flex-$1$2")+e;case 5443:return de+e+ce+"flex-item-"+V(e,/flex-|-self/,"")+e;case 4675:return de+e+ce+"flex-line-pack"+V(e,/align-content|flex-|-self/,"")+e;case 5548:return de+e+ce+V(e,"shrink","negative")+e;case 5292:return de+e+ce+V(e,"basis","preferred-size")+e;case 6060:return de+"box-"+V(e,"-grow","")+de+e+ce+V(e,"grow","positive")+e;case 4554:return de+V(e,/([^-])(transform)/g,"$1"+de+"$2")+e;case 6187:return V(V(V(e,/(zoom-|grab)/,de+"$1"),/(image-set)/,de+"$1"),e,"")+e;case 5495:case 3959:return V(e,/(image-set\([^]*)/,de+"$1$`$1");case 4968:return V(V(e,/(.+:)(flex-)?(.*)/,de+"box-pack:$3"+ce+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+de+e+e;case 4095:case 3583:case 4068:case 2532:return V(e,/(.+)-inline(.+)/,de+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(F(e)-1-t>6)switch(A(e,t+1)){case 109:if(45!==A(e,t+4))break;case 102:return V(e,/(.+:)(.+)-([^]+)/,"$1"+de+"$2-$3$1"+ue+(108==A(e,t+3)?"$3":"$2-$3"))+e;case 115:return~R(e,"stretch")?_e(V(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==A(e,t+1))break;case 6444:switch(A(e,F(e)-3-(~R(e,"!important")&&10))){case 107:return V(e,":",":"+de)+e;case 101:return V(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+de+(45===A(e,14)?"inline-":"")+"box$3$1"+de+"$2$3$1"+ce+"$2box$3")+e}break;case 5936:switch(A(e,t+11)){case 114:return de+e+ce+V(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return de+e+ce+V(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return de+e+ce+V(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return de+e+ce+e+e}return e}var Pe=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case ve:e.return=_e(e.value,e.length);break;case he:return me([Z(e,{value:V(e.value,"@","@"+de)})],o);case fe:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return me([Z(e,{props:[V(t,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return me([Z(e,{props:[V(t,/:(plac\w+)/,":"+de+"input-$1")]}),Z(e,{props:[V(t,/:(plac\w+)/,":-moz-$1")]}),Z(e,{props:[V(t,/:(plac\w+)/,ce+"input-$1")]})],o)}return""}))}}],Me=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o,r,i=e.stylisPlugins||Pe,a={},s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,c,u,d,p=[ge,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],f=(c=[je,ke].concat(i,p),u=L(c),function(e,t,n,o){for(var r="",i=0;i<u;i++)r+=c[i](e,t,n,o)||"";return r});r=function(e,t,n,o){l=n,me(be(e?e+"{"+t.styles+"}":t.styles),f),o&&(v.inserted[t.name]=!0)};var v={key:t,sheet:new M({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:r};return v.sheet.hydrate(s),v},Ee=function(e,t,n){var o=e.key+"-"+t.name;!1===n&&void 0===e.registered[o]&&(e.registered[o]=t.styles)},ze=function(e){for(var t,n=0,o=0,r=e.length;r>=4;++o,r-=4)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(r){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(o)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},Ie={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},De=/[A-Z]|^ms/g,Ve=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Re=function(e){return 45===e.charCodeAt(1)},Ae=function(e){return null!=e&&"boolean"!=typeof e},Te=function(e){var t=Object.create(null);return function(e){return void 0===t[e]&&(t[e]=Re(n=e)?n:n.replace(De,"-$&").toLowerCase()),t[e];var n}}(),Fe=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Ve,(function(e,t,n){return Ne={name:t,styles:n,next:Ne},t}))}return 1===Ie[e]||Re(e)||"number"!=typeof t||0===t?t:t+"px"};function Le(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Ne={name:n.name,styles:n.styles,next:Ne},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)Ne={name:o.name,styles:o.styles,next:Ne},o=o.next;return n.styles+";"}return function(e,t,n){var o="";if(Array.isArray(n))for(var r=0;r<n.length;r++)o+=Le(e,t,n[r])+";";else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?o+=i+"{"+t[a]+"}":Ae(a)&&(o+=Te(i)+":"+Fe(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=Le(e,t,a);switch(i){case"animation":case"animationName":o+=Te(i)+":"+s+";";break;default:o+=i+"{"+s+"}"}}else for(var l=0;l<a.length;l++)Ae(a[l])&&(o+=Te(i)+":"+Fe(i,a[l])+";")}return o}(e,t,n);case"function":if(void 0!==e){var r=Ne,i=n(e);return Ne=r,Le(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var Ne,Be=/label:\s*([^\s;\n{]+)\s*(;|$)/g,He=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o=!0,r="";Ne=void 0;var i=e[0];null==i||void 0===i.raw?(o=!1,r+=Le(n,t,i)):r+=i[0];for(var a=1;a<e.length;a++)r+=Le(n,t,e[a]),o&&(r+=i[a]);Be.lastIndex=0;for(var s,l="";null!==(s=Be.exec(r));)l+="-"+s[1];return{name:ze(r)+l,styles:r,next:Ne}},$e=!!x.useInsertionEffect&&x.useInsertionEffect||function(e){return e()},Ue={}.hasOwnProperty,We=(0,x.createContext)("undefined"!=typeof HTMLElement?Me({key:"css"}):null);We.Provider;var Ge=function(e){return(0,x.forwardRef)((function(t,n){var o=(0,x.useContext)(We);return e(t,o,n)}))},Ye=(0,x.createContext)({}),Ze="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",qe=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;return Ee(t,n,o),$e((function(){return function(e,t,n){Ee(e,t,n);var o=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var r=t;do{e.insert(t===r?"."+o:"",r,e.sheet,!0),r=r.next}while(void 0!==r)}}(t,n,o)})),null},Je=Ge((function(e,t,n){var o=e.css;"string"==typeof o&&void 0!==t.registered[o]&&(o=t.registered[o]);var r=e[Ze],i=[o],a="";"string"==typeof e.className?a=function(e,t,n){var o="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):o+=n+" "})),o}(t.registered,i,e.className):null!=e.className&&(a=e.className+" ");var s=He(i,void 0,(0,x.useContext)(Ye));a+=t.key+"-"+s.name;var l={};for(var c in e)Ue.call(e,c)&&"css"!==c&&c!==Ze&&(l[c]=e[c]);return l.ref=n,l.className=a,(0,x.createElement)(x.Fragment,null,(0,x.createElement)(qe,{cache:t,serialized:s,isStringTag:"string"==typeof r}),(0,x.createElement)(r,l))}));n(679);var Xe=function(e,t){var n=arguments;if(null==t||!Ue.call(t,"css"))return x.createElement.apply(void 0,n);var o=n.length,r=new Array(o);r[0]=Je,r[1]=function(e,t){var n={};for(var o in t)Ue.call(t,o)&&(n[o]=t[o]);return n[Ze]=e,n}(e,t);for(var i=2;i<o;i++)r[i]=n[i];return x.createElement.apply(null,r)};function Ke(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return He(t)}function Qe(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var et=window.ReactDOM;Math.min,Math.max;function tt(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function nt(e){return tt(e).getComputedStyle(e)}function ot(e){return e instanceof tt(e).Node}function rt(e){return ot(e)?(e.nodeName||"").toLowerCase():""}let it;function at(e){return e instanceof tt(e).HTMLElement}function st(e){return e instanceof tt(e).Element}function lt(e){return"undefined"!=typeof ShadowRoot&&(e instanceof tt(e).ShadowRoot||e instanceof ShadowRoot)}function ct(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=nt(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function ut(){return/^((?!chrome|android).)*safari/i.test(function(){if(it)return it;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(it=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),it):navigator.userAgent}())}["top","right","bottom","left"].reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]),Math.min,Math.max;const dt=Math.round;function pt(e){return st(e)?e:e.contextElement}const ft={x:1,y:1};function vt(e){const t=pt(e);if(!at(t))return ft;const n=t.getBoundingClientRect(),{width:o,height:r,fallback:i}=function(e){const t=nt(e);let n=parseFloat(t.width),o=parseFloat(t.height);const r=at(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,s=dt(n)!==i||dt(o)!==a;return s&&(n=i,o=a),{width:n,height:o,fallback:s}}(t);let a=(i?dt(n.width):n.width)/o,s=(i?dt(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}function ht(e,t,n,o){var r,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),s=pt(e);let l=ft;t&&(o?st(o)&&(l=vt(o)):l=vt(e));const c=s?tt(s):window,u=ut()&&n;let d=(a.left+(u&&(null==(r=c.visualViewport)?void 0:r.offsetLeft)||0))/l.x,p=(a.top+(u&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/l.y,f=a.width/l.x,v=a.height/l.y;if(s){const e=tt(s),t=o&&st(o)?tt(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=vt(n),t=n.getBoundingClientRect(),o=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(o.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(o.paddingTop))*e.y,d*=e.x,p*=e.y,f*=e.x,v*=e.y,d+=t.x,p+=t.y,n=tt(n).frameElement}}return h={width:f,height:v,x:d,y:p},{...h,top:h.y,left:h.x,right:h.x+h.width,bottom:h.y+h.height};var h}function mt(e){if("html"===rt(e))return e;const t=e.assignedSlot||e.parentNode||lt(e)&&e.host||function(e){return((ot(e)?e.ownerDocument:e.document)||window.document).documentElement}(e);return lt(t)?t.host:t}function gt(e){const t=mt(e);return function(e){return["html","body","#document"].includes(rt(e))}(t)?t.ownerDocument.body:at(t)&&ct(t)?t:gt(t)}function bt(e,t){var n;void 0===t&&(t=[]);const o=gt(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=tt(o);return r?t.concat(i,i.visualViewport||[],ct(o)?o:[]):t.concat(o,bt(o))}var yt=x.useLayoutEffect,wt=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Ot=function(){};function xt(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function St(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];var i=[].concat(o);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(xt(e,a)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var Ct=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===r(e)&&null!==e?[e]:[];var t},jt=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,C({},Qe(e,wt))},kt=function(e,t,n){var o=e.cx,r=e.getStyles,i=e.getClassNames,a=e.className;return{css:r(t,e),className:o(null!=n?n:{},i(t,e),a)}};function _t(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Pt(e){return _t(e)?window.pageYOffset:e.scrollTop}function Mt(e,t){_t(e)?window.scrollTo(0,t):e.scrollTop=t}function Et(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ot,r=Pt(e),i=t-r,a=0;!function t(){var s,l=(s=a+=10,i*((s=s/n-1)*s*s+1)+r);Mt(e,l),a<n?window.requestAnimationFrame(t):o(e)}()}function zt(e,t){var n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),r=t.offsetHeight/3;o.bottom+r>n.bottom?Mt(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight)):o.top-r<n.top&&Mt(e,Math.max(t.offsetTop-r,0))}function It(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var Dt=!1,Vt={get passive(){return Dt=!0}},Rt="undefined"!=typeof window?window:{};Rt.addEventListener&&Rt.removeEventListener&&(Rt.addEventListener("p",Ot,Vt),Rt.removeEventListener("p",Ot,!1));var At=Dt;function Tt(e){return null!=e}function Ft(e,t,n){return e?t:n}var Lt=["children","innerProps"],Nt=["children","innerProps"];var Bt,Ht,$t,Ut=function(e){return"auto"===e?"bottom":e},Wt=(0,x.createContext)(null),Gt=function(e){var t=e.children,n=e.minMenuHeight,o=e.maxMenuHeight,r=e.menuPlacement,i=e.menuPosition,a=e.menuShouldScrollIntoView,s=e.theme,l=((0,x.useContext)(Wt)||{}).setPortalPlacement,c=(0,x.useRef)(null),d=u((0,x.useState)(o),2),p=d[0],f=d[1],v=u((0,x.useState)(null),2),h=v[0],m=v[1],g=s.spacing.controlHeight;return yt((function(){var e=c.current;if(e){var t="fixed"===i,s=function(e){var t=e.maxHeight,n=e.menuEl,o=e.minHeight,r=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,o=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var r=e;r=r.parentElement;)if(t=getComputedStyle(r),(!n||"static"!==t.position)&&o.test(t.overflow+t.overflowY+t.overflowX))return r;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u,d=l.getBoundingClientRect().height,p=n.getBoundingClientRect(),f=p.bottom,v=p.height,h=p.top,m=n.offsetParent.getBoundingClientRect().top,g=a||_t(u=l)?window.innerHeight:u.clientHeight,b=Pt(l),y=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),O=m-w,x=g-h,S=O+b,C=d-b-h,j=f-g+b+y,k=b+h-w,_=160;switch(r){case"auto":case"bottom":if(x>=v)return{placement:"bottom",maxHeight:t};if(C>=v&&!a)return i&&Et(l,j,_),{placement:"bottom",maxHeight:t};if(!a&&C>=o||a&&x>=o)return i&&Et(l,j,_),{placement:"bottom",maxHeight:a?x-y:C-y};if("auto"===r||a){var P=t,M=a?O:S;return M>=o&&(P=Math.min(M-y-s,t)),{placement:"top",maxHeight:P}}if("bottom"===r)return i&&Mt(l,j),{placement:"bottom",maxHeight:t};break;case"top":if(O>=v)return{placement:"top",maxHeight:t};if(S>=v&&!a)return i&&Et(l,k,_),{placement:"top",maxHeight:t};if(!a&&S>=o||a&&O>=o){var E=t;return(!a&&S>=o||a&&O>=o)&&(E=a?O-w:S-w),i&&Et(l,k,_),{placement:"top",maxHeight:E}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return c}({maxHeight:o,menuEl:e,minHeight:n,placement:r,shouldScroll:a&&!t,isFixedPosition:t,controlHeight:g});f(s.maxHeight),m(s.placement),null==l||l(s.placement)}}),[o,r,i,a,n,l,g]),t({ref:c,placerProps:C(C({},e),{},{placement:h||Ut(r),maxHeight:p})})},Yt=function(e,t){var n=e.theme,o=n.spacing.baseUnit,r=n.colors;return C({textAlign:"center"},t?{}:{color:r.neutral40,padding:"".concat(2*o,"px ").concat(3*o,"px")})},Zt=Yt,qt=Yt,Jt=["size"],Xt=["innerProps","isRtl","size"],Kt={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Qt=function(e){var t=e.size,n=Qe(e,Jt);return Xe("svg",O({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Kt},n))},en=function(e){return Xe(Qt,O({size:20},e),Xe("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},tn=function(e){return Xe(Qt,O({size:20},e),Xe("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},nn=function(e,t){var n=e.isFocused,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return C({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*r,":hover":{color:n?i.neutral80:i.neutral40}})},on=nn,rn=nn,an=function(){var e=Ke.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Bt||(Ht=["\n  0%, 80%, 100% { opacity: 0; }\n  40% { opacity: 1; }\n"],$t||($t=Ht.slice(0)),Bt=Object.freeze(Object.defineProperties(Ht,{raw:{value:Object.freeze($t)}})))),sn=function(e){var t=e.delay,n=e.offset;return Xe("span",{css:Ke({animation:"".concat(an," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},ln=["data"],cn=["innerRef","isDisabled","isHidden","inputClassName"],un={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},dn={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":C({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},un)},pn=function(e){return C({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},un)},fn=function(e){var t=e.children,n=e.innerProps;return Xe("div",n,t)},vn={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Xe("div",O({},kt(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Xe(en,null))},Control:function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Xe("div",O({ref:r},kt(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":o,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Xe("div",O({},kt(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Xe(tn,null))},DownChevron:tn,CrossIcon:en,Group:function(e){var t=e.children,n=e.cx,o=e.getStyles,r=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return Xe("div",O({},kt(e,"group",{group:!0}),s),Xe(i,O({},a,{selectProps:u,theme:c,getStyles:o,getClassNames:r,cx:n}),l),Xe("div",null,t))},GroupHeading:function(e){var t=jt(e);t.data;var n=Qe(t,ln);return Xe("div",O({},kt(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Xe("div",O({},kt(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Xe("span",O({},t,kt(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,o=jt(e),r=o.innerRef,i=o.isDisabled,a=o.isHidden,s=o.inputClassName,l=Qe(o,cn);return Xe("div",O({},kt(e,"input",{"input-container":!0}),{"data-value":n||""}),Xe("input",O({className:t({input:!0},s),ref:r,style:pn(a),disabled:i},l)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,o=e.size,r=void 0===o?4:o,i=Qe(e,Xt);return Xe("div",O({},kt(C(C({},i),{},{innerProps:t,isRtl:n,size:r}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Xe(sn,{delay:0,offset:n}),Xe(sn,{delay:160,offset:!0}),Xe(sn,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,o=e.innerProps;return Xe("div",O({},kt(e,"menu",{menu:!0}),{ref:n},o),t)},MenuList:function(e){var t=e.children,n=e.innerProps,o=e.innerRef,r=e.isMulti;return Xe("div",O({},kt(e,"menuList",{"menu-list":!0,"menu-list--is-multi":r}),{ref:o},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,o=e.controlElement,r=e.innerProps,i=e.menuPlacement,a=e.menuPosition,s=(0,x.useRef)(null),l=(0,x.useRef)(null),c=u((0,x.useState)(Ut(i)),2),d=c[0],p=c[1],f=(0,x.useMemo)((function(){return{setPortalPlacement:p}}),[]),v=u((0,x.useState)(null),2),h=v[0],m=v[1],g=(0,x.useCallback)((function(){if(o){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(o),t="fixed"===a?0:window.pageYOffset,n=e[d]+t;n===(null==h?void 0:h.offset)&&e.left===(null==h?void 0:h.rect.left)&&e.width===(null==h?void 0:h.rect.width)||m({offset:n,rect:e})}}),[o,a,d,null==h?void 0:h.offset,null==h?void 0:h.rect.left,null==h?void 0:h.rect.width]);yt((function(){g()}),[g]);var b=(0,x.useCallback)((function(){"function"==typeof l.current&&(l.current(),l.current=null),o&&s.current&&(l.current=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=o,l=r||i?[...st(e)?bt(e):e.contextElement?bt(e.contextElement):[],...bt(t)]:[];l.forEach((e=>{const t=!st(e)&&e.toString().includes("V");!r||s&&!t||e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));let c,u=null;a&&(u=new ResizeObserver((()=>{n()})),st(e)&&!s&&u.observe(e),st(e)||!e.contextElement||s||u.observe(e.contextElement),u.observe(t));let d=s?ht(e):null;return s&&function t(){const o=ht(e);!d||o.x===d.x&&o.y===d.y&&o.width===d.width&&o.height===d.height||n(),d=o,c=requestAnimationFrame(t)}(),n(),()=>{var e;l.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=u)||e.disconnect(),u=null,s&&cancelAnimationFrame(c)}}(o,s.current,g,{elementResize:"ResizeObserver"in window}))}),[o,g]);yt((function(){b()}),[b]);var y=(0,x.useCallback)((function(e){s.current=e,b()}),[b]);if(!t&&"fixed"!==a||!h)return null;var w=Xe("div",O({ref:y},kt(C(C({},e),{},{offset:h.offset,position:a,rect:h.rect}),"menuPortal",{"menu-portal":!0}),r),n);return Xe(Wt.Provider,{value:f},t?(0,et.createPortal)(w,t):w)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,o=e.innerProps,r=Qe(e,Nt);return Xe("div",O({},kt(C(C({},r),{},{children:n,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,o=e.innerProps,r=Qe(e,Lt);return Xe("div",O({},kt(C(C({},r),{},{children:n,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),n)},MultiValue:function(e){var t=e.children,n=e.components,o=e.data,r=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return Xe(l,{data:o,innerProps:C(C({},kt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),r),selectProps:s},Xe(c,{data:o,innerProps:C({},kt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),Xe(u,{data:o,innerProps:C(C({},kt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},MultiValueContainer:fn,MultiValueLabel:fn,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Xe("div",O({role:"button"},n),t||Xe(en,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.innerRef,a=e.innerProps;return Xe("div",O({},kt(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":o,"option--is-selected":r}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Xe("div",O({},kt(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,o=e.isDisabled,r=e.isRtl;return Xe("div",O({},kt(e,"container",{"--is-disabled":o,"--is-rtl":r}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,o=e.innerProps;return Xe("div",O({},kt(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),o),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,o=e.isMulti,r=e.hasValue;return Xe("div",O({},kt(e,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":r}),n),t)}},hn=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function mn(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((o=e[n])===(r=t[n])||hn(o)&&hn(r)))return!1;var o,r;return!0}for(var gn={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},bn=function(e){return Xe("span",O({css:gn},e))},yn={guidance:function(e){var t=e.isSearchable,n=e.isMulti,o=e.tabSelectsValue,r=e.context,i=e.isInitialFocus;switch(r){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,o=void 0===n?"":n,r=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(r.length>1?"s":""," ").concat(r.join(","),", selected.");case"select-option":return"option ".concat(o,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,o=e.options,r=e.label,i=void 0===r?"":r,a=e.selectValue,s=e.isDisabled,l=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t&&c){var d=s?" disabled":"",p="".concat(l?" selected":"").concat(d);return"".concat(i).concat(p,", ").concat(u(o,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},wn=function(e){var t=e.ariaSelection,n=e.focusedOption,o=e.focusedValue,r=e.focusableOptions,i=e.isFocused,a=e.selectValue,s=e.selectProps,l=e.id,c=e.isAppleDevice,u=s.ariaLiveMessages,d=s.getOptionLabel,p=s.inputValue,f=s.isMulti,v=s.isOptionDisabled,h=s.isSearchable,m=s.menuIsOpen,g=s.options,b=s.screenReaderStatus,y=s.tabSelectsValue,w=s.isLoading,O=s["aria-label"],S=s["aria-live"],j=(0,x.useMemo)((function(){return C(C({},yn),u||{})}),[u]),k=(0,x.useMemo)((function(){var e,n="";if(t&&j.onChange){var o=t.option,r=t.options,i=t.removedValue,s=t.removedValues,l=t.value,c=i||o||(e=l,Array.isArray(e)?null:e),u=c?d(c):"",p=r||s||void 0,f=p?p.map(d):[],h=C({isDisabled:c&&v(c,a),label:u,labels:f},t);n=j.onChange(h)}return n}),[t,j,v,a,d]),_=(0,x.useMemo)((function(){var e="",t=n||o,i=!!(n&&a&&a.includes(n));if(t&&j.onFocus){var s={focused:t,label:d(t),isDisabled:v(t,a),isSelected:i,options:r,context:t===n?"menu":"value",selectValue:a,isAppleDevice:c};e=j.onFocus(s)}return e}),[n,o,d,v,j,r,a,c]),P=(0,x.useMemo)((function(){var e="";if(m&&g.length&&!w&&j.onFilter){var t=b({count:r.length});e=j.onFilter({inputValue:p,resultsMessage:t})}return e}),[r,p,m,j,g,b,w]),M="initial-input-focus"===(null==t?void 0:t.action),E=(0,x.useMemo)((function(){var e="";if(j.guidance){var t=o?"value":m?"menu":"input";e=j.guidance({"aria-label":O,context:t,isDisabled:n&&v(n,a),isMulti:f,isSearchable:h,tabSelectsValue:y,isInitialFocus:M})}return e}),[O,n,o,f,v,h,m,j,a,y,M]),z=Xe(x.Fragment,null,Xe("span",{id:"aria-selection"},k),Xe("span",{id:"aria-focused"},_),Xe("span",{id:"aria-results"},P),Xe("span",{id:"aria-guidance"},E));return Xe(x.Fragment,null,Xe(bn,{id:l},M&&z),Xe(bn,{"aria-live":S,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!M&&z))},On=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],xn=new RegExp("["+On.map((function(e){return e.letters})).join("")+"]","g"),Sn={},Cn=0;Cn<On.length;Cn++)for(var jn=On[Cn],kn=0;kn<jn.letters.length;kn++)Sn[jn.letters[kn]]=jn.base;var Pn=function(e){return e.replace(xn,(function(e){return Sn[e]}))},Mn=function(e,t){void 0===t&&(t=mn);var n=null;function o(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var i=e.apply(this,o);return n={lastResult:i,lastArgs:o,lastThis:this},i}return o.clear=function(){n=null},o}(Pn),En=function(e){return e.replace(/^\s+|\s+$/g,"")},zn=function(e){return"".concat(e.label," ").concat(e.value)},In=["innerRef"];function Dn(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var r=Object.entries(e).filter((function(e){var t=u(e,1)[0];return!n.includes(t)}));return r.reduce((function(e,t){var n=u(t,2),o=n[0],r=n[1];return e[o]=r,e}),{})}(Qe(e,In),"onExited","in","enter","exit","appear");return Xe("input",O({ref:t},n,{css:Ke({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Vn=["boxSizing","height","overflow","paddingRight","position"],Rn={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function An(e){e.preventDefault()}function Tn(e){e.stopPropagation()}function Fn(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Ln(){return"ontouchstart"in window||navigator.maxTouchPoints}var Nn=!("undefined"==typeof window||!window.document||!window.document.createElement),Bn=0,Hn={capture:!1,passive:!1},$n=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},Un={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Wn(e){var t=e.children,n=e.lockEnabled,o=e.captureEnabled,r=function(e){var t=e.isEnabled,n=e.onBottomArrive,o=e.onBottomLeave,r=e.onTopArrive,i=e.onTopLeave,a=(0,x.useRef)(!1),s=(0,x.useRef)(!1),l=(0,x.useRef)(0),c=(0,x.useRef)(null),u=(0,x.useCallback)((function(e,t){if(null!==c.current){var l=c.current,u=l.scrollTop,d=l.scrollHeight,p=l.clientHeight,f=c.current,v=t>0,h=d-p-u,m=!1;h>t&&a.current&&(o&&o(e),a.current=!1),v&&s.current&&(i&&i(e),s.current=!1),v&&t>h?(n&&!a.current&&n(e),f.scrollTop=d,m=!0,a.current=!0):!v&&-t>u&&(r&&!s.current&&r(e),f.scrollTop=0,m=!0,s.current=!0),m&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,o,r,i]),d=(0,x.useCallback)((function(e){u(e,e.deltaY)}),[u]),p=(0,x.useCallback)((function(e){l.current=e.changedTouches[0].clientY}),[]),f=(0,x.useCallback)((function(e){var t=l.current-e.changedTouches[0].clientY;u(e,t)}),[u]),v=(0,x.useCallback)((function(e){if(e){var t=!!At&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",f,t)}}),[f,p,d]),h=(0,x.useCallback)((function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",f,!1))}),[f,p,d]);return(0,x.useEffect)((function(){if(t){var e=c.current;return v(e),function(){h(e)}}}),[t,v,h]),function(e){c.current=e}}({isEnabled:void 0===o||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,o=void 0===n||n,r=(0,x.useRef)({}),i=(0,x.useRef)(null),a=(0,x.useCallback)((function(e){if(Nn){var t=document.body,n=t&&t.style;if(o&&Vn.forEach((function(e){var t=n&&n[e];r.current[e]=t})),o&&Bn<1){var i=parseInt(r.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+i||0;Object.keys(Rn).forEach((function(e){var t=Rn[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&Ln()&&(t.addEventListener("touchmove",An,Hn),e&&(e.addEventListener("touchstart",Fn,Hn),e.addEventListener("touchmove",Tn,Hn))),Bn+=1}}),[o]),s=(0,x.useCallback)((function(e){if(Nn){var t=document.body,n=t&&t.style;Bn=Math.max(Bn-1,0),o&&Bn<1&&Vn.forEach((function(e){var t=r.current[e];n&&(n[e]=t)})),t&&Ln()&&(t.removeEventListener("touchmove",An,Hn),e&&(e.removeEventListener("touchstart",Fn,Hn),e.removeEventListener("touchmove",Tn,Hn)))}}),[o]);return(0,x.useEffect)((function(){if(t){var e=i.current;return a(e),function(){s(e)}}}),[t,a,s]),function(e){i.current=e}}({isEnabled:n});return Xe(x.Fragment,null,n&&Xe("div",{onClick:$n,css:Un}),t((function(e){r(e),i(e)})))}var Gn={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Yn=function(e){var t=e.name,n=e.onFocus;return Xe("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Gn,value:"",onChange:function(){}})};function Zn(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function qn(){return Zn(/^Mac/i)}var Jn={clearIndicator:rn,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.theme,i=r.colors,a=r.borderRadius;return C({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:r.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:o?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:o?i.primary:i.neutral30}})},dropdownIndicator:on,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,o=n.colors,r=n.spacing;return C({label:"group",cursor:"default",display:"block"},t?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*r.baseUnit,paddingRight:3*r.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return C({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r})},input:function(e,t){var n=e.isDisabled,o=e.value,r=e.theme,i=r.spacing,a=r.colors;return C(C({visibility:n?"hidden":"visible",transform:o?"translateZ(0)":""},dn),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,o=e.size,r=e.theme,i=r.colors,a=r.spacing.baseUnit;return C({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:qt,menu:function(e,t){var n,o=e.placement,r=e.theme,i=r.borderRadius,s=r.spacing,l=r.colors;return C((a(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(o),"100%"),a(n,"position","absolute"),a(n,"width","100%"),a(n,"zIndex",1),n),t?{}:{backgroundColor:l.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},menuList:function(e,t){var n=e.maxHeight,o=e.theme.spacing.baseUnit;return C({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:o,paddingTop:o})},menuPortal:function(e){var t=e.rect,n=e.offset,o=e.position;return{left:t.left,position:o,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors;return C({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:r/2,margin:o.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,o=n.borderRadius,r=n.colors,i=e.cropWithEllipsis;return C({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:o/2,color:r.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors,a=e.isFocused;return C({alignItems:"center",display:"flex"},t?{}:{borderRadius:r/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:Zt,option:function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return C({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:r?s.primary:o?s.primary25:"transparent",color:n?s.neutral20:r?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:r?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,o=n.spacing,r=n.colors;return C({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:r.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing,i=o.colors;return C({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,o=e.isMulti,r=e.hasValue,i=e.selectProps.controlShouldRenderValue;return C({alignItems:"center",display:o&&r&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},Xn={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Kn={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:It(),captureMenuScroll:!It(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=C({ignoreCase:!0,ignoreAccents:!0,stringify:zn,trim:!0,matchFrom:"any"},undefined),o=n.ignoreCase,r=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?En(t):t,c=a?En(i(e)):i(e);return o&&(l=l.toLowerCase(),c=c.toLowerCase()),r&&(l=Mn(l),c=Pn(c)),"start"===s?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Qn(e,t,n,o){return{type:"option",data:t,isDisabled:so(e,t,n),isSelected:lo(e,t,n),label:io(e,t),value:ao(e,t),index:o}}function eo(e,t){return e.options.map((function(n,o){if("options"in n){var r=n.options.map((function(n,o){return Qn(e,n,t,o)})).filter((function(t){return oo(e,t)}));return r.length>0?{type:"group",data:n,options:r,index:o}:void 0}var i=Qn(e,n,t,o);return oo(e,i)?i:void 0})).filter(Tt)}function to(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,c(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function no(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,c(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function oo(e,t){var n=e.inputValue,o=void 0===n?"":n,r=t.data,i=t.isSelected,a=t.label,s=t.value;return(!uo(e)||!i)&&co(e,{label:a,value:s,data:r},o)}var ro=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},io=function(e,t){return e.getOptionLabel(t)},ao=function(e,t){return e.getOptionValue(t)};function so(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function lo(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var o=ao(e,t);return n.some((function(t){return ao(e,t)===o}))}function co(e,t,n){return!e.filterOption||e.filterOption(t,n)}var uo=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},po=1,fo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(l,e);var t,n,o,i,a,s=(t=l,n=P(),function(){var e,o=_(t);if(n){var i=_(this).constructor;e=Reflect.construct(o,arguments,i)}else e=o.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=s.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.isAppleDevice=qn()||Zn(/^iPhone/i)||Zn(/^iPad/i)||qn()&&navigator.maxTouchPoints>1,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var o=t.props,r=o.onChange,i=o.name;n.name=i,t.ariaOnChange(e,n),r(e,n)},t.setValue=function(e,n,o){var r=t.props,i=r.closeMenuOnSelect,a=r.isMulti,s=r.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(t.setState({inputIsHiddenAfterUpdate:!a}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:o})},t.selectOption=function(e){var n=t.props,o=n.blurInputOnSelect,r=n.isMulti,i=n.name,a=t.state.selectValue,s=r&&t.isOptionSelected(e,a),l=t.isOptionDisabled(e,a);if(s){var u=t.getOptionValue(e);t.setValue(a.filter((function(e){return t.getOptionValue(e)!==u})),"deselect-option",e)}else{if(l)return void t.ariaOnChange(e,{action:"select-option",option:e,name:i});r?t.setValue([].concat(c(a),[e]),"select-option",e):t.setValue(e,"select-option")}o&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,o=t.state.selectValue,r=t.getOptionValue(e),i=o.filter((function(e){return t.getOptionValue(e)!==r})),a=Ft(n,i,i[0]||null);t.onChange(a,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange(Ft(t.props.isMulti,[],null),{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,o=n[n.length-1],r=n.slice(0,n.length-1),i=Ft(e,r,r[0]||null);o&&t.onChange(i,{action:"pop-value",removedValue:o})},t.getFocusedOptionId=function(e){return ro(t.state.focusableOptionsWithIds,e)},t.getFocusableOptionsWithIds=function(){return no(eo(t.props,t.state.selectValue),t.getElementId("option"))},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return St.apply(void 0,[t.props.classNamePrefix].concat(n))},t.getOptionLabel=function(e){return io(t.props,e)},t.getOptionValue=function(e){return ao(t.props,e)},t.getStyles=function(e,n){var o=t.props.unstyled,r=Jn[e](n,o);r.boxSizing="border-box";var i=t.props.styles[e];return i?i(r,n):r},t.getClassNames=function(e,n){var o,r;return null===(o=(r=t.props.classNames)[e])||void 0===o?void 0:o.call(r,n)},t.getElementId=function(e){return"".concat(t.state.instancePrefix,"-").concat(e)},t.getComponents=function(){return e=t.props,C(C({},vn),e.components);var e},t.buildCategorizedOptions=function(){return eo(t.props,t.state.selectValue)},t.getCategorizedOptions=function(){return t.props.menuIsOpen?t.buildCategorizedOptions():[]},t.buildFocusableOptions=function(){return to(t.buildCategorizedOptions())},t.getFocusableOptions=function(){return t.props.menuIsOpen?t.buildFocusableOptions():[]},t.ariaOnChange=function(e,n){t.setState({ariaSelection:C({value:e},n)})},t.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),t.focusInput())},t.onMenuMouseMove=function(e){t.blockOptionHover=!1},t.onControlMouseDown=function(e){if(!e.defaultPrevented){var n=t.props.openMenuOnClick;t.state.isFocused?t.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&t.onMenuClose():n&&t.openMenu("first"):(n&&(t.openAfterFocus=!0),t.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},t.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||t.props.isDisabled)){var n=t.props,o=n.isMulti,r=n.menuIsOpen;t.focusInput(),r?(t.setState({inputIsHiddenAfterUpdate:!o}),t.onMenuClose()):t.openMenu("first"),e.preventDefault()}},t.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(t.clearValue(),e.preventDefault(),t.openAfterFocus=!1,"touchend"===e.type?t.focusInput():setTimeout((function(){return t.focusInput()})))},t.onScroll=function(e){"boolean"==typeof t.props.closeMenuOnScroll?e.target instanceof HTMLElement&&_t(e.target)&&t.props.onMenuClose():"function"==typeof t.props.closeMenuOnScroll&&t.props.closeMenuOnScroll(e)&&t.props.onMenuClose()},t.onCompositionStart=function(){t.isComposing=!0},t.onCompositionEnd=function(){t.isComposing=!1},t.onTouchStart=function(e){var n=e.touches,o=n&&n.item(0);o&&(t.initialTouchX=o.clientX,t.initialTouchY=o.clientY,t.userIsDragging=!1)},t.onTouchMove=function(e){var n=e.touches,o=n&&n.item(0);if(o){var r=Math.abs(o.clientX-t.initialTouchX),i=Math.abs(o.clientY-t.initialTouchY);t.userIsDragging=r>5||i>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=t.props.inputValue,o=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(o,{action:"input-change",prevInputValue:n}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var n=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:n}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){if(!t.blockOptionHover&&t.state.focusedOption!==e){var n=t.getFocusableOptions().indexOf(e);t.setState({focusedOption:e,focusedOptionId:n>-1?t.getFocusedOptionId(e):null})}},t.shouldHideSelectedOptions=function(){return uo(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var n=t.props,o=n.isMulti,r=n.backspaceRemovesValue,i=n.escapeClearsValue,a=n.inputValue,s=n.isClearable,l=n.isDisabled,c=n.menuIsOpen,u=n.onKeyDown,d=n.tabSelectsValue,p=n.openMenuOnFocus,f=t.state,v=f.focusedOption,h=f.focusedValue,m=f.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!o||a)return;t.focusValue("previous");break;case"ArrowRight":if(!o||a)return;t.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(h)t.removeValue(h);else{if(!r)return;o?t.popValue():s&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!c||!d||!v||p&&t.isOptionSelected(v,m))return;t.selectOption(v);break;case"Enter":if(229===e.keyCode)break;if(c){if(!v)return;if(t.isComposing)return;t.selectOption(v);break}return;case"Escape":c?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:a}),t.onMenuClose()):s&&i&&t.clearValue();break;case" ":if(a)return;if(!c){t.openMenu("first");break}if(!v)return;t.selectOption(v);break;case"ArrowUp":c?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":c?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!c)return;t.focusOption("pageup");break;case"PageDown":if(!c)return;t.focusOption("pagedown");break;case"Home":if(!c)return;t.focusOption("first");break;case"End":if(!c)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.state.instancePrefix="react-select-"+(t.props.instanceId||++po),t.state.selectValue=Ct(e.value),e.menuIsOpen&&t.state.selectValue.length){var n=t.getFocusableOptionsWithIds(),o=t.buildFocusableOptions(),r=o.indexOf(t.state.selectValue[0]);t.state.focusableOptionsWithIds=n,t.state.focusedOption=o[r],t.state.focusedOptionId=ro(n,o[r])}return t}return o=l,i=[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&zt(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,o=t.menuIsOpen,r=this.state.isFocused;(r&&!n&&e.isDisabled||r&&o&&!e.menuIsOpen)&&this.focusInput(),r&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):r||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(zt(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,o=n.selectValue,r=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(o[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(r&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,o=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var r=n.indexOf(o);o||(r=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===r?0:-1===r?i:r-1;break;case"next":r>-1&&r<i&&(a=r+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,o=this.getFocusableOptions();if(o.length){var r=0,i=o.indexOf(n);n||(i=-1),"up"===e?r=i>0?i-1:o.length-1:"down"===e?r=(i+1)%o.length:"pageup"===e?(r=i-t)<0&&(r=0):"pagedown"===e?(r=i+t)>o.length-1&&(r=o.length-1):"last"===e&&(r=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[r],focusedValue:null,focusedOptionId:this.getFocusedOptionId(o[r])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Xn):C(C({},Xn),this.props.theme):Xn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,o=this.getClassNames,r=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,c=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:o,getValue:r,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return so(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return lo(this.props,e,t)}},{key:"filterOption",value:function(e,t){return co(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,o=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:o})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,o=e.inputId,r=e.inputValue,i=e.tabIndex,a=e.form,s=e.menuIsOpen,l=e.required,c=this.getComponents().Input,u=this.state,d=u.inputIsHidden,p=u.ariaSelection,f=this.commonProps,v=o||this.getElementId("input"),h=C(C(C({"aria-autocomplete":"list","aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":l,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},s&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?x.createElement(c,O({},f,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:v,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:a,type:"text",value:r},h)):x.createElement(Dn,O({id:v,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ot,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:a,value:""},h))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,o=t.MultiValueContainer,r=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,s=t.Placeholder,l=this.commonProps,c=this.props,u=c.controlShouldRenderValue,d=c.isDisabled,p=c.isMulti,f=c.inputValue,v=c.placeholder,h=this.state,m=h.selectValue,g=h.focusedValue,b=h.isFocused;if(!this.hasValue()||!u)return f?null:x.createElement(s,O({},l,{key:"placeholder",isDisabled:d,isFocused:b,innerProps:{id:this.getElementId("placeholder")}}),v);if(p)return m.map((function(t,a){var s=t===g,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return x.createElement(n,O({},l,{components:{Container:o,Label:r,Remove:i},isFocused:s,isDisabled:d,key:c,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(f)return null;var y=m[0];return x.createElement(a,O({},l,{data:y,isDisabled:d}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,r=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||r)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return x.createElement(e,O({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,r=n.isLoading,i=this.state.isFocused;return e&&r?x.createElement(e,O({},t,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:i})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var o=this.commonProps,r=this.props.isDisabled,i=this.state.isFocused;return x.createElement(n,O({},o,{isDisabled:r,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,o=this.state.isFocused,r={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return x.createElement(e,O({},t,{innerProps:r,isDisabled:n,isFocused:o}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,o=t.GroupHeading,r=t.Menu,i=t.MenuList,a=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,u=this.commonProps,d=this.state.focusedOption,p=this.props,f=p.captureMenuScroll,v=p.inputValue,h=p.isLoading,m=p.loadingMessage,g=p.minMenuHeight,b=p.maxMenuHeight,y=p.menuIsOpen,w=p.menuPlacement,S=p.menuPosition,C=p.menuPortalTarget,j=p.menuShouldBlockScroll,k=p.menuShouldScrollIntoView,_=p.noOptionsMessage,P=p.onMenuScrollToTop,M=p.onMenuScrollToBottom;if(!y)return null;var E,z=function(t,n){var o=t.type,r=t.data,i=t.isDisabled,a=t.isSelected,s=t.label,l=t.value,p=d===r,f=i?void 0:function(){return e.onOptionHover(r)},v=i?void 0:function(){return e.selectOption(r)},h="".concat(e.getElementId("option"),"-").concat(n),m={id:h,onClick:v,onMouseMove:f,onMouseOver:f,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:a};return x.createElement(c,O({},u,{innerProps:m,data:r,isDisabled:i,isSelected:a,key:h,label:s,type:o,value:l,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())E=this.getCategorizedOptions().map((function(t){if("group"===t.type){var r=t.data,i=t.options,a=t.index,s="".concat(e.getElementId("group"),"-").concat(a),l="".concat(s,"-heading");return x.createElement(n,O({},u,{key:s,data:r,options:i,Heading:o,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return z(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return z(t,"".concat(t.index))}));else if(h){var I=m({inputValue:v});if(null===I)return null;E=x.createElement(s,u,I)}else{var D=_({inputValue:v});if(null===D)return null;E=x.createElement(l,u,D)}var V={minMenuHeight:g,maxMenuHeight:b,menuPlacement:w,menuPosition:S,menuShouldScrollIntoView:k},R=x.createElement(Gt,O({},u,V),(function(t){var n=t.ref,o=t.placerProps,a=o.placement,s=o.maxHeight;return x.createElement(r,O({},u,V,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:h,placement:a}),x.createElement(Wn,{captureEnabled:f,onTopArrive:P,onBottomArrive:M,lockEnabled:j},(function(t){return x.createElement(i,O({},u,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":u.isMulti,id:e.getElementId("listbox")},isLoading:h,maxHeight:s,focusedOption:d}),E)})))}));return C||"fixed"===S?x.createElement(a,O({},u,{appendTo:C,controlElement:this.controlRef,menuPlacement:w,menuPosition:S}),R):R}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,o=t.isDisabled,r=t.isMulti,i=t.name,a=t.required,s=this.state.selectValue;if(a&&!this.hasValue()&&!o)return x.createElement(Yn,{name:i,onFocus:this.onValueInputFocus});if(i&&!o){if(r){if(n){var l=s.map((function(t){return e.getOptionValue(t)})).join(n);return x.createElement("input",{name:i,type:"hidden",value:l})}var c=s.length>0?s.map((function(t,n){return x.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):x.createElement("input",{name:i,type:"hidden",value:""});return x.createElement("div",null,c)}var u=s[0]?this.getOptionValue(s[0]):"";return x.createElement("input",{name:i,type:"hidden",value:u})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,o=t.focusedOption,r=t.focusedValue,i=t.isFocused,a=t.selectValue,s=this.getFocusableOptions();return x.createElement(wn,O({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:o,focusedValue:r,isFocused:i,selectValue:a,focusableOptions:s,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,o=e.SelectContainer,r=e.ValueContainer,i=this.props,a=i.className,s=i.id,l=i.isDisabled,c=i.menuIsOpen,u=this.state.isFocused,d=this.commonProps=this.getCommonProps();return x.createElement(o,O({},d,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:u}),this.renderLiveRegion(),x.createElement(t,O({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:u,menuIsOpen:c}),x.createElement(r,O({},d,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),x.createElement(n,O({},d,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],a=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,o=t.clearFocusValueOnUpdate,r=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,p=e.inputValue,f=e.isMulti,v=Ct(u),h={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||p!==n.inputValue)){var m=d?function(e,t){return to(eo(e,t))}(e,v):[],g=d?no(eo(e,v),"".concat(l,"-option")):[],b=o?function(e,t){var n=e.focusedValue,o=e.selectValue.indexOf(n);if(o>-1){if(t.indexOf(n)>-1)return n;if(o<t.length)return t[o]}return null}(t,v):null,y=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,m);h={selectValue:v,focusedOption:y,focusedOptionId:ro(g,y),focusableOptionsWithIds:g,focusedValue:b,clearFocusValueOnUpdate:!1}}var w=null!=r&&e!==n?{inputIsHidden:r,inputIsHiddenAfterUpdate:void 0}:{},O=i,x=a&&s;return a&&!x&&(O={value:Ft(f,v,v[0]||null),options:v,action:"initial-input-focus"},x=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(O=null),C(C(C({},h),w),{},{prevProps:e,ariaSelection:O,prevWasFocused:x})}}],i&&j(o.prototype,i),a&&j(o,a),Object.defineProperty(o,"prototype",{writable:!1}),l}(x.Component);fo.defaultProps=Kn;var vo=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"],ho=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"],mo=(0,x.forwardRef)((function(e,t){var n=function(e){var t=e.defaultOptions,n=void 0!==t&&t,o=e.cacheOptions,r=void 0!==o&&o,i=e.loadOptions;e.options;var s=e.isLoading,l=void 0!==s&&s,c=e.onInputChange,d=e.filterOption,p=void 0===d?null:d,f=Qe(e,ho),v=f.inputValue,h=(0,x.useRef)(void 0),m=(0,x.useRef)(!1),g=u((0,x.useState)(Array.isArray(n)?n:void 0),2),b=g[0],y=g[1],w=u((0,x.useState)(void 0!==v?v:""),2),O=w[0],S=w[1],j=u((0,x.useState)(!0===n),2),k=j[0],_=j[1],P=u((0,x.useState)(void 0),2),M=P[0],E=P[1],z=u((0,x.useState)([]),2),I=z[0],D=z[1],V=u((0,x.useState)(!1),2),R=V[0],A=V[1],T=u((0,x.useState)({}),2),F=T[0],L=T[1],N=u((0,x.useState)(void 0),2),B=N[0],H=N[1],$=u((0,x.useState)(void 0),2),U=$[0],W=$[1];r!==U&&(L({}),W(r)),n!==B&&(y(Array.isArray(n)?n:void 0),H(n)),(0,x.useEffect)((function(){return m.current=!0,function(){m.current=!1}}),[]);var G=(0,x.useCallback)((function(e,t){if(!i)return t();var n=i(e,t);n&&"function"==typeof n.then&&n.then(t,(function(){return t()}))}),[i]);(0,x.useEffect)((function(){!0===n&&G(O,(function(e){m.current&&(y(e||[]),_(!!h.current))}))}),[]);var Y=(0,x.useCallback)((function(e,t){var n=function(e,t,n){if(n){var o=n(e,t);if("string"==typeof o)return o}return e}(e,t,c);if(!n)return h.current=void 0,S(""),E(""),D([]),_(!1),void A(!1);if(r&&F[n])S(n),E(n),D(F[n]),_(!1),A(!1);else{var o=h.current={};S(n),_(!0),A(!M),G(n,(function(e){m&&o===h.current&&(h.current=void 0,_(!1),E(n),D(e||[]),A(!1),L(e?C(C({},F),{},a({},n,e)):F))}))}}),[r,G,M,F,c]),Z=R?[]:O&&M?I:b||[];return C(C({},f),{},{options:Z,isLoading:k||l,onInputChange:Y,filterOption:p})}(e),o=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,o=e.defaultMenuIsOpen,r=void 0!==o&&o,i=e.defaultValue,a=void 0===i?null:i,s=e.inputValue,l=e.menuIsOpen,c=e.onChange,d=e.onInputChange,p=e.onMenuClose,f=e.onMenuOpen,v=e.value,h=Qe(e,vo),m=u((0,x.useState)(void 0!==s?s:n),2),g=m[0],b=m[1],y=u((0,x.useState)(void 0!==l?l:r),2),w=y[0],O=y[1],S=u((0,x.useState)(void 0!==v?v:a),2),j=S[0],k=S[1],_=(0,x.useCallback)((function(e,t){"function"==typeof c&&c(e,t),k(e)}),[c]),P=(0,x.useCallback)((function(e,t){var n;"function"==typeof d&&(n=d(e,t)),b(void 0!==n?n:e)}),[d]),M=(0,x.useCallback)((function(){"function"==typeof f&&f(),O(!0)}),[f]),E=(0,x.useCallback)((function(){"function"==typeof p&&p(),O(!1)}),[p]),z=void 0!==s?s:g,I=void 0!==l?l:w,D=void 0!==v?v:j;return C(C({},h),{},{inputValue:z,menuIsOpen:I,onChange:_,onInputChange:P,onMenuClose:E,onMenuOpen:M,value:D})}(n);return x.createElement(fo,O({ref:t},o))})),go=mo,bo=window.ReactJSXRuntime;function yo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function wo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yo(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Oo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function xo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oo(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function So(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Co(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?So(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):So(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ko(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jo(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Po(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Eo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mo(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function zo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Io(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zo(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,o.registerBlockType)("vczapi/list-meetings",{apiVersion:2,edit:function(e){e.className;var t=e.attributes,n=e.setAttributes,o=(e.isSelected,t.shortcodeType),r=t.orderBy,i=t.postsToShow,a=t.displayType,s=t.showPastMeeting,l=t.showFilter,h=t.selectedCategory,y=t.selectedAuthor,O=t.columns,x=t.preview,S=(0,b.useRef)(),C=u((0,b.useState)([]),2),j=C[0],k=C[1],_=u((0,b.useState)([]),2),P=_[0],M=_[1];return(0,b.useEffect)((function(){S.current=!0,w()({path:"/wp/v2/zoom_meeting_cats"}).then((function(e){if(!0===S.current){var t=e.length>0?e.map((function(e,t){return{label:e.name+" ("+e.count+")",value:e.slug}})):[];k((function(e){return[].concat(c(e),c(t))}))}})).catch((function(){!0===S.current&&k([])}));var e={per_page:10,who:"authors"};0!==y&&(e.include=y);var t=(0,f.addQueryArgs)("/wp/v2/users",e);return w()({path:t}).then((function(e){if(!0===S.current){var t=e.length>0?e.map((function(e,t){return{label:e.name,value:e.id}})):[];M((function(e){return[].concat(c(e),c(t))}))}})).catch((function(){})),function(){S.current=!1}}),[]),x?(0,bo.jsx)(b.Fragment,{children:(0,bo.jsx)(m(),{block:"vczapi/list-meetings",attributes:{columns:O,displayType:a,postsToShow:i,orderBy:r,shortcodeType:o,showFilter:l,selectedCategory:h,selectedAuthor:y}})}):(0,bo.jsxs)(bo.Fragment,{children:[(0,bo.jsx)(v.InspectorControls,{children:(0,bo.jsxs)(g.PanelBody,{title:"Settings",initialOpen:!0,children:[S.current&&(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Show Meeting or Webinar","video-conferencing-with-zoom-api"),value:o,options:[{label:"Meeting",value:"meeting"},{label:"Webinar",value:"webinar"}],help:"Determines whether to show Meeting or Webinar",onChange:function(e){return n({shortcodeType:e})}}),S.current&&(0,bo.jsxs)(bo.Fragment,{children:[(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Type of Meeting/Webinar to Show","video-conferencing-with-zoom-api"),value:a,onChange:function(e){return n({displayType:e})},options:[{label:"Show All",value:""},{label:"Upcoming",value:"upcoming"},{label:"Past",value:"past"}],help:"Show All,Upcoming or Past Meeting - default All"}),"upcoming"===a&&(0,bo.jsx)(g.CheckboxControl,{label:(0,d.__)("Show Meeting that have started","video-conferencing-with-zoom-api"),checked:s,onChange:function(e){return n({showPastMeeting:e})},help:"will show meetings that have passed meeting start time - upto 30 minutes after the meeting was scheduled to start."})]}),S.current&&(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Show Filter","video-conferencing-with-zoom-api"),value:l,options:[{label:"Yes",value:"yes"},{label:"No",value:"no"}],onChange:function(e){n({showFilter:e})}}),S.current&&(0,bo.jsx)(g.RangeControl,{label:(0,d.__)("Columns","video-conferencing-with-zoom-api"),value:O,help:"how many columns in the grid. Default value is 3. Users can use 1 or 2 or 3 or 4 - Any value upper than 4 will take 3 column value.",onChange:function(e){n({columns:e})},min:1,max:4}),S.current&&(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Order By","video-conferencing-with-zoom-api"),value:r,options:[{label:"Default Sorting",value:""},{label:"Ascending",value:"ASC"},{label:"Descending",value:"DESC"}],onChange:function(e){n({orderBy:e})}}),S.current&&(0,bo.jsxs)(bo.Fragment,{children:[(0,bo.jsx)("span",{children:(0,d.__)("Category","video-conferencing-with-zoom-api")}),(0,bo.jsx)(go,{cacheOptions:!0,defaultOptions:j,isMulti:!0,isClearable:!0,placeholder:(0,d.__)("Select categories - default All categories are shown","video-conferencing-with-zoom-api"),onChange:function(e,t){var o=t.action;if("clear"===o)return n({selectedCategory:[]}),[];if("remove-value"===o)return n({selectedCategory:e}),e;if("select-option"===o){var r=(0,p.unionBy)(h,e,"value");n({selectedCategory:r}),M((function(t){return(0,p.unionBy)(t,[e],"value")}))}},defaultValue:(0,p.intersectionWith)(j,h,p.isEqual),className:"components-base-control"})]}),S.current&&(0,bo.jsxs)(bo.Fragment,{children:[(0,bo.jsx)("span",{children:(0,d.__)("Author","video-conferencing-with-zoom-api")}),(0,bo.jsx)(go,{cacheOptions:!0,defaultOptions:P,noResultsText:!0,loadOptions:(0,p.debounce)((function(e,t){var n={per_page:5,who:"authors"};""!==e&&(n.search=e);var o=(0,f.addQueryArgs)("/wp/v2/users",n);return w()({path:o}).then((function(e){!0===S.current&&t(e.length>0?e.map((function(e,t){return{label:e.name,value:e.id}})):[])})).catch((function(){t([])}))}),800),isClearable:!0,placeholder:(0,d.__)("Select Author - Default All Authors are shown","video-conferencing-with-zoom-api"),onChange:function(e,t){var o=t.action;"clear"===o?n({selectedAuthor:0}):"remove-value"===o?n({selectedAuthor:e}):(n({selectedAuthor:e.value}),M((function(t){return(0,p.unionBy)(t,[e],"value")})))},defaultValue:P.filter((function(e){return e.value===y})),className:"components-base-control"})]}),S.current&&(0,bo.jsx)(g.RangeControl,{label:(0,d.__)("Number of Meetings/Webinars to show","video-conferencing-with-zoom-api"),value:i,onChange:function(e){return n({postsToShow:e})},min:1,max:100})]})}),(0,bo.jsx)("div",wo(wo({},(0,v.useBlockProps)()),{},{children:(0,bo.jsx)(g.Disabled,{children:(0,bo.jsx)(m(),{block:"vczapi/list-meetings",attributes:{columns:O,displayType:a,postsToShow:i,orderBy:r,shortcodeType:o,showFilter:l,selectedCategory:h,selectedAuthor:y}})})}))]})},example:{attributes:{preview:!0,columns:2,postsToShow:2}}}),(0,o.registerBlockType)("vczapi/show-meeting-post",{apiVersion:2,edit:function(e){var t=e.attributes,n=e.setAttributes,o=t.postID,r=t.preview,i=t.template,a=t.countdown,s=t.description,l=t.details,c=u((0,b.useState)([]),2),f=c[0],h=c[1],y=u((0,b.useState)([]),2),O=y[0],x=y[1],S=u((0,b.useState)(!1),2),C=S[0],j=S[1],k=u((0,b.useState)(!1),2),_=k[0],P=k[1],M=(0,b.useRef)(),E=(0,p.debounce)((function(e){e?(j(!0),w()({path:"/wp/v2/zoom_meetings?per_page=5&search="+e}).then((function(e){if(!0===M.current){var t=e.length>0?e.map((function(e){return{label:e.title.rendered,value:e.id}})):[];x(t),j(!1)}})).catch((function(){!0===M.current&&(x([]),j(!1))}))):x([])}),400),z=[{icon:_?"no":"edit",title:_?"Close":"Edit",subscript:"Edit",onClick:function(){P((function(e){return!e}))}}];if((0,b.useEffect)((function(){M.current=!0;var e="/wp/v2/zoom_meetings?per_page=5";return e=0!==o?e+"&include="+o:e,w()({path:e}).then((function(e){if(!0===M.current){var t=e.length>0?e.map((function(e){return{label:e.title.rendered,value:e.id}})):[];h(t)}})),function(){M.current=!1}}),[]),r)return(0,bo.jsx)("img",{src:vczapi_blocks.embed_post_preview,alt:"Embed Zoom post"});var I=O.length>0?O:f;return(0,bo.jsxs)("div",xo(xo({},(0,v.useBlockProps)()),{},{children:[(0,bo.jsx)(v.BlockControls,{children:(0,bo.jsx)(g.ToolbarGroup,{controls:z})}),!M.current&&(0,bo.jsx)(g.Spinner,{}),(0===o||_)&&(0,bo.jsxs)(g.Placeholder,{children:[(0,bo.jsx)("h2",{children:(0,d.__)("Zoom -  Show Meeting Post","video-conferencing-with-zoom-api")}),(0,bo.jsxs)("div",{className:"vczapi-blocks-form",children:[(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.ComboboxControl,{label:(0,d.__)("Select Meeting to Show","video-conferencing-with-zoom-api"),value:o||null,options:I,onFilterValueChange:E,isLoading:C,onChange:function(e){n({postID:Number(e)}),P(!1)}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Template","video-conferencing-with-zoom-api"),value:i,options:[{label:"Default",value:"none"},{label:"Boxed",value:"boxed"}],onChange:function(e){n({template:e})}})}),"boxed"!==i&&(0,bo.jsxs)(bo.Fragment,{children:[(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.CheckboxControl,{label:(0,d.__)("Display Countdown?","video-conferencing-with-zoom-api"),checked:a,onChange:function(e){n({countdown:e})}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.CheckboxControl,{label:(0,d.__)("Display Description?","video-conferencing-with-zoom-api"),checked:s,onChange:function(e){n({description:e})}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.CheckboxControl,{label:(0,d.__)("Display Details Section?","video-conferencing-with-zoom-api"),checked:l,onChange:function(e){n({details:e})}})})]})]})]}),0!==o&&!_&&(0,bo.jsx)(g.Disabled,{children:(0,bo.jsx)(m(),{block:"vczapi/show-meeting-post",attributes:{postID:o,template:i,description:s,countdown:a,details:l}})})]}))},example:{attributes:{preview:!0}}}),(0,o.registerBlockType)("vczapi/show-live-meeting",{apiVersion:2,edit:function(e){e.className;var t=e.attributes,n=e.setAttributes,o=t.host,i=t.selectedMeeting,a=t.link_only,s=t.preview,l=t.shouldShow,f=(0,b.useRef)(),h=u((0,b.useState)(!1),2),y=h[0],w=h[1],O=u((0,b.useState)([]),2),x=O[0],S=O[1],C=u((0,b.useState)(o||null),2),j=C[0],k=C[1],_=u((0,b.useState)((null==l?void 0:l.value)||l||"meeting"),2),P=_[0],M=_[1],E=u((0,b.useState)(i||{}),2),z=E[0],I=E[1],D=u((0,b.useState)([]),2),V=D[0],R=D[1],A=u((0,b.useState)(!1),2),T=A[0],F=A[1],L=u((0,b.useState)(1),2),N=L[0],B=L[1],H=u((0,b.useState)(1),2),$=H[0],U=H[1],W=u((0,b.useState)(!1),2),G=W[0],Y=W[1],Z=(0,p.debounce)((function(e){var t;F(!0);var n=e?encodeURIComponent(e):"",o=(null===(t=window)||void 0===t||null===(t=t.vczapi_blocks)||void 0===t?void 0:t.nonce)||"",r="".concat(ajaxurl,"?action=vczapi_get_zoom_hosts&host=").concat(n,"&nonce=").concat(o);fetch(r).then((function(e){return e.json()})).then((function(e){if(f.current&&Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text,value:String(e.value||e.id)}}));R(t),F(!1)}})).catch((function(){f.current&&F(!1)}))}),300),q=function(e,t){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||"undefined"===e)return[];var r=(null===(n=window)||void 0===n||null===(n=n.vczapi_blocks)||void 0===n?void 0:n.nonce)||"",i=window.ajaxurl||"admin-ajax.php",a="".concat(i,"?action=vczapi_get_live_meetings&host_id=").concat(e,"&show=").concat(t,"&nonce=").concat(r);o.hasOwnProperty("page_number")&&"undefined"!==o.page_number&&(a+="&page_number="+o.page_number),Y(!0),fetch(a).then((function(e){return e.json()})).then((function(e){if(f.current){var t=parseFloat(e.total_records)/parseFloat(e.page_size);if(t>1){var n=Math.round(t);B(n)}else B(1);S(e.formatted_meetings||[]),Y(!1)}})).catch((function(){f.current&&Y(!1)}))},J=function(e){var t=e.numberOfPages,n=[];if(t>1){for(var o=function(e){var t=e===$?"selected":"";n.push((0,bo.jsx)(g.Button,{className:t,onClick:function(){var t=(null==j?void 0:j.value)||j;q(t,P,{page_number:e}),U(e)},children:e},e))},r=1;r<=t;r++)o(r);return(0,bo.jsx)("div",{className:"vczapi-blocks-pagination",children:n})}return""};if((0,b.useEffect)((function(){var e;f.current=!0,F(!0);var t=(null===(e=window)||void 0===e||null===(e=e.vczapi_blocks)||void 0===e?void 0:e.nonce)||"",n=window.ajaxurl||"admin-ajax.php",r="".concat(n,"?action=vczapi_get_zoom_hosts&nonce=").concat(t);fetch(r).then((function(e){return e.json()})).then((function(e){if(f.current&&Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text,value:String(e.value||e.id)}}));R(t),F(!1)}})).catch((function(){f.current&&F(!1)}));var i=(null==o?void 0:o.value)||o;return i&&q(i,P),function(){f.current=!1}}),[]),s)return(0,bo.jsx)("img",{src:vczapi_blocks.direct_meeting_preview_image,alt:"Direct Meeting from Zoom"});var X=x.map((function(e){return{label:e.label,value:JSON.stringify(e)}}));return(0,bo.jsxs)("div",Co(Co({},(0,v.useBlockProps)()),{},{children:[(0,bo.jsx)(v.BlockControls,{children:(0,bo.jsx)(g.ToolbarGroup,{children:(0,bo.jsx)(g.ToolbarButton,{icon:y?"no":"edit",title:y?"Close":"Edit",subscript:"Edit",onClick:function(){w((function(e){return!e}))}})})}),(void 0===i||y)&&(0,bo.jsxs)(g.Placeholder,{children:[(0,bo.jsxs)("div",{className:"vczapi-label-header",children:[(0,bo.jsx)("h2",{children:(0,d.__)("Zoom - Show Meeting directly from Zoom","video-conferencing-with-zoom-api")}),(0,bo.jsx)("div",{children:(0,bo.jsx)("p",{children:(0,d.__)("Get a meeting directly from Zoom","video-conferencing-with-zoom-api")})})]}),(0,bo.jsxs)("div",{className:"vczapi-blocks-form",children:[void 0!==i&&i.hasOwnProperty("value")&&(0,bo.jsx)("div",{className:"vczapi-blocks-form--selected-meeting",children:(0,bo.jsxs)("h4",{children:["Currently Selected Meeting: ",(0,bo.jsx)("strong",{children:i.label})]})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.RadioControl,{className:"radio-inline",label:"Link Only",selected:a,options:[{label:"Yes",value:"yes"},{label:"No",value:"no"}],onChange:function(e){n({link_only:e})}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Would you like to show a Meeting or Webinar","video-conferencing-with-zoom-api"),value:P,options:[{label:"Meeting",value:"meeting"},{label:"Webinar",value:"webinar"}],onChange:function(e){M(e);var t=(null==j?void 0:j.value)||j;t&&(S([]),q(t,e))}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.ComboboxControl,{label:(0,d.__)("Select A Host","video-conferencing-with-zoom-api"),help:(0,d.__)("Click to view available hosts or start typing to filter","video-conferencing-with-zoom-api"),value:null!=j&&j.value?String(j.value):"string"==typeof j?j:"",options:V,onFilterValueChange:Z,isLoading:T,onChange:function(e){if(e){var t=V.find((function(t){return String(t.value)===String(e)}))||{value:e,label:e};n({host:t}),k(t),q(e,P)}}})}),G&&(void 0===x||0===x.length)&&(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.Spinner,{})}),void 0!==x&&x.length>0&&(0,bo.jsxs)("div",{className:"vczapi-blocks-form--group",children:[(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Select A Meeting : ","video-conferencing-with-zoom-api")+(N>1?" (use pagination below if necessary)":""),value:JSON.stringify(z),options:[{label:(0,d.__)("Select a meeting","video-conferencing-with-zoom-api"),value:"{}"}].concat(c(X)),disabled:G,onChange:function(e){"{}"!==e&&I(JSON.parse(e))}}),(0,bo.jsx)(J,{numberOfPages:N})]}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.Button,{isPrimary:!0,onClick:function(){if(!z.hasOwnProperty("value"))return alert("Meeting Needs to be selected"),!1;n({selectedMeeting:z}),n({shouldShow:"object"===r(P)?P:{label:P,value:P}}),w(!1)},children:(0,d.__)("Save","video-conferencing-with-zoom-api")})})]})]}),void 0!==i&&i.hasOwnProperty("value")&&!y&&(0,bo.jsx)(g.Disabled,{children:(0,bo.jsx)(m(),{block:"vczapi/show-live-meeting",attributes:{link_only:a,selectedMeeting:i,shouldShow:l}})})]}))},example:{attributes:{preview:!0}}}),(0,o.registerBlockType)("vczapi/list-host-meetings",{apiVersion:2,edit:function(e){var t,n=e.attributes,o=e.setAttributes,r=n.host,i=n.shouldShow,a=n.preview,s=u((0,b.useState)(!1),2),l=s[0],c=s[1],f=u((0,b.useState)([]),2),h=f[0],y=f[1],w=u((0,b.useState)(!1),2),O=w[0],x=w[1],S=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";x(!0);var n=window.ajaxurl||"admin-ajax.php",o=(null===(e=window)||void 0===e||null===(e=e.vczapi_blocks)||void 0===e?void 0:e.nonce)||"",r="".concat(n,"?action=vczapi_get_zoom_hosts&host=").concat(encodeURIComponent(t),"&nonce=").concat(o);fetch(r).then((function(e){return e.json()})).then((function(e){var t=(e||[]).map((function(e){return{label:e.label||e.name||e.value,value:String(e.value||e.id)}}));y(t)})).catch((function(){y([])})).finally((function(){x(!1)}))},C=(0,b.useMemo)((function(){return(0,p.debounce)(S,300)}),[]);if((0,b.useEffect)((function(){return S(),function(){C.cancel()}}),[]),a)return(0,bo.jsx)("img",{src:null===(t=vczapi_blocks)||void 0===t?void 0:t.list_host_meetings_preview_image,alt:(0,d.__)("List Host meetings","video-conferencing-with-zoom-api")});var j=(0,v.useBlockProps)();return(0,bo.jsxs)("div",ko(ko({},j),{},{children:[(0,bo.jsx)(v.BlockControls,{children:(0,bo.jsx)(g.ToolbarGroup,{children:(0,bo.jsx)(g.ToolbarButton,{icon:l?"no":"edit",title:l?(0,d.__)("Close","video-conferencing-with-zoom-api"):(0,d.__)("Edit","video-conferencing-with-zoom-api"),onClick:function(){return c((function(e){return!e}))}})})}),(!r||l)&&(0,bo.jsx)(g.Placeholder,{label:(0,d.__)("Zoom - List Meetings/Webinars based on HOST","video-conferencing-with-zoom-api"),children:(0,bo.jsxs)("div",{className:"vczapi-blocks-form",children:[(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Type","video-conferencing-with-zoom-api"),value:(null==i?void 0:i.value)||i||"meeting",options:[{label:(0,d.__)("Meeting","video-conferencing-with-zoom-api"),value:"meeting"},{label:(0,d.__)("Webinar","video-conferencing-with-zoom-api"),value:"webinar"}],onChange:function(e){return o({shouldShow:{label:"meeting"===e?"Meeting":"Webinar",value:e}})}})}),(0,bo.jsxs)("div",{className:"vczapi-blocks-form--group",children:[(0,bo.jsx)(g.ComboboxControl,{label:(0,d.__)("Select Host","video-conferencing-with-zoom-api"),value:(null==r?void 0:r.value)||r||"",options:h,onFilterValueChange:function(e){return C(e)},onChange:function(e){var t=h.find((function(t){return t.value===e}));o({host:t||e})}}),O&&(0,bo.jsx)(g.Spinner,{})]}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.Button,{variant:"primary",onClick:function(){return c(!1)},children:(0,d.__)("Save","video-conferencing-with-zoom-api")})})]})}),(null==r?void 0:r.value)&&!l&&(0,bo.jsx)(m(),{block:"vczapi/list-host-meetings",attributes:{host:r,shouldShow:i}})]}))},example:{attributes:{preview:!0}}}),(0,o.registerBlockType)("vczapi/join-via-browser",{apiVersion:2,edit:function(e){var t,n=e.attributes,o=e.setAttributes,i=n.host,a=n.selectedMeeting,s=n.disable_countdown,l=n.login_required,f=n.preview,h=n.shouldShow,y=n.passcode,w=u((0,b.useState)(!1),2),O=w[0],x=w[1],S=u((0,b.useState)([]),2),C=S[0],j=S[1],k=u((0,b.useState)(""),2),_=k[0],P=k[1],M=u((0,b.useState)(i||null),2),E=M[0],z=M[1],I=u((0,b.useState)((null==h?void 0:h.value)||h||"meeting"),2),D=I[0],V=I[1],R=u((0,b.useState)(a||{}),2),A=R[0],T=R[1],F=u((0,b.useState)([]),2),L=F[0],N=F[1],B=u((0,b.useState)(!1),2),H=B[0],$=B[1],U=u((0,b.useState)(1),2),W=U[0],G=U[1],Y=u((0,b.useState)(1),2),Z=Y[0],q=Y[1],J=u((0,b.useState)(!1),2),X=J[0],K=J[1],Q=(0,b.useCallback)((function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";$(!0);var n=t?encodeURIComponent(t):"",o=window.ajaxurl||"admin-ajax.php",r=(null===(e=window)||void 0===e||null===(e=e.vczapi_blocks)||void 0===e?void 0:e.nonce)||"",i="".concat(o,"?action=vczapi_get_zoom_hosts&host=").concat(n,"&nonce=").concat(r);fetch(i).then((function(e){return e.json()})).then((function(e){if(Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text||e.value,value:String(e.value||e.id)}}));N(t)}})).catch((function(){N([])})).finally((function(){$(!1)}))}),[]),ee=(0,b.useMemo)((function(){return(0,p.debounce)(Q,300)}),[Q]),te=(0,b.useCallback)((function(e,t){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(e){var i="object"===r(t)?t.value:t,a=window.ajaxurl||"admin-ajax.php",s=(null===(n=window)||void 0===n||null===(n=n.vczapi_blocks)||void 0===n?void 0:n.nonce)||"",l="".concat(a,"?action=vczapi_get_live_meetings&host_id=").concat(e,"&show=").concat(i,"&nonce=").concat(s);o>1&&(l+="&page_number=".concat(o)),K(!0),fetch(l).then((function(e){return e.json()})).then((function(e){var t=parseFloat((null==e?void 0:e.total_records)||0)/parseFloat((null==e?void 0:e.page_size)||1);G(t>1?Math.round(t):1),j((null==e?void 0:e.formatted_meetings)||[])})).catch((function(){j([])})).finally((function(){K(!1)}))}}),[]);if((0,b.useEffect)((function(){Q();var e=(null==i?void 0:i.value)||i;return e&&te(e,D),function(){ee.cancel()}}),[Q,te,ee]),f)return(0,bo.jsx)("img",{src:null===(t=window.vczapi_blocks)||void 0===t?void 0:t.join_via_browser,alt:(0,d.__)("Direct Meeting from Zoom","video-conferencing-with-zoom-api")});var ne=(0,v.useBlockProps)(),oe=function(){if(W<=1)return null;for(var e=[],t=function(t){e.push((0,bo.jsx)(g.Button,{variant:t===Z?"primary":"secondary",isSmall:!0,onClick:function(){var e=(null==E?void 0:E.value)||E;te(e,D,t),q(t)},children:t},t))},n=1;n<=W;n++)t(n);return(0,bo.jsx)("div",{className:"vczapi-blocks-pagination",children:e})},re=C.map((function(e){return{label:e.label,value:JSON.stringify(e)}}));return(0,bo.jsxs)("div",Po(Po({},ne),{},{children:[(0,bo.jsx)(v.BlockControls,{children:(0,bo.jsx)(g.ToolbarGroup,{children:(0,bo.jsx)(g.ToolbarButton,{icon:O?"no":"edit",title:O?(0,d.__)("Close","video-conferencing-with-zoom-api"):(0,d.__)("Edit","video-conferencing-with-zoom-api"),onClick:function(){return x((function(e){return!e}))}})})}),(!(null!=a&&a.value)||O)&&(0,bo.jsx)(g.Placeholder,{label:(0,d.__)("Zoom - Embed Join Via A Browser","video-conferencing-with-zoom-api"),instructions:(0,d.__)("Embed Join via a browser","video-conferencing-with-zoom-api"),children:(0,bo.jsxs)("div",{className:"vczapi-blocks-form",children:[_&&(0,bo.jsx)(g.Notice,{status:"error",isDismissible:!1,children:_}),(null==a?void 0:a.label)&&(0,bo.jsx)("div",{className:"vczapi-blocks-form--selected-meeting",children:(0,bo.jsxs)("h4",{children:[(0,d.__)("Currently Selected Meeting:","video-conferencing-with-zoom-api")," ",(0,bo.jsx)("strong",{children:a.label})]})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.TextControl,{label:(0,d.__)("Passcode (Set password of your meeting to automatically let users join without needing them to enter password.)","video-conferencing-with-zoom-api"),value:y||"",onChange:function(e){return o({passcode:e})}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.RadioControl,{label:(0,d.__)("Disable Countdown","video-conferencing-with-zoom-api"),selected:s||"no",options:[{label:(0,d.__)("Yes","video-conferencing-with-zoom-api"),value:"yes"},{label:(0,d.__)("No","video-conferencing-with-zoom-api"),value:"no"}],onChange:function(e){return o({disable_countdown:e})}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.RadioControl,{label:(0,d.__)("Login Required","video-conferencing-with-zoom-api"),selected:l||"no",options:[{label:(0,d.__)("Yes","video-conferencing-with-zoom-api"),value:"yes"},{label:(0,d.__)("No","video-conferencing-with-zoom-api"),value:"no"}],onChange:function(e){return o({login_required:e})}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Would you like to show a Meeting or Webinar","video-conferencing-with-zoom-api"),value:D,options:[{label:(0,d.__)("Meeting","video-conferencing-with-zoom-api"),value:"meeting"},{label:(0,d.__)("Webinar","video-conferencing-with-zoom-api"),value:"webinar"}],onChange:function(e){V(e);var t=(null==E?void 0:E.value)||E;t&&(j([]),te(t,e))}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.ComboboxControl,{label:(0,d.__)("Select A Host","video-conferencing-with-zoom-api"),help:(0,d.__)("Click to view available hosts or start typing to filter","video-conferencing-with-zoom-api"),value:null!=E&&E.value?String(E.value):"string"==typeof E?E:"",options:L,onFilterValueChange:function(e){return ee(e)},isLoading:H,onChange:function(e){if(e){var t=L.find((function(t){return String(t.value)===String(e)}))||{value:e,label:e};z(t),te(e,D)}}})}),X&&0===C.length&&(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.Spinner,{})}),C.length>0&&(0,bo.jsxs)("div",{className:"vczapi-blocks-form--group",children:[(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Select A Meeting:","video-conferencing-with-zoom-api")+(W>1?(0,d.__)(" (use pagination below if necessary)","video-conferencing-with-zoom-api"):""),value:JSON.stringify(A),options:[{label:(0,d.__)("Select a meeting","video-conferencing-with-zoom-api"),value:"{}"}].concat(c(re)),disabled:X,onChange:function(e){"{}"!==e&&T(JSON.parse(e))}}),(0,bo.jsx)(oe,{})]}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.Button,{variant:"primary",onClick:function(){null!=A&&A.value?(P(""),o({selectedMeeting:A,host:E,shouldShow:"object"===r(D)?D:{label:D,value:D}}),x(!1)):P((0,d.__)("Please select a meeting before saving.","video-conferencing-with-zoom-api"))},children:(0,d.__)("Save","video-conferencing-with-zoom-api")})})]})}),(null==a?void 0:a.value)&&!O&&(0,bo.jsx)(g.Disabled,{children:(0,bo.jsx)(m(),{block:"vczapi/join-via-browser",attributes:{selectedMeeting:a,login_required:l,disable_countdown:s,passcode:y,shouldShow:h}})})]}))},example:{attributes:{preview:!0}}}),(0,o.registerBlockType)("vczapi/recordings",{apiVersion:2,edit:function(e){e.className;var t=e.attributes,n=e.setAttributes,o=t.host,i=t.selectedMeeting,a=t.downloadable,s=t.preview,l=t.shouldShow,f=t.showBy,h=(0,b.useRef)(),y=u((0,b.useState)(!1),2),w=y[0],O=y[1],x=u((0,b.useState)([]),2),S=x[0],C=x[1],j=u((0,b.useState)(o||null),2),k=j[0],_=j[1],P=u((0,b.useState)((null==l?void 0:l.value)||l||"meeting"),2),M=P[0],E=P[1],z=u((0,b.useState)(i||{}),2),I=z[0],D=z[1],V=u((0,b.useState)([]),2),R=V[0],A=V[1],T=u((0,b.useState)(!1),2),F=T[0],L=T[1],N=u((0,b.useState)(1),2),B=N[0],H=N[1],$=u((0,b.useState)(1),2),U=$[0],W=$[1],G=u((0,b.useState)(!1),2),Y=G[0],Z=G[1],q=(0,p.debounce)((function(e){var t;L(!0);var n=e?encodeURIComponent(e):"",o=(null===(t=window)||void 0===t||null===(t=t.vczapi_blocks)||void 0===t?void 0:t.nonce)||"",r=window.ajaxurl||"admin-ajax.php",i="".concat(r,"?action=vczapi_get_zoom_hosts&host=").concat(n,"&nonce=").concat(o);fetch(i).then((function(e){return e.json()})).then((function(e){if(h.current&&Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text,value:String(e.value||e.id)}}));A(t),L(!1)}})).catch((function(){h.current&&L(!1)}))}),300),J=function(e,t){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||"undefined"===e)return[];var i="object"===r(t)?t.value:t,a=window.ajaxurl||"admin-ajax.php",s=(null===(n=window)||void 0===n||null===(n=n.vczapi_blocks)||void 0===n?void 0:n.nonce)||"",l="".concat(a,"?action=vczapi_get_live_meetings&host_id=").concat(e,"&show=").concat(i,"&nonce=").concat(s);o.hasOwnProperty("page_number")&&"undefined"!==o.page_number&&(l+="&page_number="+o.page_number),Z(!0),fetch(l).then((function(e){return e.json()})).then((function(e){if(h.current){var t=parseFloat(e.total_records)/parseFloat(e.page_size);if(t>1){var n=Math.round(t);H(n)}else H(1);C(e.formatted_meetings||[]),Z(!1)}})).catch((function(){h.current&&Z(!1)}))},X=function(e){var t=e.numberOfPages,n=[];if(t>1){for(var o=function(e){var t=e===U?"selected":"";n.push((0,bo.jsx)(g.Button,{className:t,onClick:function(){var t=(null==k?void 0:k.value)||k;J(t,M,{page_number:e}),W(e)},children:e},e))},r=1;r<=t;r++)o(r);return(0,bo.jsx)("div",{className:"vczapi-blocks-pagination",children:n})}return""};if((0,b.useEffect)((function(){var e;h.current=!0,L(!0);var t=window.ajaxurl||"admin-ajax.php",n=(null===(e=window)||void 0===e||null===(e=e.vczapi_blocks)||void 0===e?void 0:e.nonce)||"",r="".concat(t," + '?action=vczapi_get_zoom_hosts&nonce=").concat(n);fetch(r).then((function(e){return e.json()})).then((function(e){if(h.current&&Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text,value:String(e.value||e.id)}}));A(t),L(!1)}})).catch((function(){h.current&&L(!1)}));var i=(null==o?void 0:o.value)||o;return i&&"meeting"===f&&J(i,M),function(){h.current=!1}}),[]),s)return(0,bo.jsx)("img",{src:vczapi_blocks.recordings_preview,alt:"Zoom Recordings"});var K=S.map((function(e){return{label:e.label,value:JSON.stringify(e)}}));return(0,bo.jsxs)("div",Eo(Eo({},(0,v.useBlockProps)()),{},{children:[(0,bo.jsx)(v.BlockControls,{children:(0,bo.jsx)(g.ToolbarGroup,{children:(0,bo.jsx)(g.ToolbarButton,{icon:w?"no":"edit",title:w?"Close":"Edit",subscript:"Edit",onClick:function(){O((function(e){return!e}))}})})}),(void 0===i||void 0===o||w)&&(0,bo.jsxs)(g.Placeholder,{children:[(0,bo.jsxs)("div",{className:"vczapi-label-header",children:[(0,bo.jsx)("h2",{children:(0,d.__)("Zoom - Show Recordings","video-conferencing-with-zoom-api")}),(0,bo.jsx)("div",{children:(0,bo.jsx)("p",{children:(0,d.__)("Show recordings from Zoom","video-conferencing-with-zoom-api")})})]}),(0,bo.jsxs)("div",{className:"vczapi-blocks-form",children:[void 0!==i&&i.hasOwnProperty("value")&&(0,bo.jsx)("div",{className:"vczapi-blocks-form--selected-meeting",children:(0,bo.jsxs)("h4",{children:["Currently Selected Meeting: ",(0,bo.jsx)("strong",{children:i.label})]})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.RadioControl,{className:"radio-inline",label:(0,d.__)("Show Recordings by","video-conferencing-with-zoom-api"),options:[{label:"Host",value:"host"},{label:"Meeting",value:"meeting"}],selected:f,onChange:function(e){h.current&&n({showBy:e})}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.ComboboxControl,{label:(0,d.__)("Select A Host","video-conferencing-with-zoom-api"),help:(0,d.__)("Click to view available hosts or start typing to filter","video-conferencing-with-zoom-api"),value:null!=k&&k.value?String(k.value):"string"==typeof k?k:"",options:R,onFilterValueChange:q,isLoading:F,onChange:function(e){if(e){var t=R.find((function(t){return String(t.value)===String(e)}))||{value:e,label:e};h.current&&(_(t),"meeting"===f&&J(e,M))}}})}),"meeting"===f&&(0,bo.jsxs)(bo.Fragment,{children:[(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Would you like to show a Meeting or Webinar","video-conferencing-with-zoom-api"),value:M,options:[{label:"Meeting",value:"meeting"},{label:"Webinar",value:"webinar"}],onChange:function(e){E(e);var t=(null==k?void 0:k.value)||k;t&&h.current&&(C([]),J(t,e))}})}),Y&&(void 0===S||0===S.length)&&(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.Spinner,{})}),void 0!==S&&S.length>0&&(0,bo.jsxs)("div",{className:"vczapi-blocks-form--group",children:[(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Select A Meeting : ","video-conferencing-with-zoom-api")+(B>1?" (use pagination below if necessary)":""),value:JSON.stringify(I),options:[{label:(0,d.__)("Select a meeting","video-conferencing-with-zoom-api"),value:"{}"}].concat(c(K)),disabled:Y,onChange:function(e){"{}"!==e&&h.current&&D(JSON.parse(e))}}),(0,bo.jsx)(X,{numberOfPages:B})]})]}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.ToggleControl,{className:"toggle-inline",label:"Downloadable",checked:a,onChange:function(e){h.current&&n({downloadable:e})}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.Button,{isPrimary:!0,onClick:function(){return"host"!==f||k&&("object"!==r(k)||k.value)?"meeting"!==f||I.hasOwnProperty("value")?void(h.current&&(n({selectedMeeting:I}),n({host:k}),n({shouldShow:"object"===r(M)?M:{label:M,value:M}}),O(!1))):(alert("Meeting Needs to be selected"),!1):(alert("Host Needs to be selected"),!1)},children:(0,d.__)("Save","video-conferencing-with-zoom-api")})})]})]}),("host"===f&&void 0!==o||"meeting"===f&&void 0!==i)&&!w&&(0,bo.jsx)(g.Disabled,{children:(0,bo.jsx)(m(),{block:"vczapi/recordings",attributes:{downloadable:a,host:o,selectedMeeting:i,showBy:f}})})]}))}}),(0,o.registerBlockType)("vczapi/single-zoom-meeting",{apiVersion:2,edit:function(e){return(0,bo.jsx)("div",Io(Io({},(0,v.useBlockProps)()),{},{children:(0,bo.jsxs)("div",{class:"vczapi-singleMeetingSkeleton",children:[(0,bo.jsx)("h5",{children:" Please do not remove this block, this block is used to display single meeting page for FSE Themes"}),(0,bo.jsx)("img",{alt:"Zoom Meeting Single Page Outline",src:vczapi_blocks.single_zoom_meeting_page})]})}))}})},679:function(e,t,n){var o=n(864),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return o.isMemo(e)?a:s[e.$$typeof]||r}s[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[o.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,v=Object.prototype;e.exports=function e(t,n,o){if("string"!=typeof n){if(v){var r=f(n);r&&r!==v&&e(t,r,o)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),h=l(n),m=0;m<a.length;++m){var g=a[m];if(!(i[g]||o&&o[g]||h&&h[g]||s&&s[g])){var b=p(n,g);try{c(t,g,b)}catch(e){}}}}return t}},921:function(e,t){var n="function"==typeof Symbol&&Symbol.for,o=n?Symbol.for("react.element"):60103,r=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,v=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function O(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case u:case d:case i:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case m:case h:case l:return e;default:return t}}case r:return t}}}function x(e){return O(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=o,t.ForwardRef=p,t.Fragment=i,t.Lazy=m,t.Memo=h,t.Portal=r,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return x(e)||O(e)===u},t.isConcurrentMode=x,t.isContextConsumer=function(e){return O(e)===c},t.isContextProvider=function(e){return O(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return O(e)===p},t.isFragment=function(e){return O(e)===i},t.isLazy=function(e){return O(e)===m},t.isMemo=function(e){return O(e)===h},t.isPortal=function(e){return O(e)===r},t.isProfiler=function(e){return O(e)===s},t.isStrictMode=function(e){return O(e)===a},t.isSuspense=function(e){return O(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===a||e===f||e===v||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===h||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===b||e.$$typeof===y||e.$$typeof===w||e.$$typeof===g)},t.typeOf=O},864:function(e,t,n){e.exports=n(921)}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.m=t,e=[],o.O=function(t,n,r,i){if(!n){var a=1/0;for(u=0;u<e.length;u++){n=e[u][0],r=e[u][1],i=e[u][2];for(var s=!0,l=0;l<n.length;l++)(!1&i||a>=i)&&Object.keys(o.O).every((function(e){return o.O[e](n[l])}))?n.splice(l--,1):(s=!1,i<a&&(a=i));if(s){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,r,i]},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={826:0,431:0};o.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,i,a=n[0],s=n[1],l=n[2],c=0;if(a.some((function(t){return 0!==e[t]}))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(l)var u=l(o)}for(t&&t(n);c<a.length;c++)i=a[c],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(u)},n=self.webpackChunkvideo_conferencing_with_zoom_api=self.webpackChunkvideo_conferencing_with_zoom_api||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var r=o.O(void 0,[431],(function(){return o(772)}));r=o.O(r)}();
  • video-conferencing-with-zoom-api/tags/4.6.11/includes/Blocks/Blocks.php

    r3666609 r3722621  
    22
    33namespace Codemanas\VczApi\Blocks;
    4 
    5 use function Composer\Autoload\includeFile;
    64
    75/**
    … …  
    2725         */
    2826        public function __construct() {
    29                 global $wp_version;
    30                 if ( version_compare( $wp_version, '5.8', '>=' ) ) {
    31                         add_filter( 'block_categories_all', [ $this, 'register_block_categories' ], 10, 2 );
    32                 } else {
    33                         add_filter( 'block_categories', [ $this, 'register_block_categories' ], 10, 2 );
    34                 }
     27                add_filter( 'block_categories_all', [ $this, 'register_block_categories' ], 10, 2 );
     28
    3529                if ( function_exists( 'register_block_type' ) ) {
    3630                        add_action( 'init', [ $this, 'register_scripts' ] );
    … …  
    7771                        'vczapi_blocks',
    7872                        [
     73                                'nonce'                            => wp_create_nonce( 'vczapi_blocks' ),
    7974                                'list_meetings_preview'            => ZVC_PLUGIN_IMAGES_PATH . '/block-previews/list-meetings-webinars.png',
    8075                                'direct_meeting_preview_image'     => ZVC_PLUGIN_IMAGES_PATH . '/block-previews/direct-meeting.jpg',
    … …  
    9085         * Registering block categories.
    9186         *
    92          * @param array $categories Block categories.
    93          * @param mixed $post       Post.
     87         * @param   array  $categories Block categories.
     88         * @param   mixed  $post        Post.
    9489         *
    9590         * @return array
    … …  
    383378         * Get a scalar block attribute without display-oriented sanitization.
    384379         *
    385          * @param mixed  $attributes Block attributes.
    386          * @param string $key        Attribute key.
    387          * @param string $default    Default value.
     380         * @param   mixed   $attributes Block attributes.
     381         * @param   string  $key         Attribute key.
     382         * @param   string  $default     Default value.
    388383         *
    389384         * @return string
    … …  
    405400         * Get a nested scalar block attribute.
    406401         *
    407          * @param mixed  $attributes Block attributes.
    408          * @param string $key        Attribute key.
    409          * @param string $nested_key Nested key.
    410          * @param string $default    Default value.
     402         * @param   mixed   $attributes Block attributes.
     403         * @param   string  $key         Attribute key.
     404         * @param   string  $nested_key Nested key.
     405         * @param   string  $default     Default value.
    411406         *
    412407         * @return string
    … …  
    430425         * Get a positive integer block attribute.
    431426         *
    432          * @param mixed  $attributes Block attributes.
    433          * @param string $key        Attribute key.
    434          * @param int    $default    Default value.
     427         * @param   mixed   $attributes Block attributes.
     428         * @param   string  $key         Attribute key.
     429         * @param   int     $default     Default value.
    435430         *
    436431         * @return int
    … …  
    452447         * Get an allowlisted scalar block attribute.
    453448         *
    454          * @param mixed  $attributes     Block attributes.
    455          * @param string $key            Attribute key.
    456          * @param array  $allowed_values Allowed values.
    457          * @param string $default        Default value.
     449         * @param   mixed   $attributes      Block attributes.
     450         * @param   string  $key             Attribute key.
     451         * @param   array   $allowed_values Allowed values.
     452         * @param   string  $default         Default value.
    458453         *
    459454         * @return string
    … …  
    468463         * Get an allowlisted nested block attribute.
    469464         *
    470          * @param mixed  $attributes     Block attributes.
    471          * @param string $key            Attribute key.
    472          * @param array  $allowed_values Allowed values.
    473          * @param string $default        Default value.
     465         * @param   mixed   $attributes      Block attributes.
     466         * @param   string  $key             Attribute key.
     467         * @param   array   $allowed_values Allowed values.
     468         * @param   string  $default         Default value.
    474469         *
    475470         * @return string
    … …  
    484479         * Get a numeric identifier from a nested block attribute.
    485480         *
    486          * @param mixed  $attributes Block attributes.
    487          * @param string $key        Attribute key.
    488          * @param string $default    Default value.
     481         * @param   mixed   $attributes Block attributes.
     482         * @param   string  $key         Attribute key.
     483         * @param   string  $default     Default value.
    489484         *
    490485         * @return string
    … …  
    499494         * Get a sanitized Zoom host identifier.
    500495         *
    501          * @param mixed  $attributes Block attributes.
    502          * @param string $key        Attribute key.
    503          * @param string $default    Default value.
     496         * @param   mixed   $attributes Block attributes.
     497         * @param   string  $key         Attribute key.
     498         * @param   string  $default     Default value.
    504499         *
    505500         * @return string
    … …  
    517512         * characters. Avoid display-oriented sanitizers here.
    518513         *
    519          * @param mixed  $attributes Block attributes.
    520          * @param string $key        Attribute key.
     514         * @param   mixed   $attributes Block attributes.
     515         * @param   string  $key         Attribute key.
    521516         *
    522517         * @return string
    … …  
    539534         * This is shortcode-context escaping, not HTML attribute escaping.
    540535         *
    541          * @param string $name  Shortcode attribute name.
    542          * @param mixed  $value Shortcode attribute value.
     536         * @param   string  $name   Shortcode attribute name.
     537         * @param   mixed   $value Shortcode attribute value.
    543538         *
    544539         * @return string
    … …  
    573568         * @updated N/A
    574569         */
    575         public function get_hosts() {
     570        public function get_hosts(): void {
     571                check_ajax_referer( 'vczapi_blocks', 'nonce' );
     572                if ( ! current_user_can( 'edit_posts' ) && ! current_user_can( 'manage_options' ) ) {
     573                        wp_send_json_error( [ 'message' => __( 'You do not have permission to access this resource.', 'video-conferencing-with-zoom-api' ) ], 403 );
     574                }
     575
    576576                $host_name = filter_input( INPUT_GET, 'host' );
    577577                $host_name = is_scalar( $host_name ) ? (string) $host_name : '';
    … …  
    616616         * @updated N/A
    617617         */
    618         public function     get_live_meetings() {
     618        public function get_live_meetings() {
     619                check_ajax_referer( 'vczapi_blocks', 'nonce' );
     620                if ( ! current_user_can( 'edit_posts' ) && ! current_user_can( 'manage_options' ) ) {
     621                        wp_send_json_error( [ 'message' => __( 'You do not have permission to access this resource.', 'video-conferencing-with-zoom-api' ) ], 403 );
     622                }
     623
    619624                $host_id                 = filter_input( INPUT_GET, 'host_id' );
    620625                $show_meeting_or_webinar = filter_input( INPUT_GET, 'show' );
    … …  
    623628                ];
    624629
    625                 $page_number             = filter_input( INPUT_GET, 'page_number' );
     630                $page_number = filter_input( INPUT_GET, 'page_number' );
    626631                if ( ! empty( $page_number ) ) {
    627632                        $args['page_number'] = $page_number;
    … …  
    666671         * Render list of meetings.
    667672         *
    668          * @param mixed $attributes Block attributes.
     673         * @param   mixed  $attributes Block attributes.
    669674         *
    670675         * @return string
    … …  
    733738         * Render just the post.
    734739         *
    735          * @param mixed $attributes Block attributes.
     740         * @param   mixed  $attributes Block attributes.
    736741         *
    737742         * @return false|string
    … …  
    768773         * Render directly from API.
    769774         *
    770          * @param mixed $attributes Block attributes.
     775         * @param   mixed  $attributes Block attributes.
    771776         *
    772777         * @return false|string
    … …  
    798803         * Render host meeting list.
    799804         *
    800          * @param mixed $attributes Block attributes.
     805         * @param   mixed  $attributes Block attributes.
    801806         *
    802807         * @return false|string
    … …  
    819824         * Embed join via browser.
    820825         *
    821          * @param mixed $attributes Block attributes.
     826         * @param   mixed  $attributes Block attributes.
    822827         *
    823828         * @return string
    … …  
    861866         * Render Recordings.
    862867         *
    863          * @param mixed $attributes Block attributes.
     868         * @param   mixed  $attributes Block attributes.
    864869         *
    865870         * @return false|string
  • video-conferencing-with-zoom-api/tags/4.6.11/includes/admin/class-zvc-admin-ajax.php

    r3565576 r3722621  
    99 * @author  Deepen
    1010 */
    11 
    12 class Zoom_Video_Conferencing_Admin_Ajax
    13 {
    14 
    15         public function __construct()
    16         {
     11class Zoom_Video_Conferencing_Admin_Ajax {
     12
     13        public function __construct() {
    1714                //Delete Meeting
    18                 add_action('wp_ajax_zvc_delete_meeting', array($this, 'delete_meeting'));
    19                 add_action('wp_ajax_zvc_bulk_meetings_delete', array($this, 'delete_bulk_meeting'));
    20                 add_action('wp_ajax_zoom_dimiss_notice', array($this, 'dismiss_notice'));
    21                 add_action('wp_ajax_check_connection', array($this, 'check_connection'));
     15                add_action( 'wp_ajax_zvc_delete_meeting', array( $this, 'delete_meeting' ) );
     16                add_action( 'wp_ajax_zvc_bulk_meetings_delete', array( $this, 'delete_bulk_meeting' ) );
     17                add_action( 'wp_ajax_zoom_dimiss_notice', array( $this, 'dismiss_notice' ) );
     18                add_action( 'wp_ajax_check_connection', array( $this, 'check_connection' ) );
    2219
    2320                //Join via browser Auth Call
    24                 add_action('wp_ajax_nopriv_get_auth', array($this, 'get_auth'));
    25                 add_action('wp_ajax_get_auth', array($this, 'get_auth'));
     21                add_action( 'wp_ajax_nopriv_vczapi_jvb_get_auth', array( $this, 'get_auth' ) );
     22                add_action( 'wp_ajax_vczapi_jvb_get_auth', array( $this, 'get_auth' ) );
    2623
    2724                //Call meeting state
    28                 add_action('wp_ajax_nopriv_state_change', array($this, 'state_change'));
    29                 add_action('wp_ajax_state_change', array($this, 'state_change'));
     25                add_action( 'wp_ajax_nopriv_vczapi_meeting_state_change', array( $this, 'state_change' ) );
     26                add_action( 'wp_ajax_vczapi_meeting_state_change', array( $this, 'state_change' ) );
    3027
    3128                //AJAX call for fetching users
    32                 add_action('wp_ajax_get_assign_host_id', [$this, 'assign_host_id']);
    33                 add_action('wp_ajax_vczapi_get_wp_users', [$this, 'get_wp_usersByRole']);
    34                 add_action('wp_ajax_vczapi_get_zoom_host_query', [$this, 'getZoomHostByQuery']);
     29                add_action( 'wp_ajax_get_assign_host_id', [ $this, 'assign_host_id' ] );
     30                add_action( 'wp_ajax_vczapi_get_wp_users', [ $this, 'get_wp_usersByRole' ] );
     31                add_action( 'wp_ajax_vczapi_get_zoom_host_query', [ $this, 'getZoomHostByQuery' ] );
    3532
    3633                //Ajax called for dismissing notice
    37                 add_action('wp_ajax_vczapi_dismiss_admin_notice', [$this, 'admin_notice']);
     34                add_action( 'wp_ajax_vczapi_dismiss_admin_notice', [ $this, 'admin_notice' ] );
    3835
    3936                //End Meeting
    40                 add_action('wp_ajax_vczapi_end_meeting', [$this, 'end_meeting']);
    41         }
    42 
    43         public function admin_notice()
    44         {
    45                 $option = filter_input(INPUT_POST, 'option');
    46                 $nonce = filter_input(INPUT_POST, 'security');
    47                 if (!wp_verify_nonce($nonce, 'vczapi-dismiss-nonce')) {
    48                         wp_send_json_error(['message' => 'Error']);
    49                 } elseif (!current_user_can('manage_options')) {
    50                         wp_send_json_error(['message' => 'Error']);
    51                 }
    52 
    53 
    54                 if ($option == 'vczapi_dismiss_sdk_not_active_notice') {
    55                         update_option('vczapi_dismiss_sdk_not_active_notice', true);
     37                add_action( 'wp_ajax_vczapi_end_meeting', [ $this, 'end_meeting' ] );
     38        }
     39
     40        public function admin_notice() {
     41                $option = filter_input( INPUT_POST, 'option' );
     42                $nonce  = filter_input( INPUT_POST, 'security' );
     43                if ( ! wp_verify_nonce( $nonce, 'vczapi-dismiss-nonce' ) ) {
     44                        wp_send_json_error( [ 'message' => 'Error' ] );
     45                } elseif ( ! current_user_can( 'manage_options' ) ) {
     46                        wp_send_json_error( [ 'message' => 'Error' ] );
     47                }
     48
     49
     50                if ( $option == 'vczapi_dismiss_sdk_not_active_notice' ) {
     51                        update_option( 'vczapi_dismiss_sdk_not_active_notice', true );
    5652                }
    5753                wp_send_json_success();
    … …  
    6561         * @modified 2.1.0
    6662         */
    67         public function delete_meeting()
    68         {
    69                 check_ajax_referer('_nonce_zvc_security', 'security');
    70 
    71                 if (!current_user_can('manage_options')) {
    72                         return;
    73                 }
    74 
    75                 $meeting_id = filter_input(INPUT_POST, 'meeting_id');
    76                 $meeting_type = filter_input(INPUT_POST, 'type');
    77                 if ($meeting_id) {
    78                         if (!empty($meeting_type) && $meeting_type === "webinar") {
    79                                 zoom_conference()->deleteAWebinar($meeting_id);
     63        public function delete_meeting() {
     64                check_ajax_referer( '_nonce_zvc_security', 'security' );
     65
     66                if ( ! current_user_can( 'manage_options' ) ) {
     67                        return;
     68                }
     69
     70                $meeting_id   = filter_input( INPUT_POST, 'meeting_id' );
     71                $meeting_type = filter_input( INPUT_POST, 'type' );
     72                if ( $meeting_id ) {
     73                        if ( ! empty( $meeting_type ) && $meeting_type === "webinar" ) {
     74                                zoom_conference()->deleteAWebinar( $meeting_id );
    8075                        } else {
    81                                 zoom_conference()->deleteAMeeting($meeting_id);
    82                         }
    83 
    84                         wp_send_json(array(
     76                                zoom_conference()->deleteAMeeting( $meeting_id );
     77                        }
     78
     79                        wp_send_json( array(
    8580                                'error' => 0,
    86                                 'msg' => __("Deleted Meeting with ID", "video-conferencing-with-zoom-api") . ': ' . $meeting_id,
    87                         ));
     81                                'msg'   => __( "Deleted Meeting with ID", "video-conferencing-with-zoom-api" ) . ': ' . $meeting_id,
     82                        ) );
    8883                } else {
    89                         wp_send_json(array(
     84                        wp_send_json( array(
    9085                                'error' => 1,
    91                                 'msg' => __("An error occured. Host ID and Meeting ID not defined properly.", "video-conferencing-with-zoom-api"),
    92                         ));
     86                                'msg'   => __( "An error occured. Host ID and Meeting ID not defined properly.", "video-conferencing-with-zoom-api" ),
     87                        ) );
    9388                }
    9489
    … …  
    10297         * @modified 2.1.0
    10398         */
    104         public function delete_bulk_meeting()
    105         {
    106                 check_ajax_referer('_nonce_zvc_security', 'security');
    107 
    108                 if (!current_user_can('manage_options')) {
    109                         return;
    110                 }
    111 
    112                 $deleted = false;
    113                 $meeting_ids = filter_input(INPUT_POST, 'meetings_id', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
    114                 $meeting_type = filter_input(INPUT_POST, 'type');
    115                 if (!empty($meeting_ids)) {
    116                         $meeting_count = count($meeting_ids);
    117                         foreach ($meeting_ids as $meeting_id) {
    118                                 if (!empty($meeting_type) && $meeting_type === "webinar") {
    119                                         zoom_conference()->deleteAWebinar($meeting_id);
     99        public function delete_bulk_meeting() {
     100                check_ajax_referer( '_nonce_zvc_security', 'security' );
     101
     102                if ( ! current_user_can( 'manage_options' ) ) {
     103                        return;
     104                }
     105
     106                $deleted      = false;
     107                $meeting_ids  = filter_input( INPUT_POST, 'meetings_id', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
     108                $meeting_type = filter_input( INPUT_POST, 'type' );
     109                if ( ! empty( $meeting_ids ) ) {
     110                        $meeting_count = count( $meeting_ids );
     111                        foreach ( $meeting_ids as $meeting_id ) {
     112                                if ( ! empty( $meeting_type ) && $meeting_type === "webinar" ) {
     113                                        zoom_conference()->deleteAWebinar( $meeting_id );
    120114                                } else {
    121                                         zoom_conference()->deleteAMeeting($meeting_id);
     115                                        zoom_conference()->deleteAMeeting( $meeting_id );
    122116                                }
    123117                                $deleted = true;
    124118                        }
    125119
    126                         if ($deleted) {
    127                                 wp_send_json(array(
     120                        if ( $deleted ) {
     121                                wp_send_json( array(
    128122                                        'error' => 0,
    129                                         'msg' => sprintf(__("Deleted %d Meeting(s).", "video-conferencing-with-zoom-api"), $meeting_count),
    130                                 ));
     123                                        'msg'   => sprintf( __( "Deleted %d Meeting(s).", "video-conferencing-with-zoom-api" ), $meeting_count ),
     124                                ) );
    131125                        }
    132126                } else {
    133                         wp_send_json(array(
     127                        wp_send_json( array(
    134128                                'error' => 1,
    135                                 'msg' => __("You need to select a data in order to initiate this action."),
    136                         ));
     129                                'msg'   => __( "You need to select a data in order to initiate this action." ),
     130                        ) );
    137131                }
    138132
    … …  
    143137         * Dismiss admin notice
    144138         */
    145         public function dismiss_notice()
    146         {
    147                 update_option('zoom_api_notice', 1);
    148                 wp_send_json(1);
     139        public function dismiss_notice() {
     140                update_option( 'zoom_api_notice', 1 );
     141                wp_send_json( 1 );
    149142                wp_die();
    150143        }
    … …  
    156149         * @author Deepen Bajracharya
    157150         */
    158         public function check_connection()
    159         {
    160                 check_ajax_referer('_nonce_zvc_security', 'security');
    161 
    162                 $type = filter_input(INPUT_POST, 'type');
    163                 if ($type === "oAuth") {
     151        public function check_connection() {
     152                check_ajax_referer( '_nonce_zvc_security', 'security' );
     153
     154                $type = filter_input( INPUT_POST, 'type' );
     155                if ( $type === "oAuth" ) {
    164156                        $test = \Codemanas\VczApi\Requests\Zoom::instance()->me();
    165                         if (!empty($test->code)) {
    166                                 wp_send_json_error($test->message);
     157                        if ( ! empty( $test->code ) ) {
     158                                wp_send_json_error( $test->message );
    167159                        }
    168160
    169161                        //After user has been created delete this transient in order to fetch latest Data.
    170162                        video_conferencing_zoom_api_delete_user_cache();
    171                         wp_send_json_success(['msg' => "API Connection is good. You can refresh this and start creating your Zoom Events."]);
     163                        wp_send_json_success( [ 'msg' => "API Connection is good. You can refresh this and start creating your Zoom Events." ] );
    172164                }
    173165
    … …  
    181173         * @author Deepen Bajracharya
    182174         */
    183         public function get_auth()
    184         {
    185                 // check_ajax_referer('_nonce_zvc_security', 'zvc_security');
    186 
    187                 $referer = wp_get_referer();
     175        public function get_auth() {
     176                check_ajax_referer( 'vczapi_jvb', 'nonce' );
     177
     178                $referer  = wp_get_referer();
    188179                $home_url = home_url();
    189180
    190181                // Block requests with no referer or external referers
    191                 if (!$referer || parse_url($referer, PHP_URL_HOST) !== parse_url($home_url, PHP_URL_HOST)) {
    192                         wp_send_json_error('Invalid request source.');
     182                if ( ! $referer || parse_url( $referer, PHP_URL_HOST ) !== parse_url( $home_url, PHP_URL_HOST ) ) {
     183                        wp_send_json_error( 'Invalid request source.' );
    193184                }
    194185
    195186                // 2. Sanitize and validate the Meeting ID
    196                 $meeting_id = filter_input(INPUT_POST, 'meeting_id', FILTER_SANITIZE_NUMBER_INT);
    197 
    198                 if (empty($meeting_id)) {
    199                         wp_send_json_error('Invalid Meeting ID');
    200                 }
    201 
    202                 if (vczapi_is_sdk_enabled()) {
    203                         $sdk_key = get_option('vczapi_sdk_key');
    204                         $secret_key = get_option('vczapi_sdk_secret_key');
    205 
    206                         if (empty($sdk_key) || empty($secret_key)) {
    207                                 wp_send_json_error('SDK configuration error.');
     187                $meeting_id = filter_input( INPUT_POST, 'meeting_id', FILTER_SANITIZE_NUMBER_INT );
     188
     189                if ( empty( $meeting_id ) ) {
     190                        wp_send_json_error( 'Invalid Meeting ID' );
     191                }
     192
     193                if ( vczapi_is_sdk_enabled() ) {
     194                        $sdk_key    = get_option( 'vczapi_sdk_key' );
     195                        $secret_key = get_option( 'vczapi_sdk_secret_key' );
     196
     197                        if ( empty( $sdk_key ) || empty( $secret_key ) ) {
     198                                wp_send_json_error( 'SDK configuration error.' );
    208199                        }
    209200
    210201                        // Ensure role is 0 (Participant). NEVER allow Role 1 (Host) for guests.
    211                         $signature = $this->generate_sdk_signature($sdk_key, $secret_key, $meeting_id, 0);
    212 
    213                         wp_send_json_success([
    214                                 'sig' => $signature,
     202                        $signature = $this->generate_sdk_signature( $sdk_key, $secret_key, $meeting_id, 0 );
     203
     204                        wp_send_json_success( [
     205                                'sig'  => $signature,
    215206                                'type' => 'sdk'
    216                         ]);
     207                        ] );
    217208                } else {
    218                         wp_send_json_error('Service Unavailable');
    219                 }
    220 
    221                 wp_die();
    222         }
    223 
    224         private function generate_sdk_signature($sdk_key, $secret_key, $meeting_number, $role)
    225         {
    226                 $iat = round((time() * 1000 - 30000) / 1000);
    227                 $exp = $iat + 86400;
     209                        wp_send_json_error( 'Service Unavailable' );
     210                }
     211
     212                wp_die();
     213        }
     214
     215        private function generate_sdk_signature( $sdk_key, $secret_key, $meeting_number, $role ) {
     216                $iat     = round( ( time() * 1000 - 30000 ) / 1000 );
     217                $exp     = $iat + 86400;
    228218                $payload = [
    229                         'sdkKey' => $sdk_key,
    230                         'mn' => $meeting_number,
    231                         'role' => $role,
    232                         'iat' => $iat,
    233                         'exp' => $exp,
    234                         'appKey' => $sdk_key,
     219                        'sdkKey'   => $sdk_key,
     220                        'mn'       => $meeting_number,
     221                        'role'     => $role,
     222                        'iat'      => $iat,
     223                        'exp'      => $exp,
     224                        'appKey'   => $sdk_key,
    235225                        'tokenExp' => $exp,
    236226                ];
    237227
    238                 if (empty($secret_key)) {
     228                if ( empty( $secret_key ) ) {
    239229                        return false;
    240230                }
    241231
    242                 return \Firebase\JWT\JWT::encode($payload, $secret_key, 'HS256');
     232                return \Firebase\JWT\JWT::encode( $payload, $secret_key, 'HS256' );
    243233        }
    244234
    … …  
    254244         * @throws Exception
    255245         */
    256         private function generate_signature($api_key, $api_sercet, $meeting_number, $role)
    257         {
     246        private function generate_signature( $api_key, $api_sercet, $meeting_number, $role ) {
    258247                //Set the timezone to UTC
    259                 $date_utc = new \DateTime("now", new \DateTimeZone("UTC"));
    260                 $time = $date_utc->getTimestamp() * 1000 - 30000; //time in milliclearseconds (or close enough)
    261                 $data = base64_encode($api_key . $meeting_number . $time . $role);
    262                 $hash = hash_hmac('sha256', $data, $api_sercet, true);
    263                 $_sig = $api_key . "." . $meeting_number . "." . $time . "." . $role . "." . base64_encode($hash);
     248                $date_utc = new \DateTime( "now", new \DateTimeZone( "UTC" ) );
     249                $time     = $date_utc->getTimestamp() * 1000 - 30000; //time in milliclearseconds (or close enough)
     250                $data     = base64_encode( $api_key . $meeting_number . $time . $role );
     251                $hash     = hash_hmac( 'sha256', $data, $api_sercet, true );
     252                $_sig     = $api_key . "." . $meeting_number . "." . $time . "." . $role . "." . base64_encode( $hash );
    264253
    265254                //return signature, url safe base64 encoded
    266                 return rtrim(strtr(base64_encode($_sig), '+/', '-_'), '=');
     255                return rtrim( strtr( base64_encode( $_sig ), '+/', '-_' ), '=' );
    267256        }
    268257
    … …  
    270259         * Change State of the Meeting from here !
    271260         */
    272         public function state_change()
    273         {
    274                 check_ajax_referer('_nonce_zvc_security', 'accss');
    275 
    276                 if (!current_user_can('manage_options')) {
    277                         return;
    278                 }
    279 
    280                 $type = sanitize_text_field(filter_input(INPUT_POST, 'type'));
    281                 $state = sanitize_text_field(filter_input(INPUT_POST, 'state'));
    282                 $meeting_id = sanitize_text_field(filter_input(INPUT_POST, 'id'));
    283                 $post_id = sanitize_text_field(filter_input(INPUT_POST, 'post_id'));
     261        public function state_change(): void {
     262                check_ajax_referer( 'vczapi_meeting_state', 'nonce' );
     263                if ( ! current_user_can( 'manage_options' ) ) {
     264                        return;
     265                }
     266
     267                $type       = sanitize_text_field( filter_input( INPUT_POST, 'type' ) );
     268                $state      = sanitize_text_field( filter_input( INPUT_POST, 'state' ) );
     269                $meeting_id = sanitize_text_field( filter_input( INPUT_POST, 'id' ) );
     270                $post_id    = sanitize_text_field( filter_input( INPUT_POST, 'post_id' ) );
    284271
    285272                $success = false;
    286                 switch ($state) {
     273                switch ( $state ) {
    287274                        case 'end':
    288                                 if ($type === "shortcode") {
    289                                         $meeting_options = get_option('zoom_api_meeting_options');
    290                                         if (!empty($meeting_options)) {
    291                                                 $meeting_options[$meeting_id]['state'] = 'ended';
    292                                                 update_option('zoom_api_meeting_options', $meeting_options);
     275                                if ( $type === "shortcode" ) {
     276                                        $meeting_options = get_option( 'zoom_api_meeting_options' );
     277                                        if ( ! empty( $meeting_options ) ) {
     278                                                $meeting_options[ $meeting_id ]['state'] = 'ended';
     279                                                update_option( 'zoom_api_meeting_options', $meeting_options );
    293280                                        } else {
    294                                                 $new[$meeting_id]['state'] = 'ended';
    295                                                 update_option('zoom_api_meeting_options', $new);
     281                                                $new[ $meeting_id ]['state'] = 'ended';
     282                                                update_option( 'zoom_api_meeting_options', $new );
    296283                                        }
    297284
    … …  
    299286                                }
    300287
    301                                 if ($type === "post_type") {
    302                                         $meeting = get_post_meta($post_id, '_meeting_zoom_details', true);
    303                                         if (!empty($meeting)) {
     288                                if ( $type === "post_type" ) {
     289                                        $meeting = get_post_meta( $post_id, '_meeting_zoom_details', true );
     290                                        if ( ! empty( $meeting ) ) {
    304291                                                $meeting->state = 'ended';
    305                                                 update_post_meta($post_id, '_meeting_zoom_details', $meeting);
     292                                                update_post_meta( $post_id, '_meeting_zoom_details', $meeting );
    306293                                        }
    307294
    … …  
    311298                                break;
    312299                        case 'resume':
    313                                 if ($type === "shortcode") {
    314                                         $meeting_options = get_option('zoom_api_meeting_options');
    315                                         unset($meeting_options[$meeting_id]);
    316                                         update_option('zoom_api_meeting_options', $meeting_options);
     300                                if ( $type === "shortcode" ) {
     301                                        $meeting_options = get_option( 'zoom_api_meeting_options' );
     302                                        unset( $meeting_options[ $meeting_id ] );
     303                                        update_option( 'zoom_api_meeting_options', $meeting_options );
    317304                                        $success = true;
    318305                                }
    319306
    320                                 if ($type === "post_type") {
    321                                         $meeting = get_post_meta($post_id, '_meeting_zoom_details', true);
    322                                         if (!empty($meeting)) {
     307                                if ( $type === "post_type" ) {
     308                                        $meeting = get_post_meta( $post_id, '_meeting_zoom_details', true );
     309                                        if ( ! empty( $meeting ) ) {
    323310                                                $meeting->state = '';
    324                                                 update_post_meta($post_id, '_meeting_zoom_details', $meeting);
     311                                                update_post_meta( $post_id, '_meeting_zoom_details', $meeting );
    325312                                        }
    326313
    … …  
    330317                }
    331318
    332                 if ($success) {
    333                         wp_send_json_success($success);
     319                if ( $success ) {
     320                        wp_send_json_success( $success );
    334321                } else {
    335                         wp_send_json_error($success);
    336                 }
    337 
    338                 wp_die();
    339         }
    340 
    341         public function end_meeting(): void
    342         {
    343                 check_ajax_referer('_nonce_zvc_security', 'access');
     322                        wp_send_json_error( $success );
     323                }
     324
     325                wp_die();
     326        }
     327
     328        public function end_meeting(): void {
     329                check_ajax_referer( '_nonce_zvc_security', 'access' );
    344330                //only people who can create meeting can end them.
    345                 if (!current_user_can('edit_posts')) {
    346                         return;
    347                 }
    348                 $meeting_id = sanitize_text_field(filter_input(INPUT_POST, 'meeting_id'));
    349                 zoom_conference()->end_meeting($meeting_id);
     331                if ( ! current_user_can( 'edit_posts' ) ) {
     332                        return;
     333                }
     334                $meeting_id = sanitize_text_field( filter_input( INPUT_POST, 'meeting_id' ) );
     335                zoom_conference()->end_meeting( $meeting_id );
    350336        }
    351337
    … …  
    353339         * Assign Host ID page
    354340         */
    355         public function assign_host_id(): void
    356         {
    357                 check_ajax_referer('_nonce_zvc_security', 'security');
    358 
    359                 $draw = filter_input(INPUT_GET, 'draw');
    360                 $length = filter_input(INPUT_GET, 'length');
    361                 $start = filter_input(INPUT_GET, 'start');
    362                 $search = filter_input(INPUT_GET, 'search', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
    363                 $args = [
    364                         'number' => !empty($length) ? absint($length) : 10,
    365                         'paged' => $start == 0 ? 1 : $start / $length + 1,
     341        public function assign_host_id(): void {
     342                check_ajax_referer( '_nonce_zvc_security', 'security' );
     343
     344                if ( ! current_user_can( 'manage_options' ) ) {
     345                        return;
     346                }
     347
     348                $draw   = filter_input( INPUT_GET, 'draw' );
     349                $length = filter_input( INPUT_GET, 'length' );
     350                $start  = filter_input( INPUT_GET, 'start' );
     351                $search = filter_input( INPUT_GET, 'search', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
     352                $args   = [
     353                        'number' => ! empty( $length ) ? absint( $length ) : 10,
     354                        'paged'  => $start == 0 ? 1 : $start / $length + 1,
    366355                ];
    367356
    368                 if (!empty($search['value'])) {
     357                if ( ! empty( $search['value'] ) ) {
    369358                        $args['search'] = '*' . $search['value'] . '*';
    370359                }
    371360
    372                 $users = vczapi_getWpUsers_basedon_UserRoles($args);
    373                 $tableData = array();
     361                $users      = vczapi_getWpUsers_basedon_UserRoles( $args );
     362                $tableData  = array();
    374363                $zoom_users = video_conferencing_zoom_api_get_user_transients();
    375                 if (!empty($users)) {
    376                         foreach ($users->get_results() as $user) {
    377                                 $user_zoom_hostid = get_user_meta($user->ID, 'user_zoom_hostid', true);
    378                                 $email_address = get_user_meta($user->ID, 'vczapi_user_zoom_email_address', true);
    379                                 $host_id_field = '';
    380                                 $host_id_field .= '<select data-userid="' . $user->ID . '" name="zoom_host_id[' . $user->ID . ']" class="vczapi-get-zoom-hosts" style="width:100%">';
    381                                 if (!empty($user_zoom_hostid) && !empty($email_address)) {
     364                if ( ! empty( $users ) ) {
     365                        foreach ( $users->get_results() as $user ) {
     366                                $user_zoom_hostid = get_user_meta( $user->ID, 'user_zoom_hostid', true );
     367                                $email_address    = get_user_meta( $user->ID, 'vczapi_user_zoom_email_address', true );
     368                                $host_id_field    = '';
     369                                $host_id_field    .= '<select data-userid="' . $user->ID . '" name="zoom_host_id[' . $user->ID . ']" class="vczapi-get-zoom-hosts" style="width:100%">';
     370                                if ( ! empty( $user_zoom_hostid ) && ! empty( $email_address ) ) {
    382371                                        $host_id_field .= '<option value="' . $user_zoom_hostid . '" selected>' . $email_address . '</option>';
    383372                                }
    384373
    385374                                //This is for backwards compatibility before version 4.0.7
    386                                 if (!empty($zoom_users) && !empty($user_zoom_hostid) && empty($email_address)) {
    387                                         foreach ($zoom_users as $zoom_usr) {
     375                                if ( ! empty( $zoom_users ) && ! empty( $user_zoom_hostid ) && empty( $email_address ) ) {
     376                                        foreach ( $zoom_users as $zoom_usr ) {
    388377                                                $selected_host_id = $user_zoom_hostid === $zoom_usr->id ? 'selected="selected"' : false;
    389                                                 $full_name = !empty($zoom_usr->first_name) ? $zoom_usr->first_name . ' ' . $zoom_usr->last_name : $zoom_usr->email;
    390                                                 $host_id_field .= '<option value="' . $zoom_usr->id . '" ' . $selected_host_id . '>' . $full_name . '</option>';
     378                                                $full_name        = ! empty( $zoom_usr->first_name ) ? $zoom_usr->first_name . ' ' . $zoom_usr->last_name : $zoom_usr->email;
     379                                                $host_id_field    .= '<option value="' . $zoom_usr->id . '" ' . $selected_host_id . '>' . $full_name . '</option>';
    391380                                        }
    392381                                }
    … …  
    394383                                $host_id_field .= '</select>';
    395384
    396                                 if (!empty($email_address)) {
     385                                if ( ! empty( $email_address ) ) {
    397386                                        $host_id_field .= '<input type="hidden" class="vczapi-host-email-field-' . $user->ID . '" name="zoom_host_email[' . $user->ID . ']" value="' . $email_address . '" />';
    398387                                }
    399388
    400389                                $tableData[] = [
    401                                         'id' => $user->ID,
    402                                         'email' => $user->user_email,
    403                                         'name' => empty($user->first_name) ? $user->display_name : $user->first_name . ' ' . $user->last_name,
     390                                        'id'      => $user->ID,
     391                                        'email'   => $user->user_email,
     392                                        'name'    => empty( $user->first_name ) ? $user->display_name : $user->first_name . ' ' . $user->last_name,
    404393                                        'host_id' => $host_id_field,
    405394                                ];
    … …  
    407396
    408397                        $results = [
    409                                 'draw' => absint($draw),
    410                                 'recordsTotal' => $users->get_total(),
     398                                'draw'            => absint( $draw ),
     399                                'recordsTotal'    => $users->get_total(),
    411400                                'recordsFiltered' => $users->get_total(),
    412                                 'data' => $tableData,
     401                                'data'            => $tableData,
    413402                        ];
    414403
    415                         wp_send_json($results);
     404                        wp_send_json( $results );
    416405
    417406                        wp_die();
    … …  
    419408        }
    420409
    421         public function getZoomHostByQuery()
    422         {
    423                 if (!current_user_can('manage_options')) {
    424                         return;
    425                 }
    426 
    427                 $search_string = filter_input(INPUT_GET, 'term');
    428                 $results = array(
     410        public function getZoomHostByQuery() {
     411                if ( ! current_user_can( 'manage_options' ) ) {
     412                        return;
     413                }
     414
     415                $search_string = filter_input( INPUT_GET, 'term' );
     416                $results       = array(
    429417                        [
    430                                 'id' => '0',
     418                                'id'   => '0',
    431419                                'text' => 'Not a Host',
    432420                        ],
    433421                );
    434                 if (!empty($search_string)) {
    435                         $user = json_decode(zoom_conference()->getUserInfo($search_string));
    436                         if (empty($user->code) && !empty($user)) {
     422                if ( ! empty( $search_string ) ) {
     423                        $user = json_decode( zoom_conference()->getUserInfo( $search_string ) );
     424                        if ( empty( $user->code ) && ! empty( $user ) ) {
    437425                                $results[] = array(
    438                                         'id' => $user->id,
     426                                        'id'   => $user->id,
    439427                                        'text' => $user->email,
    440428                                );
    441429                        }
    442430                } else {
    443                         $users = json_decode(zoom_conference()->listUsers());
    444                         if (empty($users->code) && !empty($users->users)) {
    445                                 foreach ($users->users as $user) {
     431                        $users = json_decode( zoom_conference()->listUsers() );
     432                        if ( empty( $users->code ) && ! empty( $users->users ) ) {
     433                                foreach ( $users->users as $user ) {
    446434                                        $results[] = array(
    447                                                 'id' => $user->id,
     435                                                'id'   => $user->id,
    448436                                                'text' => $user->email,
    449437                                        );
    … …  
    452440                }
    453441
    454                 wp_send_json(array('results' => $results));
     442                wp_send_json( array( 'results' => $results ) );
    455443
    456444                wp_die();
    … …  
    460448         * Get WP Users query by user role.
    461449         */
    462         public function get_wp_usersByRole()
    463         {
    464                 if (!current_user_can('manage_options')) {
    465                         return;
    466                 }
    467 
    468                 $search_string = filter_input(INPUT_GET, 'term');
    469                 $users = vczapi_getWpUsers_basedon_UserRoles([
     450        public function get_wp_usersByRole() {
     451                if ( ! current_user_can( 'manage_options' ) ) {
     452                        return;
     453                }
     454
     455                $search_string = filter_input( INPUT_GET, 'term' );
     456                $users         = vczapi_getWpUsers_basedon_UserRoles( [
    470457                        'search' => $search_string,
    471                 ]);
    472                 $results = array();
    473                 if (!empty($users->get_results())) {
    474                         foreach ($users->get_results() as $user) {
     458                ] );
     459                $results       = array();
     460                if ( ! empty( $users->get_results() ) ) {
     461                        foreach ( $users->get_results() as $user ) {
    475462                                $results[] = array(
    476                                         'id' => $user->ID,
     463                                        'id'   => $user->ID,
    477464                                        'text' => $user->user_email,
    478465                                );
    … …  
    480467                }
    481468
    482                 wp_send_json(array('results' => $results));
     469                wp_send_json( array( 'results' => $results ) );
    483470
    484471                wp_die();
  • video-conferencing-with-zoom-api/tags/4.6.11/includes/template-functions.php

    r3158039 r3722621  
    9595
    9696        $data = array(
    97                 'ajaxurl'      => admin_url( 'admin-ajax.php' ),
    98                 'zvc_security' => wp_create_nonce( "_nonce_zvc_security" ),
    99                 'lang'         => array(
     97                'ajaxurl' => admin_url( 'admin-ajax.php' ),
     98                'nonce'   => wp_create_nonce( 'vczapi_meeting_state' ),
     99                'lang'    => array(
    100100                        'confirm_end' => __( "Are you sure you want to end this meeting ? Users won't be able to join this meeting shown from the shortcode.", "video-conferencing-with-zoom-api" )
    101101                )
    … …  
    556556        $localize = array(
    557557                'ajaxurl'                        => admin_url( 'admin-ajax.php' ),
    558                 'zvc_security'                   => wp_create_nonce( "_nonce_zvc_security" ),
    559558                'redirect_page'                  => apply_filters( 'vczapi_api_redirect_join_browser', esc_url( $post_link ) ),
    560559                'meeting_id'                     => $meeting_id,
    … …  
    565564                'user_name'                      => $full_name,
    566565                'enable_direct_join_via_browser' => ! empty( $_GET['direct_join'] ) ? (bool) $_GET['direct_join'] : $enable_direct_via_browser,
     566                'nonce'                          => wp_create_nonce( 'vczapi_jvb' ),
    567567        );
    568568
    … …  
    583583                'screenShare'       => true
    584584        ) );
    585         $localize        = array_merge( $localize, $additional_data );
     585        $localize        = array_merge( $localize, $additional_data );
    586586        ?>
    587587    <script id='video-conferencing-with-zoom-api-browser-js-extra'>
    588         var zvc_ajx = <?php echo wp_json_encode( $localize ); ?>;
     588      var zvc_ajx = <?php echo wp_json_encode( $localize ); ?>;
    589589    </script>
    590590
  • video-conferencing-with-zoom-api/tags/4.6.11/vendor/composer/installed.php

    r3673430 r3722621  
    22    'root' => array(
    33        'name' => 'techies23/video-conferencing-with-zoom-api',
    4         'pretty_version' => '4.6.10',
    5         'version' => '4.6.10.0',
    6         'reference' => '6092c923fda01a2cf628c1b7d34cc8b3ce0253a3',
     4        'pretty_version' => '4.6.11',
     5        'version' => '4.6.11.0',
     6        'reference' => 'fc528d5628ef026d4d964fa25e1671a2f8b9f80f',
    77        'type' => 'project',
    88        'install_path' => __DIR__ . '/../../',
    … …  
    2121        ),
    2222        'techies23/video-conferencing-with-zoom-api' => array(
    23             'pretty_version' => '4.6.10',
    24             'version' => '4.6.10.0',
    25             'reference' => '6092c923fda01a2cf628c1b7d34cc8b3ce0253a3',
     23            'pretty_version' => '4.6.11',
     24            'version' => '4.6.11.0',
     25            'reference' => 'fc528d5628ef026d4d964fa25e1671a2f8b9f80f',
    2626            'type' => 'project',
    2727            'install_path' => __DIR__ . '/../../',
  • video-conferencing-with-zoom-api/tags/4.6.11/video-conferencing-with-zoom-api.php

    r3673430 r3722621  
    88 * Plugin URI:        https://wordpress.org/plugins/video-conferencing-with-zoom-api/
    99 * Description:       Video Conferencing with Zoom Meetings and Webinars plugin provides you with great functionality of managing Zoom meetings, Webinar scheduling options, and users directly from your WordPress dashboard.
    10  * Version:           4.6.10
     10 * Version:           4.6.11
    1111 * Author:            Deepen Bajracharya
    1212 * Author URI:        https://www.imdpen.com
    … …  
    1414 * License URI:       https://www.gnu.org/licenses/gpl-2.0.txt
    1515 * Text Domain:       video-conferencing-with-zoom-api
    16  * Requires PHP:      7.4
     16 * Requires PHP:      8.1
    1717 * Domain Path:       /languages
    18  * Requires at least: 5.5.0
     18 * Requires at least: 6.0.0
    1919 */
    2020
    … …  
    2626defined('ZVC_PLUGIN_FILE') || define('ZVC_PLUGIN_FILE', __FILE__);
    2727defined('ZVC_PLUGIN_SLUG') || define('ZVC_PLUGIN_SLUG', 'video-conferencing-zoom');
    28 defined('ZVC_PLUGIN_VERSION') || define('ZVC_PLUGIN_VERSION', '4.6.10');
     28defined('ZVC_PLUGIN_VERSION') || define('ZVC_PLUGIN_VERSION', '4.6.11');
    2929defined('ZVC_ZOOM_WEBSDK_VERSION') || define('ZVC_ZOOM_WEBSDK_VERSION', '4.0.0');
    3030defined('ZVC_PLUGIN_DIR_PATH') || define('ZVC_PLUGIN_DIR_PATH', plugin_dir_path(__FILE__));
  • video-conferencing-with-zoom-api/trunk/README.txt

    r3673430 r3722621  
    33Tags: zoom video conference, video conference, web conferencing, online meetings, webinars
    44Donate link: https://www.paypal.com/donate?hosted_button_id=2UCQKR868M9WE
    5 Requires at least: 5.0
     5Requires at least: 6.0
    66Tested up to: 7.1.0
    7 Stable tag: 4.6.10
     7Stable tag: 4.6.11
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    … …  
    161161
    162162== Changelog ==
     163= 4.6.11 =
     164* Security Fix: Added authorization capability checks to AJAX handlers.
     165* Security Fix: Removed administrative nonce exposure from public templates.
     166* Counter: Fixed counter-timezone miscalculation for Mountain Time Zone.
    163167= 4.6.10 =
    164168* Security: Shortcode - Fixed a potential XSS vulnerability.
  • video-conferencing-with-zoom-api/trunk/assets/admin/js/script.js

    r3054964 r3722621  
    411411        type: $(e.currentTarget).data('type'),
    412412        post_id: post_id ? post_id : false,
    413         action: 'state_change',
     413        action: 'vczapi_meeting_state_change',
    414414        accss: zvc_ajax.zvc_security
    415415      };
  • video-conferencing-with-zoom-api/trunk/assets/admin/js/script.min.js

    r3054964 r3722621  
    1 !function(){"use strict";!function(e){var t={},i={onReady:function(){this.setupDOM(),this.eventListeners(),this.initializeDependencies()},setupDOM:function(){t.changeSelectType=e(".zvc-hacking-select"),t.dateTimePicker=e("#datetimepicker"),t.goToAccordionEl=e(".vczapi-go-to-open-accordion"),t.reportsDatePicker=e("#reports_date"),t.zoomAccountDatepicker=e(".zoom_account_datepicker"),t.meetingListDTable=e("#zvc_users_list_table, #zvc_meetings_list_table"),t.meetingListTableCheck=e("#zvc_meetings_list_table"),t.usersListTable=e("#vczapi-get-host-users-wp"),t.meetingListTbl=t.meetingListTableCheck.find("input[type=checkbox]"),t.cover=e("#zvc-cover"),t.changeMeetingState=e(".vczapi-meeting-state-change"),t.endMeetingEl=e(".vczapi-meeting-state-end_meeting"),t.show_on_meeting_delete_error=e(".show_on_meeting_delete_error"),t.toggleTriggerElement=e(".vczapi-toggle-trigger"),this.$manualHostID=e(".vczapi-admin-hostID-manually-add"),t.accordionElement=e(".vczapi-admin-accordion"),t.connectBox=e(".vczapi-connect-box")},eventListeners:function(){t.toggleTriggerElement.on("click",this.togglePasswordText.bind(this)),t.accordionElement.on("click",".vczapi-admin-accordion--header",this.toggleAccordion.bind(this)),t.goToAccordionEl.on("click",this.expandAccordion.bind(this)),t.meetingListTableCheck.find("#checkall").on("click",this.meetingListTableCheck),e("#bulk_delete_meeting_listings").on("click",this.bulkDeleteMeetings),e(".zvc-meetings-form").find('input[name="password"]').on("keypress",this.meetingPassword),e(".delete-meeting").on("click",this.deleteMetting),e(".zvc-dismiss-message").on("click",this.dismissNotice.bind(this)),e(".check-api-connection").on("click",this.checkConnection.bind(this)),e(t.changeMeetingState).on("click",this.meetingStateChange.bind(this)),this.$manualHostID.on("click",this.showManualHostIDField.bind(this)),t.endMeetingEl.on("click",this.endMeeting.bind(this))},endMeeting:function(t){t.preventDefault();let i=t.target.getAttribute("data-id"),a={action:"vczapi_end_meeting",access:zvc_ajax.zvc_security,meeting_id:i};confirm("Are you sure you want to end this meeting")&&e.post(zvc_ajax.ajaxurl,a).done((function(e){location.reload()}))},expandAccordion:function(t){t.preventDefault();let i=e(t.currentTarget),a=e(i.attr("href"));void 0!==a&&a.length>0&&(a.addClass("expanded"),e("html,body").animate({scrollTop:a.offset().top},1e3),a.focus())},toggleAccordion:function(t){t.preventDefault(),e(t.currentTarget).parent().toggleClass("expanded")},togglePasswordText:function(t){t.preventDefault();let i=e(t.currentTarget),a=e(i.data("element"));0===i.data("visible")?(a.attr("type","text"),i.data("visible",1),i.text("Hide")):(a.attr("type","password"),i.data("visible",0),i.text("Show"))},showManualHostIDField:function(t){t.preventDefault(),e(".vczapi-admin-post-type-host-selector").select2("destroy").remove(),e(".vczapi-manually-hostid-wrap").before('<input type="text" placeholder="'+zvc_ajax.lang.host_id_search+'" class="regular-text vczapi-search-host-id" name="userId" required>').remove()},datePickers:function(){if(t.dateTimePicker.length>0){var i=new Date,a=i.getMonth()+1,s=i.getDate(),n=i.getHours()+":"+i.getMinutes()+":"+i.getSeconds(),c=i.getFullYear()+"-"+(a<10?"0":"")+a+"-"+(s<10?"0":"")+s+" "+n,r=t.dateTimePicker.data("existingdate");r&&(c=r),t.dateTimePicker.datetimepicker({value:c,step:15,minDate:0,format:"Y-m-d H:i"})}t.reportsDatePicker.length>0&&t.reportsDatePicker.datepicker({changeMonth:!0,changeYear:!1,showButtonPanel:!0,dateFormat:"MM yy"}).focus((function(){var t=e(this);e(".ui-datepicker-calendar").detach(),e(".ui-datepicker-close").click((function(){var i=e("#ui-datepicker-div .ui-datepicker-month :selected").val(),a=e("#ui-datepicker-div .ui-datepicker-year").html();t.datepicker("setDate",new Date(a,i,1))}))})),e("#vczapi-check-recording-date").length>0&&e("#vczapi-check-recording-date").datepicker({changeMonth:!0,changeYear:!0,showButtonPanel:!0,dateFormat:"MM yy",beforeShow:function(t,i){setTimeout((function(){i.dpDiv.css({top:e("#vczapi-check-recording-date").offset().top+35,left:e("#vczapi-check-recording-date").offset().left})}),0)}}).focus((function(){var t=e(this);e(".ui-datepicker-calendar").detach(),e(".ui-datepicker-close").click((function(){var i=e("#ui-datepicker-div .ui-datepicker-month :selected").val(),a=e("#ui-datepicker-div .ui-datepicker-year :selected").val();t.datepicker("setDate",new Date(a,i,1))}))})),t.zoomAccountDatepicker.length>0&&t.zoomAccountDatepicker.datepicker({dateFormat:"yy-mm-dd"})},initializeDependencies:function(){t.changeSelectType.length>0&&t.changeSelectType.select2(),this.datePickers(),t.meetingListDTable.length>0&&t.meetingListDTable.dataTable({pageLength:25,columnDefs:[{targets:0,orderable:!1}]}),t.usersListTable.length>0&&t.usersListTable.dataTable({processing:!0,serverSide:!0,pageLength:25,ajax:{url:ajaxurl+"?action=get_assign_host_id&security="+zvc_ajax.zvc_security},columns:[{data:"id"},{data:"email"},{data:"name"},{data:"host_id"}],drawCallback:function(t){e(".vczapi-get-zoom-hosts").select2({ajax:{url:ajaxurl+"?action=vczapi_get_zoom_host_query",type:"GET",dataType:"json",delay:200,cache:!0},allowClear:!0,placeholder:"Filter a zoom user by email ID or host ID...",width:"100%"}).on("select2:select",(function(t){e(".vczapi-host-email-field-"+e(this).data("userid")).length>0?e(".vczapi-host-email-field-"+e(this).data("userid")).val(t.params.data.text):e('<input type="hidden" class="vczapi-host-email-field-'+e(this).data("userid")+'" name="zoom_host_email['+e(this).data("userid")+']" value="'+t.params.data.text+'" />').insertAfter(this)}))}}),e("#vczapi-select-wp-user-for-host").length>0&&e("#vczapi-select-wp-user-for-host").select2({ajax:{url:ajaxurl+"?action=vczapi_get_wp_users",type:"GET",dataType:"json"},placeholder:"Select a WordPress User",width:"300px"})},meetingListTableCheck:function(){e(this).is(":checked")?t.meetingListTbl.each((function(){e(this).prop("checked",!0)})):t.meetingListTbl.each((function(){e(this).prop("checked",!1)}))},bulkDeleteMeetings:function(){if(1!=confirm("Confirm bulk delete these Meeting?"))return!1;var i=[];t.meetingListTableCheck.find("input.checkthis").each((function(){e(this).is(":checked")&&i.push(e(this).val())}));var a=e(this).data("type");if(i){var s={meetings_id:i,type:a,action:"zvc_bulk_meetings_delete",security:zvc_ajax.zvc_security};t.cover.show(),e.post(zvc_ajax.ajaxurl,s).done((function(e){t.cover.fadeOut("slow"),1==e.error?t.show_on_meeting_delete_error.show().html("<p>"+e.msg+"</p>"):(t.show_on_meeting_delete_error.show().html("<p>"+e.msg+"</p>"),location.reload())}))}},meetingPassword:function(t){if(!/([a-zA-Z0-9])+/.test(String.fromCharCode(t.which)))return!1;var i=e(this).val(),a=e(this).data("maxlength");a>0&&e(this).val(i.substr(0,a))},deleteMetting:function(){var i=e(this).data("meetingid"),a=e(this).data("type");if(1!=confirm("Confirm Delete this Meeting?"))return!1;var s={meeting_id:i,type:a,action:"zvc_delete_meeting",security:zvc_ajax.zvc_security};t.cover.show(),e.post(zvc_ajax.ajaxurl,s).done((function(e){t.cover.fadeOut("slow"),1==e.error?t.show_on_meeting_delete_error.show().html("<p>"+e.msg+"</p>"):(t.show_on_meeting_delete_error.show().html("<p>"+e.msg+"</p>"),location.reload())}))},dismissNotice:function(t){t.preventDefault(),e(t.currentTarget).closest(".notice-success").hide(),e.post(zvc_ajax.ajaxurl,{action:"zoom_dimiss_notice"}).done((function(e){console.log(e)}))},checkConnection:function(i){i.preventDefault(),t.connectBox.html("<pre>Making demo request to Zoom Servers... Please wait.</pre>"),e.post(zvc_ajax.ajaxurl,{action:"check_connection",security:zvc_ajax.zvc_security,type:"oAuth"}).done((function(e){e.success?t.connectBox.append(`<pre style="color:green;">${e.data.msg}</pre>`):t.connectBox.append(`<pre style="color:red;">${e.data.msg}</pre>`)}))},meetingStateChange:function(t){t.preventDefault();var i=e(t.currentTarget).data("state"),a=e(t.currentTarget).data("postid"),s={id:e(t.currentTarget).data("id"),state:i,type:e(t.currentTarget).data("type"),post_id:a||!1,action:"state_change",accss:zvc_ajax.zvc_security};if("resume"===i)this.changeState(s);else if("end"===i){if(!confirm(zvc_ajax.lang.confirm_end))return;this.changeState(s)}},changeState:function(t){e.post(zvc_ajax.ajaxurl,t).done((function(e){location.reload()}))}},a={init:function(){this.cacheDOM(),this.evntHandlers()},cacheDOM:function(){this.notificationWrapper=e(".vczapi-status-notification"),this.syncUserId=e(".vczapi-sync-user-id")},evntHandlers:function(){this.syncUserId.on("change",this.fetchMeetingsByUser.bind(this))},fetchMeetingsByUser:function(t){t.preventDefault();var i=this,a=e(this.syncUserId).val(),s={user_id:a,action:"vczapi_sync_user",type:"check"},n=e(".results");n.html("<p>"+vczapi_sync_i10n.before_sync+"</p>"),e.post(ajaxurl,s).done((function(t){if(t.success){var s='<div class="vczapi-sync-details">';s+="<p><strong>"+vczapi_sync_i10n.total_records_found+":</strong> "+t.data.total_records+"</p>",s+="<p><strong>"+vczapi_sync_i10n.total_not_synced_records+":</strong> "+_.size(t.data.meetings)+" (Only listing Scheduled Meetings)</p>",s+='<select class="vczapi-choose-meetings-to-sync-select2" name="sync-meeting-ids[]" multiple="multiple">',e(t.data.meetings).each((function(e,t){s+='<option value="'+t.id+'">'+t.topic+"</option>"})),s+="</select>",setTimeout((function(){e(".vczapi-choose-meetings-to-sync-select2").select2({maximumSelectionLength:10,placeholder:vczapi_sync_i10n.select2_placeholder})}),100),s+='<p><a href="javascript:void(0);" class="vczapi-sync-meeting button button-primary" data-userid="'+a+'">'+vczapi_sync_i10n.sync_btn+"</a></p>",s+="</div>",n.html(s),e(".vczapi-sync-meeting").on("click",i.syncMeeting.bind(i))}else n.html("<p>"+t.data+"</p>")}))},syncMeeting:function(t){t.preventDefault(),e(t.currentTarget).attr("disabled","disabled");var i=e(".vczapi-choose-meetings-to-sync-select2").val();_.size(i)>0?(this.notificationWrapper.show().html("<p>"+vczapi_sync_i10n.sync_start+"</p>").removeClass("vczapi-error"),this.doSync(0,i)):(this.notificationWrapper.show().html("<p>"+vczapi_sync_i10n.sync_error+"</p>").addClass("vczapi-error"),e(t.currentTarget).removeAttr("disabled"))},doSync:function(t,i){var s=this,n={action:"vczapi_sync_user",type:"sync",meeting_id:i[t]};e.post(ajaxurl,n).done((function(n){t++,s.notificationWrapper.show().append("<p> "+n.data.msg+"</p>"),t<_.size(i)?a.doSync(t,i):n.success?(s.notificationWrapper.show().append("<p>"+vczapi_sync_i10n.sync_completed+"</p>"),e(".vczapi-sync-meeting").removeAttr("disabled")):(s.notificationWrapper.show().append("<p>"+n.data.msg+"</p>"),e(".vczapi-sync-meeting").removeAttr("disabled"))}))}};const s={init:function(){this.cacheDOM(),this.evntHandlers()},cacheDOM:function(){this.meetingSelector=e("#vczapi-admin-meeting-ype"),this.hideOnWebinarSelector=e(".vczapi-admin-hide-on-webinar"),this.showOnWebinarSelector=e(".vczapi-admin-show-on-webinar")},evntHandlers:function(){this.meetingSelector.on("change",this.webinarElementsShow.bind(this))},webinarElementsShow:function(t){"2"===e(t.currentTarget).val()?(this.hideOnWebinarSelector.hide(),this.showOnWebinarSelector.show()):(this.hideOnWebinarSelector.show(),this.showOnWebinarSelector.hide())}},n={init:function(){this.cacheDOM(),void 0!==this.$wizardWrapper&&this.$wizardWrapper.length>0&&this.eventListeners()},cacheDOM:function(){this.$wizardOverlay=e(".vczapi-migrate-to-s2sOauth--overlay"),this.$wizardWrapper=e(".vczapi-migrate-to-s2sOauth"),this.$s2sOauthForm=e("#vczapi-s2sOauthCredentials-wizard-form"),this.$appSDKForm=e("#vczapi-s2soauth-app-sdk-form"),this.$messageWrapper=this.$wizardWrapper.find(".vczapi-migrate-to-s2sOauth--message")},eventListeners:function(){this.maybeTriggerMigrationWizard(),this.$wizardWrapper.find(".next-step").on("click",this.navigateToStep.bind(this)),this.$s2sOauthForm.on("submit",this.s2sOauthFormHandler.bind(this)),this.$appSDKForm.on("submit",this.appSDKFormHandler.bind(this)),e("body").on("click",this.maybeCloseWizard.bind(this))},maybeCloseWizard:function(t){const i=t.target;e(i)[0]===this.$wizardOverlay[0]&&this.$wizardOverlay.removeClass("expanded")},showMessage:function(e,t="text"){const i="show-message "+("success"===e?"success-message":"error-message");this.$wizardWrapper.find(".vczapi-migrate-to-s2sOauth--message").removeClass(["error-message","success-message"]),this.$wizardWrapper.find(".vczapi-migrate-to-s2sOauth--message").addClass(i).text(t)},s2sOauthFormHandler:function(t){t.preventDefault();const i=e(t.target).serialize();e.ajax({type:"POST",url:ajaxurl+"?action=vczapi_save_oauth_credentials",context:this,data:i,beforeSend:function(){this.$s2sOauthForm.find("input").prop("disabled",!0),this.$s2sOauthForm.addClass("submitting")},success:function(e){this.$s2sOauthForm.find("input").prop("disabled",!1),this.$s2sOauthForm.removeClass("submitting"),e.hasOwnProperty("success")&&e.success?(this.showMessage("success",e?.data.message),this.$wizardWrapper.find(".next-step").attr("disabled",!1)):this.showMessage("error",e?.data.message)},error:function(e,t,i){console.log("Error thrown",i)}})},appSDKFormHandler:function(t){t.preventDefault();const i=e(t.target).serialize();e.ajax({type:"POST",url:ajaxurl+"?action=vczapi_save_app_sdk_credentials",context:this,data:i,beforeSend:function(){this.$appSDKForm.find("input").prop("disabled",!0),this.$appSDKForm.addClass("submitting")},success:function(e){this.$appSDKForm.find("input").prop("disabled",!1),this.$appSDKForm.removeClass("submitting"),e.hasOwnProperty("success")&&e.success?(this.showMessage("success",e?.data.message),this.$wizardWrapper.find(".next-step").attr("disabled",!1)):this.showMessage("error",e?.data.message)},error:function(e,t,i){console.log("Error thrown",i)}})},maybeTriggerMigrationWizard:function(){let e=this.getSearchParameters();e.hasOwnProperty("page")&&"zoom-video-conferencing-settings"===e.page&&e.hasOwnProperty("migrate")&&"now"===e.migrate&&this.$wizardOverlay.addClass("expanded")},getSearchParameters:function(){let e=window.location.search.substring(1);return null!=e&&""!==e?this.transformToAssocArray(e):{}},transformToAssocArray:function(e){for(var t={},i=e.split("&"),a=0;a<i.length;a++){var s=i[a].split("=");t[s[0]]=s[1]}return t},navigateToStep:function(t){t.preventDefault();let i=e(t.currentTarget),a=i.data("step"),s=i.data("final_step");if(void 0===a)console.log("Error no steps defined");else{let e=this,t=e.$wizardWrapper.find(".step-"+a);if(t.length>0){let n=parseInt(a)+1;this.$wizardWrapper.find(".step.active").removeClass("active").fadeOut("slow",(function(){t.addClass("active").fadeIn("slow"),i.data("step",n),i.attr("disabled",!0),n>parseInt(s)&&i.hide(),e.$messageWrapper.removeClass("show-message")}))}else i.hide()}}},c={init:function(){e(".vczapi-dismiss-admin-notice").on("click",this.dismissNotice.bind(this))},dismissNotice:function(t){t.preventDefault();let i=e(t.target),a=i.data("id"),s=i.data("security");e.ajax({type:"POST",url:ajaxurl,data:{action:"vczapi_dismiss_admin_notice",option:a,security:s},beforeSend:function(){i.parents(".vczapi-notice").length>0&&i.parents(".vczapi-notice").fadeOut()},success:function(e){e.hasOwnProperty("success")&&e.success&&console.log(e)}})}};e((function(){n.init(),c.init(),i.onReady(),a.init(),s.init()}))}(jQuery)}();
     1!function(){"use strict";!function(e){var t={},i={onReady:function(){this.setupDOM(),this.eventListeners(),this.initializeDependencies()},setupDOM:function(){t.changeSelectType=e(".zvc-hacking-select"),t.dateTimePicker=e("#datetimepicker"),t.goToAccordionEl=e(".vczapi-go-to-open-accordion"),t.reportsDatePicker=e("#reports_date"),t.zoomAccountDatepicker=e(".zoom_account_datepicker"),t.meetingListDTable=e("#zvc_users_list_table, #zvc_meetings_list_table"),t.meetingListTableCheck=e("#zvc_meetings_list_table"),t.usersListTable=e("#vczapi-get-host-users-wp"),t.meetingListTbl=t.meetingListTableCheck.find("input[type=checkbox]"),t.cover=e("#zvc-cover"),t.changeMeetingState=e(".vczapi-meeting-state-change"),t.endMeetingEl=e(".vczapi-meeting-state-end_meeting"),t.show_on_meeting_delete_error=e(".show_on_meeting_delete_error"),t.toggleTriggerElement=e(".vczapi-toggle-trigger"),this.$manualHostID=e(".vczapi-admin-hostID-manually-add"),t.accordionElement=e(".vczapi-admin-accordion"),t.connectBox=e(".vczapi-connect-box")},eventListeners:function(){t.toggleTriggerElement.on("click",this.togglePasswordText.bind(this)),t.accordionElement.on("click",".vczapi-admin-accordion--header",this.toggleAccordion.bind(this)),t.goToAccordionEl.on("click",this.expandAccordion.bind(this)),t.meetingListTableCheck.find("#checkall").on("click",this.meetingListTableCheck),e("#bulk_delete_meeting_listings").on("click",this.bulkDeleteMeetings),e(".zvc-meetings-form").find('input[name="password"]').on("keypress",this.meetingPassword),e(".delete-meeting").on("click",this.deleteMetting),e(".zvc-dismiss-message").on("click",this.dismissNotice.bind(this)),e(".check-api-connection").on("click",this.checkConnection.bind(this)),e(t.changeMeetingState).on("click",this.meetingStateChange.bind(this)),this.$manualHostID.on("click",this.showManualHostIDField.bind(this)),t.endMeetingEl.on("click",this.endMeeting.bind(this))},endMeeting:function(t){t.preventDefault();let i=t.target.getAttribute("data-id"),a={action:"vczapi_end_meeting",access:zvc_ajax.zvc_security,meeting_id:i};confirm("Are you sure you want to end this meeting")&&e.post(zvc_ajax.ajaxurl,a).done((function(e){location.reload()}))},expandAccordion:function(t){t.preventDefault();let i=e(t.currentTarget),a=e(i.attr("href"));void 0!==a&&a.length>0&&(a.addClass("expanded"),e("html,body").animate({scrollTop:a.offset().top},1e3),a.focus())},toggleAccordion:function(t){t.preventDefault(),e(t.currentTarget).parent().toggleClass("expanded")},togglePasswordText:function(t){t.preventDefault();let i=e(t.currentTarget),a=e(i.data("element"));0===i.data("visible")?(a.attr("type","text"),i.data("visible",1),i.text("Hide")):(a.attr("type","password"),i.data("visible",0),i.text("Show"))},showManualHostIDField:function(t){t.preventDefault(),e(".vczapi-admin-post-type-host-selector").select2("destroy").remove(),e(".vczapi-manually-hostid-wrap").before('<input type="text" placeholder="'+zvc_ajax.lang.host_id_search+'" class="regular-text vczapi-search-host-id" name="userId" required>').remove()},datePickers:function(){if(t.dateTimePicker.length>0){var i=new Date,a=i.getMonth()+1,s=i.getDate(),n=i.getHours()+":"+i.getMinutes()+":"+i.getSeconds(),c=i.getFullYear()+"-"+(a<10?"0":"")+a+"-"+(s<10?"0":"")+s+" "+n,r=t.dateTimePicker.data("existingdate");r&&(c=r),t.dateTimePicker.datetimepicker({value:c,step:15,minDate:0,format:"Y-m-d H:i"})}t.reportsDatePicker.length>0&&t.reportsDatePicker.datepicker({changeMonth:!0,changeYear:!1,showButtonPanel:!0,dateFormat:"MM yy"}).focus((function(){var t=e(this);e(".ui-datepicker-calendar").detach(),e(".ui-datepicker-close").click((function(){var i=e("#ui-datepicker-div .ui-datepicker-month :selected").val(),a=e("#ui-datepicker-div .ui-datepicker-year").html();t.datepicker("setDate",new Date(a,i,1))}))})),e("#vczapi-check-recording-date").length>0&&e("#vczapi-check-recording-date").datepicker({changeMonth:!0,changeYear:!0,showButtonPanel:!0,dateFormat:"MM yy",beforeShow:function(t,i){setTimeout((function(){i.dpDiv.css({top:e("#vczapi-check-recording-date").offset().top+35,left:e("#vczapi-check-recording-date").offset().left})}),0)}}).focus((function(){var t=e(this);e(".ui-datepicker-calendar").detach(),e(".ui-datepicker-close").click((function(){var i=e("#ui-datepicker-div .ui-datepicker-month :selected").val(),a=e("#ui-datepicker-div .ui-datepicker-year :selected").val();t.datepicker("setDate",new Date(a,i,1))}))})),t.zoomAccountDatepicker.length>0&&t.zoomAccountDatepicker.datepicker({dateFormat:"yy-mm-dd"})},initializeDependencies:function(){t.changeSelectType.length>0&&t.changeSelectType.select2(),this.datePickers(),t.meetingListDTable.length>0&&t.meetingListDTable.dataTable({pageLength:25,columnDefs:[{targets:0,orderable:!1}]}),t.usersListTable.length>0&&t.usersListTable.dataTable({processing:!0,serverSide:!0,pageLength:25,ajax:{url:ajaxurl+"?action=get_assign_host_id&security="+zvc_ajax.zvc_security},columns:[{data:"id"},{data:"email"},{data:"name"},{data:"host_id"}],drawCallback:function(t){e(".vczapi-get-zoom-hosts").select2({ajax:{url:ajaxurl+"?action=vczapi_get_zoom_host_query",type:"GET",dataType:"json",delay:200,cache:!0},allowClear:!0,placeholder:"Filter a zoom user by email ID or host ID...",width:"100%"}).on("select2:select",(function(t){e(".vczapi-host-email-field-"+e(this).data("userid")).length>0?e(".vczapi-host-email-field-"+e(this).data("userid")).val(t.params.data.text):e('<input type="hidden" class="vczapi-host-email-field-'+e(this).data("userid")+'" name="zoom_host_email['+e(this).data("userid")+']" value="'+t.params.data.text+'" />').insertAfter(this)}))}}),e("#vczapi-select-wp-user-for-host").length>0&&e("#vczapi-select-wp-user-for-host").select2({ajax:{url:ajaxurl+"?action=vczapi_get_wp_users",type:"GET",dataType:"json"},placeholder:"Select a WordPress User",width:"300px"})},meetingListTableCheck:function(){e(this).is(":checked")?t.meetingListTbl.each((function(){e(this).prop("checked",!0)})):t.meetingListTbl.each((function(){e(this).prop("checked",!1)}))},bulkDeleteMeetings:function(){if(1!=confirm("Confirm bulk delete these Meeting?"))return!1;var i=[];t.meetingListTableCheck.find("input.checkthis").each((function(){e(this).is(":checked")&&i.push(e(this).val())}));var a=e(this).data("type");if(i){var s={meetings_id:i,type:a,action:"zvc_bulk_meetings_delete",security:zvc_ajax.zvc_security};t.cover.show(),e.post(zvc_ajax.ajaxurl,s).done((function(e){t.cover.fadeOut("slow"),1==e.error?t.show_on_meeting_delete_error.show().html("<p>"+e.msg+"</p>"):(t.show_on_meeting_delete_error.show().html("<p>"+e.msg+"</p>"),location.reload())}))}},meetingPassword:function(t){if(!/([a-zA-Z0-9])+/.test(String.fromCharCode(t.which)))return!1;var i=e(this).val(),a=e(this).data("maxlength");a>0&&e(this).val(i.substr(0,a))},deleteMetting:function(){var i=e(this).data("meetingid"),a=e(this).data("type");if(1!=confirm("Confirm Delete this Meeting?"))return!1;var s={meeting_id:i,type:a,action:"zvc_delete_meeting",security:zvc_ajax.zvc_security};t.cover.show(),e.post(zvc_ajax.ajaxurl,s).done((function(e){t.cover.fadeOut("slow"),1==e.error?t.show_on_meeting_delete_error.show().html("<p>"+e.msg+"</p>"):(t.show_on_meeting_delete_error.show().html("<p>"+e.msg+"</p>"),location.reload())}))},dismissNotice:function(t){t.preventDefault(),e(t.currentTarget).closest(".notice-success").hide(),e.post(zvc_ajax.ajaxurl,{action:"zoom_dimiss_notice"}).done((function(e){console.log(e)}))},checkConnection:function(i){i.preventDefault(),t.connectBox.html("<pre>Making demo request to Zoom Servers... Please wait.</pre>"),e.post(zvc_ajax.ajaxurl,{action:"check_connection",security:zvc_ajax.zvc_security,type:"oAuth"}).done((function(e){e.success?t.connectBox.append(`<pre style="color:green;">${e.data.msg}</pre>`):t.connectBox.append(`<pre style="color:red;">${e.data.msg}</pre>`)}))},meetingStateChange:function(t){t.preventDefault();var i=e(t.currentTarget).data("state"),a=e(t.currentTarget).data("postid"),s={id:e(t.currentTarget).data("id"),state:i,type:e(t.currentTarget).data("type"),post_id:a||!1,action:"vczapi_meeting_state_change",accss:zvc_ajax.zvc_security};if("resume"===i)this.changeState(s);else if("end"===i){if(!confirm(zvc_ajax.lang.confirm_end))return;this.changeState(s)}},changeState:function(t){e.post(zvc_ajax.ajaxurl,t).done((function(e){location.reload()}))}},a={init:function(){this.cacheDOM(),this.evntHandlers()},cacheDOM:function(){this.notificationWrapper=e(".vczapi-status-notification"),this.syncUserId=e(".vczapi-sync-user-id")},evntHandlers:function(){this.syncUserId.on("change",this.fetchMeetingsByUser.bind(this))},fetchMeetingsByUser:function(t){t.preventDefault();var i=this,a=e(this.syncUserId).val(),s={user_id:a,action:"vczapi_sync_user",type:"check"},n=e(".results");n.html("<p>"+vczapi_sync_i10n.before_sync+"</p>"),e.post(ajaxurl,s).done((function(t){if(t.success){var s='<div class="vczapi-sync-details">';s+="<p><strong>"+vczapi_sync_i10n.total_records_found+":</strong> "+t.data.total_records+"</p>",s+="<p><strong>"+vczapi_sync_i10n.total_not_synced_records+":</strong> "+_.size(t.data.meetings)+" (Only listing Scheduled Meetings)</p>",s+='<select class="vczapi-choose-meetings-to-sync-select2" name="sync-meeting-ids[]" multiple="multiple">',e(t.data.meetings).each((function(e,t){s+='<option value="'+t.id+'">'+t.topic+"</option>"})),s+="</select>",setTimeout((function(){e(".vczapi-choose-meetings-to-sync-select2").select2({maximumSelectionLength:10,placeholder:vczapi_sync_i10n.select2_placeholder})}),100),s+='<p><a href="javascript:void(0);" class="vczapi-sync-meeting button button-primary" data-userid="'+a+'">'+vczapi_sync_i10n.sync_btn+"</a></p>",s+="</div>",n.html(s),e(".vczapi-sync-meeting").on("click",i.syncMeeting.bind(i))}else n.html("<p>"+t.data+"</p>")}))},syncMeeting:function(t){t.preventDefault(),e(t.currentTarget).attr("disabled","disabled");var i=e(".vczapi-choose-meetings-to-sync-select2").val();_.size(i)>0?(this.notificationWrapper.show().html("<p>"+vczapi_sync_i10n.sync_start+"</p>").removeClass("vczapi-error"),this.doSync(0,i)):(this.notificationWrapper.show().html("<p>"+vczapi_sync_i10n.sync_error+"</p>").addClass("vczapi-error"),e(t.currentTarget).removeAttr("disabled"))},doSync:function(t,i){var s=this,n={action:"vczapi_sync_user",type:"sync",meeting_id:i[t]};e.post(ajaxurl,n).done((function(n){t++,s.notificationWrapper.show().append("<p> "+n.data.msg+"</p>"),t<_.size(i)?a.doSync(t,i):n.success?(s.notificationWrapper.show().append("<p>"+vczapi_sync_i10n.sync_completed+"</p>"),e(".vczapi-sync-meeting").removeAttr("disabled")):(s.notificationWrapper.show().append("<p>"+n.data.msg+"</p>"),e(".vczapi-sync-meeting").removeAttr("disabled"))}))}};const s={init:function(){this.cacheDOM(),this.evntHandlers()},cacheDOM:function(){this.meetingSelector=e("#vczapi-admin-meeting-ype"),this.hideOnWebinarSelector=e(".vczapi-admin-hide-on-webinar"),this.showOnWebinarSelector=e(".vczapi-admin-show-on-webinar")},evntHandlers:function(){this.meetingSelector.on("change",this.webinarElementsShow.bind(this))},webinarElementsShow:function(t){"2"===e(t.currentTarget).val()?(this.hideOnWebinarSelector.hide(),this.showOnWebinarSelector.show()):(this.hideOnWebinarSelector.show(),this.showOnWebinarSelector.hide())}},n={init:function(){this.cacheDOM(),void 0!==this.$wizardWrapper&&this.$wizardWrapper.length>0&&this.eventListeners()},cacheDOM:function(){this.$wizardOverlay=e(".vczapi-migrate-to-s2sOauth--overlay"),this.$wizardWrapper=e(".vczapi-migrate-to-s2sOauth"),this.$s2sOauthForm=e("#vczapi-s2sOauthCredentials-wizard-form"),this.$appSDKForm=e("#vczapi-s2soauth-app-sdk-form"),this.$messageWrapper=this.$wizardWrapper.find(".vczapi-migrate-to-s2sOauth--message")},eventListeners:function(){this.maybeTriggerMigrationWizard(),this.$wizardWrapper.find(".next-step").on("click",this.navigateToStep.bind(this)),this.$s2sOauthForm.on("submit",this.s2sOauthFormHandler.bind(this)),this.$appSDKForm.on("submit",this.appSDKFormHandler.bind(this)),e("body").on("click",this.maybeCloseWizard.bind(this))},maybeCloseWizard:function(t){const i=t.target;e(i)[0]===this.$wizardOverlay[0]&&this.$wizardOverlay.removeClass("expanded")},showMessage:function(e,t="text"){const i="show-message "+("success"===e?"success-message":"error-message");this.$wizardWrapper.find(".vczapi-migrate-to-s2sOauth--message").removeClass(["error-message","success-message"]),this.$wizardWrapper.find(".vczapi-migrate-to-s2sOauth--message").addClass(i).text(t)},s2sOauthFormHandler:function(t){t.preventDefault();const i=e(t.target).serialize();e.ajax({type:"POST",url:ajaxurl+"?action=vczapi_save_oauth_credentials",context:this,data:i,beforeSend:function(){this.$s2sOauthForm.find("input").prop("disabled",!0),this.$s2sOauthForm.addClass("submitting")},success:function(e){this.$s2sOauthForm.find("input").prop("disabled",!1),this.$s2sOauthForm.removeClass("submitting"),e.hasOwnProperty("success")&&e.success?(this.showMessage("success",e?.data.message),this.$wizardWrapper.find(".next-step").attr("disabled",!1)):this.showMessage("error",e?.data.message)},error:function(e,t,i){console.log("Error thrown",i)}})},appSDKFormHandler:function(t){t.preventDefault();const i=e(t.target).serialize();e.ajax({type:"POST",url:ajaxurl+"?action=vczapi_save_app_sdk_credentials",context:this,data:i,beforeSend:function(){this.$appSDKForm.find("input").prop("disabled",!0),this.$appSDKForm.addClass("submitting")},success:function(e){this.$appSDKForm.find("input").prop("disabled",!1),this.$appSDKForm.removeClass("submitting"),e.hasOwnProperty("success")&&e.success?(this.showMessage("success",e?.data.message),this.$wizardWrapper.find(".next-step").attr("disabled",!1)):this.showMessage("error",e?.data.message)},error:function(e,t,i){console.log("Error thrown",i)}})},maybeTriggerMigrationWizard:function(){let e=this.getSearchParameters();e.hasOwnProperty("page")&&"zoom-video-conferencing-settings"===e.page&&e.hasOwnProperty("migrate")&&"now"===e.migrate&&this.$wizardOverlay.addClass("expanded")},getSearchParameters:function(){let e=window.location.search.substring(1);return null!=e&&""!==e?this.transformToAssocArray(e):{}},transformToAssocArray:function(e){for(var t={},i=e.split("&"),a=0;a<i.length;a++){var s=i[a].split("=");t[s[0]]=s[1]}return t},navigateToStep:function(t){t.preventDefault();let i=e(t.currentTarget),a=i.data("step"),s=i.data("final_step");if(void 0===a)console.log("Error no steps defined");else{let e=this,t=e.$wizardWrapper.find(".step-"+a);if(t.length>0){let n=parseInt(a)+1;this.$wizardWrapper.find(".step.active").removeClass("active").fadeOut("slow",(function(){t.addClass("active").fadeIn("slow"),i.data("step",n),i.attr("disabled",!0),n>parseInt(s)&&i.hide(),e.$messageWrapper.removeClass("show-message")}))}else i.hide()}}},c={init:function(){e(".vczapi-dismiss-admin-notice").on("click",this.dismissNotice.bind(this))},dismissNotice:function(t){t.preventDefault();let i=e(t.target),a=i.data("id"),s=i.data("security");e.ajax({type:"POST",url:ajaxurl,data:{action:"vczapi_dismiss_admin_notice",option:a,security:s},beforeSend:function(){i.parents(".vczapi-notice").length>0&&i.parents(".vczapi-notice").fadeOut()},success:function(e){e.hasOwnProperty("success")&&e.success&&console.log(e)}})}};e((function(){n.init(),c.init(),i.onReady(),a.init(),s.init()}))}(jQuery)}();
  • video-conferencing-with-zoom-api/trunk/assets/public/js/join-via-browser.js

    r2868664 r3722621  
    1212    countDown: function () {
    1313      var clock = this.$timer;
    14       if (clock.length > 0) {
    15         var valueDate = clock.data('date');
    16         var mtgTimezone = clock.data('tz');
     14      if (!clock.length) {
     15        return;
     16      }
     17      var valueDate = clock.data('date');
     18      var mtgTimezone = clock.data('tz');
     19      var userTimezone = moment.tz.guess();
     20      if (userTimezone === 'Asia/Katmandu') {
     21        userTimezone = 'Asia/Kathmandu';
     22      }
    1723
    18         // var dateFormat = moment(valueDate).format('MMM D, YYYY HH:mm:ss');
     24      // Meeting time in the meeting timezone
     25      var meetingTime = moment.tz(valueDate, mtgTimezone);
    1926
    20         var user_timezone = moment.tz.guess();
    21         if (user_timezone === 'Asia/Katmandu') {
    22           user_timezone = 'Asia/Kathmandu';
     27      // Meeting time converted to the user's timezone
     28      var userMeetingTime = meetingTime.clone().tz(userTimezone);
     29
     30      // Check time difference
     31      var diffTime = userMeetingTime.diff(moment());
     32      var lang = document.documentElement.lang;
     33      $('.sidebar-start-time').html(userMeetingTime.clone().locale(lang).format('LLLL'));
     34      var second = 1000;
     35      var minute = second * 60;
     36      var hour = minute * 60;
     37      var day = hour * 24;
     38
     39      // Meeting has already started
     40      if (diffTime <= 0) {
     41        $(clock).remove();
     42        return;
     43      }
     44      var countDown = userMeetingTime.valueOf();
     45      var x = setInterval(function () {
     46        var distance = countDown - Date.now();
     47        var days = Math.floor(distance / day);
     48        var hours = Math.floor(distance % day / hour);
     49        var minutes = Math.floor(distance % hour / minute);
     50        var seconds = Math.floor(distance % minute / second);
     51        var daysEl = document.getElementById('dpn-zvc-timer-days');
     52        var hoursEl = document.getElementById('dpn-zvc-timer-hours');
     53        var minutesEl = document.getElementById('dpn-zvc-timer-minutes');
     54        var secondsEl = document.getElementById('dpn-zvc-timer-seconds');
     55        if (daysEl) {
     56          daysEl.innerText = Math.max(0, days);
    2357        }
    24 
    25         //Converting Timezones to locals
    26         var source_timezone = moment.tz(valueDate, mtgTimezone).format();
    27         var converted_timezone = moment.tz(source_timezone, user_timezone).format('MMM D, YYYY HH:mm:ss');
    28         var convertedTimezonewithoutFormat = moment.tz(source_timezone, user_timezone).format();
    29 
    30         //Check Time Difference for Validations
    31         var currentTime = moment().unix();
    32         var eventTime = moment(convertedTimezonewithoutFormat).unix();
    33         var diffTime = eventTime - currentTime;
    34         var lang = document.documentElement.lang;
    35         $('.sidebar-start-time').html(moment.parseZone(convertedTimezonewithoutFormat).locale(lang).format('LLLL'));
    36         var second = 1000,
    37           minute = second * 60,
    38           hour = minute * 60,
    39           day = hour * 24;
    40 
    41         // if time to countdown
    42         if (diffTime > 0) {
    43           var countDown = new Date(converted_timezone).getTime();
    44           var x = setInterval(function () {
    45             var now = new Date().getTime();
    46             var distance = countDown - now;
    47             document.getElementById('dpn-zvc-timer-days').innerText = Math.floor(distance / day);
    48             document.getElementById('dpn-zvc-timer-hours').innerText = Math.floor(distance % day / hour);
    49             document.getElementById('dpn-zvc-timer-minutes').innerText = Math.floor(distance % hour / minute);
    50             document.getElementById('dpn-zvc-timer-seconds').innerText = Math.floor(distance % minute / second);
    51             if (distance < 0) {
    52               clearInterval(x);
    53               location.reload();
    54             }
    55           }, second);
    56         } else {
    57           // location.reload();
    58           $(clock).remove();
     58        if (hoursEl) {
     59          hoursEl.innerText = Math.max(0, hours);
    5960        }
    60       }
     61        if (minutesEl) {
     62          minutesEl.innerText = Math.max(0, minutes);
     63        }
     64        if (secondsEl) {
     65          secondsEl.innerText = Math.max(0, seconds);
     66        }
     67        if (distance <= 0) {
     68          clearInterval(x);
     69          location.reload();
     70        }
     71      }, second);
    6172    }
    6273  };
  • video-conferencing-with-zoom-api/trunk/assets/public/js/join-via-browser.min.js

    r2868664 r3722621  
    1 jQuery((function(e){({init:function(){this.cacheVariables(),this.countDown()},cacheVariables:function(){this.$timer=e("#dpn-zvc-timer")},countDown:function(){var t=this.$timer;if(t.length>0){var n=t.data("date"),m=t.data("tz"),a=moment.tz.guess();"Asia/Katmandu"===a&&(a="Asia/Kathmandu");var o=moment.tz(n,m).format(),i=moment.tz(o,a).format("MMM D, YYYY HH:mm:ss"),r=moment.tz(o,a).format(),c=moment().unix(),d=moment(r).unix()-c,l=document.documentElement.lang;e(".sidebar-start-time").html(moment.parseZone(r).locale(l).format("LLLL"));var s=36e5,u=24*s;if(d>0)var f=new Date(i).getTime(),h=setInterval((function(){var e=(new Date).getTime(),t=f-e;document.getElementById("dpn-zvc-timer-days").innerText=Math.floor(t/u),document.getElementById("dpn-zvc-timer-hours").innerText=Math.floor(t%u/s),document.getElementById("dpn-zvc-timer-minutes").innerText=Math.floor(t%s/6e4),document.getElementById("dpn-zvc-timer-seconds").innerText=Math.floor(t%6e4/1e3),t<0&&(clearInterval(h),location.reload())}),1e3);else e(t).remove()}}}).init()}));
     1jQuery((function(t){({init:function(){this.cacheVariables(),this.countDown()},cacheVariables:function(){this.$timer=t("#dpn-zvc-timer")},countDown:function(){var e=this.$timer;if(e.length){var n=e.data("date"),a=e.data("tz"),o=moment.tz.guess();"Asia/Katmandu"===o&&(o="Asia/Kathmandu");var i=moment.tz(n,a).clone().tz(o),m=i.diff(moment()),r=document.documentElement.lang;t(".sidebar-start-time").html(i.clone().locale(r).format("LLLL"));var c=36e5,d=24*c;if(m<=0)t(e).remove();else var l=i.valueOf(),u=setInterval((function(){var t=l-Date.now(),e=Math.floor(t/d),n=Math.floor(t%d/c),a=Math.floor(t%c/6e4),o=Math.floor(t%6e4/1e3),i=document.getElementById("dpn-zvc-timer-days"),m=document.getElementById("dpn-zvc-timer-hours"),r=document.getElementById("dpn-zvc-timer-minutes"),s=document.getElementById("dpn-zvc-timer-seconds");i&&(i.innerText=Math.max(0,e)),m&&(m.innerText=Math.max(0,n)),r&&(r.innerText=Math.max(0,a)),s&&(s.innerText=Math.max(0,o)),t<=0&&(clearInterval(u),location.reload())}),1e3)}}}).init()}));
  • video-conferencing-with-zoom-api/trunk/assets/public/js/public.js

    r2927761 r3722621  
    2121    countDownTimerMoment: function () {
    2222      var clock = this.$timer;
    23       if (clock.length > 0) {
    24         var valueDate = clock.data('date');
    25         var mtgTimezone = clock.data('tz');
    26         var mtgState = clock.data('state');
     23      if (!clock.length) {
     24        return;
     25      }
     26      var valueDate = clock.data('date');
     27      var mtgTimezone = clock.data('tz');
     28      var mtgState = clock.data('state');
     29      var userTimezone = moment.tz.guess();
     30      if (userTimezone === 'Asia/Katmandu') {
     31        userTimezone = 'Asia/Kathmandu';
     32      }
    2733
    28         // var dateFormat = moment(valueDate).format('MMM D, YYYY HH:mm:ss');
    29         var user_timezone = moment.tz.guess();
    30         if (user_timezone === 'Asia/Katmandu') {
    31           user_timezone = 'Asia/Kathmandu';
     34      // Meeting time in the meeting timezone
     35      var meetingTime = moment.tz(valueDate, mtgTimezone);
     36
     37      // Meeting time converted to user's timezone
     38      var userMeetingTime = meetingTime.clone().tz(userTimezone);
     39
     40      // Check time difference
     41      var diffTime = userMeetingTime.diff(moment());
     42      var lang = document.documentElement.lang;
     43      var dateFormat = zvc_strings.date_format !== '' ? zvc_strings.date_format : 'LLLL';
     44      $('.sidebar-start-time').html(userMeetingTime.clone().locale(lang).format(dateFormat));
     45      $('.vczapi-single-meeting-timezone').html(userTimezone);
     46      var second = 1000;
     47      var minute = second * 60;
     48      var hour = minute * 60;
     49      var day = hour * 24;
     50      if (mtgState === 'ended') {
     51        $(clock).html('<div class="dpn-zvc-meeting-ended">' + '<h3>' + zvc_strings.meeting_ended + '</h3>' + '</div>');
     52        return;
     53      }
     54      if (diffTime <= 0) {
     55        $(clock).remove();
     56        return;
     57      }
     58      var countDown = userMeetingTime.valueOf();
     59      var x = setInterval(function () {
     60        var distance = countDown - Date.now();
     61        if (distance <= 0) {
     62          clearInterval(x);
     63          $(clock).html('<div class="dpn-zvc-meeting-ended">' + '<h3>' + zvc_strings.meeting_starting + '</h3>' + '</div>');
     64          return;
    3265        }
    33 
    34         //Converting Timezones to locals
    35         var source_timezone = moment.tz(valueDate, mtgTimezone).format();
    36         var converted_timezone = moment.tz(source_timezone, user_timezone).format('MMM D, YYYY HH:mm:ss');
    37         var convertedTimezonewithoutFormat = moment.tz(source_timezone, user_timezone).format();
    38         let meetingUTCTime = moment.utc(source_timezone).valueOf();
    39         let usersDate = new Date(meetingUTCTime);
    40 
    41         //Check Time Difference for Validations
    42         var currentTime = moment().unix();
    43         var eventTime = moment(convertedTimezonewithoutFormat).unix();
    44         var diffTime = eventTime - currentTime;
    45         var lang = document.documentElement.lang;
    46         var dateFormat = zvc_strings.date_format !== '' ? zvc_strings.date_format : 'LLLL';
    47         $('.sidebar-start-time').html(moment.parseZone(usersDate).locale(lang).format(dateFormat));
    48         $('.vczapi-single-meeting-timezone').html(user_timezone);
    49         var second = 1000,
    50           minute = second * 60,
    51           hour = minute * 60,
    52           day = hour * 24;
    53         if (mtgState === 'ended') {
    54           $(clock).html('<div class=\'dpn-zvc-meeting-ended\'><h3>' + zvc_strings.meeting_ended + '</h3></div>');
    55         } else {
    56           // if time to countdown
    57           if (diffTime > 0) {
    58             var countDown = new Date(converted_timezone).getTime();
    59             var x = setInterval(function () {
    60               var now = new Date().getTime();
    61               var distance = countDown - now;
    62               document.getElementById('dpn-zvc-timer-days').innerText = Math.floor(distance / day);
    63               document.getElementById('dpn-zvc-timer-hours').innerText = Math.floor(distance % day / hour);
    64               document.getElementById('dpn-zvc-timer-minutes').innerText = Math.floor(distance % hour / minute);
    65               document.getElementById('dpn-zvc-timer-seconds').innerText = Math.floor(distance % minute / second);
    66               if (distance < 0) {
    67                 clearInterval(x);
    68                 $(clock).html('<div class=\'dpn-zvc-meeting-ended\'><h3>' + zvc_strings.meeting_starting + '</h3></div>');
    69               }
    70             }, second);
    71           } else {
    72             $(clock).remove();
    73           }
     66        var days = Math.floor(distance / day);
     67        var hours = Math.floor(distance % day / hour);
     68        var minutes = Math.floor(distance % hour / minute);
     69        var seconds = Math.floor(distance % minute / second);
     70        var daysEl = document.getElementById('dpn-zvc-timer-days');
     71        var hoursEl = document.getElementById('dpn-zvc-timer-hours');
     72        var minutesEl = document.getElementById('dpn-zvc-timer-minutes');
     73        var secondsEl = document.getElementById('dpn-zvc-timer-seconds');
     74        if (daysEl) {
     75          daysEl.innerText = days;
    7476        }
    75       }
     77        if (hoursEl) {
     78          hoursEl.innerText = hours;
     79        }
     80        if (minutesEl) {
     81          minutesEl.innerText = minutes;
     82        }
     83        if (secondsEl) {
     84          secondsEl.innerText = seconds;
     85        }
     86      }, second);
    7687    },
    7788    /**
    … …  
    146157        type: $(e.currentTarget).data('type'),
    147158        post_id: post_id ? post_id : false,
    148         action: 'state_change',
    149         accss: vczapi_state.zvc_security
     159        action: 'vczapi_meeting_state_change',
     160        nonce: vczapi_state.nonce
    150161      };
    151162      if (state === 'resume') {
  • video-conferencing-with-zoom-api/trunk/assets/public/js/public.min.js

    r2927761 r3722621  
    1 !function(){"use strict";jQuery((function(t){({init:function(){this.cacheVariables(),this.countDownTimerMoment(),this.evntLoaders()},cacheVariables:function(){this.$timer=t("#dpn-zvc-timer"),this.changeMeetingState=t(".vczapi-meeting-state-change")},evntLoaders:function(){t(document).ready(this.setTimezone.bind(this)),t(this.changeMeetingState).on("click",this.meetingStateChange.bind(this))},countDownTimerMoment:function(){var e=this.$timer;if(e.length>0){var a=e.data("date"),n=e.data("tz"),i=e.data("state"),o=moment.tz.guess();"Asia/Katmandu"===o&&(o="Asia/Kathmandu");var r=moment.tz(a,n).format(),d=moment.tz(r,o).format("MMM D, YYYY HH:mm:ss"),s=moment.tz(r,o).format();let f=moment.utc(r).valueOf(),z=new Date(f);var m=moment().unix(),c=moment(s).unix()-m,g=document.documentElement.lang,v=""!==zvc_strings.date_format?zvc_strings.date_format:"LLLL";t(".sidebar-start-time").html(moment.parseZone(z).locale(g).format(v)),t(".vczapi-single-meeting-timezone").html(o);var u=36e5,l=24*u;if("ended"===i)t(e).html("<div class='dpn-zvc-meeting-ended'><h3>"+zvc_strings.meeting_ended+"</h3></div>");else if(c>0)var h=new Date(d).getTime(),_=setInterval((function(){var a=(new Date).getTime(),n=h-a;document.getElementById("dpn-zvc-timer-days").innerText=Math.floor(n/l),document.getElementById("dpn-zvc-timer-hours").innerText=Math.floor(n%l/u),document.getElementById("dpn-zvc-timer-minutes").innerText=Math.floor(n%u/6e4),document.getElementById("dpn-zvc-timer-seconds").innerText=Math.floor(n%6e4/1e3),n<0&&(clearInterval(_),t(e).html("<div class='dpn-zvc-meeting-ended'><h3>"+zvc_strings.meeting_starting+"</h3></div>"))}),1e3);else t(e).remove()}},setTimezone:function(){var e=moment.tz.guess();"Asia/Katmandu"===e&&(e="Asia/Kathmandu");try{if(void 0!==typeof mtg_data&&"single-meeting"===mtg_data.page){t(".dpn-zvc-sidebar-content").after('<div class="dpn-zvc-sidebar-box remove-sidebar-loder-text"><p>Loading..Please wait..</p></div>');var a={action:"set_timezone",user_timezone:e,post_id:mtg_data.post_id,mtg_timezone:mtg_data.timezone,start_date:mtg_data.start_date,meeting_type:mtg_data.meeting_type,type:"page"};t.post(mtg_data.ajaxurl,a).done((function(e){e.success?t(".dpn-zvc-sidebar-content").after(e.data):t(".dpn-zvc-sidebar-content").after('<div class="dpn-zvc-sidebar-box vczapi-no-longer-valid">'+e.data+"</div>"),t(".remove-sidebar-loder-text").remove()}))}if(void 0!==typeof mtg_data&&"shortcode"===mtg_data.type){var n={action:"set_timezone",user_timezone:e,mtg_timezone:mtg_data.timezone,join_uri:mtg_data.join_uri,browser_url:mtg_data.browser_url,start_date:mtg_data.start_date,type:"shortcode"};t(".zvc-table-shortcode-duration").after('<tr class="remove-shortcode-loder-text"><td colspan="2">Loading.. Please wait..</td></tr>'),t.post(mtg_data.ajaxurl,n).done((function(e){e.success?t(".zvc-table-shortcode-duration").after(e.data):t(".zvc-table-shortcode-duration").after('<tr><td colspan="2">'+e.data+"</td></tr>"),t(".remove-shortcode-loder-text").remove()}))}}catch(t){}},meetingStateChange:function(e){e.preventDefault();var a=t(e.currentTarget).data("state"),n=t(e.currentTarget).data("postid"),i={id:t(e.currentTarget).data("id"),state:a,type:t(e.currentTarget).data("type"),post_id:n||!1,action:"state_change",accss:vczapi_state.zvc_security};if("resume"===a)this.changeState(i);else if("end"===a){if(!confirm(vczapi_state.lang.confirm_end))return;this.changeState(i)}},changeState:function(e){t.post(vczapi_state.ajaxurl,e).done((function(t){location.reload()}))}}).init()}))}();
     1!function(){"use strict";jQuery((function(t){({init:function(){this.cacheVariables(),this.countDownTimerMoment(),this.evntLoaders()},cacheVariables:function(){this.$timer=t("#dpn-zvc-timer"),this.changeMeetingState=t(".vczapi-meeting-state-change")},evntLoaders:function(){t(document).ready(this.setTimezone.bind(this)),t(this.changeMeetingState).on("click",this.meetingStateChange.bind(this))},countDownTimerMoment:function(){var e=this.$timer;if(e.length){var a=e.data("date"),n=e.data("tz"),i=e.data("state"),o=moment.tz.guess();"Asia/Katmandu"===o&&(o="Asia/Kathmandu");var d=moment.tz(a,n).clone().tz(o),r=d.diff(moment()),s=document.documentElement.lang,c=""!==zvc_strings.date_format?zvc_strings.date_format:"LLLL";t(".sidebar-start-time").html(d.clone().locale(s).format(c)),t(".vczapi-single-meeting-timezone").html(o);var m=36e5,g=24*m;if("ended"!==i)if(r<=0)t(e).remove();else var v=d.valueOf(),l=setInterval((function(){var a=v-Date.now();if(a<=0)return clearInterval(l),void t(e).html('<div class="dpn-zvc-meeting-ended"><h3>'+zvc_strings.meeting_starting+"</h3></div>");var n=Math.floor(a/g),i=Math.floor(a%g/m),o=Math.floor(a%m/6e4),d=Math.floor(a%6e4/1e3),r=document.getElementById("dpn-zvc-timer-days"),s=document.getElementById("dpn-zvc-timer-hours"),c=document.getElementById("dpn-zvc-timer-minutes"),u=document.getElementById("dpn-zvc-timer-seconds");r&&(r.innerText=n),s&&(s.innerText=i),c&&(c.innerText=o),u&&(u.innerText=d)}),1e3);else t(e).html('<div class="dpn-zvc-meeting-ended"><h3>'+zvc_strings.meeting_ended+"</h3></div>")}},setTimezone:function(){var e=moment.tz.guess();"Asia/Katmandu"===e&&(e="Asia/Kathmandu");try{if(void 0!==typeof mtg_data&&"single-meeting"===mtg_data.page){t(".dpn-zvc-sidebar-content").after('<div class="dpn-zvc-sidebar-box remove-sidebar-loder-text"><p>Loading..Please wait..</p></div>');var a={action:"set_timezone",user_timezone:e,post_id:mtg_data.post_id,mtg_timezone:mtg_data.timezone,start_date:mtg_data.start_date,meeting_type:mtg_data.meeting_type,type:"page"};t.post(mtg_data.ajaxurl,a).done((function(e){e.success?t(".dpn-zvc-sidebar-content").after(e.data):t(".dpn-zvc-sidebar-content").after('<div class="dpn-zvc-sidebar-box vczapi-no-longer-valid">'+e.data+"</div>"),t(".remove-sidebar-loder-text").remove()}))}if(void 0!==typeof mtg_data&&"shortcode"===mtg_data.type){var n={action:"set_timezone",user_timezone:e,mtg_timezone:mtg_data.timezone,join_uri:mtg_data.join_uri,browser_url:mtg_data.browser_url,start_date:mtg_data.start_date,type:"shortcode"};t(".zvc-table-shortcode-duration").after('<tr class="remove-shortcode-loder-text"><td colspan="2">Loading.. Please wait..</td></tr>'),t.post(mtg_data.ajaxurl,n).done((function(e){e.success?t(".zvc-table-shortcode-duration").after(e.data):t(".zvc-table-shortcode-duration").after('<tr><td colspan="2">'+e.data+"</td></tr>"),t(".remove-shortcode-loder-text").remove()}))}}catch(t){}},meetingStateChange:function(e){e.preventDefault();var a=t(e.currentTarget).data("state"),n=t(e.currentTarget).data("postid"),i={id:t(e.currentTarget).data("id"),state:a,type:t(e.currentTarget).data("type"),post_id:n||!1,action:"vczapi_meeting_state_change",nonce:vczapi_state.nonce};if("resume"===a)this.changeState(i);else if("end"===a){if(!confirm(vczapi_state.lang.confirm_end))return;this.changeState(i)}},changeState:function(e){t.post(vczapi_state.ajaxurl,e).done((function(t){location.reload()}))}}).init()}))}();
  • video-conferencing-with-zoom-api/trunk/assets/vendor/zoom/websdk/zoom-meeting.bundle.js

    r3565576 r3722621  
    1 "use strict";(self.webpackChunkvideo_conferencing_with_zoom_api=self.webpackChunkvideo_conferencing_with_zoom_api||[]).push([[721],{631:(e,n,t)=>{var i=t(114);const o={meetingID:atob(zvc_ajx.meeting_id),redirectTo:zvc_ajx.redirect_page,password:!1!==zvc_ajx.meeting_pwd&&atob(zvc_ajx.meeting_pwd),infoContainer:document.querySelector(".vczapi-zoom-browser-meeting--info__browser"),init:function(){this.initSDK(),this.eventHandlers(),zvc_ajx.enable_direct_join_via_browser&&this.handleJoinOnInit()},initSDK:function(){i.ZoomMtg.preLoadWasm(),i.ZoomMtg.prepareWebSDK()},eventHandlers:function(){let e=document.getElementById("vczapi-zoom-browser-meeting-join-mtg");null!=e&&(e.onclick=this.handleJoinMeetingButton.bind(this))},handleJoinOnInit:function(){const e=zvc_ajx.user_name,n=zvc_ajx.user_mail,t=this.password;this.handleJoinMeeting(e,t,n)},loader:function(){const e=document.createElement("span");return e.id="zvc-cover",e},generateSignature:async function(){const e=new FormData;return e.append("action","get_auth"),e.append("noncce",zvc_ajx.zvc_security),e.append("meeting_id",parseInt(this.meetingID)),(await fetch(zvc_ajx.ajaxurl,{method:"POST",body:e,credentials:"same-origin"})).json()},removeLoader:function(){null!==document.getElementById("zvc-cover")&&document.getElementById("zvc-cover").remove()},handleJoinMeeting:function(e,n,t,i){null==this.meetingID&&""===this.meetingID||this.generateSignature().then((o=>{if(o.success){document.getElementById("zmmtg-root").style.display="block",this.removeLoader();const a={name:null!==e?e:"",password:null!==n?n:"",email:null!==t?t:"",locale:i};this.prepBeforeJoin(o,a)}}))},handleJoinMeetingButton:function(e){e.preventDefault(),document.body.appendChild(this.loader());const n=document.getElementById("vczapi-jvb-display-name"),t=document.getElementById("vczapi-jvb-email"),i=document.getElementById("meeting_password"),o=document.querySelector(".meeting-locale");if(null!==n&&(null===n.value||""===n.value))return this.infoContainer.innerHTML="Name is a Required field!",this.infoContainer.style.color="red",this.removeLoader(),!1;if(null!==t&&(null===t.value||""===t.value))return this.infoContainer.innerHTML="Email is a Required field!",this.infoContainer.style.color="red",this.removeLoader(),!1;if(null!==i&&(null===i.value||""===i.value))return this.infoContainer.innerHTML="Validation: Password is Required!",this.infoContainer.style.color="red",this.removeLoader(),!1;const a=null!==n?n.value:"",r=null!==i?i.value:"",l=null!==t?t.value:"",s=null!==o.value?o.value:"en-US";this.handleJoinMeeting(a,r,l,s)},prepBeforeJoin:function(e,n){const t=e.data.sig,i=document.getElementById("vczapi-zoom-browser-meeting");null!==i&&i.remove();const o={lang:n.locale,leaveUrl:this.redirectTo};let a={meetingNumber:parseInt(this.meetingID),userName:n.name,signature:t,userEmail:n.email,passWord:n.password?n.password:this.password,success:function(e){console.log("Join Meeting Success")},error:function(e){console.log(e)}};const r=new URLSearchParams(window.location.search),l=Object.fromEntries(r.entries());null!==l.tk&&(a.tk=l.tk),window.location!==window.parent.location&&(o.leaveUrl=window.location.href),this.joinMeeting(o,a)},joinMeeting:function(e,n){i.ZoomMtg.i18n.load(e.lang),i.ZoomMtg.init({leaveUrl:e.leaveUrl,isSupportAV:!0,meetingInfo:zvc_ajx.meetingInfo,disableInvite:zvc_ajx.disableInvite,disableRecord:zvc_ajx.disableRecord,disableJoinAudio:zvc_ajx.disableJoinAudio,isSupportChat:zvc_ajx.isSupportChat,isSupportQA:zvc_ajx.isSupportQA,isSupportBreakout:zvc_ajx.isSupportBreakout,isSupportCC:zvc_ajx.isSupportCC,screenShare:zvc_ajx.screenShare,success:function(){i.ZoomMtg.join(n)},error:function(e){console.log(e)}})}};document.addEventListener("DOMContentLoaded",o.init())}},e=>{e(e.s=631)}]);
     1"use strict";(self.webpackChunkvideo_conferencing_with_zoom_api=self.webpackChunkvideo_conferencing_with_zoom_api||[]).push([[721],{631:(e,n,t)=>{var i=t(114);const o={meetingID:atob(zvc_ajx.meeting_id),redirectTo:zvc_ajx.redirect_page,password:!1!==zvc_ajx.meeting_pwd&&atob(zvc_ajx.meeting_pwd),infoContainer:document.querySelector(".vczapi-zoom-browser-meeting--info__browser"),init:function(){this.initSDK(),this.eventHandlers(),zvc_ajx.enable_direct_join_via_browser&&this.handleJoinOnInit()},initSDK:function(){i.ZoomMtg.preLoadWasm(),i.ZoomMtg.prepareWebSDK()},eventHandlers:function(){let e=document.getElementById("vczapi-zoom-browser-meeting-join-mtg");null!=e&&(e.onclick=this.handleJoinMeetingButton.bind(this))},handleJoinOnInit:function(){const e=zvc_ajx.user_name,n=zvc_ajx.user_mail,t=this.password;this.handleJoinMeeting(e,t,n)},loader:function(){const e=document.createElement("span");return e.id="zvc-cover",e},generateSignature:async function(){const e=new FormData;return e.append("action","vczapi_jvb_get_auth"),e.append("meeting_id",parseInt(this.meetingID)),e.append("nonce",zvc_ajx.nonce),(await fetch(zvc_ajx.ajaxurl,{method:"POST",body:e,credentials:"same-origin"})).json()},removeLoader:function(){null!==document.getElementById("zvc-cover")&&document.getElementById("zvc-cover").remove()},handleJoinMeeting:function(e,n,t,i){null==this.meetingID&&""===this.meetingID||this.generateSignature().then((o=>{if(o.success){document.getElementById("zmmtg-root").style.display="block",this.removeLoader();const a={name:null!==e?e:"",password:null!==n?n:"",email:null!==t?t:"",locale:i};this.prepBeforeJoin(o,a)}}))},handleJoinMeetingButton:function(e){e.preventDefault(),document.body.appendChild(this.loader());const n=document.getElementById("vczapi-jvb-display-name"),t=document.getElementById("vczapi-jvb-email"),i=document.getElementById("meeting_password"),o=document.querySelector(".meeting-locale");if(null!==n&&(null===n.value||""===n.value))return this.infoContainer.innerHTML="Name is a Required field!",this.infoContainer.style.color="red",this.removeLoader(),!1;if(null!==t&&(null===t.value||""===t.value))return this.infoContainer.innerHTML="Email is a Required field!",this.infoContainer.style.color="red",this.removeLoader(),!1;if(null!==i&&(null===i.value||""===i.value))return this.infoContainer.innerHTML="Validation: Password is Required!",this.infoContainer.style.color="red",this.removeLoader(),!1;const a=null!==n?n.value:"",r=null!==i?i.value:"",l=null!==t?t.value:"",s=null!==o.value?o.value:"en-US";this.handleJoinMeeting(a,r,l,s)},prepBeforeJoin:function(e,n){const t=e.data.sig,i=document.getElementById("vczapi-zoom-browser-meeting");null!==i&&i.remove();const o={lang:n.locale,leaveUrl:this.redirectTo};let a={meetingNumber:parseInt(this.meetingID),userName:n.name,signature:t,userEmail:n.email,passWord:n.password?n.password:this.password,success:function(e){console.log("Join Meeting Success")},error:function(e){console.log(e)}};const r=new URLSearchParams(window.location.search),l=Object.fromEntries(r.entries());null!==l.tk&&(a.tk=l.tk),window.location!==window.parent.location&&(o.leaveUrl=window.location.href),this.joinMeeting(o,a)},joinMeeting:function(e,n){i.ZoomMtg.i18n.load(e.lang),i.ZoomMtg.init({leaveUrl:e.leaveUrl,isSupportAV:!0,meetingInfo:zvc_ajx.meetingInfo,disableInvite:zvc_ajx.disableInvite,disableRecord:zvc_ajx.disableRecord,disableJoinAudio:zvc_ajx.disableJoinAudio,isSupportChat:zvc_ajx.isSupportChat,isSupportQA:zvc_ajx.isSupportQA,isSupportBreakout:zvc_ajx.isSupportBreakout,isSupportCC:zvc_ajx.isSupportCC,screenShare:zvc_ajx.screenShare,success:function(){i.ZoomMtg.join(n)},error:function(e){console.log(e)}})}};document.addEventListener("DOMContentLoaded",o.init())}},e=>{e(e.s=631)}]);
  • video-conferencing-with-zoom-api/trunk/build/index.asset.php

    r3666609 r3722621  
    1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render', 'wp-url'), 'version' => 'cd4b67e80c6d93d50bd9');
     1<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render', 'wp-url'), 'version' => '65af9c185fd989b98081');
  • video-conferencing-with-zoom-api/trunk/build/index.js

    r3666609 r3722621  
    1 !function(){"use strict";var e,t={231:function(e,t,n){var o=window.wp.blocks;function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:String(t)}function a(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function l(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function u(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);l=!0);}catch(e){u=!0,r=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var p=window.wp.i18n,d=window.lodash,f=window.wp.url,h=window.wp.blockEditor,v=window.wp.serverSideRender,m=n.n(v),g=window.wp.components,b=window.wp.element,y=window.wp.apiFetch,w=n.n(y);function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},O.apply(this,arguments)}var x=window.React;function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function j(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,i(o.key),o)}}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function P(e){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},P(e)}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}var M=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),E=Math.abs,I=String.fromCharCode,D=Object.assign;function V(e){return e.trim()}function z(e,t,n){return e.replace(t,n)}function R(e,t){return e.indexOf(t)}function A(e,t){return 0|e.charCodeAt(t)}function T(e,t,n){return e.slice(t,n)}function F(e){return e.length}function L(e){return e.length}function N(e,t){return t.push(e),e}var B=1,H=1,$=0,U=0,W=0,G="";function Y(e,t,n,o,r,i,a){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:B,column:H,length:a,return:""}}function Z(e,t){return D(Y("",null,null,"",null,null,0),e,{length:-e.length},t)}function q(){return W=U>0?A(G,--U):0,H--,10===W&&(H=1,B--),W}function J(){return W=U<$?A(G,U++):0,H++,10===W&&(H=1,B++),W}function X(){return A(G,U)}function K(){return U}function Q(e,t){return T(G,e,t)}function ee(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function te(e){return B=H=1,$=F(G=e),U=0,[]}function ne(e){return G="",e}function oe(e){return V(Q(U-1,ae(91===e?e+2:40===e?e+1:e)))}function re(e){for(;(W=X())&&W<33;)J();return ee(e)>2||ee(W)>3?"":" "}function ie(e,t){for(;--t&&J()&&!(W<48||W>102||W>57&&W<65||W>70&&W<97););return Q(e,K()+(t<6&&32==X()&&32==J()))}function ae(e){for(;J();)switch(W){case e:return U;case 34:case 39:34!==e&&39!==e&&ae(W);break;case 40:41===e&&ae(e);break;case 92:J()}return U}function se(e,t){for(;J()&&e+W!==57&&(e+W!==84||47!==X()););return"/*"+Q(t,U-1)+"*"+I(47===e?e:J())}function le(e){for(;!ee(X());)J();return Q(e,U)}var ue="-ms-",ce="-moz-",pe="-webkit-",de="comm",fe="rule",he="decl",ve="@keyframes";function me(e,t){for(var n="",o=L(e),r=0;r<o;r++)n+=t(e[r],r,e,t)||"";return n}function ge(e,t,n,o){switch(e.type){case"@import":case he:return e.return=e.return||e.value;case de:return"";case ve:return e.return=e.value+"{"+me(e.children,o)+"}";case fe:e.value=e.props.join(",")}return F(n=me(e.children,o))?e.return=e.value+"{"+n+"}":""}function be(e){return ne(ye("",null,null,null,[""],e=te(e),0,[0],e))}function ye(e,t,n,o,r,i,a,s,l){for(var u=0,c=0,p=a,d=0,f=0,h=0,v=1,m=1,g=1,b=0,y="",w=r,O=i,x=o,S=y;m;)switch(h=b,b=J()){case 40:if(108!=h&&58==A(S,p-1)){-1!=R(S+=z(oe(b),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:S+=oe(b);break;case 9:case 10:case 13:case 32:S+=re(h);break;case 92:S+=ie(K()-1,7);continue;case 47:switch(X()){case 42:case 47:N(Oe(se(J(),K()),t,n),l);break;default:S+="/"}break;case 123*v:s[u++]=F(S)*g;case 125*v:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+c:-1==g&&(S=z(S,/\f/g,"")),f>0&&F(S)-p&&N(f>32?xe(S+";",o,n,p-1):xe(z(S," ","")+";",o,n,p-2),l);break;case 59:S+=";";default:if(N(x=we(S,t,n,u,c,r,s,y,w=[],O=[],p),i),123===b)if(0===c)ye(S,t,x,x,w,i,p,s,O);else switch(99===d&&110===A(S,3)?100:d){case 100:case 109:case 115:ye(e,x,x,o&&N(we(e,x,x,0,0,r,s,y,r,w=[],p),O),r,O,p,s,o?w:O);break;default:ye(S,x,x,x,[""],O,0,s,O)}}u=c=f=0,v=g=1,y=S="",p=a;break;case 58:p=1+F(S),f=h;default:if(v<1)if(123==b)--v;else if(125==b&&0==v++&&125==q())continue;switch(S+=I(b),b*v){case 38:g=c>0?1:(S+="\f",-1);break;case 44:s[u++]=(F(S)-1)*g,g=1;break;case 64:45===X()&&(S+=oe(J())),d=X(),c=p=F(y=S+=le(K())),b++;break;case 45:45===h&&2==F(S)&&(v=0)}}return i}function we(e,t,n,o,r,i,a,s,l,u,c){for(var p=r-1,d=0===r?i:[""],f=L(d),h=0,v=0,m=0;h<o;++h)for(var g=0,b=T(e,p+1,p=E(v=a[h])),y=e;g<f;++g)(y=V(v>0?d[g]+" "+b:z(b,/&\f/g,d[g])))&&(l[m++]=y);return Y(e,t,n,0===r?fe:s,l,u,c)}function Oe(e,t,n){return Y(e,t,n,de,I(W),T(e,2,-2),0)}function xe(e,t,n,o){return Y(e,t,n,he,T(e,0,o),T(e,o+1,-1),o)}var Se=function(e,t,n){for(var o=0,r=0;o=r,r=X(),38===o&&12===r&&(t[n]=1),!ee(r);)J();return Q(e,U)},Ce=new WeakMap,je=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Ce.get(n))&&!o){Ce.set(e,!0);for(var r=[],i=function(e,t){return ne(function(e,t){var n=-1,o=44;do{switch(ee(o)){case 0:38===o&&12===X()&&(t[n]=1),e[n]+=Se(U-1,t,n);break;case 2:e[n]+=oe(o);break;case 4:if(44===o){e[++n]=58===X()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=I(o)}}while(o=J());return e}(te(e),t))}(t,r),a=n.props,s=0,l=0;s<i.length;s++)for(var u=0;u<a.length;u++,l++)e.props[l]=r[s]?i[s].replace(/&\f/g,a[u]):a[u]+" "+i[s]}}},ke=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Pe(e,t){switch(function(e,t){return 45^A(e,0)?(((t<<2^A(e,0))<<2^A(e,1))<<2^A(e,2))<<2^A(e,3):0}(e,t)){case 5103:return pe+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return pe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return pe+e+ce+e+ue+e+e;case 6828:case 4268:return pe+e+ue+e+e;case 6165:return pe+e+ue+"flex-"+e+e;case 5187:return pe+e+z(e,/(\w+).+(:[^]+)/,pe+"box-$1$2"+ue+"flex-$1$2")+e;case 5443:return pe+e+ue+"flex-item-"+z(e,/flex-|-self/,"")+e;case 4675:return pe+e+ue+"flex-line-pack"+z(e,/align-content|flex-|-self/,"")+e;case 5548:return pe+e+ue+z(e,"shrink","negative")+e;case 5292:return pe+e+ue+z(e,"basis","preferred-size")+e;case 6060:return pe+"box-"+z(e,"-grow","")+pe+e+ue+z(e,"grow","positive")+e;case 4554:return pe+z(e,/([^-])(transform)/g,"$1"+pe+"$2")+e;case 6187:return z(z(z(e,/(zoom-|grab)/,pe+"$1"),/(image-set)/,pe+"$1"),e,"")+e;case 5495:case 3959:return z(e,/(image-set\([^]*)/,pe+"$1$`$1");case 4968:return z(z(e,/(.+:)(flex-)?(.*)/,pe+"box-pack:$3"+ue+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+pe+e+e;case 4095:case 3583:case 4068:case 2532:return z(e,/(.+)-inline(.+)/,pe+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(F(e)-1-t>6)switch(A(e,t+1)){case 109:if(45!==A(e,t+4))break;case 102:return z(e,/(.+:)(.+)-([^]+)/,"$1"+pe+"$2-$3$1"+ce+(108==A(e,t+3)?"$3":"$2-$3"))+e;case 115:return~R(e,"stretch")?Pe(z(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==A(e,t+1))break;case 6444:switch(A(e,F(e)-3-(~R(e,"!important")&&10))){case 107:return z(e,":",":"+pe)+e;case 101:return z(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+pe+(45===A(e,14)?"inline-":"")+"box$3$1"+pe+"$2$3$1"+ue+"$2box$3")+e}break;case 5936:switch(A(e,t+11)){case 114:return pe+e+ue+z(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return pe+e+ue+z(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return pe+e+ue+z(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return pe+e+ue+e+e}return e}var _e=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case he:e.return=Pe(e.value,e.length);break;case ve:return me([Z(e,{value:z(e.value,"@","@"+pe)})],o);case fe:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return me([Z(e,{props:[z(t,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return me([Z(e,{props:[z(t,/:(plac\w+)/,":"+pe+"input-$1")]}),Z(e,{props:[z(t,/:(plac\w+)/,":-moz-$1")]}),Z(e,{props:[z(t,/:(plac\w+)/,ue+"input-$1")]})],o)}return""}))}}],Me=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o,r,i=e.stylisPlugins||_e,a={},s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,u,c,p,d=[ge,(p=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&p(e)})],f=(u=[je,ke].concat(i,d),c=L(u),function(e,t,n,o){for(var r="",i=0;i<c;i++)r+=u[i](e,t,n,o)||"";return r});r=function(e,t,n,o){l=n,me(be(e?e+"{"+t.styles+"}":t.styles),f),o&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new M({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:r};return h.sheet.hydrate(s),h},Ee=function(e,t,n){var o=e.key+"-"+t.name;!1===n&&void 0===e.registered[o]&&(e.registered[o]=t.styles)},Ie=function(e){for(var t,n=0,o=0,r=e.length;r>=4;++o,r-=4)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(r){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(o)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},De={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ve=/[A-Z]|^ms/g,ze=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Re=function(e){return 45===e.charCodeAt(1)},Ae=function(e){return null!=e&&"boolean"!=typeof e},Te=function(e){var t=Object.create(null);return function(e){return void 0===t[e]&&(t[e]=Re(n=e)?n:n.replace(Ve,"-$&").toLowerCase()),t[e];var n}}(),Fe=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(ze,(function(e,t,n){return Ne={name:t,styles:n,next:Ne},t}))}return 1===De[e]||Re(e)||"number"!=typeof t||0===t?t:t+"px"};function Le(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Ne={name:n.name,styles:n.styles,next:Ne},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)Ne={name:o.name,styles:o.styles,next:Ne},o=o.next;return n.styles+";"}return function(e,t,n){var o="";if(Array.isArray(n))for(var r=0;r<n.length;r++)o+=Le(e,t,n[r])+";";else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?o+=i+"{"+t[a]+"}":Ae(a)&&(o+=Te(i)+":"+Fe(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=Le(e,t,a);switch(i){case"animation":case"animationName":o+=Te(i)+":"+s+";";break;default:o+=i+"{"+s+"}"}}else for(var l=0;l<a.length;l++)Ae(a[l])&&(o+=Te(i)+":"+Fe(i,a[l])+";")}return o}(e,t,n);case"function":if(void 0!==e){var r=Ne,i=n(e);return Ne=r,Le(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var Ne,Be=/label:\s*([^\s;\n{]+)\s*(;|$)/g,He=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o=!0,r="";Ne=void 0;var i=e[0];null==i||void 0===i.raw?(o=!1,r+=Le(n,t,i)):r+=i[0];for(var a=1;a<e.length;a++)r+=Le(n,t,e[a]),o&&(r+=i[a]);Be.lastIndex=0;for(var s,l="";null!==(s=Be.exec(r));)l+="-"+s[1];return{name:Ie(r)+l,styles:r,next:Ne}},$e=!!x.useInsertionEffect&&x.useInsertionEffect||function(e){return e()},Ue={}.hasOwnProperty,We=(0,x.createContext)("undefined"!=typeof HTMLElement?Me({key:"css"}):null);We.Provider;var Ge=function(e){return(0,x.forwardRef)((function(t,n){var o=(0,x.useContext)(We);return e(t,o,n)}))},Ye=(0,x.createContext)({}),Ze="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",qe=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;return Ee(t,n,o),$e((function(){return function(e,t,n){Ee(e,t,n);var o=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var r=t;do{e.insert(t===r?"."+o:"",r,e.sheet,!0),r=r.next}while(void 0!==r)}}(t,n,o)})),null},Je=Ge((function(e,t,n){var o=e.css;"string"==typeof o&&void 0!==t.registered[o]&&(o=t.registered[o]);var r=e[Ze],i=[o],a="";"string"==typeof e.className?a=function(e,t,n){var o="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):o+=n+" "})),o}(t.registered,i,e.className):null!=e.className&&(a=e.className+" ");var s=He(i,void 0,(0,x.useContext)(Ye));a+=t.key+"-"+s.name;var l={};for(var u in e)Ue.call(e,u)&&"css"!==u&&u!==Ze&&(l[u]=e[u]);return l.ref=n,l.className=a,(0,x.createElement)(x.Fragment,null,(0,x.createElement)(qe,{cache:t,serialized:s,isStringTag:"string"==typeof r}),(0,x.createElement)(r,l))}));n(679);var Xe=function(e,t){var n=arguments;if(null==t||!Ue.call(t,"css"))return x.createElement.apply(void 0,n);var o=n.length,r=new Array(o);r[0]=Je,r[1]=function(e,t){var n={};for(var o in t)Ue.call(t,o)&&(n[o]=t[o]);return n[Ze]=e,n}(e,t);for(var i=2;i<o;i++)r[i]=n[i];return x.createElement.apply(null,r)};function Ke(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return He(t)}function Qe(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var et=window.ReactDOM;Math.min,Math.max;function tt(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function nt(e){return tt(e).getComputedStyle(e)}function ot(e){return e instanceof tt(e).Node}function rt(e){return ot(e)?(e.nodeName||"").toLowerCase():""}let it;function at(e){return e instanceof tt(e).HTMLElement}function st(e){return e instanceof tt(e).Element}function lt(e){return"undefined"!=typeof ShadowRoot&&(e instanceof tt(e).ShadowRoot||e instanceof ShadowRoot)}function ut(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=nt(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function ct(){return/^((?!chrome|android).)*safari/i.test(function(){if(it)return it;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(it=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),it):navigator.userAgent}())}["top","right","bottom","left"].reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]),Math.min,Math.max;const pt=Math.round;function dt(e){return st(e)?e:e.contextElement}const ft={x:1,y:1};function ht(e){const t=dt(e);if(!at(t))return ft;const n=t.getBoundingClientRect(),{width:o,height:r,fallback:i}=function(e){const t=nt(e);let n=parseFloat(t.width),o=parseFloat(t.height);const r=at(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,s=pt(n)!==i||pt(o)!==a;return s&&(n=i,o=a),{width:n,height:o,fallback:s}}(t);let a=(i?pt(n.width):n.width)/o,s=(i?pt(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}function vt(e,t,n,o){var r,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),s=dt(e);let l=ft;t&&(o?st(o)&&(l=ht(o)):l=ht(e));const u=s?tt(s):window,c=ct()&&n;let p=(a.left+(c&&(null==(r=u.visualViewport)?void 0:r.offsetLeft)||0))/l.x,d=(a.top+(c&&(null==(i=u.visualViewport)?void 0:i.offsetTop)||0))/l.y,f=a.width/l.x,h=a.height/l.y;if(s){const e=tt(s),t=o&&st(o)?tt(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=ht(n),t=n.getBoundingClientRect(),o=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(o.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(o.paddingTop))*e.y,p*=e.x,d*=e.y,f*=e.x,h*=e.y,p+=t.x,d+=t.y,n=tt(n).frameElement}}return v={width:f,height:h,x:p,y:d},{...v,top:v.y,left:v.x,right:v.x+v.width,bottom:v.y+v.height};var v}function mt(e){if("html"===rt(e))return e;const t=e.assignedSlot||e.parentNode||lt(e)&&e.host||function(e){return((ot(e)?e.ownerDocument:e.document)||window.document).documentElement}(e);return lt(t)?t.host:t}function gt(e){const t=mt(e);return function(e){return["html","body","#document"].includes(rt(e))}(t)?t.ownerDocument.body:at(t)&&ut(t)?t:gt(t)}function bt(e,t){var n;void 0===t&&(t=[]);const o=gt(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=tt(o);return r?t.concat(i,i.visualViewport||[],ut(o)?o:[]):t.concat(o,bt(o))}var yt=x.useLayoutEffect,wt=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Ot=function(){};function xt(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function St(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];var i=[].concat(o);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(xt(e,a)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var Ct=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===r(e)&&null!==e?[e]:[];var t},jt=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,C({},Qe(e,wt))},kt=function(e,t,n){var o=e.cx,r=e.getStyles,i=e.getClassNames,a=e.className;return{css:r(t,e),className:o(null!=n?n:{},i(t,e),a)}};function Pt(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function _t(e){return Pt(e)?window.pageYOffset:e.scrollTop}function Mt(e,t){Pt(e)?window.scrollTo(0,t):e.scrollTop=t}function Et(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ot,r=_t(e),i=t-r,a=0;!function t(){var s,l=(s=a+=10,i*((s=s/n-1)*s*s+1)+r);Mt(e,l),a<n?window.requestAnimationFrame(t):o(e)}()}function It(e,t){var n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),r=t.offsetHeight/3;o.bottom+r>n.bottom?Mt(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight)):o.top-r<n.top&&Mt(e,Math.max(t.offsetTop-r,0))}function Dt(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var Vt=!1,zt={get passive(){return Vt=!0}},Rt="undefined"!=typeof window?window:{};Rt.addEventListener&&Rt.removeEventListener&&(Rt.addEventListener("p",Ot,zt),Rt.removeEventListener("p",Ot,!1));var At=Vt;function Tt(e){return null!=e}function Ft(e,t,n){return e?t:n}var Lt=["children","innerProps"],Nt=["children","innerProps"];var Bt,Ht,$t,Ut=function(e){return"auto"===e?"bottom":e},Wt=(0,x.createContext)(null),Gt=function(e){var t=e.children,n=e.minMenuHeight,o=e.maxMenuHeight,r=e.menuPlacement,i=e.menuPosition,a=e.menuShouldScrollIntoView,s=e.theme,l=((0,x.useContext)(Wt)||{}).setPortalPlacement,u=(0,x.useRef)(null),p=c((0,x.useState)(o),2),d=p[0],f=p[1],h=c((0,x.useState)(null),2),v=h[0],m=h[1],g=s.spacing.controlHeight;return yt((function(){var e=u.current;if(e){var t="fixed"===i,s=function(e){var t=e.maxHeight,n=e.menuEl,o=e.minHeight,r=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,o=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var r=e;r=r.parentElement;)if(t=getComputedStyle(r),(!n||"static"!==t.position)&&o.test(t.overflow+t.overflowY+t.overflowX))return r;return document.documentElement}(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var c,p=l.getBoundingClientRect().height,d=n.getBoundingClientRect(),f=d.bottom,h=d.height,v=d.top,m=n.offsetParent.getBoundingClientRect().top,g=a||Pt(c=l)?window.innerHeight:c.clientHeight,b=_t(l),y=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),O=m-w,x=g-v,S=O+b,C=p-b-v,j=f-g+b+y,k=b+v-w,P=160;switch(r){case"auto":case"bottom":if(x>=h)return{placement:"bottom",maxHeight:t};if(C>=h&&!a)return i&&Et(l,j,P),{placement:"bottom",maxHeight:t};if(!a&&C>=o||a&&x>=o)return i&&Et(l,j,P),{placement:"bottom",maxHeight:a?x-y:C-y};if("auto"===r||a){var _=t,M=a?O:S;return M>=o&&(_=Math.min(M-y-s,t)),{placement:"top",maxHeight:_}}if("bottom"===r)return i&&Mt(l,j),{placement:"bottom",maxHeight:t};break;case"top":if(O>=h)return{placement:"top",maxHeight:t};if(S>=h&&!a)return i&&Et(l,k,P),{placement:"top",maxHeight:t};if(!a&&S>=o||a&&O>=o){var E=t;return(!a&&S>=o||a&&O>=o)&&(E=a?O-w:S-w),i&&Et(l,k,P),{placement:"top",maxHeight:E}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return u}({maxHeight:o,menuEl:e,minHeight:n,placement:r,shouldScroll:a&&!t,isFixedPosition:t,controlHeight:g});f(s.maxHeight),m(s.placement),null==l||l(s.placement)}}),[o,r,i,a,n,l,g]),t({ref:u,placerProps:C(C({},e),{},{placement:v||Ut(r),maxHeight:d})})},Yt=function(e,t){var n=e.theme,o=n.spacing.baseUnit,r=n.colors;return C({textAlign:"center"},t?{}:{color:r.neutral40,padding:"".concat(2*o,"px ").concat(3*o,"px")})},Zt=Yt,qt=Yt,Jt=["size"],Xt=["innerProps","isRtl","size"],Kt={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Qt=function(e){var t=e.size,n=Qe(e,Jt);return Xe("svg",O({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Kt},n))},en=function(e){return Xe(Qt,O({size:20},e),Xe("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},tn=function(e){return Xe(Qt,O({size:20},e),Xe("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},nn=function(e,t){var n=e.isFocused,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return C({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*r,":hover":{color:n?i.neutral80:i.neutral40}})},on=nn,rn=nn,an=function(){var e=Ke.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Bt||(Ht=["\n  0%, 80%, 100% { opacity: 0; }\n  40% { opacity: 1; }\n"],$t||($t=Ht.slice(0)),Bt=Object.freeze(Object.defineProperties(Ht,{raw:{value:Object.freeze($t)}})))),sn=function(e){var t=e.delay,n=e.offset;return Xe("span",{css:Ke({animation:"".concat(an," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},ln=["data"],un=["innerRef","isDisabled","isHidden","inputClassName"],cn={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},pn={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":C({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},cn)},dn=function(e){return C({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},cn)},fn=function(e){var t=e.children,n=e.innerProps;return Xe("div",n,t)},hn={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Xe("div",O({},kt(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Xe(en,null))},Control:function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Xe("div",O({ref:r},kt(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":o,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Xe("div",O({},kt(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Xe(tn,null))},DownChevron:tn,CrossIcon:en,Group:function(e){var t=e.children,n=e.cx,o=e.getStyles,r=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,u=e.theme,c=e.selectProps;return Xe("div",O({},kt(e,"group",{group:!0}),s),Xe(i,O({},a,{selectProps:c,theme:u,getStyles:o,getClassNames:r,cx:n}),l),Xe("div",null,t))},GroupHeading:function(e){var t=jt(e);t.data;var n=Qe(t,ln);return Xe("div",O({},kt(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Xe("div",O({},kt(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Xe("span",O({},t,kt(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,o=jt(e),r=o.innerRef,i=o.isDisabled,a=o.isHidden,s=o.inputClassName,l=Qe(o,un);return Xe("div",O({},kt(e,"input",{"input-container":!0}),{"data-value":n||""}),Xe("input",O({className:t({input:!0},s),ref:r,style:dn(a),disabled:i},l)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,o=e.size,r=void 0===o?4:o,i=Qe(e,Xt);return Xe("div",O({},kt(C(C({},i),{},{innerProps:t,isRtl:n,size:r}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Xe(sn,{delay:0,offset:n}),Xe(sn,{delay:160,offset:!0}),Xe(sn,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,o=e.innerProps;return Xe("div",O({},kt(e,"menu",{menu:!0}),{ref:n},o),t)},MenuList:function(e){var t=e.children,n=e.innerProps,o=e.innerRef,r=e.isMulti;return Xe("div",O({},kt(e,"menuList",{"menu-list":!0,"menu-list--is-multi":r}),{ref:o},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,o=e.controlElement,r=e.innerProps,i=e.menuPlacement,a=e.menuPosition,s=(0,x.useRef)(null),l=(0,x.useRef)(null),u=c((0,x.useState)(Ut(i)),2),p=u[0],d=u[1],f=(0,x.useMemo)((function(){return{setPortalPlacement:d}}),[]),h=c((0,x.useState)(null),2),v=h[0],m=h[1],g=(0,x.useCallback)((function(){if(o){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(o),t="fixed"===a?0:window.pageYOffset,n=e[p]+t;n===(null==v?void 0:v.offset)&&e.left===(null==v?void 0:v.rect.left)&&e.width===(null==v?void 0:v.rect.width)||m({offset:n,rect:e})}}),[o,a,p,null==v?void 0:v.offset,null==v?void 0:v.rect.left,null==v?void 0:v.rect.width]);yt((function(){g()}),[g]);var b=(0,x.useCallback)((function(){"function"==typeof l.current&&(l.current(),l.current=null),o&&s.current&&(l.current=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=o,l=r||i?[...st(e)?bt(e):e.contextElement?bt(e.contextElement):[],...bt(t)]:[];l.forEach((e=>{const t=!st(e)&&e.toString().includes("V");!r||s&&!t||e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));let u,c=null;a&&(c=new ResizeObserver((()=>{n()})),st(e)&&!s&&c.observe(e),st(e)||!e.contextElement||s||c.observe(e.contextElement),c.observe(t));let p=s?vt(e):null;return s&&function t(){const o=vt(e);!p||o.x===p.x&&o.y===p.y&&o.width===p.width&&o.height===p.height||n(),p=o,u=requestAnimationFrame(t)}(),n(),()=>{var e;l.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=c)||e.disconnect(),c=null,s&&cancelAnimationFrame(u)}}(o,s.current,g,{elementResize:"ResizeObserver"in window}))}),[o,g]);yt((function(){b()}),[b]);var y=(0,x.useCallback)((function(e){s.current=e,b()}),[b]);if(!t&&"fixed"!==a||!v)return null;var w=Xe("div",O({ref:y},kt(C(C({},e),{},{offset:v.offset,position:a,rect:v.rect}),"menuPortal",{"menu-portal":!0}),r),n);return Xe(Wt.Provider,{value:f},t?(0,et.createPortal)(w,t):w)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,o=e.innerProps,r=Qe(e,Nt);return Xe("div",O({},kt(C(C({},r),{},{children:n,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,o=e.innerProps,r=Qe(e,Lt);return Xe("div",O({},kt(C(C({},r),{},{children:n,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),n)},MultiValue:function(e){var t=e.children,n=e.components,o=e.data,r=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,u=n.Label,c=n.Remove;return Xe(l,{data:o,innerProps:C(C({},kt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),r),selectProps:s},Xe(u,{data:o,innerProps:C({},kt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),Xe(c,{data:o,innerProps:C(C({},kt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},MultiValueContainer:fn,MultiValueLabel:fn,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Xe("div",O({role:"button"},n),t||Xe(en,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.innerRef,a=e.innerProps;return Xe("div",O({},kt(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":o,"option--is-selected":r}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Xe("div",O({},kt(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,o=e.isDisabled,r=e.isRtl;return Xe("div",O({},kt(e,"container",{"--is-disabled":o,"--is-rtl":r}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,o=e.innerProps;return Xe("div",O({},kt(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),o),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,o=e.isMulti,r=e.hasValue;return Xe("div",O({},kt(e,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":r}),n),t)}},vn=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function mn(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((o=e[n])===(r=t[n])||vn(o)&&vn(r)))return!1;var o,r;return!0}for(var gn={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},bn=function(e){return Xe("span",O({css:gn},e))},yn={guidance:function(e){var t=e.isSearchable,n=e.isMulti,o=e.tabSelectsValue,r=e.context,i=e.isInitialFocus;switch(r){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,o=void 0===n?"":n,r=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(r.length>1?"s":""," ").concat(r.join(","),", selected.");case"select-option":return"option ".concat(o,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,o=e.options,r=e.label,i=void 0===r?"":r,a=e.selectValue,s=e.isDisabled,l=e.isSelected,u=e.isAppleDevice,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(c(a,n),".");if("menu"===t&&u){var p=s?" disabled":"",d="".concat(l?" selected":"").concat(p);return"".concat(i).concat(d,", ").concat(c(o,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},wn=function(e){var t=e.ariaSelection,n=e.focusedOption,o=e.focusedValue,r=e.focusableOptions,i=e.isFocused,a=e.selectValue,s=e.selectProps,l=e.id,u=e.isAppleDevice,c=s.ariaLiveMessages,p=s.getOptionLabel,d=s.inputValue,f=s.isMulti,h=s.isOptionDisabled,v=s.isSearchable,m=s.menuIsOpen,g=s.options,b=s.screenReaderStatus,y=s.tabSelectsValue,w=s.isLoading,O=s["aria-label"],S=s["aria-live"],j=(0,x.useMemo)((function(){return C(C({},yn),c||{})}),[c]),k=(0,x.useMemo)((function(){var e,n="";if(t&&j.onChange){var o=t.option,r=t.options,i=t.removedValue,s=t.removedValues,l=t.value,u=i||o||(e=l,Array.isArray(e)?null:e),c=u?p(u):"",d=r||s||void 0,f=d?d.map(p):[],v=C({isDisabled:u&&h(u,a),label:c,labels:f},t);n=j.onChange(v)}return n}),[t,j,h,a,p]),P=(0,x.useMemo)((function(){var e="",t=n||o,i=!!(n&&a&&a.includes(n));if(t&&j.onFocus){var s={focused:t,label:p(t),isDisabled:h(t,a),isSelected:i,options:r,context:t===n?"menu":"value",selectValue:a,isAppleDevice:u};e=j.onFocus(s)}return e}),[n,o,p,h,j,r,a,u]),_=(0,x.useMemo)((function(){var e="";if(m&&g.length&&!w&&j.onFilter){var t=b({count:r.length});e=j.onFilter({inputValue:d,resultsMessage:t})}return e}),[r,d,m,j,g,b,w]),M="initial-input-focus"===(null==t?void 0:t.action),E=(0,x.useMemo)((function(){var e="";if(j.guidance){var t=o?"value":m?"menu":"input";e=j.guidance({"aria-label":O,context:t,isDisabled:n&&h(n,a),isMulti:f,isSearchable:v,tabSelectsValue:y,isInitialFocus:M})}return e}),[O,n,o,f,h,v,m,j,a,y,M]),I=Xe(x.Fragment,null,Xe("span",{id:"aria-selection"},k),Xe("span",{id:"aria-focused"},P),Xe("span",{id:"aria-results"},_),Xe("span",{id:"aria-guidance"},E));return Xe(x.Fragment,null,Xe(bn,{id:l},M&&I),Xe(bn,{"aria-live":S,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!M&&I))},On=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],xn=new RegExp("["+On.map((function(e){return e.letters})).join("")+"]","g"),Sn={},Cn=0;Cn<On.length;Cn++)for(var jn=On[Cn],kn=0;kn<jn.letters.length;kn++)Sn[jn.letters[kn]]=jn.base;var Pn=function(e){return e.replace(xn,(function(e){return Sn[e]}))},Mn=function(e,t){void 0===t&&(t=mn);var n=null;function o(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var i=e.apply(this,o);return n={lastResult:i,lastArgs:o,lastThis:this},i}return o.clear=function(){n=null},o}(Pn),En=function(e){return e.replace(/^\s+|\s+$/g,"")},In=function(e){return"".concat(e.label," ").concat(e.value)},Dn=["innerRef"];function Vn(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var r=Object.entries(e).filter((function(e){var t=c(e,1)[0];return!n.includes(t)}));return r.reduce((function(e,t){var n=c(t,2),o=n[0],r=n[1];return e[o]=r,e}),{})}(Qe(e,Dn),"onExited","in","enter","exit","appear");return Xe("input",O({ref:t},n,{css:Ke({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var zn=["boxSizing","height","overflow","paddingRight","position"],Rn={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function An(e){e.preventDefault()}function Tn(e){e.stopPropagation()}function Fn(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Ln(){return"ontouchstart"in window||navigator.maxTouchPoints}var Nn=!("undefined"==typeof window||!window.document||!window.document.createElement),Bn=0,Hn={capture:!1,passive:!1},$n=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},Un={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Wn(e){var t=e.children,n=e.lockEnabled,o=e.captureEnabled,r=function(e){var t=e.isEnabled,n=e.onBottomArrive,o=e.onBottomLeave,r=e.onTopArrive,i=e.onTopLeave,a=(0,x.useRef)(!1),s=(0,x.useRef)(!1),l=(0,x.useRef)(0),u=(0,x.useRef)(null),c=(0,x.useCallback)((function(e,t){if(null!==u.current){var l=u.current,c=l.scrollTop,p=l.scrollHeight,d=l.clientHeight,f=u.current,h=t>0,v=p-d-c,m=!1;v>t&&a.current&&(o&&o(e),a.current=!1),h&&s.current&&(i&&i(e),s.current=!1),h&&t>v?(n&&!a.current&&n(e),f.scrollTop=p,m=!0,a.current=!0):!h&&-t>c&&(r&&!s.current&&r(e),f.scrollTop=0,m=!0,s.current=!0),m&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,o,r,i]),p=(0,x.useCallback)((function(e){c(e,e.deltaY)}),[c]),d=(0,x.useCallback)((function(e){l.current=e.changedTouches[0].clientY}),[]),f=(0,x.useCallback)((function(e){var t=l.current-e.changedTouches[0].clientY;c(e,t)}),[c]),h=(0,x.useCallback)((function(e){if(e){var t=!!At&&{passive:!1};e.addEventListener("wheel",p,t),e.addEventListener("touchstart",d,t),e.addEventListener("touchmove",f,t)}}),[f,d,p]),v=(0,x.useCallback)((function(e){e&&(e.removeEventListener("wheel",p,!1),e.removeEventListener("touchstart",d,!1),e.removeEventListener("touchmove",f,!1))}),[f,d,p]);return(0,x.useEffect)((function(){if(t){var e=u.current;return h(e),function(){v(e)}}}),[t,h,v]),function(e){u.current=e}}({isEnabled:void 0===o||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,o=void 0===n||n,r=(0,x.useRef)({}),i=(0,x.useRef)(null),a=(0,x.useCallback)((function(e){if(Nn){var t=document.body,n=t&&t.style;if(o&&zn.forEach((function(e){var t=n&&n[e];r.current[e]=t})),o&&Bn<1){var i=parseInt(r.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+i||0;Object.keys(Rn).forEach((function(e){var t=Rn[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&Ln()&&(t.addEventListener("touchmove",An,Hn),e&&(e.addEventListener("touchstart",Fn,Hn),e.addEventListener("touchmove",Tn,Hn))),Bn+=1}}),[o]),s=(0,x.useCallback)((function(e){if(Nn){var t=document.body,n=t&&t.style;Bn=Math.max(Bn-1,0),o&&Bn<1&&zn.forEach((function(e){var t=r.current[e];n&&(n[e]=t)})),t&&Ln()&&(t.removeEventListener("touchmove",An,Hn),e&&(e.removeEventListener("touchstart",Fn,Hn),e.removeEventListener("touchmove",Tn,Hn)))}}),[o]);return(0,x.useEffect)((function(){if(t){var e=i.current;return a(e),function(){s(e)}}}),[t,a,s]),function(e){i.current=e}}({isEnabled:n});return Xe(x.Fragment,null,n&&Xe("div",{onClick:$n,css:Un}),t((function(e){r(e),i(e)})))}var Gn={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Yn=function(e){var t=e.name,n=e.onFocus;return Xe("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Gn,value:"",onChange:function(){}})};function Zn(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function qn(){return Zn(/^Mac/i)}var Jn={clearIndicator:rn,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.theme,i=r.colors,a=r.borderRadius;return C({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:r.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:o?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:o?i.primary:i.neutral30}})},dropdownIndicator:on,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,o=n.colors,r=n.spacing;return C({label:"group",cursor:"default",display:"block"},t?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*r.baseUnit,paddingRight:3*r.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return C({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r})},input:function(e,t){var n=e.isDisabled,o=e.value,r=e.theme,i=r.spacing,a=r.colors;return C(C({visibility:n?"hidden":"visible",transform:o?"translateZ(0)":""},pn),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,o=e.size,r=e.theme,i=r.colors,a=r.spacing.baseUnit;return C({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:qt,menu:function(e,t){var n,o=e.placement,r=e.theme,i=r.borderRadius,s=r.spacing,l=r.colors;return C((a(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(o),"100%"),a(n,"position","absolute"),a(n,"width","100%"),a(n,"zIndex",1),n),t?{}:{backgroundColor:l.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},menuList:function(e,t){var n=e.maxHeight,o=e.theme.spacing.baseUnit;return C({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:o,paddingTop:o})},menuPortal:function(e){var t=e.rect,n=e.offset,o=e.position;return{left:t.left,position:o,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors;return C({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:r/2,margin:o.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,o=n.borderRadius,r=n.colors,i=e.cropWithEllipsis;return C({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:o/2,color:r.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors,a=e.isFocused;return C({alignItems:"center",display:"flex"},t?{}:{borderRadius:r/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:Zt,option:function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return C({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:r?s.primary:o?s.primary25:"transparent",color:n?s.neutral20:r?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:r?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,o=n.spacing,r=n.colors;return C({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:r.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing,i=o.colors;return C({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,o=e.isMulti,r=e.hasValue,i=e.selectProps.controlShouldRenderValue;return C({alignItems:"center",display:o&&r&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},Xn={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Kn={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Dt(),captureMenuScroll:!Dt(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=C({ignoreCase:!0,ignoreAccents:!0,stringify:In,trim:!0,matchFrom:"any"},undefined),o=n.ignoreCase,r=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?En(t):t,u=a?En(i(e)):i(e);return o&&(l=l.toLowerCase(),u=u.toLowerCase()),r&&(l=Mn(l),u=Pn(u)),"start"===s?u.substr(0,l.length)===l:u.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Qn(e,t,n,o){return{type:"option",data:t,isDisabled:so(e,t,n),isSelected:lo(e,t,n),label:io(e,t),value:ao(e,t),index:o}}function eo(e,t){return e.options.map((function(n,o){if("options"in n){var r=n.options.map((function(n,o){return Qn(e,n,t,o)})).filter((function(t){return oo(e,t)}));return r.length>0?{type:"group",data:n,options:r,index:o}:void 0}var i=Qn(e,n,t,o);return oo(e,i)?i:void 0})).filter(Tt)}function to(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,u(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function no(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,u(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function oo(e,t){var n=e.inputValue,o=void 0===n?"":n,r=t.data,i=t.isSelected,a=t.label,s=t.value;return(!co(e)||!i)&&uo(e,{label:a,value:s,data:r},o)}var ro=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},io=function(e,t){return e.getOptionLabel(t)},ao=function(e,t){return e.getOptionValue(t)};function so(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function lo(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var o=ao(e,t);return n.some((function(t){return ao(e,t)===o}))}function uo(e,t,n){return!e.filterOption||e.filterOption(t,n)}var co=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},po=1,fo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(l,e);var t,n,o,i,a,s=(t=l,n=_(),function(){var e,o=P(t);if(n){var i=P(this).constructor;e=Reflect.construct(o,arguments,i)}else e=o.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=s.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.isAppleDevice=qn()||Zn(/^iPhone/i)||Zn(/^iPad/i)||qn()&&navigator.maxTouchPoints>1,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var o=t.props,r=o.onChange,i=o.name;n.name=i,t.ariaOnChange(e,n),r(e,n)},t.setValue=function(e,n,o){var r=t.props,i=r.closeMenuOnSelect,a=r.isMulti,s=r.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(t.setState({inputIsHiddenAfterUpdate:!a}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:o})},t.selectOption=function(e){var n=t.props,o=n.blurInputOnSelect,r=n.isMulti,i=n.name,a=t.state.selectValue,s=r&&t.isOptionSelected(e,a),l=t.isOptionDisabled(e,a);if(s){var c=t.getOptionValue(e);t.setValue(a.filter((function(e){return t.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void t.ariaOnChange(e,{action:"select-option",option:e,name:i});r?t.setValue([].concat(u(a),[e]),"select-option",e):t.setValue(e,"select-option")}o&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,o=t.state.selectValue,r=t.getOptionValue(e),i=o.filter((function(e){return t.getOptionValue(e)!==r})),a=Ft(n,i,i[0]||null);t.onChange(a,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange(Ft(t.props.isMulti,[],null),{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,o=n[n.length-1],r=n.slice(0,n.length-1),i=Ft(e,r,r[0]||null);o&&t.onChange(i,{action:"pop-value",removedValue:o})},t.getFocusedOptionId=function(e){return ro(t.state.focusableOptionsWithIds,e)},t.getFocusableOptionsWithIds=function(){return no(eo(t.props,t.state.selectValue),t.getElementId("option"))},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return St.apply(void 0,[t.props.classNamePrefix].concat(n))},t.getOptionLabel=function(e){return io(t.props,e)},t.getOptionValue=function(e){return ao(t.props,e)},t.getStyles=function(e,n){var o=t.props.unstyled,r=Jn[e](n,o);r.boxSizing="border-box";var i=t.props.styles[e];return i?i(r,n):r},t.getClassNames=function(e,n){var o,r;return null===(o=(r=t.props.classNames)[e])||void 0===o?void 0:o.call(r,n)},t.getElementId=function(e){return"".concat(t.state.instancePrefix,"-").concat(e)},t.getComponents=function(){return e=t.props,C(C({},hn),e.components);var e},t.buildCategorizedOptions=function(){return eo(t.props,t.state.selectValue)},t.getCategorizedOptions=function(){return t.props.menuIsOpen?t.buildCategorizedOptions():[]},t.buildFocusableOptions=function(){return to(t.buildCategorizedOptions())},t.getFocusableOptions=function(){return t.props.menuIsOpen?t.buildFocusableOptions():[]},t.ariaOnChange=function(e,n){t.setState({ariaSelection:C({value:e},n)})},t.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),t.focusInput())},t.onMenuMouseMove=function(e){t.blockOptionHover=!1},t.onControlMouseDown=function(e){if(!e.defaultPrevented){var n=t.props.openMenuOnClick;t.state.isFocused?t.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&t.onMenuClose():n&&t.openMenu("first"):(n&&(t.openAfterFocus=!0),t.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},t.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||t.props.isDisabled)){var n=t.props,o=n.isMulti,r=n.menuIsOpen;t.focusInput(),r?(t.setState({inputIsHiddenAfterUpdate:!o}),t.onMenuClose()):t.openMenu("first"),e.preventDefault()}},t.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(t.clearValue(),e.preventDefault(),t.openAfterFocus=!1,"touchend"===e.type?t.focusInput():setTimeout((function(){return t.focusInput()})))},t.onScroll=function(e){"boolean"==typeof t.props.closeMenuOnScroll?e.target instanceof HTMLElement&&Pt(e.target)&&t.props.onMenuClose():"function"==typeof t.props.closeMenuOnScroll&&t.props.closeMenuOnScroll(e)&&t.props.onMenuClose()},t.onCompositionStart=function(){t.isComposing=!0},t.onCompositionEnd=function(){t.isComposing=!1},t.onTouchStart=function(e){var n=e.touches,o=n&&n.item(0);o&&(t.initialTouchX=o.clientX,t.initialTouchY=o.clientY,t.userIsDragging=!1)},t.onTouchMove=function(e){var n=e.touches,o=n&&n.item(0);if(o){var r=Math.abs(o.clientX-t.initialTouchX),i=Math.abs(o.clientY-t.initialTouchY);t.userIsDragging=r>5||i>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=t.props.inputValue,o=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(o,{action:"input-change",prevInputValue:n}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var n=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:n}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){if(!t.blockOptionHover&&t.state.focusedOption!==e){var n=t.getFocusableOptions().indexOf(e);t.setState({focusedOption:e,focusedOptionId:n>-1?t.getFocusedOptionId(e):null})}},t.shouldHideSelectedOptions=function(){return co(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var n=t.props,o=n.isMulti,r=n.backspaceRemovesValue,i=n.escapeClearsValue,a=n.inputValue,s=n.isClearable,l=n.isDisabled,u=n.menuIsOpen,c=n.onKeyDown,p=n.tabSelectsValue,d=n.openMenuOnFocus,f=t.state,h=f.focusedOption,v=f.focusedValue,m=f.selectValue;if(!(l||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!o||a)return;t.focusValue("previous");break;case"ArrowRight":if(!o||a)return;t.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(v)t.removeValue(v);else{if(!r)return;o?t.popValue():s&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!u||!p||!h||d&&t.isOptionSelected(h,m))return;t.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(u){if(!h)return;if(t.isComposing)return;t.selectOption(h);break}return;case"Escape":u?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:a}),t.onMenuClose()):s&&i&&t.clearValue();break;case" ":if(a)return;if(!u){t.openMenu("first");break}if(!h)return;t.selectOption(h);break;case"ArrowUp":u?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":u?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!u)return;t.focusOption("pageup");break;case"PageDown":if(!u)return;t.focusOption("pagedown");break;case"Home":if(!u)return;t.focusOption("first");break;case"End":if(!u)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.state.instancePrefix="react-select-"+(t.props.instanceId||++po),t.state.selectValue=Ct(e.value),e.menuIsOpen&&t.state.selectValue.length){var n=t.getFocusableOptionsWithIds(),o=t.buildFocusableOptions(),r=o.indexOf(t.state.selectValue[0]);t.state.focusableOptionsWithIds=n,t.state.focusedOption=o[r],t.state.focusedOptionId=ro(n,o[r])}return t}return o=l,i=[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&It(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,o=t.menuIsOpen,r=this.state.isFocused;(r&&!n&&e.isDisabled||r&&o&&!e.menuIsOpen)&&this.focusInput(),r&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):r||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(It(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,o=n.selectValue,r=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(o[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(r&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,o=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var r=n.indexOf(o);o||(r=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===r?0:-1===r?i:r-1;break;case"next":r>-1&&r<i&&(a=r+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,o=this.getFocusableOptions();if(o.length){var r=0,i=o.indexOf(n);n||(i=-1),"up"===e?r=i>0?i-1:o.length-1:"down"===e?r=(i+1)%o.length:"pageup"===e?(r=i-t)<0&&(r=0):"pagedown"===e?(r=i+t)>o.length-1&&(r=o.length-1):"last"===e&&(r=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[r],focusedValue:null,focusedOptionId:this.getFocusedOptionId(o[r])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Xn):C(C({},Xn),this.props.theme):Xn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,o=this.getClassNames,r=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,u=s.isRtl,c=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:o,getValue:r,hasValue:this.hasValue(),isMulti:l,isRtl:u,options:c,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return so(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return lo(this.props,e,t)}},{key:"filterOption",value:function(e,t){return uo(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,o=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:o})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,o=e.inputId,r=e.inputValue,i=e.tabIndex,a=e.form,s=e.menuIsOpen,l=e.required,u=this.getComponents().Input,c=this.state,p=c.inputIsHidden,d=c.ariaSelection,f=this.commonProps,h=o||this.getElementId("input"),v=C(C(C({"aria-autocomplete":"list","aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":l,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},s&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==d?void 0:d.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?x.createElement(u,O({},f,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:h,innerRef:this.getInputRef,isDisabled:t,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:a,type:"text",value:r},v)):x.createElement(Vn,O({id:h,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ot,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:a,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,o=t.MultiValueContainer,r=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,s=t.Placeholder,l=this.commonProps,u=this.props,c=u.controlShouldRenderValue,p=u.isDisabled,d=u.isMulti,f=u.inputValue,h=u.placeholder,v=this.state,m=v.selectValue,g=v.focusedValue,b=v.isFocused;if(!this.hasValue()||!c)return f?null:x.createElement(s,O({},l,{key:"placeholder",isDisabled:p,isFocused:b,innerProps:{id:this.getElementId("placeholder")}}),h);if(d)return m.map((function(t,a){var s=t===g,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return x.createElement(n,O({},l,{components:{Container:o,Label:r,Remove:i},isFocused:s,isDisabled:p,key:u,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(f)return null;var y=m[0];return x.createElement(a,O({},l,{data:y,isDisabled:p}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,r=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||r)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return x.createElement(e,O({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,r=n.isLoading,i=this.state.isFocused;return e&&r?x.createElement(e,O({},t,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:i})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var o=this.commonProps,r=this.props.isDisabled,i=this.state.isFocused;return x.createElement(n,O({},o,{isDisabled:r,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,o=this.state.isFocused,r={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return x.createElement(e,O({},t,{innerProps:r,isDisabled:n,isFocused:o}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,o=t.GroupHeading,r=t.Menu,i=t.MenuList,a=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,u=t.Option,c=this.commonProps,p=this.state.focusedOption,d=this.props,f=d.captureMenuScroll,h=d.inputValue,v=d.isLoading,m=d.loadingMessage,g=d.minMenuHeight,b=d.maxMenuHeight,y=d.menuIsOpen,w=d.menuPlacement,S=d.menuPosition,C=d.menuPortalTarget,j=d.menuShouldBlockScroll,k=d.menuShouldScrollIntoView,P=d.noOptionsMessage,_=d.onMenuScrollToTop,M=d.onMenuScrollToBottom;if(!y)return null;var E,I=function(t,n){var o=t.type,r=t.data,i=t.isDisabled,a=t.isSelected,s=t.label,l=t.value,d=p===r,f=i?void 0:function(){return e.onOptionHover(r)},h=i?void 0:function(){return e.selectOption(r)},v="".concat(e.getElementId("option"),"-").concat(n),m={id:v,onClick:h,onMouseMove:f,onMouseOver:f,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:a};return x.createElement(u,O({},c,{innerProps:m,data:r,isDisabled:i,isSelected:a,key:v,label:s,type:o,value:l,isFocused:d,innerRef:d?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())E=this.getCategorizedOptions().map((function(t){if("group"===t.type){var r=t.data,i=t.options,a=t.index,s="".concat(e.getElementId("group"),"-").concat(a),l="".concat(s,"-heading");return x.createElement(n,O({},c,{key:s,data:r,options:i,Heading:o,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return I(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return I(t,"".concat(t.index))}));else if(v){var D=m({inputValue:h});if(null===D)return null;E=x.createElement(s,c,D)}else{var V=P({inputValue:h});if(null===V)return null;E=x.createElement(l,c,V)}var z={minMenuHeight:g,maxMenuHeight:b,menuPlacement:w,menuPosition:S,menuShouldScrollIntoView:k},R=x.createElement(Gt,O({},c,z),(function(t){var n=t.ref,o=t.placerProps,a=o.placement,s=o.maxHeight;return x.createElement(r,O({},c,z,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:a}),x.createElement(Wn,{captureEnabled:f,onTopArrive:_,onBottomArrive:M,lockEnabled:j},(function(t){return x.createElement(i,O({},c,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":c.isMulti,id:e.getElementId("listbox")},isLoading:v,maxHeight:s,focusedOption:p}),E)})))}));return C||"fixed"===S?x.createElement(a,O({},c,{appendTo:C,controlElement:this.controlRef,menuPlacement:w,menuPosition:S}),R):R}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,o=t.isDisabled,r=t.isMulti,i=t.name,a=t.required,s=this.state.selectValue;if(a&&!this.hasValue()&&!o)return x.createElement(Yn,{name:i,onFocus:this.onValueInputFocus});if(i&&!o){if(r){if(n){var l=s.map((function(t){return e.getOptionValue(t)})).join(n);return x.createElement("input",{name:i,type:"hidden",value:l})}var u=s.length>0?s.map((function(t,n){return x.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):x.createElement("input",{name:i,type:"hidden",value:""});return x.createElement("div",null,u)}var c=s[0]?this.getOptionValue(s[0]):"";return x.createElement("input",{name:i,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,o=t.focusedOption,r=t.focusedValue,i=t.isFocused,a=t.selectValue,s=this.getFocusableOptions();return x.createElement(wn,O({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:o,focusedValue:r,isFocused:i,selectValue:a,focusableOptions:s,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,o=e.SelectContainer,r=e.ValueContainer,i=this.props,a=i.className,s=i.id,l=i.isDisabled,u=i.menuIsOpen,c=this.state.isFocused,p=this.commonProps=this.getCommonProps();return x.createElement(o,O({},p,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:c}),this.renderLiveRegion(),x.createElement(t,O({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:c,menuIsOpen:u}),x.createElement(r,O({},p,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),x.createElement(n,O({},p,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],a=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,o=t.clearFocusValueOnUpdate,r=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,u=e.options,c=e.value,p=e.menuIsOpen,d=e.inputValue,f=e.isMulti,h=Ct(c),v={};if(n&&(c!==n.value||u!==n.options||p!==n.menuIsOpen||d!==n.inputValue)){var m=p?function(e,t){return to(eo(e,t))}(e,h):[],g=p?no(eo(e,h),"".concat(l,"-option")):[],b=o?function(e,t){var n=e.focusedValue,o=e.selectValue.indexOf(n);if(o>-1){if(t.indexOf(n)>-1)return n;if(o<t.length)return t[o]}return null}(t,h):null,y=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,m);v={selectValue:h,focusedOption:y,focusedOptionId:ro(g,y),focusableOptionsWithIds:g,focusedValue:b,clearFocusValueOnUpdate:!1}}var w=null!=r&&e!==n?{inputIsHidden:r,inputIsHiddenAfterUpdate:void 0}:{},O=i,x=a&&s;return a&&!x&&(O={value:Ft(f,h,h[0]||null),options:h,action:"initial-input-focus"},x=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(O=null),C(C(C({},v),w),{},{prevProps:e,ariaSelection:O,prevWasFocused:x})}}],i&&j(o.prototype,i),a&&j(o,a),Object.defineProperty(o,"prototype",{writable:!1}),l}(x.Component);fo.defaultProps=Kn;var ho=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function vo(e){var t=e.defaultInputValue,n=void 0===t?"":t,o=e.defaultMenuIsOpen,r=void 0!==o&&o,i=e.defaultValue,a=void 0===i?null:i,s=e.inputValue,l=e.menuIsOpen,u=e.onChange,p=e.onInputChange,d=e.onMenuClose,f=e.onMenuOpen,h=e.value,v=Qe(e,ho),m=c((0,x.useState)(void 0!==s?s:n),2),g=m[0],b=m[1],y=c((0,x.useState)(void 0!==l?l:r),2),w=y[0],O=y[1],S=c((0,x.useState)(void 0!==h?h:a),2),j=S[0],k=S[1],P=(0,x.useCallback)((function(e,t){"function"==typeof u&&u(e,t),k(e)}),[u]),_=(0,x.useCallback)((function(e,t){var n;"function"==typeof p&&(n=p(e,t)),b(void 0!==n?n:e)}),[p]),M=(0,x.useCallback)((function(){"function"==typeof f&&f(),O(!0)}),[f]),E=(0,x.useCallback)((function(){"function"==typeof d&&d(),O(!1)}),[d]),I=void 0!==s?s:g,D=void 0!==l?l:w,V=void 0!==h?h:j;return C(C({},v),{},{inputValue:I,menuIsOpen:D,onChange:P,onInputChange:_,onMenuClose:E,onMenuOpen:M,value:V})}var mo=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"],go=(0,x.forwardRef)((function(e,t){var n=function(e){var t=e.defaultOptions,n=void 0!==t&&t,o=e.cacheOptions,r=void 0!==o&&o,i=e.loadOptions;e.options;var s=e.isLoading,l=void 0!==s&&s,u=e.onInputChange,p=e.filterOption,d=void 0===p?null:p,f=Qe(e,mo),h=f.inputValue,v=(0,x.useRef)(void 0),m=(0,x.useRef)(!1),g=c((0,x.useState)(Array.isArray(n)?n:void 0),2),b=g[0],y=g[1],w=c((0,x.useState)(void 0!==h?h:""),2),O=w[0],S=w[1],j=c((0,x.useState)(!0===n),2),k=j[0],P=j[1],_=c((0,x.useState)(void 0),2),M=_[0],E=_[1],I=c((0,x.useState)([]),2),D=I[0],V=I[1],z=c((0,x.useState)(!1),2),R=z[0],A=z[1],T=c((0,x.useState)({}),2),F=T[0],L=T[1],N=c((0,x.useState)(void 0),2),B=N[0],H=N[1],$=c((0,x.useState)(void 0),2),U=$[0],W=$[1];r!==U&&(L({}),W(r)),n!==B&&(y(Array.isArray(n)?n:void 0),H(n)),(0,x.useEffect)((function(){return m.current=!0,function(){m.current=!1}}),[]);var G=(0,x.useCallback)((function(e,t){if(!i)return t();var n=i(e,t);n&&"function"==typeof n.then&&n.then(t,(function(){return t()}))}),[i]);(0,x.useEffect)((function(){!0===n&&G(O,(function(e){m.current&&(y(e||[]),P(!!v.current))}))}),[]);var Y=(0,x.useCallback)((function(e,t){var n=function(e,t,n){if(n){var o=n(e,t);if("string"==typeof o)return o}return e}(e,t,u);if(!n)return v.current=void 0,S(""),E(""),V([]),P(!1),void A(!1);if(r&&F[n])S(n),E(n),V(F[n]),P(!1),A(!1);else{var o=v.current={};S(n),P(!0),A(!M),G(n,(function(e){m&&o===v.current&&(v.current=void 0,P(!1),E(n),V(e||[]),A(!1),L(e?C(C({},F),{},a({},n,e)):F))}))}}),[r,G,M,F,u]),Z=R?[]:O&&M?D:b||[];return C(C({},f),{},{options:Z,isLoading:k||l,onInputChange:Y,filterOption:d})}(e),o=vo(n);return x.createElement(fo,O({ref:t},o))})),bo=go,yo=window.ReactJSXRuntime;function wo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Oo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wo(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function So(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xo(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Co(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function jo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Co(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Co(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,o.registerBlockType)("vczapi/list-meetings",{apiVersion:2,edit:function(e){e.className;var t=e.attributes,n=e.setAttributes,o=(e.isSelected,t.shortcodeType),r=t.orderBy,i=t.postsToShow,a=t.displayType,s=t.showPastMeeting,l=t.showFilter,v=t.selectedCategory,y=t.selectedAuthor,O=t.columns,x=t.preview,S=(0,b.useRef)(),C=c((0,b.useState)([]),2),j=C[0],k=C[1],P=c((0,b.useState)([]),2),_=P[0],M=P[1];return(0,b.useEffect)((function(){S.current=!0,w()({path:"/wp/v2/zoom_meeting_cats"}).then((function(e){if(!0===S.current){var t=e.length>0?e.map((function(e,t){return{label:e.name+" ("+e.count+")",value:e.slug}})):[];k((function(e){return[].concat(u(e),u(t))}))}})).catch((function(){!0===S.current&&k([])}));var e={per_page:10,who:"authors"};0!==y&&(e.include=y);var t=(0,f.addQueryArgs)("/wp/v2/users",e);return w()({path:t}).then((function(e){if(!0===S.current){var t=e.length>0?e.map((function(e,t){return{label:e.name,value:e.id}})):[];M((function(e){return[].concat(u(e),u(t))}))}})).catch((function(){})),function(){S.current=!1}}),[]),x?(0,yo.jsx)(b.Fragment,{children:(0,yo.jsx)(m(),{block:"vczapi/list-meetings",attributes:{columns:O,displayType:a,postsToShow:i,orderBy:r,shortcodeType:o,showFilter:l,selectedCategory:v,selectedAuthor:y}})}):(0,yo.jsxs)(yo.Fragment,{children:[(0,yo.jsx)(h.InspectorControls,{children:(0,yo.jsxs)(g.PanelBody,{title:"Settings",initialOpen:!0,children:[S.current&&(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Show Meeting or Webinar","video-conferencing-with-zoom-api"),value:o,options:[{label:"Meeting",value:"meeting"},{label:"Webinar",value:"webinar"}],help:"Determines whether to show Meeting or Webinar",onChange:function(e){return n({shortcodeType:e})}}),S.current&&(0,yo.jsxs)(yo.Fragment,{children:[(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Type of Meeting/Webinar to Show","video-conferencing-with-zoom-api"),value:a,onChange:function(e){return n({displayType:e})},options:[{label:"Show All",value:""},{label:"Upcoming",value:"upcoming"},{label:"Past",value:"past"}],help:"Show All,Upcoming or Past Meeting - default All"}),"upcoming"===a&&(0,yo.jsx)(g.CheckboxControl,{label:(0,p.__)("Show Meeting that have started","video-conferencing-with-zoom-api"),checked:s,onChange:function(e){return n({showPastMeeting:e})},help:"will show meetings that have passed meeting start time - upto 30 minutes after the meeting was scheduled to start."})]}),S.current&&(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Show Filter","video-conferencing-with-zoom-api"),value:l,options:[{label:"Yes",value:"yes"},{label:"No",value:"no"}],onChange:function(e){n({showFilter:e})}}),S.current&&(0,yo.jsx)(g.RangeControl,{label:(0,p.__)("Columns","video-conferencing-with-zoom-api"),value:O,help:"how many columns in the grid. Default value is 3. Users can use 1 or 2 or 3 or 4 - Any value upper than 4 will take 3 column value.",onChange:function(e){n({columns:e})},min:1,max:4}),S.current&&(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Order By","video-conferencing-with-zoom-api"),value:r,options:[{label:"Default Sorting",value:""},{label:"Ascending",value:"ASC"},{label:"Descending",value:"DESC"}],onChange:function(e){n({orderBy:e})}}),S.current&&(0,yo.jsxs)(yo.Fragment,{children:[(0,yo.jsx)("span",{children:(0,p.__)("Category","video-conferencing-with-zoom-api")}),(0,yo.jsx)(bo,{cacheOptions:!0,defaultOptions:j,isMulti:!0,isClearable:!0,placeholder:(0,p.__)("Select categories - default All categories are shown","video-conferencing-with-zoom-api"),onChange:function(e,t){var o=t.action;if("clear"===o)return n({selectedCategory:[]}),[];if("remove-value"===o)return n({selectedCategory:e}),e;if("select-option"===o){var r=(0,d.unionBy)(v,e,"value");n({selectedCategory:r}),M((function(t){return(0,d.unionBy)(t,[e],"value")}))}},defaultValue:(0,d.intersectionWith)(j,v,d.isEqual),className:"components-base-control"})]}),S.current&&(0,yo.jsxs)(yo.Fragment,{children:[(0,yo.jsx)("span",{children:(0,p.__)("Author","video-conferencing-with-zoom-api")}),(0,yo.jsx)(bo,{cacheOptions:!0,defaultOptions:_,noResultsText:!0,loadOptions:(0,d.debounce)((function(e,t){var n={per_page:5,who:"authors"};""!==e&&(n.search=e);var o=(0,f.addQueryArgs)("/wp/v2/users",n);return w()({path:o}).then((function(e){!0===S.current&&t(e.length>0?e.map((function(e,t){return{label:e.name,value:e.id}})):[])})).catch((function(){t([])}))}),800),isClearable:!0,placeholder:(0,p.__)("Select Author - Default All Authors are shown","video-conferencing-with-zoom-api"),onChange:function(e,t){var o=t.action;"clear"===o?n({selectedAuthor:0}):"remove-value"===o?n({selectedAuthor:e}):(n({selectedAuthor:e.value}),M((function(t){return(0,d.unionBy)(t,[e],"value")})))},defaultValue:_.filter((function(e){return e.value===y})),className:"components-base-control"})]}),S.current&&(0,yo.jsx)(g.RangeControl,{label:(0,p.__)("Number of Meetings/Webinars to show","video-conferencing-with-zoom-api"),value:i,onChange:function(e){return n({postsToShow:e})},min:1,max:100})]})}),(0,yo.jsx)("div",Oo(Oo({},(0,h.useBlockProps)()),{},{children:(0,yo.jsx)(g.Disabled,{children:(0,yo.jsx)(m(),{block:"vczapi/list-meetings",attributes:{columns:O,displayType:a,postsToShow:i,orderBy:r,shortcodeType:o,showFilter:l,selectedCategory:v,selectedAuthor:y}})})}))]})},example:{attributes:{preview:!0,columns:2,postsToShow:2}}}),(0,o.registerBlockType)("vczapi/show-meeting-post",{apiVersion:2,edit:function(e){var t=e.attributes,n=e.setAttributes,o=t.postID,r=t.preview,i=t.template,a=t.countdown,s=t.description,l=t.details,u=c((0,b.useState)([]),2),f=u[0],v=u[1],y=c((0,b.useState)([]),2),O=y[0],x=y[1],S=c((0,b.useState)(!1),2),C=S[0],j=S[1],k=c((0,b.useState)(!1),2),P=k[0],_=k[1],M=(0,b.useRef)(),E=(0,d.debounce)((function(e){e?(j(!0),w()({path:"/wp/v2/zoom_meetings?per_page=5&search="+e}).then((function(e){if(!0===M.current){var t=e.length>0?e.map((function(e){return{label:e.title.rendered,value:e.id}})):[];x(t),j(!1)}})).catch((function(){!0===M.current&&(x([]),j(!1))}))):x([])}),400),I=[{icon:P?"no":"edit",title:P?"Close":"Edit",subscript:"Edit",onClick:function(){_((function(e){return!e}))}}];if((0,b.useEffect)((function(){M.current=!0;var e="/wp/v2/zoom_meetings?per_page=5";return e=0!==o?e+"&include="+o:e,w()({path:e}).then((function(e){if(!0===M.current){var t=e.length>0?e.map((function(e){return{label:e.title.rendered,value:e.id}})):[];v(t)}})),function(){M.current=!1}}),[]),r)return(0,yo.jsx)("img",{src:vczapi_blocks.embed_post_preview,alt:"Embed Zoom post"});var D=O.length>0?O:f;return(0,yo.jsxs)("div",So(So({},(0,h.useBlockProps)()),{},{children:[(0,yo.jsx)(h.BlockControls,{children:(0,yo.jsx)(g.ToolbarGroup,{controls:I})}),!M.current&&(0,yo.jsx)(g.Spinner,{}),(0===o||P)&&(0,yo.jsxs)(g.Placeholder,{children:[(0,yo.jsx)("h2",{children:(0,p.__)("Zoom -  Show Meeting Post","video-conferencing-with-zoom-api")}),(0,yo.jsxs)("div",{className:"vczapi-blocks-form",children:[(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.ComboboxControl,{label:(0,p.__)("Select Meeting to Show","video-conferencing-with-zoom-api"),value:o||null,options:D,onFilterValueChange:E,isLoading:C,onChange:function(e){n({postID:Number(e)}),_(!1)}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Template","video-conferencing-with-zoom-api"),value:i,options:[{label:"Default",value:"none"},{label:"Boxed",value:"boxed"}],onChange:function(e){n({template:e})}})}),"boxed"!==i&&(0,yo.jsxs)(yo.Fragment,{children:[(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.CheckboxControl,{label:(0,p.__)("Display Countdown?","video-conferencing-with-zoom-api"),checked:a,onChange:function(e){n({countdown:e})}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.CheckboxControl,{label:(0,p.__)("Display Description?","video-conferencing-with-zoom-api"),checked:s,onChange:function(e){n({description:e})}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.CheckboxControl,{label:(0,p.__)("Display Details Section?","video-conferencing-with-zoom-api"),checked:l,onChange:function(e){n({details:e})}})})]})]})]}),0!==o&&!P&&(0,yo.jsx)(g.Disabled,{children:(0,yo.jsx)(m(),{block:"vczapi/show-meeting-post",attributes:{postID:o,template:i,description:s,countdown:a,details:l}})})]}))},example:{attributes:{preview:!0}}}),(0,o.registerBlockType)("vczapi/show-live-meeting",{apiVersion:2,edit:function(e){e.className;var t=e.attributes,n=e.setAttributes,o=t.host,i=t.selectedMeeting,a=t.link_only,s=t.preview,l=t.shouldShow,f=(0,b.useRef)(),v=c((0,b.useState)(!1),2),y=v[0],w=v[1],O=c((0,b.useState)([]),2),x=O[0],S=O[1],C=c((0,b.useState)(o||null),2),j=C[0],k=C[1],P=c((0,b.useState)((null==l?void 0:l.value)||l||"meeting"),2),_=P[0],M=P[1],E=c((0,b.useState)(i||{}),2),I=E[0],D=E[1],V=c((0,b.useState)([]),2),z=V[0],R=V[1],A=c((0,b.useState)(!1),2),T=A[0],F=A[1],L=c((0,b.useState)(1),2),N=L[0],B=L[1],H=c((0,b.useState)(1),2),$=H[0],U=H[1],W=c((0,b.useState)(!1),2),G=W[0],Y=W[1],Z=(0,d.debounce)((function(e){F(!0);var t=e?encodeURIComponent(e):"";fetch(ajaxurl+"?action=vczapi_get_zoom_hosts&host="+t).then((function(e){return e.json()})).then((function(e){if(f.current&&Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text,value:String(e.value||e.id)}}));R(t),F(!1)}})).catch((function(){f.current&&F(!1)}))}),300),q=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||"undefined"===e)return[];var o=ajaxurl+"?action=vczapi_get_live_meetings&host_id="+e+"&show="+t;n.hasOwnProperty("page_number")&&"undefined"!==n.page_number&&(o+="&page_number="+n.page_number),Y(!0),fetch(o).then((function(e){return e.json()})).then((function(e){if(f.current){var t=parseFloat(e.total_records)/parseFloat(e.page_size);if(t>1){var n=Math.round(t);B(n)}else B(1);S(e.formatted_meetings||[]),Y(!1)}})).catch((function(){f.current&&Y(!1)}))},J=function(e){var t=e.numberOfPages,n=[];if(t>1){for(var o=function(e){var t=e===$?"selected":"";n.push((0,yo.jsx)(g.Button,{className:t,onClick:function(){var t=(null==j?void 0:j.value)||j;q(t,_,{page_number:e}),U(e)},children:e},e))},r=1;r<=t;r++)o(r);return(0,yo.jsx)("div",{className:"vczapi-blocks-pagination",children:n})}return""};if((0,b.useEffect)((function(){f.current=!0,F(!0),fetch(ajaxurl+"?action=vczapi_get_zoom_hosts&host=").then((function(e){return e.json()})).then((function(e){if(f.current&&Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text,value:String(e.value||e.id)}}));R(t),F(!1)}})).catch((function(){f.current&&F(!1)}));var e=(null==o?void 0:o.value)||o;return e&&q(e,_),function(){f.current=!1}}),[]),s)return(0,yo.jsx)("img",{src:vczapi_blocks.direct_meeting_preview_image,alt:"Direct Meeting from Zoom"});var X=x.map((function(e){return{label:e.label,value:JSON.stringify(e)}}));return(0,yo.jsxs)("div",jo(jo({},(0,h.useBlockProps)()),{},{children:[(0,yo.jsx)(h.BlockControls,{children:(0,yo.jsx)(g.ToolbarGroup,{children:(0,yo.jsx)(g.ToolbarButton,{icon:y?"no":"edit",title:y?"Close":"Edit",subscript:"Edit",onClick:function(){w((function(e){return!e}))}})})}),(void 0===i||y)&&(0,yo.jsxs)(g.Placeholder,{children:[(0,yo.jsxs)("div",{className:"vczapi-label-header",children:[(0,yo.jsx)("h2",{children:(0,p.__)("Zoom - Show Meeting directly from Zoom","video-conferencing-with-zoom-api")}),(0,yo.jsx)("div",{children:(0,yo.jsx)("p",{children:(0,p.__)("Get a meeting directly from Zoom","video-conferencing-with-zoom-api")})})]}),(0,yo.jsxs)("div",{className:"vczapi-blocks-form",children:[void 0!==i&&i.hasOwnProperty("value")&&(0,yo.jsx)("div",{className:"vczapi-blocks-form--selected-meeting",children:(0,yo.jsxs)("h4",{children:["Currently Selected Meeting: ",(0,yo.jsx)("strong",{children:i.label})]})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.RadioControl,{className:"radio-inline",label:"Link Only",selected:a,options:[{label:"Yes",value:"yes"},{label:"No",value:"no"}],onChange:function(e){n({link_only:e})}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Would you like to show a Meeting or Webinar","video-conferencing-with-zoom-api"),value:_,options:[{label:"Meeting",value:"meeting"},{label:"Webinar",value:"webinar"}],onChange:function(e){M(e);var t=(null==j?void 0:j.value)||j;t&&(S([]),q(t,e))}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.ComboboxControl,{label:(0,p.__)("Select A Host","video-conferencing-with-zoom-api"),help:(0,p.__)("Click to view available hosts or start typing to filter","video-conferencing-with-zoom-api"),value:null!=j&&j.value?String(j.value):"string"==typeof j?j:"",options:z,onFilterValueChange:Z,isLoading:T,onChange:function(e){if(e){var t=z.find((function(t){return String(t.value)===String(e)}))||{value:e,label:e};n({host:t}),k(t),q(e,_)}}})}),G&&(void 0===x||0===x.length)&&(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.Spinner,{})}),void 0!==x&&x.length>0&&(0,yo.jsxs)("div",{className:"vczapi-blocks-form--group",children:[(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Select A Meeting : ","video-conferencing-with-zoom-api")+(N>1?" (use pagination below if necessary)":""),value:JSON.stringify(I),options:[{label:(0,p.__)("Select a meeting","video-conferencing-with-zoom-api"),value:"{}"}].concat(u(X)),disabled:G,onChange:function(e){"{}"!==e&&D(JSON.parse(e))}}),(0,yo.jsx)(J,{numberOfPages:N})]}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.Button,{isPrimary:!0,onClick:function(){if(!I.hasOwnProperty("value"))return alert("Meeting Needs to be selected"),!1;n({selectedMeeting:I}),n({shouldShow:"object"===r(_)?_:{label:_,value:_}}),w(!1)},children:(0,p.__)("Save","video-conferencing-with-zoom-api")})})]})]}),void 0!==i&&i.hasOwnProperty("value")&&!y&&(0,yo.jsx)(g.Disabled,{children:(0,yo.jsx)(m(),{block:"vczapi/show-live-meeting",attributes:{link_only:a,selectedMeeting:i,shouldShow:l}})})]}))},example:{attributes:{preview:!0}}});var ko=(0,x.forwardRef)((function(e,t){var n=vo(e);return x.createElement(fo,O({ref:t},n))}));function Po(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function _o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Po(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Po(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Eo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mo(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Io(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Do(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Io(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Io(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Vo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function zo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vo(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,o.registerBlockType)("vczapi/list-host-meetings",{apiVersion:2,edit:function(e){e.className;var t=e.attributes,n=e.setAttributes,o=t.host,r=t.shouldShow,i=t.preview,a=b.useRef,s=c((0,b.useState)(!1),2),l=s[0],u=s[1];return(0,b.useEffect)((function(){return a.current=!0,function(){a.current=!1}}),[]),i?(0,yo.jsx)("img",{src:vczapi_blocks.list_host_meetings_preview_image,alt:"List Host meetings"}):(0,yo.jsxs)("div",_o(_o({},(0,h.useBlockProps)()),{},{children:[(0,yo.jsx)(h.BlockControls,{children:(0,yo.jsx)(g.ToolbarGroup,{children:(0,yo.jsx)(g.ToolbarButton,{icon:l?"no":"edit",title:l?"Close":"Edit",subscript:"Edit",onClick:function(){u((function(e){return!e}))}})})}),(void 0===o||l)&&(0,yo.jsxs)(g.Placeholder,{children:[(0,yo.jsx)("h2",{children:(0,p.__)("Zoom -  List Meetings/Webinars based on HOST","video-conferencing-with-zoom")}),(0,yo.jsxs)("div",{className:"vczapi-blocks-form",children:[(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(ko,{className:"vczapi-blocks-form--select",defaultValue:r,options:[{label:"Meeting",value:"meeting"},{label:"Webinar",value:"webinar"}],onChange:function(e,t){"select-option"===t.action&&n({shouldShow:e})}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(bo,{className:"vczapi-blocks-form--select",defaultOptions:!0,noResultsText:(0,p.__)("No options found","video-conferencing-with-zoom-api"),loadOptions:(0,d.debounce)((function(e,t){fetch("admin-ajax.php?action=vczapi_get_zoom_hosts&host="+e).then((function(e){return e.json()})).then((function(e){t(e)})).catch((function(){t([])}))}),800),defaultValue:o,onChange:function(e,t){"select-option"===t.action&&n({host:e})}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.Button,{isPrimary:!0,onClick:function(){u(!1)},children:(0,p.__)("Save","video-conferencing-with-zoom-api")})})]})]}),void 0!==o&&o.hasOwnProperty("value")&&!l&&(0,yo.jsx)(m(),{block:"vczapi/list-host-meetings",attributes:{host:o,shouldShow:r}})]}))},example:{attributes:{preview:!0}}}),(0,o.registerBlockType)("vczapi/join-via-browser",{apiVersion:2,edit:function(e){e.className;var t=e.attributes,n=e.setAttributes,o=t.host,i=t.selectedMeeting,a=t.disable_countdown,s=t.login_required,l=t.preview,f=t.shouldShow,v=t.passcode,y=(0,b.useRef)(),w=c((0,b.useState)(!1),2),O=w[0],x=w[1],S=c((0,b.useState)([]),2),C=S[0],j=S[1],k=c((0,b.useState)(o||null),2),P=k[0],_=k[1],M=c((0,b.useState)((null==f?void 0:f.value)||f||"meeting"),2),E=M[0],I=M[1],D=c((0,b.useState)(i||{}),2),V=D[0],z=D[1],R=c((0,b.useState)([]),2),A=R[0],T=R[1],F=c((0,b.useState)(!1),2),L=F[0],N=F[1],B=c((0,b.useState)(1),2),H=B[0],$=B[1],U=c((0,b.useState)(1),2),W=U[0],G=U[1],Y=c((0,b.useState)(!1),2),Z=Y[0],q=Y[1],J=(0,d.debounce)((function(e){N(!0);var t=e?encodeURIComponent(e):"";fetch(ajaxurl+"?action=vczapi_get_zoom_hosts&host="+t).then((function(e){return e.json()})).then((function(e){if(y.current&&Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text,value:String(e.value||e.id)}}));T(t),N(!1)}})).catch((function(){y.current&&N(!1)}))}),300),X=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||"undefined"===e)return[];var o="object"===r(t)?t.value:t,i=ajaxurl+"?action=vczapi_get_live_meetings&host_id="+e+"&show="+o;n.hasOwnProperty("page_number")&&"undefined"!==n.page_number&&(i+="&page_number="+n.page_number),q(!0),fetch(i).then((function(e){return e.json()})).then((function(e){if(y.current){var t=parseFloat(e.total_records)/parseFloat(e.page_size);if(t>1){var n=Math.round(t);$(n)}else $(1);j(e.formatted_meetings||[]),q(!1)}})).catch((function(){y.current&&q(!1)}))},K=function(e){var t=e.numberOfPages,n=[];if(t>1){for(var o=function(e){var t=e===W?"selected":"";n.push((0,yo.jsx)(g.Button,{className:t,onClick:function(){var t=(null==P?void 0:P.value)||P;X(t,E,{page_number:e}),G(e)},children:e},e))},r=1;r<=t;r++)o(r);return(0,yo.jsx)("div",{className:"vczapi-blocks-pagination",children:n})}return""};if((0,b.useEffect)((function(){y.current=!0,N(!0),fetch(ajaxurl+"?action=vczapi_get_zoom_hosts&host=").then((function(e){return e.json()})).then((function(e){if(y.current&&Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text,value:String(e.value||e.id)}}));T(t),N(!1)}})).catch((function(){y.current&&N(!1)}));var e=(null==o?void 0:o.value)||o;return e&&X(e,E),function(){y.current=!1}}),[]),l)return(0,yo.jsx)("img",{src:vczapi_blocks.join_via_browser,alt:"Direct Meeting from Zoom"});var Q=C.map((function(e){return{label:e.label,value:JSON.stringify(e)}}));return(0,yo.jsxs)("div",Eo(Eo({},(0,h.useBlockProps)()),{},{children:[(0,yo.jsx)(h.BlockControls,{children:(0,yo.jsx)(g.ToolbarGroup,{children:(0,yo.jsx)(g.ToolbarButton,{icon:O?"no":"edit",title:O?"Close":"Edit",subscript:"Edit",onClick:function(){x((function(e){return!e}))}})})}),(void 0===i||O)&&(0,yo.jsxs)(g.Placeholder,{children:[(0,yo.jsxs)("div",{className:"vczapi-label-header",children:[(0,yo.jsx)("h2",{children:(0,p.__)("Zoom - Embed Join Via A Browser","video-conferencing-with-zoom-api")}),(0,yo.jsx)("div",{children:(0,yo.jsx)("p",{children:(0,p.__)("Embed Join via a browser","video-conferencing-with-zoom-api")})})]}),(0,yo.jsxs)("div",{className:"vczapi-blocks-form",children:[void 0!==i&&i.hasOwnProperty("value")&&(0,yo.jsx)("div",{className:"vczapi-blocks-form--selected-meeting",children:(0,yo.jsxs)("h4",{children:["Currently Selected Meeting: ",(0,yo.jsx)("strong",{children:i.label})]})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.TextControl,{className:"text-input",label:(0,p.__)("Passcode (Set password of your meeting to automatically let users join without needing them to enter password.)","video-conferencing-with-zoom-api"),value:v,onChange:function(e){n({passcode:e})}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.RadioControl,{className:"radio-inline",label:"Disable Countdown",selected:a,options:[{label:"Yes",value:"yes"},{label:"No",value:"no"}],onChange:function(e){n({disable_countdown:e})}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.RadioControl,{className:"radio-inline",label:"Login Required",selected:s,options:[{label:"Yes",value:"yes"},{label:"No",value:"no"}],onChange:function(e){n({login_required:e})}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Would you like to show a Meeting or Webinar","video-conferencing-with-zoom-api"),value:E,options:[{label:"Meeting",value:"meeting"},{label:"Webinar",value:"webinar"}],onChange:function(e){I(e);var t=(null==P?void 0:P.value)||P;t&&(j([]),X(t,e))}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.ComboboxControl,{label:(0,p.__)("Select A Host","video-conferencing-with-zoom-api"),help:(0,p.__)("Click to view available hosts or start typing to filter","video-conferencing-with-zoom-api"),value:null!=P&&P.value?String(P.value):"string"==typeof P?P:"",options:A,onFilterValueChange:J,isLoading:L,onChange:function(e){if(e){var t=A.find((function(t){return String(t.value)===String(e)}))||{value:e,label:e};n({host:t}),_(t),X(e,E)}}})}),Z&&(void 0===C||0===C.length)&&(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.Spinner,{})}),void 0!==C&&C.length>0&&(0,yo.jsxs)("div",{className:"vczapi-blocks-form--group",children:[(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Select A Meeting : ","video-conferencing-with-zoom-api")+(H>1?" (use pagination below if necessary)":""),value:JSON.stringify(V),options:[{label:(0,p.__)("Select a meeting","video-conferencing-with-zoom-api"),value:"{}"}].concat(u(Q)),disabled:Z,onChange:function(e){"{}"!==e&&z(JSON.parse(e))}}),(0,yo.jsx)(K,{numberOfPages:H})]}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.Button,{isPrimary:!0,onClick:function(){if(!V.hasOwnProperty("value"))return alert("Meeting Needs to be selected"),!1;n({selectedMeeting:V}),n({shouldShow:"object"===r(E)?E:{label:E,value:E}}),x(!1)},children:(0,p.__)("Save","video-conferencing-with-zoom-api")})})]})]}),void 0!==i&&i.hasOwnProperty("value")&&!O&&(0,yo.jsx)(g.Disabled,{children:(0,yo.jsx)(m(),{block:"vczapi/join-via-browser",attributes:{selectedMeeting:i,login_required:s,disable_countdown:a,passcode:v,shouldShow:f}})})]}))},example:{attributes:{preview:!0}}}),(0,o.registerBlockType)("vczapi/recordings",{apiVersion:2,edit:function(e){e.className;var t=e.attributes,n=e.setAttributes,o=t.host,i=t.selectedMeeting,a=t.downloadable,s=t.preview,l=t.shouldShow,f=t.showBy,v=(0,b.useRef)(),y=c((0,b.useState)(!1),2),w=y[0],O=y[1],x=c((0,b.useState)([]),2),S=x[0],C=x[1],j=c((0,b.useState)(o||null),2),k=j[0],P=j[1],_=c((0,b.useState)((null==l?void 0:l.value)||l||"meeting"),2),M=_[0],E=_[1],I=c((0,b.useState)(i||{}),2),D=I[0],V=I[1],z=c((0,b.useState)([]),2),R=z[0],A=z[1],T=c((0,b.useState)(!1),2),F=T[0],L=T[1],N=c((0,b.useState)(1),2),B=N[0],H=N[1],$=c((0,b.useState)(1),2),U=$[0],W=$[1],G=c((0,b.useState)(!1),2),Y=G[0],Z=G[1],q=(0,d.debounce)((function(e){L(!0);var t=e?encodeURIComponent(e):"";fetch(ajaxurl+"?action=vczapi_get_zoom_hosts&host="+t).then((function(e){return e.json()})).then((function(e){if(v.current&&Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text,value:String(e.value||e.id)}}));A(t),L(!1)}})).catch((function(){v.current&&L(!1)}))}),300),J=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||"undefined"===e)return[];var o="object"===r(t)?t.value:t,i=ajaxurl+"?action=vczapi_get_live_meetings&host_id="+e+"&show="+o;n.hasOwnProperty("page_number")&&"undefined"!==n.page_number&&(i+="&page_number="+n.page_number),Z(!0),fetch(i).then((function(e){return e.json()})).then((function(e){if(v.current){var t=parseFloat(e.total_records)/parseFloat(e.page_size);if(t>1){var n=Math.round(t);H(n)}else H(1);C(e.formatted_meetings||[]),Z(!1)}})).catch((function(){v.current&&Z(!1)}))},X=function(e){var t=e.numberOfPages,n=[];if(t>1){for(var o=function(e){var t=e===U?"selected":"";n.push((0,yo.jsx)(g.Button,{className:t,onClick:function(){var t=(null==k?void 0:k.value)||k;J(t,M,{page_number:e}),W(e)},children:e},e))},r=1;r<=t;r++)o(r);return(0,yo.jsx)("div",{className:"vczapi-blocks-pagination",children:n})}return""};if((0,b.useEffect)((function(){v.current=!0,L(!0),fetch(ajaxurl+"?action=vczapi_get_zoom_hosts&host=").then((function(e){return e.json()})).then((function(e){if(v.current&&Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text,value:String(e.value||e.id)}}));A(t),L(!1)}})).catch((function(){v.current&&L(!1)}));var e=(null==o?void 0:o.value)||o;return e&&"meeting"===f&&J(e,M),function(){v.current=!1}}),[]),s)return(0,yo.jsx)("img",{src:vczapi_blocks.recordings_preview,alt:"Zoom Recordings"});var K=S.map((function(e){return{label:e.label,value:JSON.stringify(e)}}));return(0,yo.jsxs)("div",Do(Do({},(0,h.useBlockProps)()),{},{children:[(0,yo.jsx)(h.BlockControls,{children:(0,yo.jsx)(g.ToolbarGroup,{children:(0,yo.jsx)(g.ToolbarButton,{icon:w?"no":"edit",title:w?"Close":"Edit",subscript:"Edit",onClick:function(){O((function(e){return!e}))}})})}),(void 0===i||void 0===o||w)&&(0,yo.jsxs)(g.Placeholder,{children:[(0,yo.jsxs)("div",{className:"vczapi-label-header",children:[(0,yo.jsx)("h2",{children:(0,p.__)("Zoom - Show Recordings","video-conferencing-with-zoom-api")}),(0,yo.jsx)("div",{children:(0,yo.jsx)("p",{children:(0,p.__)("Show recordings from Zoom","video-conferencing-with-zoom-api")})})]}),(0,yo.jsxs)("div",{className:"vczapi-blocks-form",children:[void 0!==i&&i.hasOwnProperty("value")&&(0,yo.jsx)("div",{className:"vczapi-blocks-form--selected-meeting",children:(0,yo.jsxs)("h4",{children:["Currently Selected Meeting: ",(0,yo.jsx)("strong",{children:i.label})]})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.RadioControl,{className:"radio-inline",label:(0,p.__)("Show Recordings by","video-conferencing-with-zoom-api"),options:[{label:"Host",value:"host"},{label:"Meeting",value:"meeting"}],selected:f,onChange:function(e){v.current&&n({showBy:e})}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.ComboboxControl,{label:(0,p.__)("Select A Host","video-conferencing-with-zoom-api"),help:(0,p.__)("Click to view available hosts or start typing to filter","video-conferencing-with-zoom-api"),value:null!=k&&k.value?String(k.value):"string"==typeof k?k:"",options:R,onFilterValueChange:q,isLoading:F,onChange:function(e){if(e){var t=R.find((function(t){return String(t.value)===String(e)}))||{value:e,label:e};v.current&&(P(t),"meeting"===f&&J(e,M))}}})}),"meeting"===f&&(0,yo.jsxs)(yo.Fragment,{children:[(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Would you like to show a Meeting or Webinar","video-conferencing-with-zoom-api"),value:M,options:[{label:"Meeting",value:"meeting"},{label:"Webinar",value:"webinar"}],onChange:function(e){E(e);var t=(null==k?void 0:k.value)||k;t&&v.current&&(C([]),J(t,e))}})}),Y&&(void 0===S||0===S.length)&&(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.Spinner,{})}),void 0!==S&&S.length>0&&(0,yo.jsxs)("div",{className:"vczapi-blocks-form--group",children:[(0,yo.jsx)(g.SelectControl,{label:(0,p.__)("Select A Meeting : ","video-conferencing-with-zoom-api")+(B>1?" (use pagination below if necessary)":""),value:JSON.stringify(D),options:[{label:(0,p.__)("Select a meeting","video-conferencing-with-zoom-api"),value:"{}"}].concat(u(K)),disabled:Y,onChange:function(e){"{}"!==e&&v.current&&V(JSON.parse(e))}}),(0,yo.jsx)(X,{numberOfPages:B})]})]}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.ToggleControl,{className:"toggle-inline",label:"Downloadable",checked:a,onChange:function(e){v.current&&n({downloadable:e})}})}),(0,yo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,yo.jsx)(g.Button,{isPrimary:!0,onClick:function(){return"host"!==f||k&&("object"!==r(k)||k.value)?"meeting"!==f||D.hasOwnProperty("value")?void(v.current&&(n({selectedMeeting:D}),n({host:k}),n({shouldShow:"object"===r(M)?M:{label:M,value:M}}),O(!1))):(alert("Meeting Needs to be selected"),!1):(alert("Host Needs to be selected"),!1)},children:(0,p.__)("Save","video-conferencing-with-zoom-api")})})]})]}),("host"===f&&void 0!==o||"meeting"===f&&void 0!==i)&&!w&&(0,yo.jsx)(g.Disabled,{children:(0,yo.jsx)(m(),{block:"vczapi/recordings",attributes:{downloadable:a,host:o,selectedMeeting:i,showBy:f}})})]}))}}),(0,o.registerBlockType)("vczapi/single-zoom-meeting",{apiVersion:2,edit:function(e){return(0,yo.jsx)("div",zo(zo({},(0,h.useBlockProps)()),{},{children:(0,yo.jsxs)("div",{class:"vczapi-singleMeetingSkeleton",children:[(0,yo.jsx)("h5",{children:" Please do not remove this block, this block is used to display single meeting page for FSE Themes"}),(0,yo.jsx)("img",{alt:"Zoom Meeting Single Page Outline",src:vczapi_blocks.single_zoom_meeting_page})]})}))}})},679:function(e,t,n){var o=n(864),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return o.isMemo(e)?a:s[e.$$typeof]||r}s[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[o.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,o){if("string"!=typeof n){if(h){var r=f(n);r&&r!==h&&e(t,r,o)}var a=c(n);p&&(a=a.concat(p(n)));for(var s=l(t),v=l(n),m=0;m<a.length;++m){var g=a[m];if(!(i[g]||o&&o[g]||v&&v[g]||s&&s[g])){var b=d(n,g);try{u(t,g,b)}catch(e){}}}}return t}},921:function(e,t){var n="function"==typeof Symbol&&Symbol.for,o=n?Symbol.for("react.element"):60103,r=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function O(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case c:case p:case i:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case u:case d:case m:case v:case l:return e;default:return t}}case r:return t}}}function x(e){return O(e)===p}t.AsyncMode=c,t.ConcurrentMode=p,t.ContextConsumer=u,t.ContextProvider=l,t.Element=o,t.ForwardRef=d,t.Fragment=i,t.Lazy=m,t.Memo=v,t.Portal=r,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return x(e)||O(e)===c},t.isConcurrentMode=x,t.isContextConsumer=function(e){return O(e)===u},t.isContextProvider=function(e){return O(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return O(e)===d},t.isFragment=function(e){return O(e)===i},t.isLazy=function(e){return O(e)===m},t.isMemo=function(e){return O(e)===v},t.isPortal=function(e){return O(e)===r},t.isProfiler=function(e){return O(e)===s},t.isStrictMode=function(e){return O(e)===a},t.isSuspense=function(e){return O(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===p||e===s||e===a||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===b||e.$$typeof===y||e.$$typeof===w||e.$$typeof===g)},t.typeOf=O},864:function(e,t,n){e.exports=n(921)}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.m=t,e=[],o.O=function(t,n,r,i){if(!n){var a=1/0;for(c=0;c<e.length;c++){n=e[c][0],r=e[c][1],i=e[c][2];for(var s=!0,l=0;l<n.length;l++)(!1&i||a>=i)&&Object.keys(o.O).every((function(e){return o.O[e](n[l])}))?n.splice(l--,1):(s=!1,i<a&&(a=i));if(s){e.splice(c--,1);var u=r();void 0!==u&&(t=u)}}return t}i=i||0;for(var c=e.length;c>0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[n,r,i]},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={826:0,431:0};o.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,i,a=n[0],s=n[1],l=n[2],u=0;if(a.some((function(t){return 0!==e[t]}))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(l)var c=l(o)}for(t&&t(n);u<a.length;u++)i=a[u],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(c)},n=self.webpackChunkvideo_conferencing_with_zoom_api=self.webpackChunkvideo_conferencing_with_zoom_api||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var r=o.O(void 0,[431],(function(){return o(231)}));r=o.O(r)}();
     1!function(){"use strict";var e,t={772:function(e,t,n){var o=window.wp.blocks;function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:String(t)}function a(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function l(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function c(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return s}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var d=window.wp.i18n,p=window.lodash,f=window.wp.url,v=window.wp.blockEditor,h=window.wp.serverSideRender,m=n.n(h),g=window.wp.components,b=window.wp.element,y=window.wp.apiFetch,w=n.n(y);function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},O.apply(this,arguments)}var x=window.React;function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function j(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,i(o.key),o)}}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function P(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(P=function(){return!!e})()}var M=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),E=Math.abs,z=String.fromCharCode,I=Object.assign;function D(e){return e.trim()}function V(e,t,n){return e.replace(t,n)}function R(e,t){return e.indexOf(t)}function A(e,t){return 0|e.charCodeAt(t)}function T(e,t,n){return e.slice(t,n)}function F(e){return e.length}function L(e){return e.length}function N(e,t){return t.push(e),e}var B=1,H=1,$=0,U=0,W=0,G="";function Y(e,t,n,o,r,i,a){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:B,column:H,length:a,return:""}}function Z(e,t){return I(Y("",null,null,"",null,null,0),e,{length:-e.length},t)}function q(){return W=U>0?A(G,--U):0,H--,10===W&&(H=1,B--),W}function J(){return W=U<$?A(G,U++):0,H++,10===W&&(H=1,B++),W}function X(){return A(G,U)}function K(){return U}function Q(e,t){return T(G,e,t)}function ee(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function te(e){return B=H=1,$=F(G=e),U=0,[]}function ne(e){return G="",e}function oe(e){return D(Q(U-1,ae(91===e?e+2:40===e?e+1:e)))}function re(e){for(;(W=X())&&W<33;)J();return ee(e)>2||ee(W)>3?"":" "}function ie(e,t){for(;--t&&J()&&!(W<48||W>102||W>57&&W<65||W>70&&W<97););return Q(e,K()+(t<6&&32==X()&&32==J()))}function ae(e){for(;J();)switch(W){case e:return U;case 34:case 39:34!==e&&39!==e&&ae(W);break;case 40:41===e&&ae(e);break;case 92:J()}return U}function se(e,t){for(;J()&&e+W!==57&&(e+W!==84||47!==X()););return"/*"+Q(t,U-1)+"*"+z(47===e?e:J())}function le(e){for(;!ee(X());)J();return Q(e,U)}var ce="-ms-",ue="-moz-",de="-webkit-",pe="comm",fe="rule",ve="decl",he="@keyframes";function me(e,t){for(var n="",o=L(e),r=0;r<o;r++)n+=t(e[r],r,e,t)||"";return n}function ge(e,t,n,o){switch(e.type){case"@import":case ve:return e.return=e.return||e.value;case pe:return"";case he:return e.return=e.value+"{"+me(e.children,o)+"}";case fe:e.value=e.props.join(",")}return F(n=me(e.children,o))?e.return=e.value+"{"+n+"}":""}function be(e){return ne(ye("",null,null,null,[""],e=te(e),0,[0],e))}function ye(e,t,n,o,r,i,a,s,l){for(var c=0,u=0,d=a,p=0,f=0,v=0,h=1,m=1,g=1,b=0,y="",w=r,O=i,x=o,S=y;m;)switch(v=b,b=J()){case 40:if(108!=v&&58==A(S,d-1)){-1!=R(S+=V(oe(b),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:S+=oe(b);break;case 9:case 10:case 13:case 32:S+=re(v);break;case 92:S+=ie(K()-1,7);continue;case 47:switch(X()){case 42:case 47:N(Oe(se(J(),K()),t,n),l);break;default:S+="/"}break;case 123*h:s[c++]=F(S)*g;case 125*h:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+u:-1==g&&(S=V(S,/\f/g,"")),f>0&&F(S)-d&&N(f>32?xe(S+";",o,n,d-1):xe(V(S," ","")+";",o,n,d-2),l);break;case 59:S+=";";default:if(N(x=we(S,t,n,c,u,r,s,y,w=[],O=[],d),i),123===b)if(0===u)ye(S,t,x,x,w,i,d,s,O);else switch(99===p&&110===A(S,3)?100:p){case 100:case 109:case 115:ye(e,x,x,o&&N(we(e,x,x,0,0,r,s,y,r,w=[],d),O),r,O,d,s,o?w:O);break;default:ye(S,x,x,x,[""],O,0,s,O)}}c=u=f=0,h=g=1,y=S="",d=a;break;case 58:d=1+F(S),f=v;default:if(h<1)if(123==b)--h;else if(125==b&&0==h++&&125==q())continue;switch(S+=z(b),b*h){case 38:g=u>0?1:(S+="\f",-1);break;case 44:s[c++]=(F(S)-1)*g,g=1;break;case 64:45===X()&&(S+=oe(J())),p=X(),u=d=F(y=S+=le(K())),b++;break;case 45:45===v&&2==F(S)&&(h=0)}}return i}function we(e,t,n,o,r,i,a,s,l,c,u){for(var d=r-1,p=0===r?i:[""],f=L(p),v=0,h=0,m=0;v<o;++v)for(var g=0,b=T(e,d+1,d=E(h=a[v])),y=e;g<f;++g)(y=D(h>0?p[g]+" "+b:V(b,/&\f/g,p[g])))&&(l[m++]=y);return Y(e,t,n,0===r?fe:s,l,c,u)}function Oe(e,t,n){return Y(e,t,n,pe,z(W),T(e,2,-2),0)}function xe(e,t,n,o){return Y(e,t,n,ve,T(e,0,o),T(e,o+1,-1),o)}var Se=function(e,t,n){for(var o=0,r=0;o=r,r=X(),38===o&&12===r&&(t[n]=1),!ee(r);)J();return Q(e,U)},Ce=new WeakMap,je=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Ce.get(n))&&!o){Ce.set(e,!0);for(var r=[],i=function(e,t){return ne(function(e,t){var n=-1,o=44;do{switch(ee(o)){case 0:38===o&&12===X()&&(t[n]=1),e[n]+=Se(U-1,t,n);break;case 2:e[n]+=oe(o);break;case 4:if(44===o){e[++n]=58===X()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=z(o)}}while(o=J());return e}(te(e),t))}(t,r),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=r[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},ke=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function _e(e,t){switch(function(e,t){return 45^A(e,0)?(((t<<2^A(e,0))<<2^A(e,1))<<2^A(e,2))<<2^A(e,3):0}(e,t)){case 5103:return de+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return de+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return de+e+ue+e+ce+e+e;case 6828:case 4268:return de+e+ce+e+e;case 6165:return de+e+ce+"flex-"+e+e;case 5187:return de+e+V(e,/(\w+).+(:[^]+)/,de+"box-$1$2"+ce+"flex-$1$2")+e;case 5443:return de+e+ce+"flex-item-"+V(e,/flex-|-self/,"")+e;case 4675:return de+e+ce+"flex-line-pack"+V(e,/align-content|flex-|-self/,"")+e;case 5548:return de+e+ce+V(e,"shrink","negative")+e;case 5292:return de+e+ce+V(e,"basis","preferred-size")+e;case 6060:return de+"box-"+V(e,"-grow","")+de+e+ce+V(e,"grow","positive")+e;case 4554:return de+V(e,/([^-])(transform)/g,"$1"+de+"$2")+e;case 6187:return V(V(V(e,/(zoom-|grab)/,de+"$1"),/(image-set)/,de+"$1"),e,"")+e;case 5495:case 3959:return V(e,/(image-set\([^]*)/,de+"$1$`$1");case 4968:return V(V(e,/(.+:)(flex-)?(.*)/,de+"box-pack:$3"+ce+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+de+e+e;case 4095:case 3583:case 4068:case 2532:return V(e,/(.+)-inline(.+)/,de+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(F(e)-1-t>6)switch(A(e,t+1)){case 109:if(45!==A(e,t+4))break;case 102:return V(e,/(.+:)(.+)-([^]+)/,"$1"+de+"$2-$3$1"+ue+(108==A(e,t+3)?"$3":"$2-$3"))+e;case 115:return~R(e,"stretch")?_e(V(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==A(e,t+1))break;case 6444:switch(A(e,F(e)-3-(~R(e,"!important")&&10))){case 107:return V(e,":",":"+de)+e;case 101:return V(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+de+(45===A(e,14)?"inline-":"")+"box$3$1"+de+"$2$3$1"+ce+"$2box$3")+e}break;case 5936:switch(A(e,t+11)){case 114:return de+e+ce+V(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return de+e+ce+V(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return de+e+ce+V(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return de+e+ce+e+e}return e}var Pe=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case ve:e.return=_e(e.value,e.length);break;case he:return me([Z(e,{value:V(e.value,"@","@"+de)})],o);case fe:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return me([Z(e,{props:[V(t,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return me([Z(e,{props:[V(t,/:(plac\w+)/,":"+de+"input-$1")]}),Z(e,{props:[V(t,/:(plac\w+)/,":-moz-$1")]}),Z(e,{props:[V(t,/:(plac\w+)/,ce+"input-$1")]})],o)}return""}))}}],Me=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o,r,i=e.stylisPlugins||Pe,a={},s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,c,u,d,p=[ge,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],f=(c=[je,ke].concat(i,p),u=L(c),function(e,t,n,o){for(var r="",i=0;i<u;i++)r+=c[i](e,t,n,o)||"";return r});r=function(e,t,n,o){l=n,me(be(e?e+"{"+t.styles+"}":t.styles),f),o&&(v.inserted[t.name]=!0)};var v={key:t,sheet:new M({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:r};return v.sheet.hydrate(s),v},Ee=function(e,t,n){var o=e.key+"-"+t.name;!1===n&&void 0===e.registered[o]&&(e.registered[o]=t.styles)},ze=function(e){for(var t,n=0,o=0,r=e.length;r>=4;++o,r-=4)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(r){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(o)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},Ie={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},De=/[A-Z]|^ms/g,Ve=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Re=function(e){return 45===e.charCodeAt(1)},Ae=function(e){return null!=e&&"boolean"!=typeof e},Te=function(e){var t=Object.create(null);return function(e){return void 0===t[e]&&(t[e]=Re(n=e)?n:n.replace(De,"-$&").toLowerCase()),t[e];var n}}(),Fe=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Ve,(function(e,t,n){return Ne={name:t,styles:n,next:Ne},t}))}return 1===Ie[e]||Re(e)||"number"!=typeof t||0===t?t:t+"px"};function Le(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Ne={name:n.name,styles:n.styles,next:Ne},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)Ne={name:o.name,styles:o.styles,next:Ne},o=o.next;return n.styles+";"}return function(e,t,n){var o="";if(Array.isArray(n))for(var r=0;r<n.length;r++)o+=Le(e,t,n[r])+";";else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?o+=i+"{"+t[a]+"}":Ae(a)&&(o+=Te(i)+":"+Fe(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=Le(e,t,a);switch(i){case"animation":case"animationName":o+=Te(i)+":"+s+";";break;default:o+=i+"{"+s+"}"}}else for(var l=0;l<a.length;l++)Ae(a[l])&&(o+=Te(i)+":"+Fe(i,a[l])+";")}return o}(e,t,n);case"function":if(void 0!==e){var r=Ne,i=n(e);return Ne=r,Le(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var Ne,Be=/label:\s*([^\s;\n{]+)\s*(;|$)/g,He=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o=!0,r="";Ne=void 0;var i=e[0];null==i||void 0===i.raw?(o=!1,r+=Le(n,t,i)):r+=i[0];for(var a=1;a<e.length;a++)r+=Le(n,t,e[a]),o&&(r+=i[a]);Be.lastIndex=0;for(var s,l="";null!==(s=Be.exec(r));)l+="-"+s[1];return{name:ze(r)+l,styles:r,next:Ne}},$e=!!x.useInsertionEffect&&x.useInsertionEffect||function(e){return e()},Ue={}.hasOwnProperty,We=(0,x.createContext)("undefined"!=typeof HTMLElement?Me({key:"css"}):null);We.Provider;var Ge=function(e){return(0,x.forwardRef)((function(t,n){var o=(0,x.useContext)(We);return e(t,o,n)}))},Ye=(0,x.createContext)({}),Ze="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",qe=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;return Ee(t,n,o),$e((function(){return function(e,t,n){Ee(e,t,n);var o=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var r=t;do{e.insert(t===r?"."+o:"",r,e.sheet,!0),r=r.next}while(void 0!==r)}}(t,n,o)})),null},Je=Ge((function(e,t,n){var o=e.css;"string"==typeof o&&void 0!==t.registered[o]&&(o=t.registered[o]);var r=e[Ze],i=[o],a="";"string"==typeof e.className?a=function(e,t,n){var o="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):o+=n+" "})),o}(t.registered,i,e.className):null!=e.className&&(a=e.className+" ");var s=He(i,void 0,(0,x.useContext)(Ye));a+=t.key+"-"+s.name;var l={};for(var c in e)Ue.call(e,c)&&"css"!==c&&c!==Ze&&(l[c]=e[c]);return l.ref=n,l.className=a,(0,x.createElement)(x.Fragment,null,(0,x.createElement)(qe,{cache:t,serialized:s,isStringTag:"string"==typeof r}),(0,x.createElement)(r,l))}));n(679);var Xe=function(e,t){var n=arguments;if(null==t||!Ue.call(t,"css"))return x.createElement.apply(void 0,n);var o=n.length,r=new Array(o);r[0]=Je,r[1]=function(e,t){var n={};for(var o in t)Ue.call(t,o)&&(n[o]=t[o]);return n[Ze]=e,n}(e,t);for(var i=2;i<o;i++)r[i]=n[i];return x.createElement.apply(null,r)};function Ke(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return He(t)}function Qe(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var et=window.ReactDOM;Math.min,Math.max;function tt(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function nt(e){return tt(e).getComputedStyle(e)}function ot(e){return e instanceof tt(e).Node}function rt(e){return ot(e)?(e.nodeName||"").toLowerCase():""}let it;function at(e){return e instanceof tt(e).HTMLElement}function st(e){return e instanceof tt(e).Element}function lt(e){return"undefined"!=typeof ShadowRoot&&(e instanceof tt(e).ShadowRoot||e instanceof ShadowRoot)}function ct(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=nt(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function ut(){return/^((?!chrome|android).)*safari/i.test(function(){if(it)return it;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(it=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),it):navigator.userAgent}())}["top","right","bottom","left"].reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]),Math.min,Math.max;const dt=Math.round;function pt(e){return st(e)?e:e.contextElement}const ft={x:1,y:1};function vt(e){const t=pt(e);if(!at(t))return ft;const n=t.getBoundingClientRect(),{width:o,height:r,fallback:i}=function(e){const t=nt(e);let n=parseFloat(t.width),o=parseFloat(t.height);const r=at(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,s=dt(n)!==i||dt(o)!==a;return s&&(n=i,o=a),{width:n,height:o,fallback:s}}(t);let a=(i?dt(n.width):n.width)/o,s=(i?dt(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}function ht(e,t,n,o){var r,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),s=pt(e);let l=ft;t&&(o?st(o)&&(l=vt(o)):l=vt(e));const c=s?tt(s):window,u=ut()&&n;let d=(a.left+(u&&(null==(r=c.visualViewport)?void 0:r.offsetLeft)||0))/l.x,p=(a.top+(u&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/l.y,f=a.width/l.x,v=a.height/l.y;if(s){const e=tt(s),t=o&&st(o)?tt(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=vt(n),t=n.getBoundingClientRect(),o=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(o.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(o.paddingTop))*e.y,d*=e.x,p*=e.y,f*=e.x,v*=e.y,d+=t.x,p+=t.y,n=tt(n).frameElement}}return h={width:f,height:v,x:d,y:p},{...h,top:h.y,left:h.x,right:h.x+h.width,bottom:h.y+h.height};var h}function mt(e){if("html"===rt(e))return e;const t=e.assignedSlot||e.parentNode||lt(e)&&e.host||function(e){return((ot(e)?e.ownerDocument:e.document)||window.document).documentElement}(e);return lt(t)?t.host:t}function gt(e){const t=mt(e);return function(e){return["html","body","#document"].includes(rt(e))}(t)?t.ownerDocument.body:at(t)&&ct(t)?t:gt(t)}function bt(e,t){var n;void 0===t&&(t=[]);const o=gt(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=tt(o);return r?t.concat(i,i.visualViewport||[],ct(o)?o:[]):t.concat(o,bt(o))}var yt=x.useLayoutEffect,wt=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Ot=function(){};function xt(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function St(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];var i=[].concat(o);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(xt(e,a)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var Ct=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===r(e)&&null!==e?[e]:[];var t},jt=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,C({},Qe(e,wt))},kt=function(e,t,n){var o=e.cx,r=e.getStyles,i=e.getClassNames,a=e.className;return{css:r(t,e),className:o(null!=n?n:{},i(t,e),a)}};function _t(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Pt(e){return _t(e)?window.pageYOffset:e.scrollTop}function Mt(e,t){_t(e)?window.scrollTo(0,t):e.scrollTop=t}function Et(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ot,r=Pt(e),i=t-r,a=0;!function t(){var s,l=(s=a+=10,i*((s=s/n-1)*s*s+1)+r);Mt(e,l),a<n?window.requestAnimationFrame(t):o(e)}()}function zt(e,t){var n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),r=t.offsetHeight/3;o.bottom+r>n.bottom?Mt(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight)):o.top-r<n.top&&Mt(e,Math.max(t.offsetTop-r,0))}function It(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var Dt=!1,Vt={get passive(){return Dt=!0}},Rt="undefined"!=typeof window?window:{};Rt.addEventListener&&Rt.removeEventListener&&(Rt.addEventListener("p",Ot,Vt),Rt.removeEventListener("p",Ot,!1));var At=Dt;function Tt(e){return null!=e}function Ft(e,t,n){return e?t:n}var Lt=["children","innerProps"],Nt=["children","innerProps"];var Bt,Ht,$t,Ut=function(e){return"auto"===e?"bottom":e},Wt=(0,x.createContext)(null),Gt=function(e){var t=e.children,n=e.minMenuHeight,o=e.maxMenuHeight,r=e.menuPlacement,i=e.menuPosition,a=e.menuShouldScrollIntoView,s=e.theme,l=((0,x.useContext)(Wt)||{}).setPortalPlacement,c=(0,x.useRef)(null),d=u((0,x.useState)(o),2),p=d[0],f=d[1],v=u((0,x.useState)(null),2),h=v[0],m=v[1],g=s.spacing.controlHeight;return yt((function(){var e=c.current;if(e){var t="fixed"===i,s=function(e){var t=e.maxHeight,n=e.menuEl,o=e.minHeight,r=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,o=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var r=e;r=r.parentElement;)if(t=getComputedStyle(r),(!n||"static"!==t.position)&&o.test(t.overflow+t.overflowY+t.overflowX))return r;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u,d=l.getBoundingClientRect().height,p=n.getBoundingClientRect(),f=p.bottom,v=p.height,h=p.top,m=n.offsetParent.getBoundingClientRect().top,g=a||_t(u=l)?window.innerHeight:u.clientHeight,b=Pt(l),y=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),O=m-w,x=g-h,S=O+b,C=d-b-h,j=f-g+b+y,k=b+h-w,_=160;switch(r){case"auto":case"bottom":if(x>=v)return{placement:"bottom",maxHeight:t};if(C>=v&&!a)return i&&Et(l,j,_),{placement:"bottom",maxHeight:t};if(!a&&C>=o||a&&x>=o)return i&&Et(l,j,_),{placement:"bottom",maxHeight:a?x-y:C-y};if("auto"===r||a){var P=t,M=a?O:S;return M>=o&&(P=Math.min(M-y-s,t)),{placement:"top",maxHeight:P}}if("bottom"===r)return i&&Mt(l,j),{placement:"bottom",maxHeight:t};break;case"top":if(O>=v)return{placement:"top",maxHeight:t};if(S>=v&&!a)return i&&Et(l,k,_),{placement:"top",maxHeight:t};if(!a&&S>=o||a&&O>=o){var E=t;return(!a&&S>=o||a&&O>=o)&&(E=a?O-w:S-w),i&&Et(l,k,_),{placement:"top",maxHeight:E}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return c}({maxHeight:o,menuEl:e,minHeight:n,placement:r,shouldScroll:a&&!t,isFixedPosition:t,controlHeight:g});f(s.maxHeight),m(s.placement),null==l||l(s.placement)}}),[o,r,i,a,n,l,g]),t({ref:c,placerProps:C(C({},e),{},{placement:h||Ut(r),maxHeight:p})})},Yt=function(e,t){var n=e.theme,o=n.spacing.baseUnit,r=n.colors;return C({textAlign:"center"},t?{}:{color:r.neutral40,padding:"".concat(2*o,"px ").concat(3*o,"px")})},Zt=Yt,qt=Yt,Jt=["size"],Xt=["innerProps","isRtl","size"],Kt={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Qt=function(e){var t=e.size,n=Qe(e,Jt);return Xe("svg",O({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Kt},n))},en=function(e){return Xe(Qt,O({size:20},e),Xe("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},tn=function(e){return Xe(Qt,O({size:20},e),Xe("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},nn=function(e,t){var n=e.isFocused,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return C({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*r,":hover":{color:n?i.neutral80:i.neutral40}})},on=nn,rn=nn,an=function(){var e=Ke.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Bt||(Ht=["\n  0%, 80%, 100% { opacity: 0; }\n  40% { opacity: 1; }\n"],$t||($t=Ht.slice(0)),Bt=Object.freeze(Object.defineProperties(Ht,{raw:{value:Object.freeze($t)}})))),sn=function(e){var t=e.delay,n=e.offset;return Xe("span",{css:Ke({animation:"".concat(an," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},ln=["data"],cn=["innerRef","isDisabled","isHidden","inputClassName"],un={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},dn={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":C({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},un)},pn=function(e){return C({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},un)},fn=function(e){var t=e.children,n=e.innerProps;return Xe("div",n,t)},vn={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Xe("div",O({},kt(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Xe(en,null))},Control:function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Xe("div",O({ref:r},kt(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":o,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Xe("div",O({},kt(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Xe(tn,null))},DownChevron:tn,CrossIcon:en,Group:function(e){var t=e.children,n=e.cx,o=e.getStyles,r=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return Xe("div",O({},kt(e,"group",{group:!0}),s),Xe(i,O({},a,{selectProps:u,theme:c,getStyles:o,getClassNames:r,cx:n}),l),Xe("div",null,t))},GroupHeading:function(e){var t=jt(e);t.data;var n=Qe(t,ln);return Xe("div",O({},kt(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Xe("div",O({},kt(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Xe("span",O({},t,kt(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,o=jt(e),r=o.innerRef,i=o.isDisabled,a=o.isHidden,s=o.inputClassName,l=Qe(o,cn);return Xe("div",O({},kt(e,"input",{"input-container":!0}),{"data-value":n||""}),Xe("input",O({className:t({input:!0},s),ref:r,style:pn(a),disabled:i},l)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,o=e.size,r=void 0===o?4:o,i=Qe(e,Xt);return Xe("div",O({},kt(C(C({},i),{},{innerProps:t,isRtl:n,size:r}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Xe(sn,{delay:0,offset:n}),Xe(sn,{delay:160,offset:!0}),Xe(sn,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,o=e.innerProps;return Xe("div",O({},kt(e,"menu",{menu:!0}),{ref:n},o),t)},MenuList:function(e){var t=e.children,n=e.innerProps,o=e.innerRef,r=e.isMulti;return Xe("div",O({},kt(e,"menuList",{"menu-list":!0,"menu-list--is-multi":r}),{ref:o},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,o=e.controlElement,r=e.innerProps,i=e.menuPlacement,a=e.menuPosition,s=(0,x.useRef)(null),l=(0,x.useRef)(null),c=u((0,x.useState)(Ut(i)),2),d=c[0],p=c[1],f=(0,x.useMemo)((function(){return{setPortalPlacement:p}}),[]),v=u((0,x.useState)(null),2),h=v[0],m=v[1],g=(0,x.useCallback)((function(){if(o){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(o),t="fixed"===a?0:window.pageYOffset,n=e[d]+t;n===(null==h?void 0:h.offset)&&e.left===(null==h?void 0:h.rect.left)&&e.width===(null==h?void 0:h.rect.width)||m({offset:n,rect:e})}}),[o,a,d,null==h?void 0:h.offset,null==h?void 0:h.rect.left,null==h?void 0:h.rect.width]);yt((function(){g()}),[g]);var b=(0,x.useCallback)((function(){"function"==typeof l.current&&(l.current(),l.current=null),o&&s.current&&(l.current=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=o,l=r||i?[...st(e)?bt(e):e.contextElement?bt(e.contextElement):[],...bt(t)]:[];l.forEach((e=>{const t=!st(e)&&e.toString().includes("V");!r||s&&!t||e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));let c,u=null;a&&(u=new ResizeObserver((()=>{n()})),st(e)&&!s&&u.observe(e),st(e)||!e.contextElement||s||u.observe(e.contextElement),u.observe(t));let d=s?ht(e):null;return s&&function t(){const o=ht(e);!d||o.x===d.x&&o.y===d.y&&o.width===d.width&&o.height===d.height||n(),d=o,c=requestAnimationFrame(t)}(),n(),()=>{var e;l.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=u)||e.disconnect(),u=null,s&&cancelAnimationFrame(c)}}(o,s.current,g,{elementResize:"ResizeObserver"in window}))}),[o,g]);yt((function(){b()}),[b]);var y=(0,x.useCallback)((function(e){s.current=e,b()}),[b]);if(!t&&"fixed"!==a||!h)return null;var w=Xe("div",O({ref:y},kt(C(C({},e),{},{offset:h.offset,position:a,rect:h.rect}),"menuPortal",{"menu-portal":!0}),r),n);return Xe(Wt.Provider,{value:f},t?(0,et.createPortal)(w,t):w)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,o=e.innerProps,r=Qe(e,Nt);return Xe("div",O({},kt(C(C({},r),{},{children:n,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,o=e.innerProps,r=Qe(e,Lt);return Xe("div",O({},kt(C(C({},r),{},{children:n,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),n)},MultiValue:function(e){var t=e.children,n=e.components,o=e.data,r=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return Xe(l,{data:o,innerProps:C(C({},kt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),r),selectProps:s},Xe(c,{data:o,innerProps:C({},kt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),Xe(u,{data:o,innerProps:C(C({},kt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},MultiValueContainer:fn,MultiValueLabel:fn,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Xe("div",O({role:"button"},n),t||Xe(en,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.innerRef,a=e.innerProps;return Xe("div",O({},kt(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":o,"option--is-selected":r}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Xe("div",O({},kt(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,o=e.isDisabled,r=e.isRtl;return Xe("div",O({},kt(e,"container",{"--is-disabled":o,"--is-rtl":r}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,o=e.innerProps;return Xe("div",O({},kt(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),o),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,o=e.isMulti,r=e.hasValue;return Xe("div",O({},kt(e,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":r}),n),t)}},hn=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function mn(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((o=e[n])===(r=t[n])||hn(o)&&hn(r)))return!1;var o,r;return!0}for(var gn={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},bn=function(e){return Xe("span",O({css:gn},e))},yn={guidance:function(e){var t=e.isSearchable,n=e.isMulti,o=e.tabSelectsValue,r=e.context,i=e.isInitialFocus;switch(r){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,o=void 0===n?"":n,r=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(r.length>1?"s":""," ").concat(r.join(","),", selected.");case"select-option":return"option ".concat(o,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,o=e.options,r=e.label,i=void 0===r?"":r,a=e.selectValue,s=e.isDisabled,l=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t&&c){var d=s?" disabled":"",p="".concat(l?" selected":"").concat(d);return"".concat(i).concat(p,", ").concat(u(o,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},wn=function(e){var t=e.ariaSelection,n=e.focusedOption,o=e.focusedValue,r=e.focusableOptions,i=e.isFocused,a=e.selectValue,s=e.selectProps,l=e.id,c=e.isAppleDevice,u=s.ariaLiveMessages,d=s.getOptionLabel,p=s.inputValue,f=s.isMulti,v=s.isOptionDisabled,h=s.isSearchable,m=s.menuIsOpen,g=s.options,b=s.screenReaderStatus,y=s.tabSelectsValue,w=s.isLoading,O=s["aria-label"],S=s["aria-live"],j=(0,x.useMemo)((function(){return C(C({},yn),u||{})}),[u]),k=(0,x.useMemo)((function(){var e,n="";if(t&&j.onChange){var o=t.option,r=t.options,i=t.removedValue,s=t.removedValues,l=t.value,c=i||o||(e=l,Array.isArray(e)?null:e),u=c?d(c):"",p=r||s||void 0,f=p?p.map(d):[],h=C({isDisabled:c&&v(c,a),label:u,labels:f},t);n=j.onChange(h)}return n}),[t,j,v,a,d]),_=(0,x.useMemo)((function(){var e="",t=n||o,i=!!(n&&a&&a.includes(n));if(t&&j.onFocus){var s={focused:t,label:d(t),isDisabled:v(t,a),isSelected:i,options:r,context:t===n?"menu":"value",selectValue:a,isAppleDevice:c};e=j.onFocus(s)}return e}),[n,o,d,v,j,r,a,c]),P=(0,x.useMemo)((function(){var e="";if(m&&g.length&&!w&&j.onFilter){var t=b({count:r.length});e=j.onFilter({inputValue:p,resultsMessage:t})}return e}),[r,p,m,j,g,b,w]),M="initial-input-focus"===(null==t?void 0:t.action),E=(0,x.useMemo)((function(){var e="";if(j.guidance){var t=o?"value":m?"menu":"input";e=j.guidance({"aria-label":O,context:t,isDisabled:n&&v(n,a),isMulti:f,isSearchable:h,tabSelectsValue:y,isInitialFocus:M})}return e}),[O,n,o,f,v,h,m,j,a,y,M]),z=Xe(x.Fragment,null,Xe("span",{id:"aria-selection"},k),Xe("span",{id:"aria-focused"},_),Xe("span",{id:"aria-results"},P),Xe("span",{id:"aria-guidance"},E));return Xe(x.Fragment,null,Xe(bn,{id:l},M&&z),Xe(bn,{"aria-live":S,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!M&&z))},On=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],xn=new RegExp("["+On.map((function(e){return e.letters})).join("")+"]","g"),Sn={},Cn=0;Cn<On.length;Cn++)for(var jn=On[Cn],kn=0;kn<jn.letters.length;kn++)Sn[jn.letters[kn]]=jn.base;var Pn=function(e){return e.replace(xn,(function(e){return Sn[e]}))},Mn=function(e,t){void 0===t&&(t=mn);var n=null;function o(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var i=e.apply(this,o);return n={lastResult:i,lastArgs:o,lastThis:this},i}return o.clear=function(){n=null},o}(Pn),En=function(e){return e.replace(/^\s+|\s+$/g,"")},zn=function(e){return"".concat(e.label," ").concat(e.value)},In=["innerRef"];function Dn(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var r=Object.entries(e).filter((function(e){var t=u(e,1)[0];return!n.includes(t)}));return r.reduce((function(e,t){var n=u(t,2),o=n[0],r=n[1];return e[o]=r,e}),{})}(Qe(e,In),"onExited","in","enter","exit","appear");return Xe("input",O({ref:t},n,{css:Ke({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Vn=["boxSizing","height","overflow","paddingRight","position"],Rn={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function An(e){e.preventDefault()}function Tn(e){e.stopPropagation()}function Fn(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Ln(){return"ontouchstart"in window||navigator.maxTouchPoints}var Nn=!("undefined"==typeof window||!window.document||!window.document.createElement),Bn=0,Hn={capture:!1,passive:!1},$n=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},Un={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Wn(e){var t=e.children,n=e.lockEnabled,o=e.captureEnabled,r=function(e){var t=e.isEnabled,n=e.onBottomArrive,o=e.onBottomLeave,r=e.onTopArrive,i=e.onTopLeave,a=(0,x.useRef)(!1),s=(0,x.useRef)(!1),l=(0,x.useRef)(0),c=(0,x.useRef)(null),u=(0,x.useCallback)((function(e,t){if(null!==c.current){var l=c.current,u=l.scrollTop,d=l.scrollHeight,p=l.clientHeight,f=c.current,v=t>0,h=d-p-u,m=!1;h>t&&a.current&&(o&&o(e),a.current=!1),v&&s.current&&(i&&i(e),s.current=!1),v&&t>h?(n&&!a.current&&n(e),f.scrollTop=d,m=!0,a.current=!0):!v&&-t>u&&(r&&!s.current&&r(e),f.scrollTop=0,m=!0,s.current=!0),m&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,o,r,i]),d=(0,x.useCallback)((function(e){u(e,e.deltaY)}),[u]),p=(0,x.useCallback)((function(e){l.current=e.changedTouches[0].clientY}),[]),f=(0,x.useCallback)((function(e){var t=l.current-e.changedTouches[0].clientY;u(e,t)}),[u]),v=(0,x.useCallback)((function(e){if(e){var t=!!At&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",f,t)}}),[f,p,d]),h=(0,x.useCallback)((function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",f,!1))}),[f,p,d]);return(0,x.useEffect)((function(){if(t){var e=c.current;return v(e),function(){h(e)}}}),[t,v,h]),function(e){c.current=e}}({isEnabled:void 0===o||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,o=void 0===n||n,r=(0,x.useRef)({}),i=(0,x.useRef)(null),a=(0,x.useCallback)((function(e){if(Nn){var t=document.body,n=t&&t.style;if(o&&Vn.forEach((function(e){var t=n&&n[e];r.current[e]=t})),o&&Bn<1){var i=parseInt(r.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+i||0;Object.keys(Rn).forEach((function(e){var t=Rn[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&Ln()&&(t.addEventListener("touchmove",An,Hn),e&&(e.addEventListener("touchstart",Fn,Hn),e.addEventListener("touchmove",Tn,Hn))),Bn+=1}}),[o]),s=(0,x.useCallback)((function(e){if(Nn){var t=document.body,n=t&&t.style;Bn=Math.max(Bn-1,0),o&&Bn<1&&Vn.forEach((function(e){var t=r.current[e];n&&(n[e]=t)})),t&&Ln()&&(t.removeEventListener("touchmove",An,Hn),e&&(e.removeEventListener("touchstart",Fn,Hn),e.removeEventListener("touchmove",Tn,Hn)))}}),[o]);return(0,x.useEffect)((function(){if(t){var e=i.current;return a(e),function(){s(e)}}}),[t,a,s]),function(e){i.current=e}}({isEnabled:n});return Xe(x.Fragment,null,n&&Xe("div",{onClick:$n,css:Un}),t((function(e){r(e),i(e)})))}var Gn={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Yn=function(e){var t=e.name,n=e.onFocus;return Xe("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Gn,value:"",onChange:function(){}})};function Zn(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function qn(){return Zn(/^Mac/i)}var Jn={clearIndicator:rn,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.theme,i=r.colors,a=r.borderRadius;return C({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:r.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:o?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:o?i.primary:i.neutral30}})},dropdownIndicator:on,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,o=n.colors,r=n.spacing;return C({label:"group",cursor:"default",display:"block"},t?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*r.baseUnit,paddingRight:3*r.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return C({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r})},input:function(e,t){var n=e.isDisabled,o=e.value,r=e.theme,i=r.spacing,a=r.colors;return C(C({visibility:n?"hidden":"visible",transform:o?"translateZ(0)":""},dn),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,o=e.size,r=e.theme,i=r.colors,a=r.spacing.baseUnit;return C({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:qt,menu:function(e,t){var n,o=e.placement,r=e.theme,i=r.borderRadius,s=r.spacing,l=r.colors;return C((a(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(o),"100%"),a(n,"position","absolute"),a(n,"width","100%"),a(n,"zIndex",1),n),t?{}:{backgroundColor:l.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},menuList:function(e,t){var n=e.maxHeight,o=e.theme.spacing.baseUnit;return C({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:o,paddingTop:o})},menuPortal:function(e){var t=e.rect,n=e.offset,o=e.position;return{left:t.left,position:o,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors;return C({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:r/2,margin:o.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,o=n.borderRadius,r=n.colors,i=e.cropWithEllipsis;return C({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:o/2,color:r.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors,a=e.isFocused;return C({alignItems:"center",display:"flex"},t?{}:{borderRadius:r/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:Zt,option:function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return C({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:r?s.primary:o?s.primary25:"transparent",color:n?s.neutral20:r?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:r?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,o=n.spacing,r=n.colors;return C({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:r.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing,i=o.colors;return C({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,o=e.isMulti,r=e.hasValue,i=e.selectProps.controlShouldRenderValue;return C({alignItems:"center",display:o&&r&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},Xn={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Kn={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:It(),captureMenuScroll:!It(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=C({ignoreCase:!0,ignoreAccents:!0,stringify:zn,trim:!0,matchFrom:"any"},undefined),o=n.ignoreCase,r=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?En(t):t,c=a?En(i(e)):i(e);return o&&(l=l.toLowerCase(),c=c.toLowerCase()),r&&(l=Mn(l),c=Pn(c)),"start"===s?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Qn(e,t,n,o){return{type:"option",data:t,isDisabled:so(e,t,n),isSelected:lo(e,t,n),label:io(e,t),value:ao(e,t),index:o}}function eo(e,t){return e.options.map((function(n,o){if("options"in n){var r=n.options.map((function(n,o){return Qn(e,n,t,o)})).filter((function(t){return oo(e,t)}));return r.length>0?{type:"group",data:n,options:r,index:o}:void 0}var i=Qn(e,n,t,o);return oo(e,i)?i:void 0})).filter(Tt)}function to(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,c(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function no(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,c(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function oo(e,t){var n=e.inputValue,o=void 0===n?"":n,r=t.data,i=t.isSelected,a=t.label,s=t.value;return(!uo(e)||!i)&&co(e,{label:a,value:s,data:r},o)}var ro=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},io=function(e,t){return e.getOptionLabel(t)},ao=function(e,t){return e.getOptionValue(t)};function so(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function lo(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var o=ao(e,t);return n.some((function(t){return ao(e,t)===o}))}function co(e,t,n){return!e.filterOption||e.filterOption(t,n)}var uo=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},po=1,fo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(l,e);var t,n,o,i,a,s=(t=l,n=P(),function(){var e,o=_(t);if(n){var i=_(this).constructor;e=Reflect.construct(o,arguments,i)}else e=o.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=s.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.isAppleDevice=qn()||Zn(/^iPhone/i)||Zn(/^iPad/i)||qn()&&navigator.maxTouchPoints>1,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var o=t.props,r=o.onChange,i=o.name;n.name=i,t.ariaOnChange(e,n),r(e,n)},t.setValue=function(e,n,o){var r=t.props,i=r.closeMenuOnSelect,a=r.isMulti,s=r.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(t.setState({inputIsHiddenAfterUpdate:!a}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:o})},t.selectOption=function(e){var n=t.props,o=n.blurInputOnSelect,r=n.isMulti,i=n.name,a=t.state.selectValue,s=r&&t.isOptionSelected(e,a),l=t.isOptionDisabled(e,a);if(s){var u=t.getOptionValue(e);t.setValue(a.filter((function(e){return t.getOptionValue(e)!==u})),"deselect-option",e)}else{if(l)return void t.ariaOnChange(e,{action:"select-option",option:e,name:i});r?t.setValue([].concat(c(a),[e]),"select-option",e):t.setValue(e,"select-option")}o&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,o=t.state.selectValue,r=t.getOptionValue(e),i=o.filter((function(e){return t.getOptionValue(e)!==r})),a=Ft(n,i,i[0]||null);t.onChange(a,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange(Ft(t.props.isMulti,[],null),{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,o=n[n.length-1],r=n.slice(0,n.length-1),i=Ft(e,r,r[0]||null);o&&t.onChange(i,{action:"pop-value",removedValue:o})},t.getFocusedOptionId=function(e){return ro(t.state.focusableOptionsWithIds,e)},t.getFocusableOptionsWithIds=function(){return no(eo(t.props,t.state.selectValue),t.getElementId("option"))},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return St.apply(void 0,[t.props.classNamePrefix].concat(n))},t.getOptionLabel=function(e){return io(t.props,e)},t.getOptionValue=function(e){return ao(t.props,e)},t.getStyles=function(e,n){var o=t.props.unstyled,r=Jn[e](n,o);r.boxSizing="border-box";var i=t.props.styles[e];return i?i(r,n):r},t.getClassNames=function(e,n){var o,r;return null===(o=(r=t.props.classNames)[e])||void 0===o?void 0:o.call(r,n)},t.getElementId=function(e){return"".concat(t.state.instancePrefix,"-").concat(e)},t.getComponents=function(){return e=t.props,C(C({},vn),e.components);var e},t.buildCategorizedOptions=function(){return eo(t.props,t.state.selectValue)},t.getCategorizedOptions=function(){return t.props.menuIsOpen?t.buildCategorizedOptions():[]},t.buildFocusableOptions=function(){return to(t.buildCategorizedOptions())},t.getFocusableOptions=function(){return t.props.menuIsOpen?t.buildFocusableOptions():[]},t.ariaOnChange=function(e,n){t.setState({ariaSelection:C({value:e},n)})},t.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),t.focusInput())},t.onMenuMouseMove=function(e){t.blockOptionHover=!1},t.onControlMouseDown=function(e){if(!e.defaultPrevented){var n=t.props.openMenuOnClick;t.state.isFocused?t.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&t.onMenuClose():n&&t.openMenu("first"):(n&&(t.openAfterFocus=!0),t.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},t.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||t.props.isDisabled)){var n=t.props,o=n.isMulti,r=n.menuIsOpen;t.focusInput(),r?(t.setState({inputIsHiddenAfterUpdate:!o}),t.onMenuClose()):t.openMenu("first"),e.preventDefault()}},t.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(t.clearValue(),e.preventDefault(),t.openAfterFocus=!1,"touchend"===e.type?t.focusInput():setTimeout((function(){return t.focusInput()})))},t.onScroll=function(e){"boolean"==typeof t.props.closeMenuOnScroll?e.target instanceof HTMLElement&&_t(e.target)&&t.props.onMenuClose():"function"==typeof t.props.closeMenuOnScroll&&t.props.closeMenuOnScroll(e)&&t.props.onMenuClose()},t.onCompositionStart=function(){t.isComposing=!0},t.onCompositionEnd=function(){t.isComposing=!1},t.onTouchStart=function(e){var n=e.touches,o=n&&n.item(0);o&&(t.initialTouchX=o.clientX,t.initialTouchY=o.clientY,t.userIsDragging=!1)},t.onTouchMove=function(e){var n=e.touches,o=n&&n.item(0);if(o){var r=Math.abs(o.clientX-t.initialTouchX),i=Math.abs(o.clientY-t.initialTouchY);t.userIsDragging=r>5||i>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=t.props.inputValue,o=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(o,{action:"input-change",prevInputValue:n}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var n=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:n}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){if(!t.blockOptionHover&&t.state.focusedOption!==e){var n=t.getFocusableOptions().indexOf(e);t.setState({focusedOption:e,focusedOptionId:n>-1?t.getFocusedOptionId(e):null})}},t.shouldHideSelectedOptions=function(){return uo(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var n=t.props,o=n.isMulti,r=n.backspaceRemovesValue,i=n.escapeClearsValue,a=n.inputValue,s=n.isClearable,l=n.isDisabled,c=n.menuIsOpen,u=n.onKeyDown,d=n.tabSelectsValue,p=n.openMenuOnFocus,f=t.state,v=f.focusedOption,h=f.focusedValue,m=f.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!o||a)return;t.focusValue("previous");break;case"ArrowRight":if(!o||a)return;t.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(h)t.removeValue(h);else{if(!r)return;o?t.popValue():s&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!c||!d||!v||p&&t.isOptionSelected(v,m))return;t.selectOption(v);break;case"Enter":if(229===e.keyCode)break;if(c){if(!v)return;if(t.isComposing)return;t.selectOption(v);break}return;case"Escape":c?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:a}),t.onMenuClose()):s&&i&&t.clearValue();break;case" ":if(a)return;if(!c){t.openMenu("first");break}if(!v)return;t.selectOption(v);break;case"ArrowUp":c?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":c?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!c)return;t.focusOption("pageup");break;case"PageDown":if(!c)return;t.focusOption("pagedown");break;case"Home":if(!c)return;t.focusOption("first");break;case"End":if(!c)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.state.instancePrefix="react-select-"+(t.props.instanceId||++po),t.state.selectValue=Ct(e.value),e.menuIsOpen&&t.state.selectValue.length){var n=t.getFocusableOptionsWithIds(),o=t.buildFocusableOptions(),r=o.indexOf(t.state.selectValue[0]);t.state.focusableOptionsWithIds=n,t.state.focusedOption=o[r],t.state.focusedOptionId=ro(n,o[r])}return t}return o=l,i=[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&zt(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,o=t.menuIsOpen,r=this.state.isFocused;(r&&!n&&e.isDisabled||r&&o&&!e.menuIsOpen)&&this.focusInput(),r&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):r||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(zt(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,o=n.selectValue,r=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(o[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(r&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,o=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var r=n.indexOf(o);o||(r=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===r?0:-1===r?i:r-1;break;case"next":r>-1&&r<i&&(a=r+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,o=this.getFocusableOptions();if(o.length){var r=0,i=o.indexOf(n);n||(i=-1),"up"===e?r=i>0?i-1:o.length-1:"down"===e?r=(i+1)%o.length:"pageup"===e?(r=i-t)<0&&(r=0):"pagedown"===e?(r=i+t)>o.length-1&&(r=o.length-1):"last"===e&&(r=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[r],focusedValue:null,focusedOptionId:this.getFocusedOptionId(o[r])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Xn):C(C({},Xn),this.props.theme):Xn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,o=this.getClassNames,r=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,c=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:o,getValue:r,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return so(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return lo(this.props,e,t)}},{key:"filterOption",value:function(e,t){return co(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,o=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:o})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,o=e.inputId,r=e.inputValue,i=e.tabIndex,a=e.form,s=e.menuIsOpen,l=e.required,c=this.getComponents().Input,u=this.state,d=u.inputIsHidden,p=u.ariaSelection,f=this.commonProps,v=o||this.getElementId("input"),h=C(C(C({"aria-autocomplete":"list","aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":l,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},s&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?x.createElement(c,O({},f,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:v,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:a,type:"text",value:r},h)):x.createElement(Dn,O({id:v,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ot,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:a,value:""},h))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,o=t.MultiValueContainer,r=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,s=t.Placeholder,l=this.commonProps,c=this.props,u=c.controlShouldRenderValue,d=c.isDisabled,p=c.isMulti,f=c.inputValue,v=c.placeholder,h=this.state,m=h.selectValue,g=h.focusedValue,b=h.isFocused;if(!this.hasValue()||!u)return f?null:x.createElement(s,O({},l,{key:"placeholder",isDisabled:d,isFocused:b,innerProps:{id:this.getElementId("placeholder")}}),v);if(p)return m.map((function(t,a){var s=t===g,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return x.createElement(n,O({},l,{components:{Container:o,Label:r,Remove:i},isFocused:s,isDisabled:d,key:c,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(f)return null;var y=m[0];return x.createElement(a,O({},l,{data:y,isDisabled:d}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,r=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||r)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return x.createElement(e,O({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,r=n.isLoading,i=this.state.isFocused;return e&&r?x.createElement(e,O({},t,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:i})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var o=this.commonProps,r=this.props.isDisabled,i=this.state.isFocused;return x.createElement(n,O({},o,{isDisabled:r,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,o=this.state.isFocused,r={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return x.createElement(e,O({},t,{innerProps:r,isDisabled:n,isFocused:o}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,o=t.GroupHeading,r=t.Menu,i=t.MenuList,a=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,u=this.commonProps,d=this.state.focusedOption,p=this.props,f=p.captureMenuScroll,v=p.inputValue,h=p.isLoading,m=p.loadingMessage,g=p.minMenuHeight,b=p.maxMenuHeight,y=p.menuIsOpen,w=p.menuPlacement,S=p.menuPosition,C=p.menuPortalTarget,j=p.menuShouldBlockScroll,k=p.menuShouldScrollIntoView,_=p.noOptionsMessage,P=p.onMenuScrollToTop,M=p.onMenuScrollToBottom;if(!y)return null;var E,z=function(t,n){var o=t.type,r=t.data,i=t.isDisabled,a=t.isSelected,s=t.label,l=t.value,p=d===r,f=i?void 0:function(){return e.onOptionHover(r)},v=i?void 0:function(){return e.selectOption(r)},h="".concat(e.getElementId("option"),"-").concat(n),m={id:h,onClick:v,onMouseMove:f,onMouseOver:f,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:a};return x.createElement(c,O({},u,{innerProps:m,data:r,isDisabled:i,isSelected:a,key:h,label:s,type:o,value:l,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())E=this.getCategorizedOptions().map((function(t){if("group"===t.type){var r=t.data,i=t.options,a=t.index,s="".concat(e.getElementId("group"),"-").concat(a),l="".concat(s,"-heading");return x.createElement(n,O({},u,{key:s,data:r,options:i,Heading:o,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return z(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return z(t,"".concat(t.index))}));else if(h){var I=m({inputValue:v});if(null===I)return null;E=x.createElement(s,u,I)}else{var D=_({inputValue:v});if(null===D)return null;E=x.createElement(l,u,D)}var V={minMenuHeight:g,maxMenuHeight:b,menuPlacement:w,menuPosition:S,menuShouldScrollIntoView:k},R=x.createElement(Gt,O({},u,V),(function(t){var n=t.ref,o=t.placerProps,a=o.placement,s=o.maxHeight;return x.createElement(r,O({},u,V,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:h,placement:a}),x.createElement(Wn,{captureEnabled:f,onTopArrive:P,onBottomArrive:M,lockEnabled:j},(function(t){return x.createElement(i,O({},u,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":u.isMulti,id:e.getElementId("listbox")},isLoading:h,maxHeight:s,focusedOption:d}),E)})))}));return C||"fixed"===S?x.createElement(a,O({},u,{appendTo:C,controlElement:this.controlRef,menuPlacement:w,menuPosition:S}),R):R}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,o=t.isDisabled,r=t.isMulti,i=t.name,a=t.required,s=this.state.selectValue;if(a&&!this.hasValue()&&!o)return x.createElement(Yn,{name:i,onFocus:this.onValueInputFocus});if(i&&!o){if(r){if(n){var l=s.map((function(t){return e.getOptionValue(t)})).join(n);return x.createElement("input",{name:i,type:"hidden",value:l})}var c=s.length>0?s.map((function(t,n){return x.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):x.createElement("input",{name:i,type:"hidden",value:""});return x.createElement("div",null,c)}var u=s[0]?this.getOptionValue(s[0]):"";return x.createElement("input",{name:i,type:"hidden",value:u})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,o=t.focusedOption,r=t.focusedValue,i=t.isFocused,a=t.selectValue,s=this.getFocusableOptions();return x.createElement(wn,O({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:o,focusedValue:r,isFocused:i,selectValue:a,focusableOptions:s,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,o=e.SelectContainer,r=e.ValueContainer,i=this.props,a=i.className,s=i.id,l=i.isDisabled,c=i.menuIsOpen,u=this.state.isFocused,d=this.commonProps=this.getCommonProps();return x.createElement(o,O({},d,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:u}),this.renderLiveRegion(),x.createElement(t,O({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:u,menuIsOpen:c}),x.createElement(r,O({},d,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),x.createElement(n,O({},d,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],a=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,o=t.clearFocusValueOnUpdate,r=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,p=e.inputValue,f=e.isMulti,v=Ct(u),h={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||p!==n.inputValue)){var m=d?function(e,t){return to(eo(e,t))}(e,v):[],g=d?no(eo(e,v),"".concat(l,"-option")):[],b=o?function(e,t){var n=e.focusedValue,o=e.selectValue.indexOf(n);if(o>-1){if(t.indexOf(n)>-1)return n;if(o<t.length)return t[o]}return null}(t,v):null,y=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,m);h={selectValue:v,focusedOption:y,focusedOptionId:ro(g,y),focusableOptionsWithIds:g,focusedValue:b,clearFocusValueOnUpdate:!1}}var w=null!=r&&e!==n?{inputIsHidden:r,inputIsHiddenAfterUpdate:void 0}:{},O=i,x=a&&s;return a&&!x&&(O={value:Ft(f,v,v[0]||null),options:v,action:"initial-input-focus"},x=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(O=null),C(C(C({},h),w),{},{prevProps:e,ariaSelection:O,prevWasFocused:x})}}],i&&j(o.prototype,i),a&&j(o,a),Object.defineProperty(o,"prototype",{writable:!1}),l}(x.Component);fo.defaultProps=Kn;var vo=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"],ho=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"],mo=(0,x.forwardRef)((function(e,t){var n=function(e){var t=e.defaultOptions,n=void 0!==t&&t,o=e.cacheOptions,r=void 0!==o&&o,i=e.loadOptions;e.options;var s=e.isLoading,l=void 0!==s&&s,c=e.onInputChange,d=e.filterOption,p=void 0===d?null:d,f=Qe(e,ho),v=f.inputValue,h=(0,x.useRef)(void 0),m=(0,x.useRef)(!1),g=u((0,x.useState)(Array.isArray(n)?n:void 0),2),b=g[0],y=g[1],w=u((0,x.useState)(void 0!==v?v:""),2),O=w[0],S=w[1],j=u((0,x.useState)(!0===n),2),k=j[0],_=j[1],P=u((0,x.useState)(void 0),2),M=P[0],E=P[1],z=u((0,x.useState)([]),2),I=z[0],D=z[1],V=u((0,x.useState)(!1),2),R=V[0],A=V[1],T=u((0,x.useState)({}),2),F=T[0],L=T[1],N=u((0,x.useState)(void 0),2),B=N[0],H=N[1],$=u((0,x.useState)(void 0),2),U=$[0],W=$[1];r!==U&&(L({}),W(r)),n!==B&&(y(Array.isArray(n)?n:void 0),H(n)),(0,x.useEffect)((function(){return m.current=!0,function(){m.current=!1}}),[]);var G=(0,x.useCallback)((function(e,t){if(!i)return t();var n=i(e,t);n&&"function"==typeof n.then&&n.then(t,(function(){return t()}))}),[i]);(0,x.useEffect)((function(){!0===n&&G(O,(function(e){m.current&&(y(e||[]),_(!!h.current))}))}),[]);var Y=(0,x.useCallback)((function(e,t){var n=function(e,t,n){if(n){var o=n(e,t);if("string"==typeof o)return o}return e}(e,t,c);if(!n)return h.current=void 0,S(""),E(""),D([]),_(!1),void A(!1);if(r&&F[n])S(n),E(n),D(F[n]),_(!1),A(!1);else{var o=h.current={};S(n),_(!0),A(!M),G(n,(function(e){m&&o===h.current&&(h.current=void 0,_(!1),E(n),D(e||[]),A(!1),L(e?C(C({},F),{},a({},n,e)):F))}))}}),[r,G,M,F,c]),Z=R?[]:O&&M?I:b||[];return C(C({},f),{},{options:Z,isLoading:k||l,onInputChange:Y,filterOption:p})}(e),o=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,o=e.defaultMenuIsOpen,r=void 0!==o&&o,i=e.defaultValue,a=void 0===i?null:i,s=e.inputValue,l=e.menuIsOpen,c=e.onChange,d=e.onInputChange,p=e.onMenuClose,f=e.onMenuOpen,v=e.value,h=Qe(e,vo),m=u((0,x.useState)(void 0!==s?s:n),2),g=m[0],b=m[1],y=u((0,x.useState)(void 0!==l?l:r),2),w=y[0],O=y[1],S=u((0,x.useState)(void 0!==v?v:a),2),j=S[0],k=S[1],_=(0,x.useCallback)((function(e,t){"function"==typeof c&&c(e,t),k(e)}),[c]),P=(0,x.useCallback)((function(e,t){var n;"function"==typeof d&&(n=d(e,t)),b(void 0!==n?n:e)}),[d]),M=(0,x.useCallback)((function(){"function"==typeof f&&f(),O(!0)}),[f]),E=(0,x.useCallback)((function(){"function"==typeof p&&p(),O(!1)}),[p]),z=void 0!==s?s:g,I=void 0!==l?l:w,D=void 0!==v?v:j;return C(C({},h),{},{inputValue:z,menuIsOpen:I,onChange:_,onInputChange:P,onMenuClose:E,onMenuOpen:M,value:D})}(n);return x.createElement(fo,O({ref:t},o))})),go=mo,bo=window.ReactJSXRuntime;function yo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function wo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yo(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Oo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function xo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oo(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function So(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Co(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?So(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):So(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ko(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jo(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Po(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Eo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mo(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function zo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Io(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zo(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,o.registerBlockType)("vczapi/list-meetings",{apiVersion:2,edit:function(e){e.className;var t=e.attributes,n=e.setAttributes,o=(e.isSelected,t.shortcodeType),r=t.orderBy,i=t.postsToShow,a=t.displayType,s=t.showPastMeeting,l=t.showFilter,h=t.selectedCategory,y=t.selectedAuthor,O=t.columns,x=t.preview,S=(0,b.useRef)(),C=u((0,b.useState)([]),2),j=C[0],k=C[1],_=u((0,b.useState)([]),2),P=_[0],M=_[1];return(0,b.useEffect)((function(){S.current=!0,w()({path:"/wp/v2/zoom_meeting_cats"}).then((function(e){if(!0===S.current){var t=e.length>0?e.map((function(e,t){return{label:e.name+" ("+e.count+")",value:e.slug}})):[];k((function(e){return[].concat(c(e),c(t))}))}})).catch((function(){!0===S.current&&k([])}));var e={per_page:10,who:"authors"};0!==y&&(e.include=y);var t=(0,f.addQueryArgs)("/wp/v2/users",e);return w()({path:t}).then((function(e){if(!0===S.current){var t=e.length>0?e.map((function(e,t){return{label:e.name,value:e.id}})):[];M((function(e){return[].concat(c(e),c(t))}))}})).catch((function(){})),function(){S.current=!1}}),[]),x?(0,bo.jsx)(b.Fragment,{children:(0,bo.jsx)(m(),{block:"vczapi/list-meetings",attributes:{columns:O,displayType:a,postsToShow:i,orderBy:r,shortcodeType:o,showFilter:l,selectedCategory:h,selectedAuthor:y}})}):(0,bo.jsxs)(bo.Fragment,{children:[(0,bo.jsx)(v.InspectorControls,{children:(0,bo.jsxs)(g.PanelBody,{title:"Settings",initialOpen:!0,children:[S.current&&(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Show Meeting or Webinar","video-conferencing-with-zoom-api"),value:o,options:[{label:"Meeting",value:"meeting"},{label:"Webinar",value:"webinar"}],help:"Determines whether to show Meeting or Webinar",onChange:function(e){return n({shortcodeType:e})}}),S.current&&(0,bo.jsxs)(bo.Fragment,{children:[(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Type of Meeting/Webinar to Show","video-conferencing-with-zoom-api"),value:a,onChange:function(e){return n({displayType:e})},options:[{label:"Show All",value:""},{label:"Upcoming",value:"upcoming"},{label:"Past",value:"past"}],help:"Show All,Upcoming or Past Meeting - default All"}),"upcoming"===a&&(0,bo.jsx)(g.CheckboxControl,{label:(0,d.__)("Show Meeting that have started","video-conferencing-with-zoom-api"),checked:s,onChange:function(e){return n({showPastMeeting:e})},help:"will show meetings that have passed meeting start time - upto 30 minutes after the meeting was scheduled to start."})]}),S.current&&(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Show Filter","video-conferencing-with-zoom-api"),value:l,options:[{label:"Yes",value:"yes"},{label:"No",value:"no"}],onChange:function(e){n({showFilter:e})}}),S.current&&(0,bo.jsx)(g.RangeControl,{label:(0,d.__)("Columns","video-conferencing-with-zoom-api"),value:O,help:"how many columns in the grid. Default value is 3. Users can use 1 or 2 or 3 or 4 - Any value upper than 4 will take 3 column value.",onChange:function(e){n({columns:e})},min:1,max:4}),S.current&&(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Order By","video-conferencing-with-zoom-api"),value:r,options:[{label:"Default Sorting",value:""},{label:"Ascending",value:"ASC"},{label:"Descending",value:"DESC"}],onChange:function(e){n({orderBy:e})}}),S.current&&(0,bo.jsxs)(bo.Fragment,{children:[(0,bo.jsx)("span",{children:(0,d.__)("Category","video-conferencing-with-zoom-api")}),(0,bo.jsx)(go,{cacheOptions:!0,defaultOptions:j,isMulti:!0,isClearable:!0,placeholder:(0,d.__)("Select categories - default All categories are shown","video-conferencing-with-zoom-api"),onChange:function(e,t){var o=t.action;if("clear"===o)return n({selectedCategory:[]}),[];if("remove-value"===o)return n({selectedCategory:e}),e;if("select-option"===o){var r=(0,p.unionBy)(h,e,"value");n({selectedCategory:r}),M((function(t){return(0,p.unionBy)(t,[e],"value")}))}},defaultValue:(0,p.intersectionWith)(j,h,p.isEqual),className:"components-base-control"})]}),S.current&&(0,bo.jsxs)(bo.Fragment,{children:[(0,bo.jsx)("span",{children:(0,d.__)("Author","video-conferencing-with-zoom-api")}),(0,bo.jsx)(go,{cacheOptions:!0,defaultOptions:P,noResultsText:!0,loadOptions:(0,p.debounce)((function(e,t){var n={per_page:5,who:"authors"};""!==e&&(n.search=e);var o=(0,f.addQueryArgs)("/wp/v2/users",n);return w()({path:o}).then((function(e){!0===S.current&&t(e.length>0?e.map((function(e,t){return{label:e.name,value:e.id}})):[])})).catch((function(){t([])}))}),800),isClearable:!0,placeholder:(0,d.__)("Select Author - Default All Authors are shown","video-conferencing-with-zoom-api"),onChange:function(e,t){var o=t.action;"clear"===o?n({selectedAuthor:0}):"remove-value"===o?n({selectedAuthor:e}):(n({selectedAuthor:e.value}),M((function(t){return(0,p.unionBy)(t,[e],"value")})))},defaultValue:P.filter((function(e){return e.value===y})),className:"components-base-control"})]}),S.current&&(0,bo.jsx)(g.RangeControl,{label:(0,d.__)("Number of Meetings/Webinars to show","video-conferencing-with-zoom-api"),value:i,onChange:function(e){return n({postsToShow:e})},min:1,max:100})]})}),(0,bo.jsx)("div",wo(wo({},(0,v.useBlockProps)()),{},{children:(0,bo.jsx)(g.Disabled,{children:(0,bo.jsx)(m(),{block:"vczapi/list-meetings",attributes:{columns:O,displayType:a,postsToShow:i,orderBy:r,shortcodeType:o,showFilter:l,selectedCategory:h,selectedAuthor:y}})})}))]})},example:{attributes:{preview:!0,columns:2,postsToShow:2}}}),(0,o.registerBlockType)("vczapi/show-meeting-post",{apiVersion:2,edit:function(e){var t=e.attributes,n=e.setAttributes,o=t.postID,r=t.preview,i=t.template,a=t.countdown,s=t.description,l=t.details,c=u((0,b.useState)([]),2),f=c[0],h=c[1],y=u((0,b.useState)([]),2),O=y[0],x=y[1],S=u((0,b.useState)(!1),2),C=S[0],j=S[1],k=u((0,b.useState)(!1),2),_=k[0],P=k[1],M=(0,b.useRef)(),E=(0,p.debounce)((function(e){e?(j(!0),w()({path:"/wp/v2/zoom_meetings?per_page=5&search="+e}).then((function(e){if(!0===M.current){var t=e.length>0?e.map((function(e){return{label:e.title.rendered,value:e.id}})):[];x(t),j(!1)}})).catch((function(){!0===M.current&&(x([]),j(!1))}))):x([])}),400),z=[{icon:_?"no":"edit",title:_?"Close":"Edit",subscript:"Edit",onClick:function(){P((function(e){return!e}))}}];if((0,b.useEffect)((function(){M.current=!0;var e="/wp/v2/zoom_meetings?per_page=5";return e=0!==o?e+"&include="+o:e,w()({path:e}).then((function(e){if(!0===M.current){var t=e.length>0?e.map((function(e){return{label:e.title.rendered,value:e.id}})):[];h(t)}})),function(){M.current=!1}}),[]),r)return(0,bo.jsx)("img",{src:vczapi_blocks.embed_post_preview,alt:"Embed Zoom post"});var I=O.length>0?O:f;return(0,bo.jsxs)("div",xo(xo({},(0,v.useBlockProps)()),{},{children:[(0,bo.jsx)(v.BlockControls,{children:(0,bo.jsx)(g.ToolbarGroup,{controls:z})}),!M.current&&(0,bo.jsx)(g.Spinner,{}),(0===o||_)&&(0,bo.jsxs)(g.Placeholder,{children:[(0,bo.jsx)("h2",{children:(0,d.__)("Zoom -  Show Meeting Post","video-conferencing-with-zoom-api")}),(0,bo.jsxs)("div",{className:"vczapi-blocks-form",children:[(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.ComboboxControl,{label:(0,d.__)("Select Meeting to Show","video-conferencing-with-zoom-api"),value:o||null,options:I,onFilterValueChange:E,isLoading:C,onChange:function(e){n({postID:Number(e)}),P(!1)}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Template","video-conferencing-with-zoom-api"),value:i,options:[{label:"Default",value:"none"},{label:"Boxed",value:"boxed"}],onChange:function(e){n({template:e})}})}),"boxed"!==i&&(0,bo.jsxs)(bo.Fragment,{children:[(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.CheckboxControl,{label:(0,d.__)("Display Countdown?","video-conferencing-with-zoom-api"),checked:a,onChange:function(e){n({countdown:e})}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.CheckboxControl,{label:(0,d.__)("Display Description?","video-conferencing-with-zoom-api"),checked:s,onChange:function(e){n({description:e})}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.CheckboxControl,{label:(0,d.__)("Display Details Section?","video-conferencing-with-zoom-api"),checked:l,onChange:function(e){n({details:e})}})})]})]})]}),0!==o&&!_&&(0,bo.jsx)(g.Disabled,{children:(0,bo.jsx)(m(),{block:"vczapi/show-meeting-post",attributes:{postID:o,template:i,description:s,countdown:a,details:l}})})]}))},example:{attributes:{preview:!0}}}),(0,o.registerBlockType)("vczapi/show-live-meeting",{apiVersion:2,edit:function(e){e.className;var t=e.attributes,n=e.setAttributes,o=t.host,i=t.selectedMeeting,a=t.link_only,s=t.preview,l=t.shouldShow,f=(0,b.useRef)(),h=u((0,b.useState)(!1),2),y=h[0],w=h[1],O=u((0,b.useState)([]),2),x=O[0],S=O[1],C=u((0,b.useState)(o||null),2),j=C[0],k=C[1],_=u((0,b.useState)((null==l?void 0:l.value)||l||"meeting"),2),P=_[0],M=_[1],E=u((0,b.useState)(i||{}),2),z=E[0],I=E[1],D=u((0,b.useState)([]),2),V=D[0],R=D[1],A=u((0,b.useState)(!1),2),T=A[0],F=A[1],L=u((0,b.useState)(1),2),N=L[0],B=L[1],H=u((0,b.useState)(1),2),$=H[0],U=H[1],W=u((0,b.useState)(!1),2),G=W[0],Y=W[1],Z=(0,p.debounce)((function(e){var t;F(!0);var n=e?encodeURIComponent(e):"",o=(null===(t=window)||void 0===t||null===(t=t.vczapi_blocks)||void 0===t?void 0:t.nonce)||"",r="".concat(ajaxurl,"?action=vczapi_get_zoom_hosts&host=").concat(n,"&nonce=").concat(o);fetch(r).then((function(e){return e.json()})).then((function(e){if(f.current&&Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text,value:String(e.value||e.id)}}));R(t),F(!1)}})).catch((function(){f.current&&F(!1)}))}),300),q=function(e,t){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||"undefined"===e)return[];var r=(null===(n=window)||void 0===n||null===(n=n.vczapi_blocks)||void 0===n?void 0:n.nonce)||"",i=window.ajaxurl||"admin-ajax.php",a="".concat(i,"?action=vczapi_get_live_meetings&host_id=").concat(e,"&show=").concat(t,"&nonce=").concat(r);o.hasOwnProperty("page_number")&&"undefined"!==o.page_number&&(a+="&page_number="+o.page_number),Y(!0),fetch(a).then((function(e){return e.json()})).then((function(e){if(f.current){var t=parseFloat(e.total_records)/parseFloat(e.page_size);if(t>1){var n=Math.round(t);B(n)}else B(1);S(e.formatted_meetings||[]),Y(!1)}})).catch((function(){f.current&&Y(!1)}))},J=function(e){var t=e.numberOfPages,n=[];if(t>1){for(var o=function(e){var t=e===$?"selected":"";n.push((0,bo.jsx)(g.Button,{className:t,onClick:function(){var t=(null==j?void 0:j.value)||j;q(t,P,{page_number:e}),U(e)},children:e},e))},r=1;r<=t;r++)o(r);return(0,bo.jsx)("div",{className:"vczapi-blocks-pagination",children:n})}return""};if((0,b.useEffect)((function(){var e;f.current=!0,F(!0);var t=(null===(e=window)||void 0===e||null===(e=e.vczapi_blocks)||void 0===e?void 0:e.nonce)||"",n=window.ajaxurl||"admin-ajax.php",r="".concat(n,"?action=vczapi_get_zoom_hosts&nonce=").concat(t);fetch(r).then((function(e){return e.json()})).then((function(e){if(f.current&&Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text,value:String(e.value||e.id)}}));R(t),F(!1)}})).catch((function(){f.current&&F(!1)}));var i=(null==o?void 0:o.value)||o;return i&&q(i,P),function(){f.current=!1}}),[]),s)return(0,bo.jsx)("img",{src:vczapi_blocks.direct_meeting_preview_image,alt:"Direct Meeting from Zoom"});var X=x.map((function(e){return{label:e.label,value:JSON.stringify(e)}}));return(0,bo.jsxs)("div",Co(Co({},(0,v.useBlockProps)()),{},{children:[(0,bo.jsx)(v.BlockControls,{children:(0,bo.jsx)(g.ToolbarGroup,{children:(0,bo.jsx)(g.ToolbarButton,{icon:y?"no":"edit",title:y?"Close":"Edit",subscript:"Edit",onClick:function(){w((function(e){return!e}))}})})}),(void 0===i||y)&&(0,bo.jsxs)(g.Placeholder,{children:[(0,bo.jsxs)("div",{className:"vczapi-label-header",children:[(0,bo.jsx)("h2",{children:(0,d.__)("Zoom - Show Meeting directly from Zoom","video-conferencing-with-zoom-api")}),(0,bo.jsx)("div",{children:(0,bo.jsx)("p",{children:(0,d.__)("Get a meeting directly from Zoom","video-conferencing-with-zoom-api")})})]}),(0,bo.jsxs)("div",{className:"vczapi-blocks-form",children:[void 0!==i&&i.hasOwnProperty("value")&&(0,bo.jsx)("div",{className:"vczapi-blocks-form--selected-meeting",children:(0,bo.jsxs)("h4",{children:["Currently Selected Meeting: ",(0,bo.jsx)("strong",{children:i.label})]})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.RadioControl,{className:"radio-inline",label:"Link Only",selected:a,options:[{label:"Yes",value:"yes"},{label:"No",value:"no"}],onChange:function(e){n({link_only:e})}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Would you like to show a Meeting or Webinar","video-conferencing-with-zoom-api"),value:P,options:[{label:"Meeting",value:"meeting"},{label:"Webinar",value:"webinar"}],onChange:function(e){M(e);var t=(null==j?void 0:j.value)||j;t&&(S([]),q(t,e))}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.ComboboxControl,{label:(0,d.__)("Select A Host","video-conferencing-with-zoom-api"),help:(0,d.__)("Click to view available hosts or start typing to filter","video-conferencing-with-zoom-api"),value:null!=j&&j.value?String(j.value):"string"==typeof j?j:"",options:V,onFilterValueChange:Z,isLoading:T,onChange:function(e){if(e){var t=V.find((function(t){return String(t.value)===String(e)}))||{value:e,label:e};n({host:t}),k(t),q(e,P)}}})}),G&&(void 0===x||0===x.length)&&(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.Spinner,{})}),void 0!==x&&x.length>0&&(0,bo.jsxs)("div",{className:"vczapi-blocks-form--group",children:[(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Select A Meeting : ","video-conferencing-with-zoom-api")+(N>1?" (use pagination below if necessary)":""),value:JSON.stringify(z),options:[{label:(0,d.__)("Select a meeting","video-conferencing-with-zoom-api"),value:"{}"}].concat(c(X)),disabled:G,onChange:function(e){"{}"!==e&&I(JSON.parse(e))}}),(0,bo.jsx)(J,{numberOfPages:N})]}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.Button,{isPrimary:!0,onClick:function(){if(!z.hasOwnProperty("value"))return alert("Meeting Needs to be selected"),!1;n({selectedMeeting:z}),n({shouldShow:"object"===r(P)?P:{label:P,value:P}}),w(!1)},children:(0,d.__)("Save","video-conferencing-with-zoom-api")})})]})]}),void 0!==i&&i.hasOwnProperty("value")&&!y&&(0,bo.jsx)(g.Disabled,{children:(0,bo.jsx)(m(),{block:"vczapi/show-live-meeting",attributes:{link_only:a,selectedMeeting:i,shouldShow:l}})})]}))},example:{attributes:{preview:!0}}}),(0,o.registerBlockType)("vczapi/list-host-meetings",{apiVersion:2,edit:function(e){var t,n=e.attributes,o=e.setAttributes,r=n.host,i=n.shouldShow,a=n.preview,s=u((0,b.useState)(!1),2),l=s[0],c=s[1],f=u((0,b.useState)([]),2),h=f[0],y=f[1],w=u((0,b.useState)(!1),2),O=w[0],x=w[1],S=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";x(!0);var n=window.ajaxurl||"admin-ajax.php",o=(null===(e=window)||void 0===e||null===(e=e.vczapi_blocks)||void 0===e?void 0:e.nonce)||"",r="".concat(n,"?action=vczapi_get_zoom_hosts&host=").concat(encodeURIComponent(t),"&nonce=").concat(o);fetch(r).then((function(e){return e.json()})).then((function(e){var t=(e||[]).map((function(e){return{label:e.label||e.name||e.value,value:String(e.value||e.id)}}));y(t)})).catch((function(){y([])})).finally((function(){x(!1)}))},C=(0,b.useMemo)((function(){return(0,p.debounce)(S,300)}),[]);if((0,b.useEffect)((function(){return S(),function(){C.cancel()}}),[]),a)return(0,bo.jsx)("img",{src:null===(t=vczapi_blocks)||void 0===t?void 0:t.list_host_meetings_preview_image,alt:(0,d.__)("List Host meetings","video-conferencing-with-zoom-api")});var j=(0,v.useBlockProps)();return(0,bo.jsxs)("div",ko(ko({},j),{},{children:[(0,bo.jsx)(v.BlockControls,{children:(0,bo.jsx)(g.ToolbarGroup,{children:(0,bo.jsx)(g.ToolbarButton,{icon:l?"no":"edit",title:l?(0,d.__)("Close","video-conferencing-with-zoom-api"):(0,d.__)("Edit","video-conferencing-with-zoom-api"),onClick:function(){return c((function(e){return!e}))}})})}),(!r||l)&&(0,bo.jsx)(g.Placeholder,{label:(0,d.__)("Zoom - List Meetings/Webinars based on HOST","video-conferencing-with-zoom-api"),children:(0,bo.jsxs)("div",{className:"vczapi-blocks-form",children:[(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Type","video-conferencing-with-zoom-api"),value:(null==i?void 0:i.value)||i||"meeting",options:[{label:(0,d.__)("Meeting","video-conferencing-with-zoom-api"),value:"meeting"},{label:(0,d.__)("Webinar","video-conferencing-with-zoom-api"),value:"webinar"}],onChange:function(e){return o({shouldShow:{label:"meeting"===e?"Meeting":"Webinar",value:e}})}})}),(0,bo.jsxs)("div",{className:"vczapi-blocks-form--group",children:[(0,bo.jsx)(g.ComboboxControl,{label:(0,d.__)("Select Host","video-conferencing-with-zoom-api"),value:(null==r?void 0:r.value)||r||"",options:h,onFilterValueChange:function(e){return C(e)},onChange:function(e){var t=h.find((function(t){return t.value===e}));o({host:t||e})}}),O&&(0,bo.jsx)(g.Spinner,{})]}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.Button,{variant:"primary",onClick:function(){return c(!1)},children:(0,d.__)("Save","video-conferencing-with-zoom-api")})})]})}),(null==r?void 0:r.value)&&!l&&(0,bo.jsx)(m(),{block:"vczapi/list-host-meetings",attributes:{host:r,shouldShow:i}})]}))},example:{attributes:{preview:!0}}}),(0,o.registerBlockType)("vczapi/join-via-browser",{apiVersion:2,edit:function(e){var t,n=e.attributes,o=e.setAttributes,i=n.host,a=n.selectedMeeting,s=n.disable_countdown,l=n.login_required,f=n.preview,h=n.shouldShow,y=n.passcode,w=u((0,b.useState)(!1),2),O=w[0],x=w[1],S=u((0,b.useState)([]),2),C=S[0],j=S[1],k=u((0,b.useState)(""),2),_=k[0],P=k[1],M=u((0,b.useState)(i||null),2),E=M[0],z=M[1],I=u((0,b.useState)((null==h?void 0:h.value)||h||"meeting"),2),D=I[0],V=I[1],R=u((0,b.useState)(a||{}),2),A=R[0],T=R[1],F=u((0,b.useState)([]),2),L=F[0],N=F[1],B=u((0,b.useState)(!1),2),H=B[0],$=B[1],U=u((0,b.useState)(1),2),W=U[0],G=U[1],Y=u((0,b.useState)(1),2),Z=Y[0],q=Y[1],J=u((0,b.useState)(!1),2),X=J[0],K=J[1],Q=(0,b.useCallback)((function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";$(!0);var n=t?encodeURIComponent(t):"",o=window.ajaxurl||"admin-ajax.php",r=(null===(e=window)||void 0===e||null===(e=e.vczapi_blocks)||void 0===e?void 0:e.nonce)||"",i="".concat(o,"?action=vczapi_get_zoom_hosts&host=").concat(n,"&nonce=").concat(r);fetch(i).then((function(e){return e.json()})).then((function(e){if(Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text||e.value,value:String(e.value||e.id)}}));N(t)}})).catch((function(){N([])})).finally((function(){$(!1)}))}),[]),ee=(0,b.useMemo)((function(){return(0,p.debounce)(Q,300)}),[Q]),te=(0,b.useCallback)((function(e,t){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(e){var i="object"===r(t)?t.value:t,a=window.ajaxurl||"admin-ajax.php",s=(null===(n=window)||void 0===n||null===(n=n.vczapi_blocks)||void 0===n?void 0:n.nonce)||"",l="".concat(a,"?action=vczapi_get_live_meetings&host_id=").concat(e,"&show=").concat(i,"&nonce=").concat(s);o>1&&(l+="&page_number=".concat(o)),K(!0),fetch(l).then((function(e){return e.json()})).then((function(e){var t=parseFloat((null==e?void 0:e.total_records)||0)/parseFloat((null==e?void 0:e.page_size)||1);G(t>1?Math.round(t):1),j((null==e?void 0:e.formatted_meetings)||[])})).catch((function(){j([])})).finally((function(){K(!1)}))}}),[]);if((0,b.useEffect)((function(){Q();var e=(null==i?void 0:i.value)||i;return e&&te(e,D),function(){ee.cancel()}}),[Q,te,ee]),f)return(0,bo.jsx)("img",{src:null===(t=window.vczapi_blocks)||void 0===t?void 0:t.join_via_browser,alt:(0,d.__)("Direct Meeting from Zoom","video-conferencing-with-zoom-api")});var ne=(0,v.useBlockProps)(),oe=function(){if(W<=1)return null;for(var e=[],t=function(t){e.push((0,bo.jsx)(g.Button,{variant:t===Z?"primary":"secondary",isSmall:!0,onClick:function(){var e=(null==E?void 0:E.value)||E;te(e,D,t),q(t)},children:t},t))},n=1;n<=W;n++)t(n);return(0,bo.jsx)("div",{className:"vczapi-blocks-pagination",children:e})},re=C.map((function(e){return{label:e.label,value:JSON.stringify(e)}}));return(0,bo.jsxs)("div",Po(Po({},ne),{},{children:[(0,bo.jsx)(v.BlockControls,{children:(0,bo.jsx)(g.ToolbarGroup,{children:(0,bo.jsx)(g.ToolbarButton,{icon:O?"no":"edit",title:O?(0,d.__)("Close","video-conferencing-with-zoom-api"):(0,d.__)("Edit","video-conferencing-with-zoom-api"),onClick:function(){return x((function(e){return!e}))}})})}),(!(null!=a&&a.value)||O)&&(0,bo.jsx)(g.Placeholder,{label:(0,d.__)("Zoom - Embed Join Via A Browser","video-conferencing-with-zoom-api"),instructions:(0,d.__)("Embed Join via a browser","video-conferencing-with-zoom-api"),children:(0,bo.jsxs)("div",{className:"vczapi-blocks-form",children:[_&&(0,bo.jsx)(g.Notice,{status:"error",isDismissible:!1,children:_}),(null==a?void 0:a.label)&&(0,bo.jsx)("div",{className:"vczapi-blocks-form--selected-meeting",children:(0,bo.jsxs)("h4",{children:[(0,d.__)("Currently Selected Meeting:","video-conferencing-with-zoom-api")," ",(0,bo.jsx)("strong",{children:a.label})]})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.TextControl,{label:(0,d.__)("Passcode (Set password of your meeting to automatically let users join without needing them to enter password.)","video-conferencing-with-zoom-api"),value:y||"",onChange:function(e){return o({passcode:e})}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.RadioControl,{label:(0,d.__)("Disable Countdown","video-conferencing-with-zoom-api"),selected:s||"no",options:[{label:(0,d.__)("Yes","video-conferencing-with-zoom-api"),value:"yes"},{label:(0,d.__)("No","video-conferencing-with-zoom-api"),value:"no"}],onChange:function(e){return o({disable_countdown:e})}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.RadioControl,{label:(0,d.__)("Login Required","video-conferencing-with-zoom-api"),selected:l||"no",options:[{label:(0,d.__)("Yes","video-conferencing-with-zoom-api"),value:"yes"},{label:(0,d.__)("No","video-conferencing-with-zoom-api"),value:"no"}],onChange:function(e){return o({login_required:e})}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Would you like to show a Meeting or Webinar","video-conferencing-with-zoom-api"),value:D,options:[{label:(0,d.__)("Meeting","video-conferencing-with-zoom-api"),value:"meeting"},{label:(0,d.__)("Webinar","video-conferencing-with-zoom-api"),value:"webinar"}],onChange:function(e){V(e);var t=(null==E?void 0:E.value)||E;t&&(j([]),te(t,e))}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.ComboboxControl,{label:(0,d.__)("Select A Host","video-conferencing-with-zoom-api"),help:(0,d.__)("Click to view available hosts or start typing to filter","video-conferencing-with-zoom-api"),value:null!=E&&E.value?String(E.value):"string"==typeof E?E:"",options:L,onFilterValueChange:function(e){return ee(e)},isLoading:H,onChange:function(e){if(e){var t=L.find((function(t){return String(t.value)===String(e)}))||{value:e,label:e};z(t),te(e,D)}}})}),X&&0===C.length&&(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.Spinner,{})}),C.length>0&&(0,bo.jsxs)("div",{className:"vczapi-blocks-form--group",children:[(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Select A Meeting:","video-conferencing-with-zoom-api")+(W>1?(0,d.__)(" (use pagination below if necessary)","video-conferencing-with-zoom-api"):""),value:JSON.stringify(A),options:[{label:(0,d.__)("Select a meeting","video-conferencing-with-zoom-api"),value:"{}"}].concat(c(re)),disabled:X,onChange:function(e){"{}"!==e&&T(JSON.parse(e))}}),(0,bo.jsx)(oe,{})]}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.Button,{variant:"primary",onClick:function(){null!=A&&A.value?(P(""),o({selectedMeeting:A,host:E,shouldShow:"object"===r(D)?D:{label:D,value:D}}),x(!1)):P((0,d.__)("Please select a meeting before saving.","video-conferencing-with-zoom-api"))},children:(0,d.__)("Save","video-conferencing-with-zoom-api")})})]})}),(null==a?void 0:a.value)&&!O&&(0,bo.jsx)(g.Disabled,{children:(0,bo.jsx)(m(),{block:"vczapi/join-via-browser",attributes:{selectedMeeting:a,login_required:l,disable_countdown:s,passcode:y,shouldShow:h}})})]}))},example:{attributes:{preview:!0}}}),(0,o.registerBlockType)("vczapi/recordings",{apiVersion:2,edit:function(e){e.className;var t=e.attributes,n=e.setAttributes,o=t.host,i=t.selectedMeeting,a=t.downloadable,s=t.preview,l=t.shouldShow,f=t.showBy,h=(0,b.useRef)(),y=u((0,b.useState)(!1),2),w=y[0],O=y[1],x=u((0,b.useState)([]),2),S=x[0],C=x[1],j=u((0,b.useState)(o||null),2),k=j[0],_=j[1],P=u((0,b.useState)((null==l?void 0:l.value)||l||"meeting"),2),M=P[0],E=P[1],z=u((0,b.useState)(i||{}),2),I=z[0],D=z[1],V=u((0,b.useState)([]),2),R=V[0],A=V[1],T=u((0,b.useState)(!1),2),F=T[0],L=T[1],N=u((0,b.useState)(1),2),B=N[0],H=N[1],$=u((0,b.useState)(1),2),U=$[0],W=$[1],G=u((0,b.useState)(!1),2),Y=G[0],Z=G[1],q=(0,p.debounce)((function(e){var t;L(!0);var n=e?encodeURIComponent(e):"",o=(null===(t=window)||void 0===t||null===(t=t.vczapi_blocks)||void 0===t?void 0:t.nonce)||"",r=window.ajaxurl||"admin-ajax.php",i="".concat(r,"?action=vczapi_get_zoom_hosts&host=").concat(n,"&nonce=").concat(o);fetch(i).then((function(e){return e.json()})).then((function(e){if(h.current&&Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text,value:String(e.value||e.id)}}));A(t),L(!1)}})).catch((function(){h.current&&L(!1)}))}),300),J=function(e,t){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||"undefined"===e)return[];var i="object"===r(t)?t.value:t,a=window.ajaxurl||"admin-ajax.php",s=(null===(n=window)||void 0===n||null===(n=n.vczapi_blocks)||void 0===n?void 0:n.nonce)||"",l="".concat(a,"?action=vczapi_get_live_meetings&host_id=").concat(e,"&show=").concat(i,"&nonce=").concat(s);o.hasOwnProperty("page_number")&&"undefined"!==o.page_number&&(l+="&page_number="+o.page_number),Z(!0),fetch(l).then((function(e){return e.json()})).then((function(e){if(h.current){var t=parseFloat(e.total_records)/parseFloat(e.page_size);if(t>1){var n=Math.round(t);H(n)}else H(1);C(e.formatted_meetings||[]),Z(!1)}})).catch((function(){h.current&&Z(!1)}))},X=function(e){var t=e.numberOfPages,n=[];if(t>1){for(var o=function(e){var t=e===U?"selected":"";n.push((0,bo.jsx)(g.Button,{className:t,onClick:function(){var t=(null==k?void 0:k.value)||k;J(t,M,{page_number:e}),W(e)},children:e},e))},r=1;r<=t;r++)o(r);return(0,bo.jsx)("div",{className:"vczapi-blocks-pagination",children:n})}return""};if((0,b.useEffect)((function(){var e;h.current=!0,L(!0);var t=window.ajaxurl||"admin-ajax.php",n=(null===(e=window)||void 0===e||null===(e=e.vczapi_blocks)||void 0===e?void 0:e.nonce)||"",r="".concat(t," + '?action=vczapi_get_zoom_hosts&nonce=").concat(n);fetch(r).then((function(e){return e.json()})).then((function(e){if(h.current&&Array.isArray(e)){var t=e.map((function(e){return{label:e.label||e.name||e.text,value:String(e.value||e.id)}}));A(t),L(!1)}})).catch((function(){h.current&&L(!1)}));var i=(null==o?void 0:o.value)||o;return i&&"meeting"===f&&J(i,M),function(){h.current=!1}}),[]),s)return(0,bo.jsx)("img",{src:vczapi_blocks.recordings_preview,alt:"Zoom Recordings"});var K=S.map((function(e){return{label:e.label,value:JSON.stringify(e)}}));return(0,bo.jsxs)("div",Eo(Eo({},(0,v.useBlockProps)()),{},{children:[(0,bo.jsx)(v.BlockControls,{children:(0,bo.jsx)(g.ToolbarGroup,{children:(0,bo.jsx)(g.ToolbarButton,{icon:w?"no":"edit",title:w?"Close":"Edit",subscript:"Edit",onClick:function(){O((function(e){return!e}))}})})}),(void 0===i||void 0===o||w)&&(0,bo.jsxs)(g.Placeholder,{children:[(0,bo.jsxs)("div",{className:"vczapi-label-header",children:[(0,bo.jsx)("h2",{children:(0,d.__)("Zoom - Show Recordings","video-conferencing-with-zoom-api")}),(0,bo.jsx)("div",{children:(0,bo.jsx)("p",{children:(0,d.__)("Show recordings from Zoom","video-conferencing-with-zoom-api")})})]}),(0,bo.jsxs)("div",{className:"vczapi-blocks-form",children:[void 0!==i&&i.hasOwnProperty("value")&&(0,bo.jsx)("div",{className:"vczapi-blocks-form--selected-meeting",children:(0,bo.jsxs)("h4",{children:["Currently Selected Meeting: ",(0,bo.jsx)("strong",{children:i.label})]})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.RadioControl,{className:"radio-inline",label:(0,d.__)("Show Recordings by","video-conferencing-with-zoom-api"),options:[{label:"Host",value:"host"},{label:"Meeting",value:"meeting"}],selected:f,onChange:function(e){h.current&&n({showBy:e})}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.ComboboxControl,{label:(0,d.__)("Select A Host","video-conferencing-with-zoom-api"),help:(0,d.__)("Click to view available hosts or start typing to filter","video-conferencing-with-zoom-api"),value:null!=k&&k.value?String(k.value):"string"==typeof k?k:"",options:R,onFilterValueChange:q,isLoading:F,onChange:function(e){if(e){var t=R.find((function(t){return String(t.value)===String(e)}))||{value:e,label:e};h.current&&(_(t),"meeting"===f&&J(e,M))}}})}),"meeting"===f&&(0,bo.jsxs)(bo.Fragment,{children:[(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Would you like to show a Meeting or Webinar","video-conferencing-with-zoom-api"),value:M,options:[{label:"Meeting",value:"meeting"},{label:"Webinar",value:"webinar"}],onChange:function(e){E(e);var t=(null==k?void 0:k.value)||k;t&&h.current&&(C([]),J(t,e))}})}),Y&&(void 0===S||0===S.length)&&(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.Spinner,{})}),void 0!==S&&S.length>0&&(0,bo.jsxs)("div",{className:"vczapi-blocks-form--group",children:[(0,bo.jsx)(g.SelectControl,{label:(0,d.__)("Select A Meeting : ","video-conferencing-with-zoom-api")+(B>1?" (use pagination below if necessary)":""),value:JSON.stringify(I),options:[{label:(0,d.__)("Select a meeting","video-conferencing-with-zoom-api"),value:"{}"}].concat(c(K)),disabled:Y,onChange:function(e){"{}"!==e&&h.current&&D(JSON.parse(e))}}),(0,bo.jsx)(X,{numberOfPages:B})]})]}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.ToggleControl,{className:"toggle-inline",label:"Downloadable",checked:a,onChange:function(e){h.current&&n({downloadable:e})}})}),(0,bo.jsx)("div",{className:"vczapi-blocks-form--group",children:(0,bo.jsx)(g.Button,{isPrimary:!0,onClick:function(){return"host"!==f||k&&("object"!==r(k)||k.value)?"meeting"!==f||I.hasOwnProperty("value")?void(h.current&&(n({selectedMeeting:I}),n({host:k}),n({shouldShow:"object"===r(M)?M:{label:M,value:M}}),O(!1))):(alert("Meeting Needs to be selected"),!1):(alert("Host Needs to be selected"),!1)},children:(0,d.__)("Save","video-conferencing-with-zoom-api")})})]})]}),("host"===f&&void 0!==o||"meeting"===f&&void 0!==i)&&!w&&(0,bo.jsx)(g.Disabled,{children:(0,bo.jsx)(m(),{block:"vczapi/recordings",attributes:{downloadable:a,host:o,selectedMeeting:i,showBy:f}})})]}))}}),(0,o.registerBlockType)("vczapi/single-zoom-meeting",{apiVersion:2,edit:function(e){return(0,bo.jsx)("div",Io(Io({},(0,v.useBlockProps)()),{},{children:(0,bo.jsxs)("div",{class:"vczapi-singleMeetingSkeleton",children:[(0,bo.jsx)("h5",{children:" Please do not remove this block, this block is used to display single meeting page for FSE Themes"}),(0,bo.jsx)("img",{alt:"Zoom Meeting Single Page Outline",src:vczapi_blocks.single_zoom_meeting_page})]})}))}})},679:function(e,t,n){var o=n(864),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return o.isMemo(e)?a:s[e.$$typeof]||r}s[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[o.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,v=Object.prototype;e.exports=function e(t,n,o){if("string"!=typeof n){if(v){var r=f(n);r&&r!==v&&e(t,r,o)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),h=l(n),m=0;m<a.length;++m){var g=a[m];if(!(i[g]||o&&o[g]||h&&h[g]||s&&s[g])){var b=p(n,g);try{c(t,g,b)}catch(e){}}}}return t}},921:function(e,t){var n="function"==typeof Symbol&&Symbol.for,o=n?Symbol.for("react.element"):60103,r=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,v=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function O(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case u:case d:case i:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case m:case h:case l:return e;default:return t}}case r:return t}}}function x(e){return O(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=o,t.ForwardRef=p,t.Fragment=i,t.Lazy=m,t.Memo=h,t.Portal=r,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return x(e)||O(e)===u},t.isConcurrentMode=x,t.isContextConsumer=function(e){return O(e)===c},t.isContextProvider=function(e){return O(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return O(e)===p},t.isFragment=function(e){return O(e)===i},t.isLazy=function(e){return O(e)===m},t.isMemo=function(e){return O(e)===h},t.isPortal=function(e){return O(e)===r},t.isProfiler=function(e){return O(e)===s},t.isStrictMode=function(e){return O(e)===a},t.isSuspense=function(e){return O(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===a||e===f||e===v||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===h||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===b||e.$$typeof===y||e.$$typeof===w||e.$$typeof===g)},t.typeOf=O},864:function(e,t,n){e.exports=n(921)}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.m=t,e=[],o.O=function(t,n,r,i){if(!n){var a=1/0;for(u=0;u<e.length;u++){n=e[u][0],r=e[u][1],i=e[u][2];for(var s=!0,l=0;l<n.length;l++)(!1&i||a>=i)&&Object.keys(o.O).every((function(e){return o.O[e](n[l])}))?n.splice(l--,1):(s=!1,i<a&&(a=i));if(s){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,r,i]},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={826:0,431:0};o.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,i,a=n[0],s=n[1],l=n[2],c=0;if(a.some((function(t){return 0!==e[t]}))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(l)var u=l(o)}for(t&&t(n);c<a.length;c++)i=a[c],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(u)},n=self.webpackChunkvideo_conferencing_with_zoom_api=self.webpackChunkvideo_conferencing_with_zoom_api||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var r=o.O(void 0,[431],(function(){return o(772)}));r=o.O(r)}();
  • video-conferencing-with-zoom-api/trunk/includes/Blocks/Blocks.php

    r3666609 r3722621  
    22
    33namespace Codemanas\VczApi\Blocks;
    4 
    5 use function Composer\Autoload\includeFile;
    64
    75/**
    … …  
    2725         */
    2826        public function __construct() {
    29                 global $wp_version;
    30                 if ( version_compare( $wp_version, '5.8', '>=' ) ) {
    31                         add_filter( 'block_categories_all', [ $this, 'register_block_categories' ], 10, 2 );
    32                 } else {
    33                         add_filter( 'block_categories', [ $this, 'register_block_categories' ], 10, 2 );
    34                 }
     27                add_filter( 'block_categories_all', [ $this, 'register_block_categories' ], 10, 2 );
     28
    3529                if ( function_exists( 'register_block_type' ) ) {
    3630                        add_action( 'init', [ $this, 'register_scripts' ] );
    … …  
    7771                        'vczapi_blocks',
    7872                        [
     73                                'nonce'                            => wp_create_nonce( 'vczapi_blocks' ),
    7974                                'list_meetings_preview'            => ZVC_PLUGIN_IMAGES_PATH . '/block-previews/list-meetings-webinars.png',
    8075                                'direct_meeting_preview_image'     => ZVC_PLUGIN_IMAGES_PATH . '/block-previews/direct-meeting.jpg',
    … …  
    9085         * Registering block categories.
    9186         *
    92          * @param array $categories Block categories.
    93          * @param mixed $post       Post.
     87         * @param   array  $categories Block categories.
     88         * @param   mixed  $post        Post.
    9489         *
    9590         * @return array
    … …  
    383378         * Get a scalar block attribute without display-oriented sanitization.
    384379         *
    385          * @param mixed  $attributes Block attributes.
    386          * @param string $key        Attribute key.
    387          * @param string $default    Default value.
     380         * @param   mixed   $attributes Block attributes.
     381         * @param   string  $key         Attribute key.
     382         * @param   string  $default     Default value.
    388383         *
    389384         * @return string
    … …  
    405400         * Get a nested scalar block attribute.
    406401         *
    407          * @param mixed  $attributes Block attributes.
    408          * @param string $key        Attribute key.
    409          * @param string $nested_key Nested key.
    410          * @param string $default    Default value.
     402         * @param   mixed   $attributes Block attributes.
     403         * @param   string  $key         Attribute key.
     404         * @param   string  $nested_key Nested key.
     405         * @param   string  $default     Default value.
    411406         *
    412407         * @return string
    … …  
    430425         * Get a positive integer block attribute.
    431426         *
    432          * @param mixed  $attributes Block attributes.
    433          * @param string $key        Attribute key.
    434          * @param int    $default    Default value.
     427         * @param   mixed   $attributes Block attributes.
     428         * @param   string  $key         Attribute key.
     429         * @param   int     $default     Default value.
    435430         *
    436431         * @return int
    … …  
    452447         * Get an allowlisted scalar block attribute.
    453448         *
    454          * @param mixed  $attributes     Block attributes.
    455          * @param string $key            Attribute key.
    456          * @param array  $allowed_values Allowed values.
    457          * @param string $default        Default value.
     449         * @param   mixed   $attributes      Block attributes.
     450         * @param   string  $key             Attribute key.
     451         * @param   array   $allowed_values Allowed values.
     452         * @param   string  $default         Default value.
    458453         *
    459454         * @return string
    … …  
    468463         * Get an allowlisted nested block attribute.
    469464         *
    470          * @param mixed  $attributes     Block attributes.
    471          * @param string $key            Attribute key.
    472          * @param array  $allowed_values Allowed values.
    473          * @param string $default        Default value.
     465         * @param   mixed   $attributes      Block attributes.
     466         * @param   string  $key             Attribute key.
     467         * @param   array   $allowed_values Allowed values.
     468         * @param   string  $default         Default value.
    474469         *
    475470         * @return string
    … …  
    484479         * Get a numeric identifier from a nested block attribute.
    485480         *
    486          * @param mixed  $attributes Block attributes.
    487          * @param string $key        Attribute key.
    488          * @param string $default    Default value.
     481         * @param   mixed   $attributes Block attributes.
     482         * @param   string  $key         Attribute key.
     483         * @param   string  $default     Default value.
    489484         *
    490485         * @return string
    … …  
    499494         * Get a sanitized Zoom host identifier.
    500495         *
    501          * @param mixed  $attributes Block attributes.
    502          * @param string $key        Attribute key.
    503          * @param string $default    Default value.
     496         * @param   mixed   $attributes Block attributes.
     497         * @param   string  $key         Attribute key.
     498         * @param   string  $default     Default value.
    504499         *
    505500         * @return string
    … …  
    517512         * characters. Avoid display-oriented sanitizers here.
    518513         *
    519          * @param mixed  $attributes Block attributes.
    520          * @param string $key        Attribute key.
     514         * @param   mixed   $attributes Block attributes.
     515         * @param   string  $key         Attribute key.
    521516         *
    522517         * @return string
    … …  
    539534         * This is shortcode-context escaping, not HTML attribute escaping.
    540535         *
    541          * @param string $name  Shortcode attribute name.
    542          * @param mixed  $value Shortcode attribute value.
     536         * @param   string  $name   Shortcode attribute name.
     537         * @param   mixed   $value Shortcode attribute value.
    543538         *
    544539         * @return string
    … …  
    573568         * @updated N/A
    574569         */
    575         public function get_hosts() {
     570        public function get_hosts(): void {
     571                check_ajax_referer( 'vczapi_blocks', 'nonce' );
     572                if ( ! current_user_can( 'edit_posts' ) && ! current_user_can( 'manage_options' ) ) {
     573                        wp_send_json_error( [ 'message' => __( 'You do not have permission to access this resource.', 'video-conferencing-with-zoom-api' ) ], 403 );
     574                }
     575
    576576                $host_name = filter_input( INPUT_GET, 'host' );
    577577                $host_name = is_scalar( $host_name ) ? (string) $host_name : '';
    … …  
    616616         * @updated N/A
    617617         */
    618         public function     get_live_meetings() {
     618        public function get_live_meetings() {
     619                check_ajax_referer( 'vczapi_blocks', 'nonce' );
     620                if ( ! current_user_can( 'edit_posts' ) && ! current_user_can( 'manage_options' ) ) {
     621                        wp_send_json_error( [ 'message' => __( 'You do not have permission to access this resource.', 'video-conferencing-with-zoom-api' ) ], 403 );
     622                }
     623
    619624                $host_id                 = filter_input( INPUT_GET, 'host_id' );
    620625                $show_meeting_or_webinar = filter_input( INPUT_GET, 'show' );
    … …  
    623628                ];
    624629
    625                 $page_number             = filter_input( INPUT_GET, 'page_number' );
     630                $page_number = filter_input( INPUT_GET, 'page_number' );
    626631                if ( ! empty( $page_number ) ) {
    627632                        $args['page_number'] = $page_number;
    … …  
    666671         * Render list of meetings.
    667672         *
    668          * @param mixed $attributes Block attributes.
     673         * @param   mixed  $attributes Block attributes.
    669674         *
    670675         * @return string
    … …  
    733738         * Render just the post.
    734739         *
    735          * @param mixed $attributes Block attributes.
     740         * @param   mixed  $attributes Block attributes.
    736741         *
    737742         * @return false|string
    … …  
    768773         * Render directly from API.
    769774         *
    770          * @param mixed $attributes Block attributes.
     775         * @param   mixed  $attributes Block attributes.
    771776         *
    772777         * @return false|string
    … …  
    798803         * Render host meeting list.
    799804         *
    800          * @param mixed $attributes Block attributes.
     805         * @param   mixed  $attributes Block attributes.
    801806         *
    802807         * @return false|string
    … …  
    819824         * Embed join via browser.
    820825         *
    821          * @param mixed $attributes Block attributes.
     826         * @param   mixed  $attributes Block attributes.
    822827         *
    823828         * @return string
    … …  
    861866         * Render Recordings.
    862867         *
    863          * @param mixed $attributes Block attributes.
     868         * @param   mixed  $attributes Block attributes.
    864869         *
    865870         * @return false|string
  • video-conferencing-with-zoom-api/trunk/includes/admin/class-zvc-admin-ajax.php

    r3565576 r3722621  
    99 * @author  Deepen
    1010 */
    11 
    12 class Zoom_Video_Conferencing_Admin_Ajax
    13 {
    14 
    15         public function __construct()
    16         {
     11class Zoom_Video_Conferencing_Admin_Ajax {
     12
     13        public function __construct() {
    1714                //Delete Meeting
    18                 add_action('wp_ajax_zvc_delete_meeting', array($this, 'delete_meeting'));
    19                 add_action('wp_ajax_zvc_bulk_meetings_delete', array($this, 'delete_bulk_meeting'));
    20                 add_action('wp_ajax_zoom_dimiss_notice', array($this, 'dismiss_notice'));
    21                 add_action('wp_ajax_check_connection', array($this, 'check_connection'));
     15                add_action( 'wp_ajax_zvc_delete_meeting', array( $this, 'delete_meeting' ) );
     16                add_action( 'wp_ajax_zvc_bulk_meetings_delete', array( $this, 'delete_bulk_meeting' ) );
     17                add_action( 'wp_ajax_zoom_dimiss_notice', array( $this, 'dismiss_notice' ) );
     18                add_action( 'wp_ajax_check_connection', array( $this, 'check_connection' ) );
    2219
    2320                //Join via browser Auth Call
    24                 add_action('wp_ajax_nopriv_get_auth', array($this, 'get_auth'));
    25                 add_action('wp_ajax_get_auth', array($this, 'get_auth'));
     21                add_action( 'wp_ajax_nopriv_vczapi_jvb_get_auth', array( $this, 'get_auth' ) );
     22                add_action( 'wp_ajax_vczapi_jvb_get_auth', array( $this, 'get_auth' ) );
    2623
    2724                //Call meeting state
    28                 add_action('wp_ajax_nopriv_state_change', array($this, 'state_change'));
    29                 add_action('wp_ajax_state_change', array($this, 'state_change'));
     25                add_action( 'wp_ajax_nopriv_vczapi_meeting_state_change', array( $this, 'state_change' ) );
     26                add_action( 'wp_ajax_vczapi_meeting_state_change', array( $this, 'state_change' ) );
    3027
    3128                //AJAX call for fetching users
    32                 add_action('wp_ajax_get_assign_host_id', [$this, 'assign_host_id']);
    33                 add_action('wp_ajax_vczapi_get_wp_users', [$this, 'get_wp_usersByRole']);
    34                 add_action('wp_ajax_vczapi_get_zoom_host_query', [$this, 'getZoomHostByQuery']);
     29                add_action( 'wp_ajax_get_assign_host_id', [ $this, 'assign_host_id' ] );
     30                add_action( 'wp_ajax_vczapi_get_wp_users', [ $this, 'get_wp_usersByRole' ] );
     31                add_action( 'wp_ajax_vczapi_get_zoom_host_query', [ $this, 'getZoomHostByQuery' ] );
    3532
    3633                //Ajax called for dismissing notice
    37                 add_action('wp_ajax_vczapi_dismiss_admin_notice', [$this, 'admin_notice']);
     34                add_action( 'wp_ajax_vczapi_dismiss_admin_notice', [ $this, 'admin_notice' ] );
    3835
    3936                //End Meeting
    40                 add_action('wp_ajax_vczapi_end_meeting', [$this, 'end_meeting']);
    41         }
    42 
    43         public function admin_notice()
    44         {
    45                 $option = filter_input(INPUT_POST, 'option');
    46                 $nonce = filter_input(INPUT_POST, 'security');
    47                 if (!wp_verify_nonce($nonce, 'vczapi-dismiss-nonce')) {
    48                         wp_send_json_error(['message' => 'Error']);
    49                 } elseif (!current_user_can('manage_options')) {
    50                         wp_send_json_error(['message' => 'Error']);
    51                 }
    52 
    53 
    54                 if ($option == 'vczapi_dismiss_sdk_not_active_notice') {
    55                         update_option('vczapi_dismiss_sdk_not_active_notice', true);
     37                add_action( 'wp_ajax_vczapi_end_meeting', [ $this, 'end_meeting' ] );
     38        }
     39
     40        public function admin_notice() {
     41                $option = filter_input( INPUT_POST, 'option' );
     42                $nonce  = filter_input( INPUT_POST, 'security' );
     43                if ( ! wp_verify_nonce( $nonce, 'vczapi-dismiss-nonce' ) ) {
     44                        wp_send_json_error( [ 'message' => 'Error' ] );
     45                } elseif ( ! current_user_can( 'manage_options' ) ) {
     46                        wp_send_json_error( [ 'message' => 'Error' ] );
     47                }
     48
     49
     50                if ( $option == 'vczapi_dismiss_sdk_not_active_notice' ) {
     51                        update_option( 'vczapi_dismiss_sdk_not_active_notice', true );
    5652                }
    5753                wp_send_json_success();
    … …  
    6561         * @modified 2.1.0
    6662         */
    67         public function delete_meeting()
    68         {
    69                 check_ajax_referer('_nonce_zvc_security', 'security');
    70 
    71                 if (!current_user_can('manage_options')) {
    72                         return;
    73                 }
    74 
    75                 $meeting_id = filter_input(INPUT_POST, 'meeting_id');
    76                 $meeting_type = filter_input(INPUT_POST, 'type');
    77                 if ($meeting_id) {
    78                         if (!empty($meeting_type) && $meeting_type === "webinar") {
    79                                 zoom_conference()->deleteAWebinar($meeting_id);
     63        public function delete_meeting() {
     64                check_ajax_referer( '_nonce_zvc_security', 'security' );
     65
     66                if ( ! current_user_can( 'manage_options' ) ) {
     67                        return;
     68                }
     69
     70                $meeting_id   = filter_input( INPUT_POST, 'meeting_id' );
     71                $meeting_type = filter_input( INPUT_POST, 'type' );
     72                if ( $meeting_id ) {
     73                        if ( ! empty( $meeting_type ) && $meeting_type === "webinar" ) {
     74                                zoom_conference()->deleteAWebinar( $meeting_id );
    8075                        } else {
    81                                 zoom_conference()->deleteAMeeting($meeting_id);
    82                         }
    83 
    84                         wp_send_json(array(
     76                                zoom_conference()->deleteAMeeting( $meeting_id );
     77                        }
     78
     79                        wp_send_json( array(
    8580                                'error' => 0,
    86                                 'msg' => __("Deleted Meeting with ID", "video-conferencing-with-zoom-api") . ': ' . $meeting_id,
    87                         ));
     81                                'msg'   => __( "Deleted Meeting with ID", "video-conferencing-with-zoom-api" ) . ': ' . $meeting_id,
     82                        ) );
    8883                } else {
    89                         wp_send_json(array(
     84                        wp_send_json( array(
    9085                                'error' => 1,
    91                                 'msg' => __("An error occured. Host ID and Meeting ID not defined properly.", "video-conferencing-with-zoom-api"),
    92                         ));
     86                                'msg'   => __( "An error occured. Host ID and Meeting ID not defined properly.", "video-conferencing-with-zoom-api" ),
     87                        ) );
    9388                }
    9489
    … …  
    10297         * @modified 2.1.0
    10398         */
    104         public function delete_bulk_meeting()
    105         {
    106                 check_ajax_referer('_nonce_zvc_security', 'security');
    107 
    108                 if (!current_user_can('manage_options')) {
    109                         return;
    110                 }
    111 
    112                 $deleted = false;
    113                 $meeting_ids = filter_input(INPUT_POST, 'meetings_id', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
    114                 $meeting_type = filter_input(INPUT_POST, 'type');
    115                 if (!empty($meeting_ids)) {
    116                         $meeting_count = count($meeting_ids);
    117                         foreach ($meeting_ids as $meeting_id) {
    118                                 if (!empty($meeting_type) && $meeting_type === "webinar") {
    119                                         zoom_conference()->deleteAWebinar($meeting_id);
     99        public function delete_bulk_meeting() {
     100                check_ajax_referer( '_nonce_zvc_security', 'security' );
     101
     102                if ( ! current_user_can( 'manage_options' ) ) {
     103                        return;
     104                }
     105
     106                $deleted      = false;
     107                $meeting_ids  = filter_input( INPUT_POST, 'meetings_id', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
     108                $meeting_type = filter_input( INPUT_POST, 'type' );
     109                if ( ! empty( $meeting_ids ) ) {
     110                        $meeting_count = count( $meeting_ids );
     111                        foreach ( $meeting_ids as $meeting_id ) {
     112                                if ( ! empty( $meeting_type ) && $meeting_type === "webinar" ) {
     113                                        zoom_conference()->deleteAWebinar( $meeting_id );
    120114                                } else {
    121                                         zoom_conference()->deleteAMeeting($meeting_id);
     115                                        zoom_conference()->deleteAMeeting( $meeting_id );
    122116                                }
    123117                                $deleted = true;
    124118                        }
    125119
    126                         if ($deleted) {
    127                                 wp_send_json(array(
     120                        if ( $deleted ) {
     121                                wp_send_json( array(
    128122                                        'error' => 0,
    129                                         'msg' => sprintf(__("Deleted %d Meeting(s).", "video-conferencing-with-zoom-api"), $meeting_count),
    130                                 ));
     123                                        'msg'   => sprintf( __( "Deleted %d Meeting(s).", "video-conferencing-with-zoom-api" ), $meeting_count ),
     124                                ) );
    131125                        }
    132126                } else {
    133                         wp_send_json(array(
     127                        wp_send_json( array(
    134128                                'error' => 1,
    135                                 'msg' => __("You need to select a data in order to initiate this action."),
    136                         ));
     129                                'msg'   => __( "You need to select a data in order to initiate this action." ),
     130                        ) );
    137131                }
    138132
    … …  
    143137         * Dismiss admin notice
    144138         */
    145         public function dismiss_notice()
    146         {
    147                 update_option('zoom_api_notice', 1);
    148                 wp_send_json(1);
     139        public function dismiss_notice() {
     140                update_option( 'zoom_api_notice', 1 );
     141                wp_send_json( 1 );
    149142                wp_die();
    150143        }
    … …  
    156149         * @author Deepen Bajracharya
    157150         */
    158         public function check_connection()
    159         {
    160                 check_ajax_referer('_nonce_zvc_security', 'security');
    161 
    162                 $type = filter_input(INPUT_POST, 'type');
    163                 if ($type === "oAuth") {
     151        public function check_connection() {
     152                check_ajax_referer( '_nonce_zvc_security', 'security' );
     153
     154                $type = filter_input( INPUT_POST, 'type' );
     155                if ( $type === "oAuth" ) {
    164156                        $test = \Codemanas\VczApi\Requests\Zoom::instance()->me();
    165                         if (!empty($test->code)) {
    166                                 wp_send_json_error($test->message);
     157                        if ( ! empty( $test->code ) ) {
     158                                wp_send_json_error( $test->message );
    167159                        }
    168160
    169161                        //After user has been created delete this transient in order to fetch latest Data.
    170162                        video_conferencing_zoom_api_delete_user_cache();
    171                         wp_send_json_success(['msg' => "API Connection is good. You can refresh this and start creating your Zoom Events."]);
     163                        wp_send_json_success( [ 'msg' => "API Connection is good. You can refresh this and start creating your Zoom Events." ] );
    172164                }
    173165
    … …  
    181173         * @author Deepen Bajracharya
    182174         */
    183         public function get_auth()
    184         {
    185                 // check_ajax_referer('_nonce_zvc_security', 'zvc_security');
    186 
    187                 $referer = wp_get_referer();
     175        public function get_auth() {
     176                check_ajax_referer( 'vczapi_jvb', 'nonce' );
     177
     178                $referer  = wp_get_referer();
    188179                $home_url = home_url();
    189180
    190181                // Block requests with no referer or external referers
    191                 if (!$referer || parse_url($referer, PHP_URL_HOST) !== parse_url($home_url, PHP_URL_HOST)) {
    192                         wp_send_json_error('Invalid request source.');
     182                if ( ! $referer || parse_url( $referer, PHP_URL_HOST ) !== parse_url( $home_url, PHP_URL_HOST ) ) {
     183                        wp_send_json_error( 'Invalid request source.' );
    193184                }
    194185
    195186                // 2. Sanitize and validate the Meeting ID
    196                 $meeting_id = filter_input(INPUT_POST, 'meeting_id', FILTER_SANITIZE_NUMBER_INT);
    197 
    198                 if (empty($meeting_id)) {
    199                         wp_send_json_error('Invalid Meeting ID');
    200                 }
    201 
    202                 if (vczapi_is_sdk_enabled()) {
    203                         $sdk_key = get_option('vczapi_sdk_key');
    204                         $secret_key = get_option('vczapi_sdk_secret_key');
    205 
    206                         if (empty($sdk_key) || empty($secret_key)) {
    207                                 wp_send_json_error('SDK configuration error.');
     187                $meeting_id = filter_input( INPUT_POST, 'meeting_id', FILTER_SANITIZE_NUMBER_INT );
     188
     189                if ( empty( $meeting_id ) ) {
     190                        wp_send_json_error( 'Invalid Meeting ID' );
     191                }
     192
     193                if ( vczapi_is_sdk_enabled() ) {
     194                        $sdk_key    = get_option( 'vczapi_sdk_key' );
     195                        $secret_key = get_option( 'vczapi_sdk_secret_key' );
     196
     197                        if ( empty( $sdk_key ) || empty( $secret_key ) ) {
     198                                wp_send_json_error( 'SDK configuration error.' );
    208199                        }
    209200
    210201                        // Ensure role is 0 (Participant). NEVER allow Role 1 (Host) for guests.
    211                         $signature = $this->generate_sdk_signature($sdk_key, $secret_key, $meeting_id, 0);
    212 
    213                         wp_send_json_success([
    214                                 'sig' => $signature,
     202                        $signature = $this->generate_sdk_signature( $sdk_key, $secret_key, $meeting_id, 0 );
     203
     204                        wp_send_json_success( [
     205                                'sig'  => $signature,
    215206                                'type' => 'sdk'
    216                         ]);
     207                        ] );
    217208                } else {
    218                         wp_send_json_error('Service Unavailable');
    219                 }
    220 
    221                 wp_die();
    222         }
    223 
    224         private function generate_sdk_signature($sdk_key, $secret_key, $meeting_number, $role)
    225         {
    226                 $iat = round((time() * 1000 - 30000) / 1000);
    227                 $exp = $iat + 86400;
     209                        wp_send_json_error( 'Service Unavailable' );
     210                }
     211
     212                wp_die();
     213        }
     214
     215        private function generate_sdk_signature( $sdk_key, $secret_key, $meeting_number, $role ) {
     216                $iat     = round( ( time() * 1000 - 30000 ) / 1000 );
     217                $exp     = $iat + 86400;
    228218                $payload = [
    229                         'sdkKey' => $sdk_key,
    230                         'mn' => $meeting_number,
    231                         'role' => $role,
    232                         'iat' => $iat,
    233                         'exp' => $exp,
    234                         'appKey' => $sdk_key,
     219                        'sdkKey'   => $sdk_key,
     220                        'mn'       => $meeting_number,
     221                        'role'     => $role,
     222                        'iat'      => $iat,
     223                        'exp'      => $exp,
     224                        'appKey'   => $sdk_key,
    235225                        'tokenExp' => $exp,
    236226                ];
    237227
    238                 if (empty($secret_key)) {
     228                if ( empty( $secret_key ) ) {
    239229                        return false;
    240230                }
    241231
    242                 return \Firebase\JWT\JWT::encode($payload, $secret_key, 'HS256');
     232                return \Firebase\JWT\JWT::encode( $payload, $secret_key, 'HS256' );
    243233        }
    244234
    … …  
    254244         * @throws Exception
    255245         */
    256         private function generate_signature($api_key, $api_sercet, $meeting_number, $role)
    257         {
     246        private function generate_signature( $api_key, $api_sercet, $meeting_number, $role ) {
    258247                //Set the timezone to UTC
    259                 $date_utc = new \DateTime("now", new \DateTimeZone("UTC"));
    260                 $time = $date_utc->getTimestamp() * 1000 - 30000; //time in milliclearseconds (or close enough)
    261                 $data = base64_encode($api_key . $meeting_number . $time . $role);
    262                 $hash = hash_hmac('sha256', $data, $api_sercet, true);
    263                 $_sig = $api_key . "." . $meeting_number . "." . $time . "." . $role . "." . base64_encode($hash);
     248                $date_utc = new \DateTime( "now", new \DateTimeZone( "UTC" ) );
     249                $time     = $date_utc->getTimestamp() * 1000 - 30000; //time in milliclearseconds (or close enough)
     250                $data     = base64_encode( $api_key . $meeting_number . $time . $role );
     251                $hash     = hash_hmac( 'sha256', $data, $api_sercet, true );
     252                $_sig     = $api_key . "." . $meeting_number . "." . $time . "." . $role . "." . base64_encode( $hash );
    264253
    265254                //return signature, url safe base64 encoded
    266                 return rtrim(strtr(base64_encode($_sig), '+/', '-_'), '=');
     255                return rtrim( strtr( base64_encode( $_sig ), '+/', '-_' ), '=' );
    267256        }
    268257
    … …  
    270259         * Change State of the Meeting from here !
    271260         */
    272         public function state_change()
    273         {
    274                 check_ajax_referer('_nonce_zvc_security', 'accss');
    275 
    276                 if (!current_user_can('manage_options')) {
    277                         return;
    278                 }
    279 
    280                 $type = sanitize_text_field(filter_input(INPUT_POST, 'type'));
    281                 $state = sanitize_text_field(filter_input(INPUT_POST, 'state'));
    282                 $meeting_id = sanitize_text_field(filter_input(INPUT_POST, 'id'));
    283                 $post_id = sanitize_text_field(filter_input(INPUT_POST, 'post_id'));
     261        public function state_change(): void {
     262                check_ajax_referer( 'vczapi_meeting_state', 'nonce' );
     263                if ( ! current_user_can( 'manage_options' ) ) {
     264                        return;
     265                }
     266
     267                $type       = sanitize_text_field( filter_input( INPUT_POST, 'type' ) );
     268                $state      = sanitize_text_field( filter_input( INPUT_POST, 'state' ) );
     269                $meeting_id = sanitize_text_field( filter_input( INPUT_POST, 'id' ) );
     270                $post_id    = sanitize_text_field( filter_input( INPUT_POST, 'post_id' ) );
    284271
    285272                $success = false;
    286                 switch ($state) {
     273                switch ( $state ) {
    287274                        case 'end':
    288                                 if ($type === "shortcode") {
    289                                         $meeting_options = get_option('zoom_api_meeting_options');
    290                                         if (!empty($meeting_options)) {
    291                                                 $meeting_options[$meeting_id]['state'] = 'ended';
    292                                                 update_option('zoom_api_meeting_options', $meeting_options);
     275                                if ( $type === "shortcode" ) {
     276                                        $meeting_options = get_option( 'zoom_api_meeting_options' );
     277                                        if ( ! empty( $meeting_options ) ) {
     278                                                $meeting_options[ $meeting_id ]['state'] = 'ended';
     279                                                update_option( 'zoom_api_meeting_options', $meeting_options );
    293280                                        } else {
    294                                                 $new[$meeting_id]['state'] = 'ended';
    295                                                 update_option('zoom_api_meeting_options', $new);
     281                                                $new[ $meeting_id ]['state'] = 'ended';
     282                                                update_option( 'zoom_api_meeting_options', $new );
    296283                                        }
    297284
    … …  
    299286                                }
    300287
    301                                 if ($type === "post_type") {
    302                                         $meeting = get_post_meta($post_id, '_meeting_zoom_details', true);
    303                                         if (!empty($meeting)) {
     288                                if ( $type === "post_type" ) {
     289                                        $meeting = get_post_meta( $post_id, '_meeting_zoom_details', true );
     290                                        if ( ! empty( $meeting ) ) {
    304291                                                $meeting->state = 'ended';
    305                                                 update_post_meta($post_id, '_meeting_zoom_details', $meeting);
     292                                                update_post_meta( $post_id, '_meeting_zoom_details', $meeting );
    306293                                        }
    307294
    … …  
    311298                                break;
    312299                        case 'resume':
    313                                 if ($type === "shortcode") {
    314                                         $meeting_options = get_option('zoom_api_meeting_options');
    315                                         unset($meeting_options[$meeting_id]);
    316                                         update_option('zoom_api_meeting_options', $meeting_options);
     300                                if ( $type === "shortcode" ) {
     301                                        $meeting_options = get_option( 'zoom_api_meeting_options' );
     302                                        unset( $meeting_options[ $meeting_id ] );
     303                                        update_option( 'zoom_api_meeting_options', $meeting_options );
    317304                                        $success = true;
    318305                                }
    319306
    320                                 if ($type === "post_type") {
    321                                         $meeting = get_post_meta($post_id, '_meeting_zoom_details', true);
    322                                         if (!empty($meeting)) {
     307                                if ( $type === "post_type" ) {
     308                                        $meeting = get_post_meta( $post_id, '_meeting_zoom_details', true );
     309                                        if ( ! empty( $meeting ) ) {
    323310                                                $meeting->state = '';
    324                                                 update_post_meta($post_id, '_meeting_zoom_details', $meeting);
     311                                                update_post_meta( $post_id, '_meeting_zoom_details', $meeting );
    325312                                        }
    326313
    … …  
    330317                }
    331318
    332                 if ($success) {
    333                         wp_send_json_success($success);
     319                if ( $success ) {
     320                        wp_send_json_success( $success );
    334321                } else {
    335                         wp_send_json_error($success);
    336                 }
    337 
    338                 wp_die();
    339         }
    340 
    341         public function end_meeting(): void
    342         {
    343                 check_ajax_referer('_nonce_zvc_security', 'access');
     322                        wp_send_json_error( $success );
     323                }
     324
     325                wp_die();
     326        }
     327
     328        public function end_meeting(): void {
     329                check_ajax_referer( '_nonce_zvc_security', 'access' );
    344330                //only people who can create meeting can end them.
    345                 if (!current_user_can('edit_posts')) {
    346                         return;
    347                 }
    348                 $meeting_id = sanitize_text_field(filter_input(INPUT_POST, 'meeting_id'));
    349                 zoom_conference()->end_meeting($meeting_id);
     331                if ( ! current_user_can( 'edit_posts' ) ) {
     332                        return;
     333                }
     334                $meeting_id = sanitize_text_field( filter_input( INPUT_POST, 'meeting_id' ) );
     335                zoom_conference()->end_meeting( $meeting_id );
    350336        }
    351337
    … …  
    353339         * Assign Host ID page
    354340         */
    355         public function assign_host_id(): void
    356         {
    357                 check_ajax_referer('_nonce_zvc_security', 'security');
    358 
    359                 $draw = filter_input(INPUT_GET, 'draw');
    360                 $length = filter_input(INPUT_GET, 'length');
    361                 $start = filter_input(INPUT_GET, 'start');
    362                 $search = filter_input(INPUT_GET, 'search', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
    363                 $args = [
    364                         'number' => !empty($length) ? absint($length) : 10,
    365                         'paged' => $start == 0 ? 1 : $start / $length + 1,
     341        public function assign_host_id(): void {
     342                check_ajax_referer( '_nonce_zvc_security', 'security' );
     343
     344                if ( ! current_user_can( 'manage_options' ) ) {
     345                        return;
     346                }
     347
     348                $draw   = filter_input( INPUT_GET, 'draw' );
     349                $length = filter_input( INPUT_GET, 'length' );
     350                $start  = filter_input( INPUT_GET, 'start' );
     351                $search = filter_input( INPUT_GET, 'search', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
     352                $args   = [
     353                        'number' => ! empty( $length ) ? absint( $length ) : 10,
     354                        'paged'  => $start == 0 ? 1 : $start / $length + 1,
    366355                ];
    367356
    368                 if (!empty($search['value'])) {
     357                if ( ! empty( $search['value'] ) ) {
    369358                        $args['search'] = '*' . $search['value'] . '*';
    370359                }
    371360
    372                 $users = vczapi_getWpUsers_basedon_UserRoles($args);
    373                 $tableData = array();
     361                $users      = vczapi_getWpUsers_basedon_UserRoles( $args );
     362                $tableData  = array();
    374363                $zoom_users = video_conferencing_zoom_api_get_user_transients();
    375                 if (!empty($users)) {
    376                         foreach ($users->get_results() as $user) {
    377                                 $user_zoom_hostid = get_user_meta($user->ID, 'user_zoom_hostid', true);
    378                                 $email_address = get_user_meta($user->ID, 'vczapi_user_zoom_email_address', true);
    379                                 $host_id_field = '';
    380                                 $host_id_field .= '<select data-userid="' . $user->ID . '" name="zoom_host_id[' . $user->ID . ']" class="vczapi-get-zoom-hosts" style="width:100%">';
    381                                 if (!empty($user_zoom_hostid) && !empty($email_address)) {
     364                if ( ! empty( $users ) ) {
     365                        foreach ( $users->get_results() as $user ) {
     366                                $user_zoom_hostid = get_user_meta( $user->ID, 'user_zoom_hostid', true );
     367                                $email_address    = get_user_meta( $user->ID, 'vczapi_user_zoom_email_address', true );
     368                                $host_id_field    = '';
     369                                $host_id_field    .= '<select data-userid="' . $user->ID . '" name="zoom_host_id[' . $user->ID . ']" class="vczapi-get-zoom-hosts" style="width:100%">';
     370                                if ( ! empty( $user_zoom_hostid ) && ! empty( $email_address ) ) {
    382371                                        $host_id_field .= '<option value="' . $user_zoom_hostid . '" selected>' . $email_address . '</option>';
    383372                                }
    384373
    385374                                //This is for backwards compatibility before version 4.0.7
    386                                 if (!empty($zoom_users) && !empty($user_zoom_hostid) && empty($email_address)) {
    387                                         foreach ($zoom_users as $zoom_usr) {
     375                                if ( ! empty( $zoom_users ) && ! empty( $user_zoom_hostid ) && empty( $email_address ) ) {
     376                                        foreach ( $zoom_users as $zoom_usr ) {
    388377                                                $selected_host_id = $user_zoom_hostid === $zoom_usr->id ? 'selected="selected"' : false;
    389                                                 $full_name = !empty($zoom_usr->first_name) ? $zoom_usr->first_name . ' ' . $zoom_usr->last_name : $zoom_usr->email;
    390                                                 $host_id_field .= '<option value="' . $zoom_usr->id . '" ' . $selected_host_id . '>' . $full_name . '</option>';
     378                                                $full_name        = ! empty( $zoom_usr->first_name ) ? $zoom_usr->first_name . ' ' . $zoom_usr->last_name : $zoom_usr->email;
     379                                                $host_id_field    .= '<option value="' . $zoom_usr->id . '" ' . $selected_host_id . '>' . $full_name . '</option>';
    391380                                        }
    392381                                }
    … …  
    394383                                $host_id_field .= '</select>';
    395384
    396                                 if (!empty($email_address)) {
     385                                if ( ! empty( $email_address ) ) {
    397386                                        $host_id_field .= '<input type="hidden" class="vczapi-host-email-field-' . $user->ID . '" name="zoom_host_email[' . $user->ID . ']" value="' . $email_address . '" />';
    398387                                }
    399388
    400389                                $tableData[] = [
    401                                         'id' => $user->ID,
    402                                         'email' => $user->user_email,
    403                                         'name' => empty($user->first_name) ? $user->display_name : $user->first_name . ' ' . $user->last_name,
     390                                        'id'      => $user->ID,
     391                                        'email'   => $user->user_email,
     392                                        'name'    => empty( $user->first_name ) ? $user->display_name : $user->first_name . ' ' . $user->last_name,
    404393                                        'host_id' => $host_id_field,
    405394                                ];
    … …  
    407396
    408397                        $results = [
    409                                 'draw' => absint($draw),
    410                                 'recordsTotal' => $users->get_total(),
     398                                'draw'            => absint( $draw ),
     399                                'recordsTotal'    => $users->get_total(),
    411400                                'recordsFiltered' => $users->get_total(),
    412                                 'data' => $tableData,
     401                                'data'            => $tableData,
    413402                        ];
    414403
    415                         wp_send_json($results);
     404                        wp_send_json( $results );
    416405
    417406                        wp_die();
    … …  
    419408        }
    420409
    421         public function getZoomHostByQuery()
    422         {
    423                 if (!current_user_can('manage_options')) {
    424                         return;
    425                 }
    426 
    427                 $search_string = filter_input(INPUT_GET, 'term');
    428                 $results = array(
     410        public function getZoomHostByQuery() {
     411                if ( ! current_user_can( 'manage_options' ) ) {
     412                        return;
     413                }
     414
     415                $search_string = filter_input( INPUT_GET, 'term' );
     416                $results       = array(
    429417                        [
    430                                 'id' => '0',
     418                                'id'   => '0',
    431419                                'text' => 'Not a Host',
    432420                        ],
    433421                );
    434                 if (!empty($search_string)) {
    435                         $user = json_decode(zoom_conference()->getUserInfo($search_string));
    436                         if (empty($user->code) && !empty($user)) {
     422                if ( ! empty( $search_string ) ) {
     423                        $user = json_decode( zoom_conference()->getUserInfo( $search_string ) );
     424                        if ( empty( $user->code ) && ! empty( $user ) ) {
    437425                                $results[] = array(
    438                                         'id' => $user->id,
     426                                        'id'   => $user->id,
    439427                                        'text' => $user->email,
    440428                                );
    441429                        }
    442430                } else {
    443                         $users = json_decode(zoom_conference()->listUsers());
    444                         if (empty($users->code) && !empty($users->users)) {
    445                                 foreach ($users->users as $user) {
     431                        $users = json_decode( zoom_conference()->listUsers() );
     432                        if ( empty( $users->code ) && ! empty( $users->users ) ) {
     433                                foreach ( $users->users as $user ) {
    446434                                        $results[] = array(
    447                                                 'id' => $user->id,
     435                                                'id'   => $user->id,
    448436                                                'text' => $user->email,
    449437                                        );
    … …  
    452440                }
    453441
    454                 wp_send_json(array('results' => $results));
     442                wp_send_json( array( 'results' => $results ) );
    455443
    456444                wp_die();
    … …  
    460448         * Get WP Users query by user role.
    461449         */
    462         public function get_wp_usersByRole()
    463         {
    464                 if (!current_user_can('manage_options')) {
    465                         return;
    466                 }
    467 
    468                 $search_string = filter_input(INPUT_GET, 'term');
    469                 $users = vczapi_getWpUsers_basedon_UserRoles([
     450        public function get_wp_usersByRole() {
     451                if ( ! current_user_can( 'manage_options' ) ) {
     452                        return;
     453                }
     454
     455                $search_string = filter_input( INPUT_GET, 'term' );
     456                $users         = vczapi_getWpUsers_basedon_UserRoles( [
    470457                        'search' => $search_string,
    471                 ]);
    472                 $results = array();
    473                 if (!empty($users->get_results())) {
    474                         foreach ($users->get_results() as $user) {
     458                ] );
     459                $results       = array();
     460                if ( ! empty( $users->get_results() ) ) {
     461                        foreach ( $users->get_results() as $user ) {
    475462                                $results[] = array(
    476                                         'id' => $user->ID,
     463                                        'id'   => $user->ID,
    477464                                        'text' => $user->user_email,
    478465                                );
    … …  
    480467                }
    481468
    482                 wp_send_json(array('results' => $results));
     469                wp_send_json( array( 'results' => $results ) );
    483470
    484471                wp_die();
  • video-conferencing-with-zoom-api/trunk/includes/template-functions.php

    r3158039 r3722621  
    9595
    9696        $data = array(
    97                 'ajaxurl'      => admin_url( 'admin-ajax.php' ),
    98                 'zvc_security' => wp_create_nonce( "_nonce_zvc_security" ),
    99                 'lang'         => array(
     97                'ajaxurl' => admin_url( 'admin-ajax.php' ),
     98                'nonce'   => wp_create_nonce( 'vczapi_meeting_state' ),
     99                'lang'    => array(
    100100                        'confirm_end' => __( "Are you sure you want to end this meeting ? Users won't be able to join this meeting shown from the shortcode.", "video-conferencing-with-zoom-api" )
    101101                )
    … …  
    556556        $localize = array(
    557557                'ajaxurl'                        => admin_url( 'admin-ajax.php' ),
    558                 'zvc_security'                   => wp_create_nonce( "_nonce_zvc_security" ),
    559558                'redirect_page'                  => apply_filters( 'vczapi_api_redirect_join_browser', esc_url( $post_link ) ),
    560559                'meeting_id'                     => $meeting_id,
    … …  
    565564                'user_name'                      => $full_name,
    566565                'enable_direct_join_via_browser' => ! empty( $_GET['direct_join'] ) ? (bool) $_GET['direct_join'] : $enable_direct_via_browser,
     566                'nonce'                          => wp_create_nonce( 'vczapi_jvb' ),
    567567        );
    568568
    … …  
    583583                'screenShare'       => true
    584584        ) );
    585         $localize        = array_merge( $localize, $additional_data );
     585        $localize        = array_merge( $localize, $additional_data );
    586586        ?>
    587587    <script id='video-conferencing-with-zoom-api-browser-js-extra'>
    588         var zvc_ajx = <?php echo wp_json_encode( $localize ); ?>;
     588      var zvc_ajx = <?php echo wp_json_encode( $localize ); ?>;
    589589    </script>
    590590
  • video-conferencing-with-zoom-api/trunk/vendor/composer/installed.php

    r3673430 r3722621  
    22    'root' => array(
    33        'name' => 'techies23/video-conferencing-with-zoom-api',
    4         'pretty_version' => '4.6.10',
    5         'version' => '4.6.10.0',
    6         'reference' => '6092c923fda01a2cf628c1b7d34cc8b3ce0253a3',
     4        'pretty_version' => '4.6.11',
     5        'version' => '4.6.11.0',
     6        'reference' => 'fc528d5628ef026d4d964fa25e1671a2f8b9f80f',
    77        'type' => 'project',
    88        'install_path' => __DIR__ . '/../../',
    … …  
    2121        ),
    2222        'techies23/video-conferencing-with-zoom-api' => array(
    23             'pretty_version' => '4.6.10',
    24             'version' => '4.6.10.0',
    25             'reference' => '6092c923fda01a2cf628c1b7d34cc8b3ce0253a3',
     23            'pretty_version' => '4.6.11',
     24            'version' => '4.6.11.0',
     25            'reference' => 'fc528d5628ef026d4d964fa25e1671a2f8b9f80f',
    2626            'type' => 'project',
    2727            'install_path' => __DIR__ . '/../../',
  • video-conferencing-with-zoom-api/trunk/video-conferencing-with-zoom-api.php

    r3673430 r3722621  
    88 * Plugin URI:        https://wordpress.org/plugins/video-conferencing-with-zoom-api/
    99 * Description:       Video Conferencing with Zoom Meetings and Webinars plugin provides you with great functionality of managing Zoom meetings, Webinar scheduling options, and users directly from your WordPress dashboard.
    10  * Version:           4.6.10
     10 * Version:           4.6.11
    1111 * Author:            Deepen Bajracharya
    1212 * Author URI:        https://www.imdpen.com
    … …  
    1414 * License URI:       https://www.gnu.org/licenses/gpl-2.0.txt
    1515 * Text Domain:       video-conferencing-with-zoom-api
    16  * Requires PHP:      7.4
     16 * Requires PHP:      8.1
    1717 * Domain Path:       /languages
    18  * Requires at least: 5.5.0
     18 * Requires at least: 6.0.0
    1919 */
    2020
    … …  
    2626defined('ZVC_PLUGIN_FILE') || define('ZVC_PLUGIN_FILE', __FILE__);
    2727defined('ZVC_PLUGIN_SLUG') || define('ZVC_PLUGIN_SLUG', 'video-conferencing-zoom');
    28 defined('ZVC_PLUGIN_VERSION') || define('ZVC_PLUGIN_VERSION', '4.6.10');
     28defined('ZVC_PLUGIN_VERSION') || define('ZVC_PLUGIN_VERSION', '4.6.11');
    2929defined('ZVC_ZOOM_WEBSDK_VERSION') || define('ZVC_ZOOM_WEBSDK_VERSION', '4.0.0');
    3030defined('ZVC_PLUGIN_DIR_PATH') || define('ZVC_PLUGIN_DIR_PATH', plugin_dir_path(__FILE__));
Note: See TracChangeset for help on using the changeset viewer.