!function(e){var t={};function n(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){
/* flatpickr v4.6.3, @license MIT */
e.exports=function(){"use strict";
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation. All rights reserved.
    Licensed under the Apache License, Version 2.0 (the "License"); you may not use
    this file except in compliance with the License. You may obtain a copy of the
    License at http://www.apache.org/licenses/LICENSE-2.0

    THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
    WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
    MERCHANTABLITY OR NON-INFRINGEMENT.

    See the Apache Version 2.0 License for specific language governing permissions
    and limitations under the License.
    ***************************************************************************** */var e=function(){return(e=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},t=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],n={_disable:[],_enable:[],allowInput:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enable:[],enableSeconds:!1,enableTime:!1,errorHandler:function(e){return"undefined"!=typeof console&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},a={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},r=function(e){return("0"+e).slice(-2)},i=function(e){return!0===e?1:0};function o(e,t,n){var a;return void 0===n&&(n=!1),function(){var r=this,i=arguments;null!==a&&clearTimeout(a),a=window.setTimeout((function(){a=null,n||e.apply(r,i)}),t),n&&!a&&e.apply(r,i)}}var l=function(e){return e instanceof Array?e:[e]};function c(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function s(e,t,n){var a=window.document.createElement(e);return t=t||"",n=n||"",a.className=t,void 0!==n&&(a.textContent=n),a}function u(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function d(e,t){var n=s("div","numInputWrapper"),a=s("input","numInput "+e),r=s("span","arrowUp"),i=s("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?a.type="number":(a.type="text",a.pattern="\\d*"),void 0!==t)for(var o in t)a.setAttribute(o,t[o]);return n.appendChild(a),n.appendChild(r),n.appendChild(i),n}var m=function(){},f=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},p={D:m,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*i(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,n){var a=parseInt(t),r=new Date(e.getFullYear(),0,2+7*(a-1),0,0,0,0);return r.setDate(r.getDate()-r.getDay()+n.firstDayOfWeek),r},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:m,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:m,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},g={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},h={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[h.w(e,t,n)]},F:function(e,t,n){return f(h.n(e,t,n)-1,!1,t)},G:function(e,t,n){return r(h.h(e,t,n))},H:function(e){return r(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[i(e.getHours()>11)]},M:function(e,t){return f(e.getMonth(),!0,t)},S:function(e){return r(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(e){return r(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return r(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return r(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},v=function(e){var t=e.config,r=void 0===t?n:t,i=e.l10n,o=void 0===i?a:i;return function(e,t,n){var a=n||o;return void 0!==r.formatDate?r.formatDate(e,t,a):t.split("").map((function(t,n,i){return h[t]&&"\\"!==i[n-1]?h[t](e,a,r):"\\"!==t?t:""})).join("")}},b=function(e){var t=e.config,r=void 0===t?n:t,i=e.l10n,o=void 0===i?a:i;return function(e,t,a,i){if(0===e||e){var l,c=i||o,s=e;if(e instanceof Date)l=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)l=new Date(e);else if("string"==typeof e){var u=t||(r||n).dateFormat,d=String(e).trim();if("today"===d)l=new Date,a=!0;else if(/Z$/.test(d)||/GMT$/.test(d))l=new Date(e);else if(r&&r.parseDate)l=r.parseDate(e,u);else{l=r&&r.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var m=void 0,f=[],h=0,v=0,b="";h<u.length;h++){var w=u[h],y="\\"===w,_="\\"===u[h-1]||y;if(g[w]&&!_){b+=g[w];var D=new RegExp(b).exec(e);D&&(m=!0)&&f["Y"!==w?"push":"unshift"]({fn:p[w],val:D[++v]})}else y||(b+=".");f.forEach((function(e){var t=e.fn,n=e.val;return l=t(l,n,c)||l}))}l=m?l:void 0}}if(l instanceof Date&&!isNaN(l.getTime()))return!0===a&&l.setHours(0,0,0,0),l;r.errorHandler(new Error("Invalid date provided: "+s))}}};function w(e,t,n){return void 0===n&&(n=!0),!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var y=864e5;function _(m,p){var h={config:e({},n,E.defaultConfig),l10n:a};function _(e){return e.bind(h)}function D(){var e=h.config;!1===e.weekNumbers&&1===e.showMonths||!0!==e.noCalendar&&window.requestAnimationFrame((function(){if(void 0!==h.calendarContainer&&(h.calendarContainer.style.visibility="hidden",h.calendarContainer.style.display="block"),void 0!==h.daysContainer){var t=(h.days.offsetWidth+1)*e.showMonths;h.daysContainer.style.width=t+"px",h.calendarContainer.style.width=t+(void 0!==h.weekWrapper?h.weekWrapper.offsetWidth:0)+"px",h.calendarContainer.style.removeProperty("visibility"),h.calendarContainer.style.removeProperty("display")}}))}function C(e){0===h.selectedDates.length&&ne(),void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var t="keydown"===e.type,n=e.target;void 0!==h.amPM&&e.target===h.amPM&&(h.amPM.textContent=h.l10n.amPM[i(h.amPM.textContent===h.l10n.amPM[0])]);var a=parseFloat(n.getAttribute("min")),o=parseFloat(n.getAttribute("max")),l=parseFloat(n.getAttribute("step")),c=parseInt(n.value,10),s=e.delta||(t?38===e.which?1:-1:0),u=c+l*s;if(void 0!==n.value&&2===n.value.length){var d=n===h.hourElement,m=n===h.minuteElement;u<a?(u=o+u+i(!d)+(i(d)&&i(!h.amPM)),m&&P(void 0,-1,h.hourElement)):u>o&&(u=n===h.hourElement?u-o-i(!h.amPM):a,m&&P(void 0,1,h.hourElement)),h.amPM&&d&&(1===l?u+c===23:Math.abs(u-c)>l)&&(h.amPM.textContent=h.l10n.amPM[i(h.amPM.textContent===h.l10n.amPM[0])]),n.value=r(u)}}(e);var t=h._input.value;M(),ve(),h._input.value!==t&&h._debouncedChange()}function M(){if(void 0!==h.hourElement&&void 0!==h.minuteElement){var e,t,n=(parseInt(h.hourElement.value.slice(-2),10)||0)%24,a=(parseInt(h.minuteElement.value,10)||0)%60,r=void 0!==h.secondElement?(parseInt(h.secondElement.value,10)||0)%60:0;void 0!==h.amPM&&(e=n,t=h.amPM.textContent,n=e%12+12*i(t===h.l10n.amPM[1]));var o=void 0!==h.config.minTime||h.config.minDate&&h.minDateHasTime&&h.latestSelectedDateObj&&0===w(h.latestSelectedDateObj,h.config.minDate,!0);if(void 0!==h.config.maxTime||h.config.maxDate&&h.maxDateHasTime&&h.latestSelectedDateObj&&0===w(h.latestSelectedDateObj,h.config.maxDate,!0)){var l=void 0!==h.config.maxTime?h.config.maxTime:h.config.maxDate;(n=Math.min(n,l.getHours()))===l.getHours()&&(a=Math.min(a,l.getMinutes())),a===l.getMinutes()&&(r=Math.min(r,l.getSeconds()))}if(o){var c=void 0!==h.config.minTime?h.config.minTime:h.config.minDate;(n=Math.max(n,c.getHours()))===c.getHours()&&(a=Math.max(a,c.getMinutes())),a===c.getMinutes()&&(r=Math.max(r,c.getSeconds()))}x(n,a,r)}}function O(e){var t=e||h.latestSelectedDateObj;t&&x(t.getHours(),t.getMinutes(),t.getSeconds())}function k(){var e=h.config.defaultHour,t=h.config.defaultMinute,n=h.config.defaultSeconds;if(void 0!==h.config.minDate){var a=h.config.minDate.getHours(),r=h.config.minDate.getMinutes();(e=Math.max(e,a))===a&&(t=Math.max(r,t)),e===a&&t===r&&(n=h.config.minDate.getSeconds())}if(void 0!==h.config.maxDate){var i=h.config.maxDate.getHours(),o=h.config.maxDate.getMinutes();(e=Math.min(e,i))===i&&(t=Math.min(o,t)),e===i&&t===o&&(n=h.config.maxDate.getSeconds())}x(e,t,n)}function x(e,t,n){void 0!==h.latestSelectedDateObj&&h.latestSelectedDateObj.setHours(e%24,t,n||0,0),h.hourElement&&h.minuteElement&&!h.isMobile&&(h.hourElement.value=r(h.config.time_24hr?e:(12+e)%12+12*i(e%12==0)),h.minuteElement.value=r(t),void 0!==h.amPM&&(h.amPM.textContent=h.l10n.amPM[i(e>=12)]),void 0!==h.secondElement&&(h.secondElement.value=r(n)))}function S(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&V(t)}function N(e,t,n,a){return t instanceof Array?t.forEach((function(t){return N(e,t,n,a)})):e instanceof Array?e.forEach((function(e){return N(e,t,n,a)})):(e.addEventListener(t,n,a),void h._handlers.push({element:e,event:t,handler:n,options:a}))}function j(e){return function(t){1===t.which&&e(t)}}function T(){me("onChange")}function I(e,t){var n=void 0!==e?h.parseDate(e):h.latestSelectedDateObj||(h.config.minDate&&h.config.minDate>h.now?h.config.minDate:h.config.maxDate&&h.config.maxDate<h.now?h.config.maxDate:h.now),a=h.currentYear,r=h.currentMonth;try{void 0!==n&&(h.currentYear=n.getFullYear(),h.currentMonth=n.getMonth())}catch(e){e.message="Invalid date supplied: "+n,h.config.errorHandler(e)}t&&h.currentYear!==a&&(me("onYearChange"),R()),!t||h.currentYear===a&&h.currentMonth===r||me("onMonthChange"),h.redraw()}function A(e){~e.target.className.indexOf("arrow")&&P(e,e.target.classList.contains("arrowUp")?1:-1)}function P(e,t,n){var a=e&&e.target,r=n||a&&a.parentNode&&a.parentNode.firstChild,i=fe("increment");i.delta=t,r&&r.dispatchEvent(i)}function F(e,t,n,a){var r=Z(t,!0),i=s("span","flatpickr-day "+e,t.getDate().toString());return i.dateObj=t,i.$i=a,i.setAttribute("aria-label",h.formatDate(t,h.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===w(t,h.now)&&(h.todayDateElem=i,i.classList.add("today"),i.setAttribute("aria-current","date")),r?(i.tabIndex=-1,pe(t)&&(i.classList.add("selected"),h.selectedDateElem=i,"range"===h.config.mode&&(c(i,"startRange",h.selectedDates[0]&&0===w(t,h.selectedDates[0],!0)),c(i,"endRange",h.selectedDates[1]&&0===w(t,h.selectedDates[1],!0)),"nextMonthDay"===e&&i.classList.add("inRange")))):i.classList.add("flatpickr-disabled"),"range"===h.config.mode&&function(e){return!("range"!==h.config.mode||h.selectedDates.length<2)&&w(e,h.selectedDates[0])>=0&&w(e,h.selectedDates[1])<=0}(t)&&!pe(t)&&i.classList.add("inRange"),h.weekNumbers&&1===h.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&h.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+h.config.getWeek(t)+"</span>"),me("onDayCreate",i),i}function Y(e){e.focus(),"range"===h.config.mode&&ee(e)}function z(e){for(var t=e>0?0:h.config.showMonths-1,n=e>0?h.config.showMonths:-1,a=t;a!=n;a+=e)for(var r=h.daysContainer.children[a],i=e>0?0:r.children.length-1,o=e>0?r.children.length:-1,l=i;l!=o;l+=e){var c=r.children[l];if(-1===c.className.indexOf("hidden")&&Z(c.dateObj))return c}}function H(e,t){var n=Q(document.activeElement||document.body),a=void 0!==e?e:n?document.activeElement:void 0!==h.selectedDateElem&&Q(h.selectedDateElem)?h.selectedDateElem:void 0!==h.todayDateElem&&Q(h.todayDateElem)?h.todayDateElem:z(t>0?1:-1);return void 0===a?h._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():h.currentMonth,a=t>0?h.config.showMonths:-1,r=t>0?1:-1,i=n-h.currentMonth;i!=a;i+=r)for(var o=h.daysContainer.children[i],l=n-h.currentMonth===i?e.$i+t:t<0?o.children.length-1:0,c=o.children.length,s=l;s>=0&&s<c&&s!=(t>0?c:-1);s+=r){var u=o.children[s];if(-1===u.className.indexOf("hidden")&&Z(u.dateObj)&&Math.abs(e.$i-s)>=Math.abs(t))return Y(u)}h.changeMonth(r),H(z(r),0)}(a,t):Y(a)}function L(e,t){for(var n=(new Date(e,t,1).getDay()-h.l10n.firstDayOfWeek+7)%7,a=h.utils.getDaysInMonth((t-1+12)%12),r=h.utils.getDaysInMonth(t),i=window.document.createDocumentFragment(),o=h.config.showMonths>1,l=o?"prevMonthDay hidden":"prevMonthDay",c=o?"nextMonthDay hidden":"nextMonthDay",u=a+1-n,d=0;u<=a;u++,d++)i.appendChild(F(l,new Date(e,t-1,u),u,d));for(u=1;u<=r;u++,d++)i.appendChild(F("",new Date(e,t,u),u,d));for(var m=r+1;m<=42-n&&(1===h.config.showMonths||d%7!=0);m++,d++)i.appendChild(F(c,new Date(e,t+1,m%r),m,d));var f=s("div","dayContainer");return f.appendChild(i),f}function W(){if(void 0!==h.daysContainer){u(h.daysContainer),h.weekNumbers&&u(h.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t<h.config.showMonths;t++){var n=new Date(h.currentYear,h.currentMonth,1);n.setMonth(h.currentMonth+t),e.appendChild(L(n.getFullYear(),n.getMonth()))}h.daysContainer.appendChild(e),h.days=h.daysContainer.firstChild,"range"===h.config.mode&&1===h.selectedDates.length&&ee()}}function R(){if(!(h.config.showMonths>1||"dropdown"!==h.config.monthSelectorType)){var e=function(e){return!(void 0!==h.config.minDate&&h.currentYear===h.config.minDate.getFullYear()&&e<h.config.minDate.getMonth()||void 0!==h.config.maxDate&&h.currentYear===h.config.maxDate.getFullYear()&&e>h.config.maxDate.getMonth())};h.monthsDropdownContainer.tabIndex=-1,h.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e(t)){var n=s("option","flatpickr-monthDropdown-month");n.value=new Date(h.currentYear,t).getMonth().toString(),n.textContent=f(t,h.config.shorthandCurrentMonth,h.l10n),n.tabIndex=-1,h.currentMonth===t&&(n.selected=!0),h.monthsDropdownContainer.appendChild(n)}}}function J(){var e,t=s("div","flatpickr-month"),n=window.document.createDocumentFragment();h.config.showMonths>1||"static"===h.config.monthSelectorType?e=s("span","cur-month"):(h.monthsDropdownContainer=s("select","flatpickr-monthDropdown-months"),N(h.monthsDropdownContainer,"change",(function(e){var t=e.target,n=parseInt(t.value,10);h.changeMonth(n-h.currentMonth),me("onMonthChange")})),R(),e=h.monthsDropdownContainer);var a=d("cur-year",{tabindex:"-1"}),r=a.getElementsByTagName("input")[0];r.setAttribute("aria-label",h.l10n.yearAriaLabel),h.config.minDate&&r.setAttribute("min",h.config.minDate.getFullYear().toString()),h.config.maxDate&&(r.setAttribute("max",h.config.maxDate.getFullYear().toString()),r.disabled=!!h.config.minDate&&h.config.minDate.getFullYear()===h.config.maxDate.getFullYear());var i=s("div","flatpickr-current-month");return i.appendChild(e),i.appendChild(a),n.appendChild(i),t.appendChild(n),{container:t,yearElement:r,monthElement:e}}function U(){u(h.monthNav),h.monthNav.appendChild(h.prevMonthNav),h.config.showMonths&&(h.yearElements=[],h.monthElements=[]);for(var e=h.config.showMonths;e--;){var t=J();h.yearElements.push(t.yearElement),h.monthElements.push(t.monthElement),h.monthNav.appendChild(t.container)}h.monthNav.appendChild(h.nextMonthNav)}function B(){h.weekdayContainer?u(h.weekdayContainer):h.weekdayContainer=s("div","flatpickr-weekdays");for(var e=h.config.showMonths;e--;){var t=s("div","flatpickr-weekdaycontainer");h.weekdayContainer.appendChild(t)}return K(),h.weekdayContainer}function K(){if(h.weekdayContainer){var e=h.l10n.firstDayOfWeek,t=h.l10n.weekdays.shorthand.slice();e>0&&e<t.length&&(t=t.splice(e,t.length).concat(t.splice(0,e)));for(var n=h.config.showMonths;n--;)h.weekdayContainer.children[n].innerHTML="\n      <span class='flatpickr-weekday'>\n        "+t.join("</span><span class='flatpickr-weekday'>")+"\n      </span>\n      "}}function $(e,t){void 0===t&&(t=!0);var n=t?e:e-h.currentMonth;n<0&&!0===h._hidePrevMonthArrow||n>0&&!0===h._hideNextMonthArrow||(h.currentMonth+=n,(h.currentMonth<0||h.currentMonth>11)&&(h.currentYear+=h.currentMonth>11?1:-1,h.currentMonth=(h.currentMonth+12)%12,me("onYearChange"),R()),W(),me("onMonthChange"),ge())}function q(e){return!(!h.config.appendTo||!h.config.appendTo.contains(e))||h.calendarContainer.contains(e)}function G(e){if(h.isOpen&&!h.config.inline){var t="function"==typeof(o=e).composedPath?o.composedPath()[0]:o.target,n=q(t),a=t===h.input||t===h.altInput||h.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(h.input)||~e.path.indexOf(h.altInput)),r="blur"===e.type?a&&e.relatedTarget&&!q(e.relatedTarget):!a&&!n&&!q(e.relatedTarget),i=!h.config.ignoredFocusElements.some((function(e){return e.contains(t)}));r&&i&&(void 0!==h.timeContainer&&void 0!==h.minuteElement&&void 0!==h.hourElement&&C(),h.close(),"range"===h.config.mode&&1===h.selectedDates.length&&(h.clear(!1),h.redraw()))}var o}function V(e){if(!(!e||h.config.minDate&&e<h.config.minDate.getFullYear()||h.config.maxDate&&e>h.config.maxDate.getFullYear())){var t=e,n=h.currentYear!==t;h.currentYear=t||h.currentYear,h.config.maxDate&&h.currentYear===h.config.maxDate.getFullYear()?h.currentMonth=Math.min(h.config.maxDate.getMonth(),h.currentMonth):h.config.minDate&&h.currentYear===h.config.minDate.getFullYear()&&(h.currentMonth=Math.max(h.config.minDate.getMonth(),h.currentMonth)),n&&(h.redraw(),me("onYearChange"),R())}}function Z(e,t){void 0===t&&(t=!0);var n=h.parseDate(e,void 0,t);if(h.config.minDate&&n&&w(n,h.config.minDate,void 0!==t?t:!h.minDateHasTime)<0||h.config.maxDate&&n&&w(n,h.config.maxDate,void 0!==t?t:!h.maxDateHasTime)>0)return!1;if(0===h.config.enable.length&&0===h.config.disable.length)return!0;if(void 0===n)return!1;for(var a=h.config.enable.length>0,r=a?h.config.enable:h.config.disable,i=0,o=void 0;i<r.length;i++){if("function"==typeof(o=r[i])&&o(n))return a;if(o instanceof Date&&void 0!==n&&o.getTime()===n.getTime())return a;if("string"==typeof o&&void 0!==n){var l=h.parseDate(o,void 0,!0);return l&&l.getTime()===n.getTime()?a:!a}if("object"==typeof o&&void 0!==n&&o.from&&o.to&&n.getTime()>=o.from.getTime()&&n.getTime()<=o.to.getTime())return a}return!a}function Q(e){return void 0!==h.daysContainer&&-1===e.className.indexOf("hidden")&&h.daysContainer.contains(e)}function X(e){var t=e.target===h._input,n=h.config.allowInput,a=h.isOpen&&(!n||!t),r=h.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return h.setDate(h._input.value,!0,e.target===h.altInput?h.config.altFormat:h.config.dateFormat),e.target.blur();h.open()}else if(q(e.target)||a||r){var i=!!h.timeContainer&&h.timeContainer.contains(e.target);switch(e.keyCode){case 13:i?(e.preventDefault(),C(),le()):ce(e);break;case 27:e.preventDefault(),le();break;case 8:case 46:t&&!h.config.allowInput&&(e.preventDefault(),h.clear());break;case 37:case 39:if(i||t)h.hourElement&&h.hourElement.focus();else if(e.preventDefault(),void 0!==h.daysContainer&&(!1===n||document.activeElement&&Q(document.activeElement))){var o=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),$(o),H(z(1),0)):H(void 0,o)}break;case 38:case 40:e.preventDefault();var l=40===e.keyCode?1:-1;h.daysContainer&&void 0!==e.target.$i||e.target===h.input||e.target===h.altInput?e.ctrlKey?(e.stopPropagation(),V(h.currentYear-l),H(z(1),0)):i||H(void 0,7*l):e.target===h.currentYearElement?V(h.currentYear-l):h.config.enableTime&&(!i&&h.hourElement&&h.hourElement.focus(),C(e),h._debouncedChange());break;case 9:if(i){var c=[h.hourElement,h.minuteElement,h.secondElement,h.amPM].concat(h.pluginElements).filter((function(e){return e})),s=c.indexOf(e.target);if(-1!==s){var u=c[s+(e.shiftKey?-1:1)];e.preventDefault(),(u||h._input).focus()}}else!h.config.noCalendar&&h.daysContainer&&h.daysContainer.contains(e.target)&&e.shiftKey&&(e.preventDefault(),h._input.focus())}}if(void 0!==h.amPM&&e.target===h.amPM)switch(e.key){case h.l10n.amPM[0].charAt(0):case h.l10n.amPM[0].charAt(0).toLowerCase():h.amPM.textContent=h.l10n.amPM[0],M(),ve();break;case h.l10n.amPM[1].charAt(0):case h.l10n.amPM[1].charAt(0).toLowerCase():h.amPM.textContent=h.l10n.amPM[1],M(),ve()}(t||q(e.target))&&me("onKeyDown",e)}function ee(e){if(1===h.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled"))){for(var t=e?e.dateObj.getTime():h.days.firstElementChild.dateObj.getTime(),n=h.parseDate(h.selectedDates[0],void 0,!0).getTime(),a=Math.min(t,h.selectedDates[0].getTime()),r=Math.max(t,h.selectedDates[0].getTime()),i=!1,o=0,l=0,c=a;c<r;c+=y)Z(new Date(c),!0)||(i=i||c>a&&c<r,c<n&&(!o||c>o)?o=c:c>n&&(!l||c<l)&&(l=c));for(var s=0;s<h.config.showMonths;s++)for(var u=h.daysContainer.children[s],d=function(a,r){var c,s,d,m=u.children[a],f=m.dateObj.getTime(),p=o>0&&f<o||l>0&&f>l;return p?(m.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach((function(e){m.classList.remove(e)})),"continue"):i&&!p?"continue":(["startRange","inRange","endRange","notAllowed"].forEach((function(e){m.classList.remove(e)})),void(void 0!==e&&(e.classList.add(t<=h.selectedDates[0].getTime()?"startRange":"endRange"),n<t&&f===n?m.classList.add("startRange"):n>t&&f===n&&m.classList.add("endRange"),f>=o&&(0===l||f<=l)&&(s=n,d=t,(c=f)>Math.min(s,d)&&c<Math.max(s,d))&&m.classList.add("inRange"))))},m=0,f=u.children.length;m<f;m++)d(m)}}function te(){!h.isOpen||h.config.static||h.config.inline||ie()}function ne(){h.setDate(void 0!==h.config.minDate?new Date(h.config.minDate.getTime()):new Date,!0),k(),ve()}function ae(e){return function(t){var n=h.config["_"+e+"Date"]=h.parseDate(t,h.config.dateFormat),a=h.config["_"+("min"===e?"max":"min")+"Date"];void 0!==n&&(h["min"===e?"minDateHasTime":"maxDateHasTime"]=n.getHours()>0||n.getMinutes()>0||n.getSeconds()>0),h.selectedDates&&(h.selectedDates=h.selectedDates.filter((function(e){return Z(e)})),h.selectedDates.length||"min"!==e||O(n),ve()),h.daysContainer&&(oe(),void 0!==n?h.currentYearElement[e]=n.getFullYear().toString():h.currentYearElement.removeAttribute(e),h.currentYearElement.disabled=!!a&&void 0!==n&&a.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof h.config.locale&&void 0===E.l10ns[h.config.locale]&&h.config.errorHandler(new Error("flatpickr: invalid locale "+h.config.locale)),h.l10n=e({},E.l10ns.default,"object"==typeof h.config.locale?h.config.locale:"default"!==h.config.locale?E.l10ns[h.config.locale]:void 0),g.K="("+h.l10n.amPM[0]+"|"+h.l10n.amPM[1]+"|"+h.l10n.amPM[0].toLowerCase()+"|"+h.l10n.amPM[1].toLowerCase()+")",void 0===e({},p,JSON.parse(JSON.stringify(m.dataset||{}))).time_24hr&&void 0===E.defaultConfig.time_24hr&&(h.config.time_24hr=h.l10n.time_24hr),h.formatDate=v(h),h.parseDate=b({config:h.config,l10n:h.l10n})}function ie(e){if(void 0!==h.calendarContainer){me("onPreCalendarPosition");var t=e||h._positionElement,n=Array.prototype.reduce.call(h.calendarContainer.children,(function(e,t){return e+t.offsetHeight}),0),a=h.calendarContainer.offsetWidth,r=h.config.position.split(" "),i=r[0],o=r.length>1?r[1]:null,l=t.getBoundingClientRect(),s=window.innerHeight-l.bottom,u="above"===i||"below"!==i&&s<n&&l.top>n,d=window.pageYOffset+l.top+(u?-n-2:t.offsetHeight+2);if(c(h.calendarContainer,"arrowTop",!u),c(h.calendarContainer,"arrowBottom",u),!h.config.inline){var m=window.pageXOffset+l.left-(null!=o&&"center"===o?(a-l.width)/2:0),f=window.document.body.offsetWidth-(window.pageXOffset+l.right),p=m+a>window.document.body.offsetWidth,g=f+a>window.document.body.offsetWidth;if(c(h.calendarContainer,"rightMost",p),!h.config.static)if(h.calendarContainer.style.top=d+"px",p)if(g){var v=document.styleSheets[0];if(void 0===v)return;var b=window.document.body.offsetWidth,w=Math.max(0,b/2-a/2),y=v.cssRules.length,_="{left:"+l.left+"px;right:auto;}";c(h.calendarContainer,"rightMost",!1),c(h.calendarContainer,"centerMost",!0),v.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+_,y),h.calendarContainer.style.left=w+"px",h.calendarContainer.style.right="auto"}else h.calendarContainer.style.left="auto",h.calendarContainer.style.right=f+"px";else h.calendarContainer.style.left=m+"px",h.calendarContainer.style.right="auto"}}}function oe(){h.config.noCalendar||h.isMobile||(ge(),W())}function le(){h._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(h.close,0):h.close()}function ce(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,(function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")}));if(void 0!==t){var n=t,a=h.latestSelectedDateObj=new Date(n.dateObj.getTime()),r=(a.getMonth()<h.currentMonth||a.getMonth()>h.currentMonth+h.config.showMonths-1)&&"range"!==h.config.mode;if(h.selectedDateElem=n,"single"===h.config.mode)h.selectedDates=[a];else if("multiple"===h.config.mode){var i=pe(a);i?h.selectedDates.splice(parseInt(i),1):h.selectedDates.push(a)}else"range"===h.config.mode&&(2===h.selectedDates.length&&h.clear(!1,!1),h.latestSelectedDateObj=a,h.selectedDates.push(a),0!==w(a,h.selectedDates[0],!0)&&h.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()})));if(M(),r){var o=h.currentYear!==a.getFullYear();h.currentYear=a.getFullYear(),h.currentMonth=a.getMonth(),o&&(me("onYearChange"),R()),me("onMonthChange")}if(ge(),W(),ve(),h.config.enableTime&&setTimeout((function(){return h.showTimeInput=!0}),50),r||"range"===h.config.mode||1!==h.config.showMonths?void 0!==h.selectedDateElem&&void 0===h.hourElement&&h.selectedDateElem&&h.selectedDateElem.focus():Y(n),void 0!==h.hourElement&&void 0!==h.hourElement&&h.hourElement.focus(),h.config.closeOnSelect){var l="single"===h.config.mode&&!h.config.enableTime,c="range"===h.config.mode&&2===h.selectedDates.length&&!h.config.enableTime;(l||c)&&le()}T()}}h.parseDate=b({config:h.config,l10n:h.l10n}),h._handlers=[],h.pluginElements=[],h.loadedPlugins=[],h._bind=N,h._setHoursFromDate=O,h._positionCalendar=ie,h.changeMonth=$,h.changeYear=V,h.clear=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0),h.input.value="",void 0!==h.altInput&&(h.altInput.value=""),void 0!==h.mobileInput&&(h.mobileInput.value=""),h.selectedDates=[],h.latestSelectedDateObj=void 0,!0===t&&(h.currentYear=h._initialDate.getFullYear(),h.currentMonth=h._initialDate.getMonth()),h.showTimeInput=!1,!0===h.config.enableTime&&k(),h.redraw(),e&&me("onChange")},h.close=function(){h.isOpen=!1,h.isMobile||(void 0!==h.calendarContainer&&h.calendarContainer.classList.remove("open"),void 0!==h._input&&h._input.classList.remove("active")),me("onClose")},h._createElement=s,h.destroy=function(){void 0!==h.config&&me("onDestroy");for(var e=h._handlers.length;e--;){var t=h._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(h._handlers=[],h.mobileInput)h.mobileInput.parentNode&&h.mobileInput.parentNode.removeChild(h.mobileInput),h.mobileInput=void 0;else if(h.calendarContainer&&h.calendarContainer.parentNode)if(h.config.static&&h.calendarContainer.parentNode){var n=h.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else h.calendarContainer.parentNode.removeChild(h.calendarContainer);h.altInput&&(h.input.type="text",h.altInput.parentNode&&h.altInput.parentNode.removeChild(h.altInput),delete h.altInput),h.input&&(h.input.type=h.input._type,h.input.classList.remove("flatpickr-input"),h.input.removeAttribute("readonly"),h.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(e){try{delete h[e]}catch(e){}}))},h.isEnabled=Z,h.jumpToDate=I,h.open=function(e,t){if(void 0===t&&(t=h._positionElement),!0===h.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==h.mobileInput&&(h.mobileInput.focus(),h.mobileInput.click()),void me("onOpen");if(!h._input.disabled&&!h.config.inline){var n=h.isOpen;h.isOpen=!0,n||(h.calendarContainer.classList.add("open"),h._input.classList.add("active"),me("onOpen"),ie(t)),!0===h.config.enableTime&&!0===h.config.noCalendar&&(0===h.selectedDates.length&&ne(),!1!==h.config.allowInput||void 0!==e&&h.timeContainer.contains(e.relatedTarget)||setTimeout((function(){return h.hourElement.select()}),50))}},h.redraw=oe,h.set=function(e,n){if(null!==e&&"object"==typeof e)for(var a in Object.assign(h.config,e),e)void 0!==se[a]&&se[a].forEach((function(e){return e()}));else h.config[e]=n,void 0!==se[e]?se[e].forEach((function(e){return e()})):t.indexOf(e)>-1&&(h.config[e]=l(n));h.redraw(),ve(!1)},h.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=h.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return h.clear(t);ue(e,n),h.showTimeInput=h.selectedDates.length>0,h.latestSelectedDateObj=h.selectedDates[h.selectedDates.length-1],h.redraw(),I(),O(),0===h.selectedDates.length&&h.clear(!1),ve(t),t&&me("onChange")},h.toggle=function(e){if(!0===h.isOpen)return h.close();h.open(e)};var se={locale:[re,K],showMonths:[U,D,B],minDate:[I],maxDate:[I]};function ue(e,t){var n=[];if(e instanceof Array)n=e.map((function(e){return h.parseDate(e,t)}));else if(e instanceof Date||"number"==typeof e)n=[h.parseDate(e,t)];else if("string"==typeof e)switch(h.config.mode){case"single":case"time":n=[h.parseDate(e,t)];break;case"multiple":n=e.split(h.config.conjunction).map((function(e){return h.parseDate(e,t)}));break;case"range":n=e.split(h.l10n.rangeSeparator).map((function(e){return h.parseDate(e,t)}))}else h.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));h.selectedDates=n.filter((function(e){return e instanceof Date&&Z(e,!1)})),"range"===h.config.mode&&h.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()}))}function de(e){return e.slice().map((function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?h.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:h.parseDate(e.from,void 0),to:h.parseDate(e.to,void 0)}:e})).filter((function(e){return e}))}function me(e,t){if(void 0!==h.config){var n=h.config[e];if(void 0!==n&&n.length>0)for(var a=0;n[a]&&a<n.length;a++)n[a](h.selectedDates,h.input.value,h,t);"onChange"===e&&(h.input.dispatchEvent(fe("change")),h.input.dispatchEvent(fe("input")))}}function fe(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function pe(e){for(var t=0;t<h.selectedDates.length;t++)if(0===w(h.selectedDates[t],e))return""+t;return!1}function ge(){h.config.noCalendar||h.isMobile||!h.monthNav||(h.yearElements.forEach((function(e,t){var n=new Date(h.currentYear,h.currentMonth,1);n.setMonth(h.currentMonth+t),h.config.showMonths>1||"static"===h.config.monthSelectorType?h.monthElements[t].textContent=f(n.getMonth(),h.config.shorthandCurrentMonth,h.l10n)+" ":h.monthsDropdownContainer.value=n.getMonth().toString(),e.value=n.getFullYear().toString()})),h._hidePrevMonthArrow=void 0!==h.config.minDate&&(h.currentYear===h.config.minDate.getFullYear()?h.currentMonth<=h.config.minDate.getMonth():h.currentYear<h.config.minDate.getFullYear()),h._hideNextMonthArrow=void 0!==h.config.maxDate&&(h.currentYear===h.config.maxDate.getFullYear()?h.currentMonth+1>h.config.maxDate.getMonth():h.currentYear>h.config.maxDate.getFullYear()))}function he(e){return h.selectedDates.map((function(t){return h.formatDate(t,e)})).filter((function(e,t,n){return"range"!==h.config.mode||h.config.enableTime||n.indexOf(e)===t})).join("range"!==h.config.mode?h.config.conjunction:h.l10n.rangeSeparator)}function ve(e){void 0===e&&(e=!0),void 0!==h.mobileInput&&h.mobileFormatStr&&(h.mobileInput.value=void 0!==h.latestSelectedDateObj?h.formatDate(h.latestSelectedDateObj,h.mobileFormatStr):""),h.input.value=he(h.config.dateFormat),void 0!==h.altInput&&(h.altInput.value=he(h.config.altFormat)),!1!==e&&me("onValueUpdate")}function be(e){var t=h.prevMonthNav.contains(e.target),n=h.nextMonthNav.contains(e.target);t||n?$(t?-1:1):h.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?h.changeYear(h.currentYear+1):e.target.classList.contains("arrowDown")&&h.changeYear(h.currentYear-1)}return function(){h.element=h.input=m,h.isOpen=!1,function(){var a=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],r=e({},p,JSON.parse(JSON.stringify(m.dataset||{}))),i={};h.config.parseDate=r.parseDate,h.config.formatDate=r.formatDate,Object.defineProperty(h.config,"enable",{get:function(){return h.config._enable},set:function(e){h.config._enable=de(e)}}),Object.defineProperty(h.config,"disable",{get:function(){return h.config._disable},set:function(e){h.config._disable=de(e)}});var o="time"===r.mode;if(!r.dateFormat&&(r.enableTime||o)){var c=E.defaultConfig.dateFormat||n.dateFormat;i.dateFormat=r.noCalendar||o?"H:i"+(r.enableSeconds?":S":""):c+" H:i"+(r.enableSeconds?":S":"")}if(r.altInput&&(r.enableTime||o)&&!r.altFormat){var s=E.defaultConfig.altFormat||n.altFormat;i.altFormat=r.noCalendar||o?"h:i"+(r.enableSeconds?":S K":" K"):s+" h:i"+(r.enableSeconds?":S":"")+" K"}r.altInputClass||(h.config.altInputClass=h.input.className+" "+h.config.altInputClass),Object.defineProperty(h.config,"minDate",{get:function(){return h.config._minDate},set:ae("min")}),Object.defineProperty(h.config,"maxDate",{get:function(){return h.config._maxDate},set:ae("max")});var u=function(e){return function(t){h.config["min"===e?"_minTime":"_maxTime"]=h.parseDate(t,"H:i:S")}};Object.defineProperty(h.config,"minTime",{get:function(){return h.config._minTime},set:u("min")}),Object.defineProperty(h.config,"maxTime",{get:function(){return h.config._maxTime},set:u("max")}),"time"===r.mode&&(h.config.noCalendar=!0,h.config.enableTime=!0),Object.assign(h.config,i,r);for(var d=0;d<a.length;d++)h.config[a[d]]=!0===h.config[a[d]]||"true"===h.config[a[d]];for(t.filter((function(e){return void 0!==h.config[e]})).forEach((function(e){h.config[e]=l(h.config[e]||[]).map(_)})),h.isMobile=!h.config.disableMobile&&!h.config.inline&&"single"===h.config.mode&&!h.config.disable.length&&!h.config.enable.length&&!h.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),d=0;d<h.config.plugins.length;d++){var f=h.config.plugins[d](h)||{};for(var g in f)t.indexOf(g)>-1?h.config[g]=l(f[g]).map(_).concat(h.config[g]):void 0===r[g]&&(h.config[g]=f[g])}me("onParseConfig")}(),re(),h.input=h.config.wrap?m.querySelector("[data-input]"):m,h.input?(h.input._type=h.input.type,h.input.type="text",h.input.classList.add("flatpickr-input"),h._input=h.input,h.config.altInput&&(h.altInput=s(h.input.nodeName,h.config.altInputClass),h._input=h.altInput,h.altInput.placeholder=h.input.placeholder,h.altInput.disabled=h.input.disabled,h.altInput.required=h.input.required,h.altInput.tabIndex=h.input.tabIndex,h.altInput.type="text",h.input.setAttribute("type","hidden"),!h.config.static&&h.input.parentNode&&h.input.parentNode.insertBefore(h.altInput,h.input.nextSibling)),h.config.allowInput||h._input.setAttribute("readonly","readonly"),h._positionElement=h.config.positionElement||h._input):h.config.errorHandler(new Error("Invalid input element specified")),function(){h.selectedDates=[],h.now=h.parseDate(h.config.now)||new Date;var e=h.config.defaultDate||("INPUT"!==h.input.nodeName&&"TEXTAREA"!==h.input.nodeName||!h.input.placeholder||h.input.value!==h.input.placeholder?h.input.value:null);e&&ue(e,h.config.dateFormat),h._initialDate=h.selectedDates.length>0?h.selectedDates[0]:h.config.minDate&&h.config.minDate.getTime()>h.now.getTime()?h.config.minDate:h.config.maxDate&&h.config.maxDate.getTime()<h.now.getTime()?h.config.maxDate:h.now,h.currentYear=h._initialDate.getFullYear(),h.currentMonth=h._initialDate.getMonth(),h.selectedDates.length>0&&(h.latestSelectedDateObj=h.selectedDates[0]),void 0!==h.config.minTime&&(h.config.minTime=h.parseDate(h.config.minTime,"H:i")),void 0!==h.config.maxTime&&(h.config.maxTime=h.parseDate(h.config.maxTime,"H:i")),h.minDateHasTime=!!h.config.minDate&&(h.config.minDate.getHours()>0||h.config.minDate.getMinutes()>0||h.config.minDate.getSeconds()>0),h.maxDateHasTime=!!h.config.maxDate&&(h.config.maxDate.getHours()>0||h.config.maxDate.getMinutes()>0||h.config.maxDate.getSeconds()>0),Object.defineProperty(h,"showTimeInput",{get:function(){return h._showTimeInput},set:function(e){h._showTimeInput=e,h.calendarContainer&&c(h.calendarContainer,"showTimeInput",e),h.isOpen&&ie()}})}(),h.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=h.currentMonth),void 0===t&&(t=h.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:h.l10n.daysInMonth[e]}},h.isMobile||function(){var e=window.document.createDocumentFragment();if(h.calendarContainer=s("div","flatpickr-calendar"),h.calendarContainer.tabIndex=-1,!h.config.noCalendar){if(e.appendChild((h.monthNav=s("div","flatpickr-months"),h.yearElements=[],h.monthElements=[],h.prevMonthNav=s("span","flatpickr-prev-month"),h.prevMonthNav.innerHTML=h.config.prevArrow,h.nextMonthNav=s("span","flatpickr-next-month"),h.nextMonthNav.innerHTML=h.config.nextArrow,U(),Object.defineProperty(h,"_hidePrevMonthArrow",{get:function(){return h.__hidePrevMonthArrow},set:function(e){h.__hidePrevMonthArrow!==e&&(c(h.prevMonthNav,"flatpickr-disabled",e),h.__hidePrevMonthArrow=e)}}),Object.defineProperty(h,"_hideNextMonthArrow",{get:function(){return h.__hideNextMonthArrow},set:function(e){h.__hideNextMonthArrow!==e&&(c(h.nextMonthNav,"flatpickr-disabled",e),h.__hideNextMonthArrow=e)}}),h.currentYearElement=h.yearElements[0],ge(),h.monthNav)),h.innerContainer=s("div","flatpickr-innerContainer"),h.config.weekNumbers){var t=function(){h.calendarContainer.classList.add("hasWeeks");var e=s("div","flatpickr-weekwrapper");e.appendChild(s("span","flatpickr-weekday",h.l10n.weekAbbreviation));var t=s("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),n=t.weekWrapper,a=t.weekNumbers;h.innerContainer.appendChild(n),h.weekNumbers=a,h.weekWrapper=n}h.rContainer=s("div","flatpickr-rContainer"),h.rContainer.appendChild(B()),h.daysContainer||(h.daysContainer=s("div","flatpickr-days"),h.daysContainer.tabIndex=-1),W(),h.rContainer.appendChild(h.daysContainer),h.innerContainer.appendChild(h.rContainer),e.appendChild(h.innerContainer)}h.config.enableTime&&e.appendChild(function(){h.calendarContainer.classList.add("hasTime"),h.config.noCalendar&&h.calendarContainer.classList.add("noCalendar"),h.timeContainer=s("div","flatpickr-time"),h.timeContainer.tabIndex=-1;var e=s("span","flatpickr-time-separator",":"),t=d("flatpickr-hour",{"aria-label":h.l10n.hourAriaLabel});h.hourElement=t.getElementsByTagName("input")[0];var n=d("flatpickr-minute",{"aria-label":h.l10n.minuteAriaLabel});if(h.minuteElement=n.getElementsByTagName("input")[0],h.hourElement.tabIndex=h.minuteElement.tabIndex=-1,h.hourElement.value=r(h.latestSelectedDateObj?h.latestSelectedDateObj.getHours():h.config.time_24hr?h.config.defaultHour:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(h.config.defaultHour)),h.minuteElement.value=r(h.latestSelectedDateObj?h.latestSelectedDateObj.getMinutes():h.config.defaultMinute),h.hourElement.setAttribute("step",h.config.hourIncrement.toString()),h.minuteElement.setAttribute("step",h.config.minuteIncrement.toString()),h.hourElement.setAttribute("min",h.config.time_24hr?"0":"1"),h.hourElement.setAttribute("max",h.config.time_24hr?"23":"12"),h.minuteElement.setAttribute("min","0"),h.minuteElement.setAttribute("max","59"),h.timeContainer.appendChild(t),h.timeContainer.appendChild(e),h.timeContainer.appendChild(n),h.config.time_24hr&&h.timeContainer.classList.add("time24hr"),h.config.enableSeconds){h.timeContainer.classList.add("hasSeconds");var a=d("flatpickr-second");h.secondElement=a.getElementsByTagName("input")[0],h.secondElement.value=r(h.latestSelectedDateObj?h.latestSelectedDateObj.getSeconds():h.config.defaultSeconds),h.secondElement.setAttribute("step",h.minuteElement.getAttribute("step")),h.secondElement.setAttribute("min","0"),h.secondElement.setAttribute("max","59"),h.timeContainer.appendChild(s("span","flatpickr-time-separator",":")),h.timeContainer.appendChild(a)}return h.config.time_24hr||(h.amPM=s("span","flatpickr-am-pm",h.l10n.amPM[i((h.latestSelectedDateObj?h.hourElement.value:h.config.defaultHour)>11)]),h.amPM.title=h.l10n.toggleTitle,h.amPM.tabIndex=-1,h.timeContainer.appendChild(h.amPM)),h.timeContainer}()),c(h.calendarContainer,"rangeMode","range"===h.config.mode),c(h.calendarContainer,"animate",!0===h.config.animate),c(h.calendarContainer,"multiMonth",h.config.showMonths>1),h.calendarContainer.appendChild(e);var o=void 0!==h.config.appendTo&&void 0!==h.config.appendTo.nodeType;if((h.config.inline||h.config.static)&&(h.calendarContainer.classList.add(h.config.inline?"inline":"static"),h.config.inline&&(!o&&h.element.parentNode?h.element.parentNode.insertBefore(h.calendarContainer,h._input.nextSibling):void 0!==h.config.appendTo&&h.config.appendTo.appendChild(h.calendarContainer)),h.config.static)){var l=s("div","flatpickr-wrapper");h.element.parentNode&&h.element.parentNode.insertBefore(l,h.element),l.appendChild(h.element),h.altInput&&l.appendChild(h.altInput),l.appendChild(h.calendarContainer)}h.config.static||h.config.inline||(void 0!==h.config.appendTo?h.config.appendTo:window.document.body).appendChild(h.calendarContainer)}(),function(){if(h.config.wrap&&["open","close","toggle","clear"].forEach((function(e){Array.prototype.forEach.call(h.element.querySelectorAll("[data-"+e+"]"),(function(t){return N(t,"click",h[e])}))})),h.isMobile)!function(){var e=h.config.enableTime?h.config.noCalendar?"time":"datetime-local":"date";h.mobileInput=s("input",h.input.className+" flatpickr-mobile"),h.mobileInput.step=h.input.getAttribute("step")||"any",h.mobileInput.tabIndex=1,h.mobileInput.type=e,h.mobileInput.disabled=h.input.disabled,h.mobileInput.required=h.input.required,h.mobileInput.placeholder=h.input.placeholder,h.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",h.selectedDates.length>0&&(h.mobileInput.defaultValue=h.mobileInput.value=h.formatDate(h.selectedDates[0],h.mobileFormatStr)),h.config.minDate&&(h.mobileInput.min=h.formatDate(h.config.minDate,"Y-m-d")),h.config.maxDate&&(h.mobileInput.max=h.formatDate(h.config.maxDate,"Y-m-d")),h.input.type="hidden",void 0!==h.altInput&&(h.altInput.type="hidden");try{h.input.parentNode&&h.input.parentNode.insertBefore(h.mobileInput,h.input.nextSibling)}catch(e){}N(h.mobileInput,"change",(function(e){h.setDate(e.target.value,!1,h.mobileFormatStr),me("onChange"),me("onClose")}))}();else{var e=o(te,50);h._debouncedChange=o(T,300),h.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&N(h.daysContainer,"mouseover",(function(e){"range"===h.config.mode&&ee(e.target)})),N(window.document.body,"keydown",X),h.config.inline||h.config.static||N(window,"resize",e),void 0!==window.ontouchstart?N(window.document,"touchstart",G):N(window.document,"mousedown",j(G)),N(window.document,"focus",G,{capture:!0}),!0===h.config.clickOpens&&(N(h._input,"focus",h.open),N(h._input,"mousedown",j(h.open))),void 0!==h.daysContainer&&(N(h.monthNav,"mousedown",j(be)),N(h.monthNav,["keyup","increment"],S),N(h.daysContainer,"mousedown",j(ce))),void 0!==h.timeContainer&&void 0!==h.minuteElement&&void 0!==h.hourElement&&(N(h.timeContainer,["increment"],C),N(h.timeContainer,"blur",C,{capture:!0}),N(h.timeContainer,"mousedown",j(A)),N([h.hourElement,h.minuteElement],["focus","click"],(function(e){return e.target.select()})),void 0!==h.secondElement&&N(h.secondElement,"focus",(function(){return h.secondElement&&h.secondElement.select()})),void 0!==h.amPM&&N(h.amPM,"mousedown",j((function(e){C(e),T()}))))}}(),(h.selectedDates.length||h.config.noCalendar)&&(h.config.enableTime&&O(h.config.noCalendar?h.latestSelectedDateObj||h.config.minDate:void 0),ve(!1)),D(),h.showTimeInput=h.selectedDates.length>0||h.config.noCalendar;var a=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!h.isMobile&&a&&ie(),me("onReady")}(),h}function D(e,t){for(var n=Array.prototype.slice.call(e).filter((function(e){return e instanceof HTMLElement})),a=[],r=0;r<n.length;r++){var i=n[r];try{if(null!==i.getAttribute("data-fp-omit"))continue;void 0!==i._flatpickr&&(i._flatpickr.destroy(),i._flatpickr=void 0),i._flatpickr=_(i,t||{}),a.push(i._flatpickr)}catch(e){console.error(e)}}return 1===a.length?a[0]:a}"function"!=typeof Object.assign&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var a=function(t){t&&Object.keys(t).forEach((function(n){return e[n]=t[n]}))},r=0,i=t;r<i.length;r++){var o=i[r];a(o)}return e}),"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return D(this,e)},HTMLElement.prototype.flatpickr=function(e){return D([this],e)});var E=function(e,t){return"string"==typeof e?D(window.document.querySelectorAll(e),t):e instanceof Node?D([e],t):D(e,t)};return E.defaultConfig={},E.l10ns={en:e({},a),default:e({},a)},E.localize=function(t){E.l10ns.default=e({},E.l10ns.default,t)},E.setDefaults=function(t){E.defaultConfig=e({},E.defaultConfig,t)},E.parseDate=b({}),E.formatDate=v({}),E.compareDates=w,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return D(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},"undefined"!=typeof window&&(window.flatpickr=E),E}()},function(e,t,n){},function(e,t,n){"use strict";n.r(t);n(1);var a=(0,wp.element.createContext)({}),r=n(0),i=n.n(r);function o(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||d(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 l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],a=!0,r=!1,i=void 0;try{for(var o,l=e[Symbol.iterator]();!(a=(o=l.next()).done)&&(n.push(o.value),!t||n.length!==t);a=!0);}catch(e){r=!0,i=e}finally{try{a||null==l.return||l.return()}finally{if(r)throw i}}return n}(e,t)||d(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.")}()}function d(e,t){if(e){if("string"==typeof e)return m(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)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var f=wp.element,p=(f.createElement,f.useState),g=f.useEffect,h=f.Fragment,v=(f.render,f.useRef),b=wp.data,w=(b.dispatch,b.select),y=function(e){var t=u(p(""),2),n=t[0],a=t[1];return g((function(){var t="",n="",r={};switch(e.type){case"friends":n="user",t=e.id.item_id;break;case"group":n="group",t=e.id.id,r={item_id:e.id.id};break;case"activity":n="user",t=e.id.secondary_item_id;break;case"user":n="user",t=e.id.user_id;break;case"shared":n="user",t=e.id.id,r={user_id:e.id.id};break;case"course":n="course",t=e.id.id,r={item_id:e.id.id};break;default:n=e.type,t=e.id.id}localforage.getItem(n+"_"+t).then((function(t){null!==t?a(JSON.parse(t)):fetch("".concat(window.vibebp.api.url,"/avatar"),{method:"post",body:JSON.stringify({type:n,ids:r,token:w("vibebp").getToken()})}).then((function(e){return e.json()})).then((function(t){if(t.status){var n=c(c({},t.value),{},{id:e.id.id});localforage.setItem(t.key,JSON.stringify(n)),a(n)}}))}))}),[e.id]),wp.element.createElement(h,null,e.not_show_name?wp.element.createElement("img",{src:n.avatar,className:"vibebp_avatar",onClick:e.click,alt:n.name,title:n.name}):wp.element.createElement("span",null,wp.element.createElement("img",{src:n.avatar,className:"vibebp_avatar",onClick:e.click,alt:n.name,title:n.name}),wp.element.createElement("span",null,n.name)))},_=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=v(Date.now());g((function(){var n=setTimeout((function(){Date.now()-a.current>=t&&(e(),a.current=Date.now())}),t-(Date.now()-a.current));return function(){clearTimeout(n)}}),[t].concat(o(n)))};function D(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||k(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 E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],a=!0,r=!1,i=void 0;try{for(var o,l=e[Symbol.iterator]();!(a=(o=l.next()).done)&&(n.push(o.value),!t||n.length!==t);a=!0);}catch(e){r=!0,i=e}finally{try{a||null==l.return||l.return()}finally{if(r)throw i}}return n}(e,t)||k(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.")}()}function k(e,t){if(e){if("string"==typeof e)return x(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)?x(e,t):void 0}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var S=wp.element,N=(S.createElement,S.useState),j=S.useEffect,T=(S.Fragment,S.render,S.useContext,wp.data),I=T.dispatch,A=T.select,P=function(e){var t=O(N(!1),2),n=t[0],a=t[1],r=O(N({id:0,post_title:"",post_content:"",meta:{host:"",start_date:"",duration:60,time_zone:"",password:"",join_before_host:!1,host_video:!1,participant_video:!1,mute_upon_entry:!1,enforce_login:!1,auto_recording:!1,alternative_hosts:""},shared:{shared_type:"shared",shared_values:[]}}),2),o=r[0],l=r[1],c=O(N({}),2),s=c[0],u=c[1],d=O(N(""),2),m=d[0],f=d[1],p=O(N([]),2),g=p[0],h=p[1];j((function(){l(C(C({},o),e.meeting))}),[e.meeting]),j((function(){fetch("".concat(window.vibezoom.api.url,"/user/get_new_meeting_pre"),{method:"post",body:JSON.stringify({token:A("vibebp").getToken()})}).then((function(e){return e.json()})).then((function(e){u(e)}))}),[]),_((function(){if(h([]),m.length>2&&o.shared.shared_type){var e={s:m,shared_type:o.shared.shared_type};fetch("".concat(window.vibezoom.api.url,"/search"),{method:"post",body:JSON.stringify(C(C({},e),{},{token:A("vibebp").getToken()}))}).then((function(e){return e.json()})).then((function(e){e.status&&e.values&&Array.isArray(e.values)&&h(e.values)}))}}),500,[m]);return wp.element.createElement("div",{className:"new_zoom_meeting"},wp.element.createElement("div",{className:"new_meeting_header"},wp.element.createElement("span",{className:"vicon vicon-arrow-left",onClick:e.back})),wp.element.createElement("div",{className:"new_meeting_content vibebp_form"},wp.element.createElement("div",{className:"vibebp_form_field"},wp.element.createElement("label",null,window.vibezoom.translations.meeting_title),wp.element.createElement("input",{type:"text",value:o.post_title,onChange:function(e){l(C(C({},o),{},{post_title:e.target.value}))}})),wp.element.createElement("div",{className:"vibebp_form_field"},wp.element.createElement("label",null,window.vibezoom.translations.password),wp.element.createElement("input",{type:"text",value:o.meta.password,onChange:function(e){var t=C({},o);t.meta.password=e.target.value,l(t)}})),wp.element.createElement("div",{className:"vibebp_form_field"},wp.element.createElement("label",null,window.vibezoom.translations.meeting_content),wp.element.createElement("div",{className:"vibe_meeting_editor"},wp.element.createElement("textarea",{onChange:function(e){l(C(C({},o),{},{post_content:e.target.value}))},value:o.post_content}))),wp.element.createElement("div",{className:"zoom_meeting_timings"},wp.element.createElement("div",{className:"vibebp_form_field"},wp.element.createElement("label",null,window.vibezoom.translations.meeting_start_time),wp.element.createElement("input",{type:"text",ref:function(e){e&&i()(e,{altInput:!0,defaultDate:o.meta.start_date,enableTime:!0,onChange:function(e,t,n){var a=C({},o);a.meta.start_date=t,l(a)}})}})),wp.element.createElement("div",{className:"vibebp_form_field"},wp.element.createElement("label",null,window.vibezoom.translations.meeting_duration_in_minutes),wp.element.createElement("input",{type:"number",value:o.meta.duration,onChange:function(e){var t=C({},o);t.meta.duration=e.target.value,l(t)}})),s.hasOwnProperty("time_zones")&&s.time_zones?wp.element.createElement("div",{className:"vibebp_form_field"},wp.element.createElement("label",null,window.vibezoom.translations.time_zone),wp.element.createElement("select",{value:o.meta.time_zone,onChange:function(e){var t=C({},o);t.meta.time_zone=e.target.value,l(t)}},wp.element.createElement("option",{value:""},window.vibezoom.translations.select_time_zone),Object.keys(s.time_zones).map((function(e){return wp.element.createElement("option",{value:e},s.time_zones[e])})))):""),wp.element.createElement("div",{className:"zoom_meeting_controls"},wp.element.createElement("div",{className:"vibebp_form_field"},wp.element.createElement("p",null,window.vibezoom.translations.join_before_host),wp.element.createElement("div",{className:"switch"},o.meta.join_before_host?wp.element.createElement("input",{type:"checkbox",id:"join_before_host",checked:!0,onClick:function(){var e=C({},o);e.meta.join_before_host=!e.meta.join_before_host,l(e)}}):wp.element.createElement("input",{type:"checkbox",id:"join_before_host",onClick:function(){var e=C({},o);e.meta.join_before_host=!e.meta.join_before_host,l(e)}}),wp.element.createElement("label",{for:"join_before_host",className:"slider"}))),wp.element.createElement("div",{className:"vibebp_form_field"},wp.element.createElement("p",null,window.vibezoom.translations.host_video),wp.element.createElement("div",{className:"switch"},o.meta.host_video?wp.element.createElement("input",{type:"checkbox",id:"host_video",checked:!0,onClick:function(){var e=C({},o);e.meta.host_video=!e.meta.host_video,l(e)}}):wp.element.createElement("input",{type:"checkbox",id:"host_video",onClick:function(){var e=C({},o);e.meta.host_video=!e.meta.host_video,l(e)}}),wp.element.createElement("label",{for:"host_video",className:"slider"}))),wp.element.createElement("div",{className:"vibebp_form_field"},wp.element.createElement("p",null,window.vibezoom.translations.participant_video),wp.element.createElement("div",{className:"switch"},o.meta.participant_video?wp.element.createElement("input",{type:"checkbox",id:"participant_video",checked:!0,onClick:function(){var e=C({},o);e.meta.participant_video=!e.meta.participant_video,l(e)}}):wp.element.createElement("input",{type:"checkbox",id:"participant_video",onClick:function(){var e=C({},o);e.meta.participant_video=!e.meta.participant_video,l(e)}}),wp.element.createElement("label",{for:"participant_video",className:"slider"}))),wp.element.createElement("div",{className:"vibebp_form_field"},wp.element.createElement("p",null,window.vibezoom.translations.mute_upon_entry),wp.element.createElement("div",{className:"switch"},o.meta.mute_upon_entry?wp.element.createElement("input",{type:"checkbox",id:"mute_upon_entry",checked:!0,onClick:function(){var e=C({},o);e.meta.mute_upon_entry=!e.meta.mute_upon_entry,l(e)}}):wp.element.createElement("input",{type:"checkbox",id:"mute_upon_entry",onClick:function(){var e=C({},o);e.meta.mute_upon_entry=!e.meta.mute_upon_entry,l(e)}}),wp.element.createElement("label",{for:"mute_upon_entry",className:"slider"}))),wp.element.createElement("div",{className:"vibebp_form_field"},wp.element.createElement("p",null,window.vibezoom.translations.enforce_login),wp.element.createElement("div",{className:"switch"},o.meta.enforce_login?wp.element.createElement("input",{type:"checkbox",id:"enforce_login",checked:!0,onClick:function(){var e=C({},o);e.meta.enforce_login=!e.meta.enforce_login,l(e)}}):wp.element.createElement("input",{type:"checkbox",id:"enforce_login",onClick:function(){var e=C({},o);e.meta.enforce_login=!e.meta.enforce_login,l(e)}}),wp.element.createElement("label",{for:"enforce_login",className:"slider"}))),wp.element.createElement("div",{className:"vibebp_form_field"},wp.element.createElement("p",null,window.vibezoom.translations.auto_recording),wp.element.createElement("div",{className:"switch"},o.meta.auto_recording?wp.element.createElement("input",{type:"checkbox",id:"auto_recording",checked:!0,onClick:function(){var e=C({},o);e.meta.auto_recording=!e.meta.auto_recording,l(e)}}):wp.element.createElement("input",{type:"checkbox",id:"auto_recording",onClick:function(){var e=C({},o);e.meta.auto_recording=!e.meta.auto_recording,l(e)}}),wp.element.createElement("label",{for:"auto_recording",className:"slider"})))),wp.element.createElement("div",{className:"zoom_meeting_sharing"},o.shared?wp.element.createElement("div",{className:"shared"},wp.element.createElement("div",{className:"vibebp_form_field"},wp.element.createElement("label",null,window.vibezoom.translations.select_sharing_type),wp.element.createElement("select",{value:o.shared.shared_type,onChange:function(e){var t=C({},o);t.shared.shared_type=e.target.value,t.shared.shared_values=[],l(t)}},wp.element.createElement("option",{value:""},window.vibezoom.translations.select_sharing_type),Object.keys(window.vibezoom.shared_types).map((function(e){return wp.element.createElement("option",{value:e},window.vibezoom.shared_types[e])})))),o.shared.shared_type?wp.element.createElement("div",null,o.shared.shared_values&&Array.isArray(o.shared.shared_values)?wp.element.createElement("div",{className:"vibebp_form_field"},wp.element.createElement("label",null,window.vibezoom.translations.shared_with),wp.element.createElement("div",{className:"shared_values"},o.shared.shared_values.map((function(e,t){return wp.element.createElement("div",{className:"vibebp_meeting_members",onClick:function(){var e=C({},o);e.shared.shared_values.splice(t,1),l(e)}},wp.element.createElement(y,{type:o.shared.shared_type,id:{id:parseInt(e)}}))})))):"",wp.element.createElement("div",{className:"vibebp_form_field"},wp.element.createElement("input",{type:"text",value:m,onChange:function(e){f(e.target.value)},placeholder:window.vibezoom.translations.search_text})),Array.isArray(g)&&g.length?wp.element.createElement("div",{className:"vibebp_form_field"},wp.element.createElement("div",{className:"search_results"},g.map((function(e,t){return wp.element.createElement("div",{className:"vibebp_meeting_members",onClick:function(){var n=C({},o);if(-1==n.shared.shared_values.indexOf(e.id)){n.shared.shared_values.push(e.id);var a=D(g);a.splice(t,1),h(a)}l(n)}},wp.element.createElement("span",null,e.label))})))):""):""):""),wp.element.createElement("div",{className:"zoom_create_form_end"},s.hasOwnProperty("hosts")&&s.hosts?wp.element.createElement("div",{className:"vibebp_form_field"},wp.element.createElement("label",null,window.vibezoom.translations.select_host),wp.element.createElement("select",{value:o.meta.host,onChange:function(e){var t=C({},o);t.meta.host=e.target.value,l(t)}},wp.element.createElement("option",{value:""},window.vibezoom.translations.select_host_user),Object.keys(s.hosts).map((function(e){return wp.element.createElement("option",{value:e},s.hosts[e])})))):"",wp.element.createElement("div",{className:"vibebp_form_field"},wp.element.createElement("a",{className:n?"button is-primary is-loading":"button is-primary",onClick:function(){var t={id:o.id,post_title:o.post_title,post_content:o.post_content,meta:o.meta,shared:o.shared};a(!0),fetch("".concat(window.vibezoom.api.url,"/user/meetings/new"),{method:"post",body:JSON.stringify(C(C({},t),{},{token:A("vibebp").getToken()}))}).then((function(e){return e.json()})).then((function(t){if(a(!1),t.status){e.created(t.meeting);var n=A("vibebp").getData("followers"),r=A("vibebp").getOnlineMembers();n&&n.length&&n.map((function(e){-1!==r.indexOf(e)&&I("vibebp").sendRealTimeNotification(e,t.followermessage)}))}else t.hasOwnProperty("message")&&I("vibebp").addNotification({text:t.message}),t.hasOwnProperty("debug")&&I("vibebp").addNotification({text:t.debug.errors[0].message})}))}},window.vibezoom.translations.submit)))))};function F(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],a=!0,r=!1,i=void 0;try{for(var o,l=e[Symbol.iterator]();!(a=(o=l.next()).done)&&(n.push(o.value),!t||n.length!==t);a=!0);}catch(e){r=!0,i=e}finally{try{a||null==l.return||l.return()}finally{if(r)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y(e,t)}(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.")}()}function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var z=wp.element,H=z.useState,L=z.useEffect,W=z.Fragment,R=(z.useContext,wp.data),J=R.dispatch,U=R.select,B=function(e){var t=F(H(!1),2),n=t[0],a=t[1],r=F(H(!1),2),i=r[0],o=r[1],l=F(H(e.meeting),2),c=l[0],s=l[1];L((function(){s(e.meeting)}),[e.meeting]);return wp.element.createElement("div",{className:"join_vibezoom"},c.meeting_details?wp.element.createElement(W,null,c.meeting_details.password&&c.meeting_details.meeting_id?wp.element.createElement(W,null,U("vibebp").getUser().id!=c.post_author?wp.element.createElement("a",{className:"button is-primary",onClick:function(){a(!n)}},window.vibezoom.translations.open_meeting):wp.element.createElement("a",{className:"button is-primary",onClick:function(){a(!n)}},window.vibezoom.translations.start_meeting),n?wp.element.createElement("div",{className:"vibe_zoom_iframe_container"},wp.element.createElement("div",{className:"passcode"},wp.element.createElement("span",null,window.vibezoom.translations.passcode),wp.element.createElement("a",{href:"#",onClick:function(){var e=document.createElement("textarea");e.innerText=c.meeting_details.password,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}},window.vibezoom.translations.click_to_copy)),n?wp.element.createElement("a",{className:i?"button is-primary open_in_new_tab is-loading":"button is-primary open_in_new_tab",onClick:function(){o(!0),fetch("".concat(window.vibezoom.api.url,"/user/meetings/record_join_activity"),{method:"post",body:JSON.stringify({token:U("vibebp").getToken(),id:c.id})}).then((function(e){return e.json()})).then((function(e){o(!1),e.hasOwnProperty("message")&&J("vibebp").addNotification({text:e.message}),e.status&&(U("vibebp").getUser().id==c.post_author?c.meeting_details&&c.meeting_details.start_url&&window.open(c.meeting_details.start_url,"_blank"):c.meeting_details&&c.meeting_details.join_url&&window.open(c.meeting_details.join_url,"_blank"))}))}},window.vibezoom.translations.open_meeting_in_new_tab):""):""):""):"")};function K(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],a=!0,r=!1,i=void 0;try{for(var o,l=e[Symbol.iterator]();!(a=(o=l.next()).done)&&(n.push(o.value),!t||n.length!==t);a=!0);}catch(e){r=!0,i=e}finally{try{a||null==l.return||l.return()}finally{if(r)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return $(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $(e,t)}(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.")}()}function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var q=wp.element,G=q.useState,V=q.useEffect,Z=q.Fragment,Q=q.useContext,X=wp.data,ee=X.dispatch,te=X.select,ne=function(e){var t=Q(a),n=te("vibebp").getUser(),r=K(G(e.meeting),2),i=r[0],o=r[1];V((function(){o(e.meeting)}),[e.meeting]);return wp.element.createElement(Z,null,wp.element.createElement("div",{className:"vibebp_full_meeting_wrapper"},wp.element.createElement("div",{className:"vibebp_meetings_header"},wp.element.createElement("span",{className:"vicon vicon-arrow-left",onClick:e.back}),wp.element.createElement("span",null,wp.element.createElement("span",{className:"meeting_date"},i.post_date),i.post_author===n.id?wp.element.createElement("span",null,wp.element.createElement("span",{className:"vicon vicon-pencil",onClick:function(){t.update(i,"edit_meeting_id")}}),wp.element.createElement("span",{className:"vicon vicon-trash",onClick:function(){fetch("".concat(window.vibezoom.api.url,"/user/meetings/trash"),{method:"post",body:JSON.stringify({token:te("vibebp").getToken(),meeting_id:i.id})}).then((function(e){return e.json()})).then((function(t){t.hasOwnProperty("message")&&ee("vibebp").addNotification({text:t.message}),t.status&&(e.update("remove",i),e.back())}))}})):"")),wp.element.createElement("h3",{className:"post_title"},i.post_title),wp.element.createElement("div",{className:"vibebp_meeting_content",dangerouslySetInnerHTML:{__html:i.post_content}}),i.meeting_details?wp.element.createElement(B,{meeting:i}):""))};function ae(e){return function(e){if(Array.isArray(e))return se(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ce(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 re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?re(Object(n),!0).forEach((function(t){oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function le(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],a=!0,r=!1,i=void 0;try{for(var o,l=e[Symbol.iterator]();!(a=(o=l.next()).done)&&(n.push(o.value),!t||n.length!==t);a=!0);}catch(e){r=!0,i=e}finally{try{a||null==l.return||l.return()}finally{if(r)throw i}}return n}(e,t)||ce(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.")}()}function ce(e,t){if(e){if("string"==typeof e)return se(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)?se(e,t):void 0}}function se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var ue=wp.element,de=ue.useState,me=ue.useEffect,fe=ue.Fragment,pe=(ue.render,ue.useContext),ge=wp.data.select,he=function(e){var t=pe(a),n=le(de({type:e.type,page:1,s:"",orderby:"date",order:"DESC",scope:"shared"}),2),r=n[0],i=n[1],o=le(de(!1),2),l=o[0],c=o[1],s=le(de(!1),2),u=s[0],d=s[1],m=le(de(!1),2),f=m[0],p=m[1],g=le(de(t.meetings),2),h=g[0],v=g[1];me((function(){v(t.meetings)}),[t.meetings]),me((function(){i(ie(ie({},r),{},{type:e.type,page:1}))}),[e.type]),_((function(){c(!0),1==r.page&&b([]),fetch("".concat(window.vibezoom.api.url,"/user/meetings"),{method:"post",body:JSON.stringify(ie(ie({},r),{},{token:ge("vibebp").getToken()}))}).then((function(e){return e.json()})).then((function(e){if(c(!1),e.status)if(u){var t=[].concat(ae(h),ae(e.meetings));t.length<parseInt(e.total)?p(!0):p(!1),d(!1),b(t)}else e.meetings.length<parseInt(e.total)?p(!0):p(!1),b(e.meetings)}))}),500,[r]);var b=function(e){v(e),t.update(e,"set")};return wp.element.createElement("div",{className:"vibebp_meetings_wrapper"},wp.element.createElement(fe,null,wp.element.createElement("div",{className:"vibebp_main_header vibebp_form"},wp.element.createElement("div",{className:"vibebp_form_field"},wp.element.createElement("input",{type:"text",value:r.s,onChange:function(e){i(ie(ie({},r),{},{s:e.target.value,page:1}))},placeholder:window.vibezoom.translations.search_text})),"joined"==e.type?wp.element.createElement("div",{class:"buttons has-addons"},Object.keys(window.vibezoom.shared_tabs).map((function(e){return wp.element.createElement("button",{className:r.scope==e?"button is-success is-selected":"button",onClick:function(t){i(ie(ie({},r),{},{scope:e,page:1}))}},window.vibezoom.shared_tabs[e])}))):"",wp.element.createElement("div",null,wp.element.createElement("select",{value:r.orderby,onChange:function(e){i(ie(ie({},r),{},{orderby:e.target.value,page:1}))}},Object.keys(window.vibezoom.sorters).map((function(e){return wp.element.createElement("option",{value:e},window.vibezoom.sorters[e])}))),wp.element.createElement("span",null,wp.element.createElement("span",{className:"ASC"==r.order?"vicon vicon-angle-up active":"vicon vicon-angle-up",onClick:function(){i(ie(ie({},r),{},{order:"ASC"}))}}),wp.element.createElement("span",{className:"DESC"==r.order?"vicon vicon-angle-down active":"vicon vicon-angle-down",onClick:function(){i(ie(ie({},r),{},{order:"DESC"}))}})))),h&&h.length?wp.element.createElement(fe,null,wp.element.createElement("div",{className:"vibebp_zoom_meetings"},h.map((function(e){var n=Date.now(),a=(e.meeting_details.start-n)/1e3,r="";return r=n>=e.meeting_details.start&&n<=e.meeting_details.end?"running":n<e.meeting_details.start?"upcoming_meeting":"meeting_over",wp.element.createElement("div",{className:"vibebp_zoom_meeting",onClick:function(){t.update(e,"show_meeting_id")}},wp.element.createElement("div",null,wp.element.createElement("span",{className:r},"running"==r?window.vibezoom.translations.meeting_running:"meeting_over"==r?window.vibezoom.translations.meeting_over:a>86400?Math.floor(a/86400)+window.vibezoom.translations.days:a>3600?Math.floor(a/3600)+window.vibezoom.translations.hours:a>60?Math.floor(a/60)+window.vibezoom.translations.minutes:Math.floor(a)+window.vibezoom.translations.seconds),wp.element.createElement("h3",null,e.post_title),e.meeting_details?wp.element.createElement("div",{className:"meeting_details"},e.meeting_details.start?wp.element.createElement("span",null,wp.element.createElement("span",null,wp.element.createElement("span",{className:"vicon vicon-calendar"}),wp.element.createElement("span",null,new Date(e.meeting_details.start).toLocaleString()))):"",e.meeting_details.duration?wp.element.createElement("span",null,wp.element.createElement("span",null,wp.element.createElement("span",{className:"vicon vicon-alarm-clock"}),wp.element.createElement("span",null,e.meeting_details.duration," ",window.vibezoom.translations.minutes))):""):""),wp.element.createElement("div",{className:"vibebp_meeting_members"},wp.element.createElement(y,{type:"user",id:{user_id:e.post_author},not_show_name:!0})))}))),f?wp.element.createElement("a",{className:"link",onClick:function(){d(!0),i(ie(ie({},r),{},{page:r.page+1}))}},window.vibezoom.translations.load_more):""):wp.element.createElement("div",{className:"vbp_message"},window.vibezoom.translations.no_zooms),l?wp.element.createElement("div",{class:"loading-roller"},wp.element.createElement("div",null),wp.element.createElement("div",null),wp.element.createElement("div",null),wp.element.createElement("div",null),wp.element.createElement("div",null),wp.element.createElement("div",null),wp.element.createElement("div",null),wp.element.createElement("div",null)):""))};function ve(e){return function(e){if(Array.isArray(e))return Ee(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||De(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 be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function we(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?be(Object(n),!0).forEach((function(t){ye(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],a=!0,r=!1,i=void 0;try{for(var o,l=e[Symbol.iterator]();!(a=(o=l.next()).done)&&(n.push(o.value),!t||n.length!==t);a=!0);}catch(e){r=!0,i=e}finally{try{a||null==l.return||l.return()}finally{if(r)throw i}}return n}(e,t)||De(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.")}()}function De(e,t){if(e){if("string"==typeof e)return Ee(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)?Ee(e,t):void 0}}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var Ce=wp.element,Me=Ce.useState,Oe=Ce.useEffect,ke=wp.data.select,xe=function(e){var t=_e(Me({}),2),n=(t[0],t[1],ke("vibebp").getUser()),r=_e(Me([]),2),i=r[0],o=r[1],l=_e(Me([]),2),c=l[0],s=l[1],u=_e(Me(!1),2),d=u[0],m=u[1],f=_e(Me(!0),2),p=f[0],g=f[1],h=_e(Me([]),2),v=h[0],b=h[1],w=_e(Me(!1),2),y=w[0],_=w[1],D=_e(Me(!1),2),E=D[0],C=D[1],M=window.vibezoom.settings.editor_slug,O=n.caps.hasOwnProperty(window.vibezoom.settings.new_vibezoom_cap);Oe((function(){var e=ke("vibebp").getMenu().filter((function(e){return"zoom_meeting"===e.parent})).filter((function(e){return!!O||-1==M.indexOf(e.slug)}));if(e.map((function(t,n){-1===e.findIndex((function(e){return e.class.indexOf("current-menu-item")>-1}))&&e[n].class.push("current-menu-item")})),-1==document.querySelector("body").classList.value.indexOf("withsidebar")&&document.querySelector("body").classList.add("withsidebar"),"view"==ke("vibebp").getAction()||"shared"==ke("vibebp").getAction()){var t=ke("vibebp").getAction();"view"==t&&(t="shared"),m(t)}o(e)}),[]),Oe((function(){if(v&&v.length&&ke("vibebp").getId()&&p){var e=ke("vibebp").getId();v.findIndex((function(t){return t.id==e}))>-1&&(k(v[v.findIndex((function(t){return t.id==e}))],"show_meeting_id"),g(!1))}}),[v,p]);var k=function(e,t){var n=ve(v),a=-1;switch(t){case"add":n.push(e),b(n);break;case"update":(a=n.findIndex((function(t){return t.id==e.id})))>=0&&(n.splice(a,1,e),b(n));break;case"set":b(e);break;case"show_meeting_id":(a=n.findIndex((function(t){return parseInt(t.id)==parseInt(e.id)})))>=0&&(_(!1),C(n[a]));break;case"edit_meeting_id":(a=n.findIndex((function(t){return parseInt(t.id)==parseInt(e.id)})))>=0&&(C(!1),_(n[a]))}};return wp.element.createElement("div",{className:"vibebp_sidebars"},wp.element.createElement("div",{className:"vibebp_left_sidebar_wrapper"},wp.element.createElement("div",{className:"vibebp_left_sidebar"},wp.element.createElement("h3",null,window.vibezoom.label),O?wp.element.createElement("a",{className:"button is-primary new_mail",onClick:function(){_(!0)}},window.vibezoom.translations.create_zoom):"",i.map((function(e,t){var n=e.class.join(" ")+" "+e.css_id;return wp.element.createElement("a",{className:n,onClick:function(n){var a=we({},c);a.filter=e.css_id,a.page=1,c.css_id!==a.filter&&s(a),m(e.css_id);var r=ve(i),l=r.findIndex((function(e){return e.class.indexOf("current-menu-item")>-1}));r[l].class.splice(r[l].class.indexOf("current-menu-item"),1),r[t].class.push("current-menu-item"),o(r)}},e.name)})))),wp.element.createElement("div",{className:"vibebp_main"},wp.element.createElement("div",{className:"vibe_zoom_context_wrapper"},wp.element.createElement(a.Provider,{value:{meetings:v,update:k}},E?wp.element.createElement(ne,{meeting:E,back:function(){C(!1)}}):y?wp.element.createElement(P,{meeting:y,back:function(){_(!1)},created:function(e){_(!1)}}):"my_meetings"===d?wp.element.createElement(he,{type:"joined"}):"manage_meetings"===d?wp.element.createElement(he,{type:"mine"}):wp.element.createElement(he,{type:"joined"})))))},Se=wp.element,Ne=(Se.createElement,Se.render);Se.useState,Se.useEffect,Se.Fragment,Se.useContext;document.addEventListener("component_loaded",(function(e){"zoom_meeting"===e.detail.component&&setTimeout((function(){Ne(wp.element.createElement(xe,{field:e.detail}),document.querySelector("#zoom_meeting_component"))}),200)}),!1)}]);