1jQuery((function(e){e("#enable_signup_notification").on("change",(function(){this.checked?(e(".registration-email-field").show(),e(".registration-signup-notification-label").show()):(e(".registration-email-field").hide(),e(".registration-signup-notification-label").hide())})),e("#enable_waiting_notification").on("change",(function(){this.checked?(e(".registration-waiting-email-field").show(),e(".registration-waiting-notification-label").show()):(e(".registration-waiting-email-field").hide(),e(".registration-waiting-notification-label").hide())})),e("#enable_cancelled_notification").on("change",(function(){this.checked?(e(".registration-cancelled-email-field").show(),e(".registration-cancelled-notification-label").show()):(e(".registration-cancelled-email-field").hide(),e(".registration-cancelled-notification-label").hide())})),e(".wpem-view-shortcodes, .dynamic-shortcodes-close").on("click",(function(i){i.preventDefault(),e(".dynamic-shortcodes-modal").toggle()})),e("#enable_custom_certification").on("change",(function(){this.checked&&1==e("#enable_certification").prop("checked")?(e(".registration-certificate-content-label").show(),e(".registration-certificate-template-field").show(),e(".registration-certificate-style-label").show(),e(".registration-certificate-style-field").show(),e(".certificate-pdf-size").show()):(e(".registration-certificate-content-label").hide(),e(".registration-certificate-template-field").hide(),e(".registration-certificate-style-label").hide(),e(".registration-certificate-style-field").hide(),e(".certificate-pdf-size").hide())})),e("#enable_certification").on("change",(function(){this.checked?e(".custom-certification-checkbox").show():(e("#enable_custom_certification").prop("checked",!1).trigger("change"),e(".custom-certification-checkbox").hide())})),e(".wpem-certificate-pdf-preveiew-btn").on("click",(function(i){i.preventDefault();var t=e("textarea[name='template-content']").val(),n=e("textarea[name='template-style']").val(),a=e("input[name='page-height']").val(),c=e("input[name='page-width']").val();""!=t&&null!=t&&null!=t&&e.ajax({url:wpem_event_submission.ajaxUrl,type:"post",data:{action:"event_manager_generate_preview_pdf",content:t,style:n,pdf_width:c,pdf_height:a},success:function(e){""!==e&&window.open(e,"_blank")}})}))})); 2var RegistrationCheckin=function (){ 3return { 4init: function (){ 5jQuery(".wpem-attendee-modal").on("click", ".registration-checkin", RegistrationCheckin.actions.updateCheckin); 6jQuery(".wpem-attendee-modal").on("click", ".registration-uncheckin", RegistrationCheckin.actions.updateCheckin); 7jQuery(".registration-checkin").on("click", RegistrationCheckin.actions.updateCheckin); 8jQuery(".registration-uncheckin").on("click", RegistrationCheckin.actions.updateCheckin); 9}, 10actions: { 11updateCheckin: function (n){ 12var check_in_value=jQuery(this).data("value"); 13registration_id=jQuery(this).data("registration-id"); 14event_id=jQuery("input[name=event_id]").val(); 15source=jQuery(this).data("source"); 16var attendee_id=jQuery("#attendee_id-"+registration_id).html(); 17jQuery.ajax({ 18type: "POST", 19url: event_registration_checkin.ajaxUrl.toString().replace("%%endpoint%%", "update_event_registration_checkin_data"), 20data: { check_in_value: check_in_value, registration_id: registration_id, event_id: event_id, source: source }, 21beforeSend: function (n, e){ 22if(jQuery(".wpem-attendee-modal.wpem-modal-open").length){ 23jQuery("#attendee_id-"+registration_id).html("Loading..."); 24}else{ 25jQuery("#registration-"+registration_id).find(".wpem-event-regi-checkin-out").html("Loading..."); 26}}, 27success: function (response){ 28console.error("Error:", response.data.message); 29if(response.success){ 30if(jQuery(".wpem-attendee-modal.wpem-modal-open").length){ 31if(check_in_value=='1'){ 32jQuery("#attendee_id-"+registration_id).html("<span><a href='#' class='button-secondary registration-uncheckin' data-source='' data-value='0' data-registration-id='"+registration_id+"'>Undo Check in</a></span>"); 33jQuery(".registration-uncheckin").on("click", RegistrationCheckin.actions.updateCheckin); 34}else{ 35jQuery("#attendee_id-"+registration_id).html("<span><a href='#' class='button-secondary registration-checkin' data-source='' data-value='1' data-registration-id='"+registration_id+"'>Check in</a></span>"); 36jQuery(".registration-checkin").on("click", RegistrationCheckin.actions.updateCheckin); 37}}else{ 38if(check_in_value=='1'){ 39jQuery("#registration-"+registration_id).find(".wpem-event-regi-checkin-out").html("<span><a href='#' class='button-secondary registration-uncheckin' data-source='' data-value='0' data-registration-id='"+registration_id+"'>Undo Check in</a></span>"); 40jQuery(".registration-uncheckin").on("click", RegistrationCheckin.actions.updateCheckin); 41}else{ 42jQuery("#registration-"+registration_id).find(".wpem-event-regi-checkin-out").html("<span><a href='#' class='button-secondary registration-checkin' data-source='' data-value='1' data-registration-id='"+registration_id+"'>Check in</a></span>"); 43jQuery(".registration-checkin").on("click", RegistrationCheckin.actions.updateCheckin); 44}} 45jQuery(".check_in_total").html(response); 46}else{ 47jQuery(".wpem-event-regi-list-body").prepend('<div class="wpem-alert wpem-alert-danger">'+response.data.message+'</div>'); 48}}, 49error: function(jqXHR, textStatus, errorThrown){ 50try { 51jQuery("#attendee_id-"+registration_id).html(attendee_id); 52var response=JSON.parse(jqXHR.responseText); 53if(jQuery(".wpem-attendee-modal.wpem-modal-open").length){ 54if(response.data&&response.data.message){ 55jQuery(".wpem-attendee-modal-content").prepend('<div class="wpem-alert wpem-alert-danger">'+response.data.message+'</div>'); 56}else{ 57jQuery(".wpem-attendee-modal-content").prepend('<div class="wpem-alert wpem-alert-danger">Something went wrong. Please try again!</div>'); 58}}else{ 59if(response.data&&response.data.message){ 60jQuery(".wpem-event-regi-list-body").prepend('<div class="wpem-alert wpem-alert-danger">'+response.data.message+'</div>'); 61}else{ 62jQuery(".wpem-event-regi-list-body").prepend('<div class="wpem-alert wpem-alert-danger">Something went wrong. Please try again!</div>'); 63}} 64} catch (e){ 65console.error("Failed to parse error response.", e); 66}}, 67complete: function (n, e){ 68}, 69}), 70n.preventDefault(); 71}, 72}, 73};}; 74(RegistrationCheckin=RegistrationCheckin()), 75jQuery(document).ready(function (n){ 76RegistrationCheckin.init(); 77}); 78(function(){ 79'use strict';function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a}; 80function ca(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var l=ca(this);function p(a,b){if(b)a:{var c=l;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ba(c,a,{configurable:!0,writable:!0,value:b})}} 81p("Symbol",function(a){function b(h){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(h||"")+"_"+e++,h)}function c(h,f){this.g=h;ba(this,"description",{configurable:!0,writable:!0,value:f})}
81if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b}); 82p("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=l[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return da(aa(this))}})}return a});p("Symbol.asyncIterator",function(a){return a?a:Symbol("Symbol.asyncIterator")}); 83function da(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}function q(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if("number"==typeof a.length)return{next:aa(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function ea(a){if(!(a instanceof Array)){a=q(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}function r(a,b){return Object.prototype.hasOwnProperty.call(a,b)} 84var fa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)r(d,e)&&(a[e]=d[e])}return a};p("Object.assign",function(a){return a||fa});var ha;if("function"==typeof Object.setPrototypeOf)ha=Object.setPrototypeOf;else{var ia;a:{var ja={a:!0},ka={};try{ka.__proto__=ja;ia=ka.a;break a}catch(a){}ia=!1}ha=ia?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var t=ha; 85function la(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b} 86p("Promise",function(a){function b(f){this.g=0;this.i=void 0;this.h=[];this.o=!1;var g=this.j();try{f(g.resolve,g.reject)}catch(k){g.reject(k)}}function c(){this.g=null}function d(f){return f instanceof b?f:new b(function(g){g(f)})}if(a)return a;c.prototype.h=function(f){if(null==this.g){this.g=[];var g=this;this.i(function(){g.l()})}this.g.push(f)};var e=l.setTimeout;c.prototype.i=function(f){e(f,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var f=this.g;this.g=[];for(var g=0;g<f.length;++g){var k= 87f[g];f[g]=null;try{k()}catch(m){this.j(m)}}}this.g=null};c.prototype.j=function(f){this.i(function(){throw f;})};b.prototype.j=function(){function f(m){return function(n){k||(k=!0,m.call(g,n))}}var g=this,k=!1;return{resolve:f(this.D),reject:f(this.l)}};b.prototype.D=function(f){if(f===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(f instanceof b)this.O(f);else{a:switch(typeof f){case "object":var g=null!=f;break a;case "function":g=!0;break a;default:g=!1}g?this.C(f):this.m(f)}}; 88b.prototype.C=function(f){var g=void 0;try{g=f.then}catch(k){this.l(k);return}"function"==typeof g?this.P(g,f):this.m(f)};b.prototype.l=function(f){this.u(2,f)};b.prototype.m=function(f){this.u(1,f)};b.prototype.u=function(f,g){if(0!=this.g)throw Error("Cannot settle("+f+", "+g+"): Promise already settled in state"+this.g);this.g=f;this.i=g;2===this.g&&this.G();this.A()};b.prototype.G=function(){var f=this;e(function(){if(f.B()){var g=l.console;"undefined"!==typeof g&&g.error(f.i)}},1)};b.prototype.B= 89function(){if(this.o)return!1;var f=l.CustomEvent,g=l.Event,k=l.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof f?f=new f("unhandledrejection",{cancelable:!0}):"function"===typeof g?f=new g("unhandledrejection",{cancelable:!0}):(f=l.document.createEvent("CustomEvent"),f.initCustomEvent("unhandledrejection",!1,!0,f));f.promise=this;f.reason=this.i;return k(f)};b.prototype.A=function(){if(null!=this.h){for(var f=0;f<this.h.length;++f)h.h(this.h[f]);this.h=null}};var h=new c;b.prototype.O= 90function(f){var g=this.j();f.F(g.resolve,g.reject)};b.prototype.P=function(f,g){var k=this.j();try{f.call(g,k.resolve,k.reject)}catch(m){k.reject(m)}};b.prototype.then=function(f,g){function k(y,G){return"function"==typeof y?function(ra){try{m(y(ra))}catch(sa){n(sa)}}:G}var m,n,u=new b(function(y,G){m=y;n=G});this.F(k(f,m),k(g,n));return u};b.prototype.catch=function(f){return this.then(void 0,f)};b.prototype.F=function(f,g){function k(){switch(m.g){case 1:f(m.i);break;case 2:g(m.i);break;default:throw Error("Unexpected state: "+ 91m.g);}}var m=this;null==this.h?h.h(k):this.h.push(k);this.o=!0};b.resolve=d;b.reject=function(f){return new b(function(g,k){k(f)})};b.race=function(f){return new b(function(g,k){for(var m=q(f),n=m.next();!n.done;n=m.next())d(n.value).F(g,k)})};b.all=function(f){var g=q(f),k=g.next();return k.done?d([]):new b(function(m,n){function u(ra){return function(sa){y[ra]=sa;G--;0==G&&m(y)}}var y=[],G=0;do y.push(void 0),G++,d(k.value).F(u(y.length-1),n),k=g.next();while(!k.done)})};return b}); 92p("Object.setPrototypeOf",function(a){return a||t}); 93p("WeakMap",function(a){function b(k){this.g=(g+=Math.random()+1).toString();if(k){k=q(k);for(var m;!(m=k.next()).done;)m=m.value,this.set(m[0],m[1])}}function c(){}function d(k){var m=typeof k;return"object"===m&&null!==k||"function"===m}function e(k){if(!r(k,f)){var m=new c;ba(k,f,{value:m})}}function h(k){var m=Object[k];m&&(Object[k]=function(n){if(n instanceof c)return n;Object.isExtensible(n)&&e(n);return m(n)})}if(function(){if(!a||!Object.seal)return!1;
vendor: 4,743 bytes, lines 93-104
93try{var k=Object.seal({}),m=Object.seal({}), 94n=new a([[k,2],[m,3]]);if(2!=n.get(k)||3!=n.get(m))return!1;n.delete(k);n.set(m,4);return!n.has(k)&&4==n.get(m)}catch(u){return!1}}())return a;var f="$jscomp_hidden_"+Math.random();h("freeze");h("preventExtensions");h("seal");var g=0;b.prototype.set=function(k,m){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!r(k,f))throw Error("WeakMap key fail: "+k);k[f][this.g]=m;return this};b.prototype.get=function(k){return d(k)&&r(k,f)?k[f][this.g]:void 0};b.prototype.has=function(k){return d(k)&&r(k, 95f)&&r(k[f],this.g)};b.prototype.delete=function(k){return d(k)&&r(k,f)&&r(k[f],this.g)?delete k[f][this.g]:!1};return b}); 96p("Map",function(a){function b(){var g={};return g.v=g.next=g.head=g}function c(g,k){var m=g.g;return da(function(){if(m){for(;m.head!=g.g;)m=m.v;for(;m.next!=m.head;)return m=m.next,{done:!1,value:k(m)};m=null}return{done:!0,value:void 0}})}function d(g,k){var m=k&&typeof k;"object"==m||"function"==m?h.has(k)?m=h.get(k):(m=""+ ++f,h.set(k,m)):m="p_"+k;var n=g.h[m];if(n&&r(g.h,m))for(g=0;g<n.length;g++){var u=n[g];if(k!==k&&u.key!==u.key||k===u.key)return{id:m,list:n,index:g,s:u}}return{id:m,list:n, 97index:-1,s:void 0}}function e(g){this.h={};this.g=b();this.size=0;if(g){g=q(g);for(var k;!(k=g.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var g=Object.seal({x:4}),k=new a(q([[g,"s"]]));if("s"!=k.get(g)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var m=k.entries(),n=m.next();if(n.done||n.value[0]!=g||"s"!=n.value[1])return!1;n=m.next();return n.done||4!=n.value[0].x|| 98"t"!=n.value[1]||!m.next().done?!1:!0}catch(u){return!1}}())return a;var h=new WeakMap;e.prototype.set=function(g,k){g=0===g?0:g;var m=d(this,g);m.list||(m.list=this.h[m.id]=[]);m.s?m.s.value=k:(m.s={next:this.g,v:this.g.v,head:this.g,key:g,value:k},m.list.push(m.s),this.g.v.next=m.s,this.g.v=m.s,this.size++);return this};e.prototype.delete=function(g){g=d(this,g);return g.s&&g.list?(g.list.splice(g.index,1),g.list.length||delete this.h[g.id],g.s.v.next=g.s.next,g.s.next.v=g.s.v,g.s.head=null,this.size--, 99!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.v=b();this.size=0};e.prototype.has=function(g){return!!d(this,g).s};e.prototype.get=function(g){return(g=d(this,g).s)&&g.value};e.prototype.entries=function(){return c(this,function(g){return[g.key,g.value]})};e.prototype.keys=function(){return c(this,function(g){return g.key})};e.prototype.values=function(){return c(this,function(g){return g.value})};e.prototype.forEach=function(g,k){for(var m=this.entries(),n;!(n=m.next()).done;)n=n.value, 100g.call(k,n[1],n[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var f=0;return e});function ma(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var h=c++;return{value:b(h,a[h]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}p("Array.prototype.values",function(a){return a?a:function(){return ma(this,function(b,c){return c})}});p("Array.prototype.keys",function(a){return a?a:function(){return ma(this,function(b){return b})}}); 101function v(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}p("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=v(this,b,"endsWith");void 0===c&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;0<e&&0<c;)if(d[--c]!=b[--e])return!1;return 0>=e}}); 102function na(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var h=a[e];if(b.call(c,h,e,a))return{J:e,N:h}}return{J:-1,N:void 0}}p("Array.prototype.find",function(a){return a?a:function(b,c){return na(this,b,c).N}});p("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=v(this,b,"startsWith"),e=d.length,h=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var f=0;f<h&&c<e;)if(d[c++]!=b[f++])return!1;return f>=h}}); 103p("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});p("String.prototype.repeat",function(a){return a?a:function(b){var c=v(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}}); 104p("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(g){return g};var e=[],h="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof h){b=h.call(b);for(var f=0;!(h=b.next()).done;
104)e.push(c.call(d,h.value,f++))}else for(h=b.length,f=0;f<h;f++)e.push(c.call(d,b[f],f));return e}});p("String.prototype.trimLeft",function(a){function b(){return this.replace(/^[\s\xa0]+/,"")}return a||b});p("String.prototype.trimStart",function(a){return a||String.prototype.trimLeft}); 105p("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});p("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var h=d[c];if(h===b||Object.is(h,b))return!0}return!1}});p("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==v(this,b,"includes").indexOf(b,c||0)}}); 106p("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});function oa(a){a=Math.trunc(a)||0;0>a&&(a+=this.length);if(!(0>a||a>=this.length))return this[a]}p("Array.prototype.at",function(a){return a?a:oa}); 107p("Array.prototype.copyWithin",function(a){function b(c){c=Number(c);return Infinity===c||-Infinity===c?c:c|0}return a?a:function(c,d,e){var h=this.length;c=b(c);d=b(d);e=void 0===e?h:b(e);c=0>c?Math.max(h+c,0):Math.min(c,h);d=0>d?Math.max(h+d,0):Math.min(d,h);e=0>e?Math.max(h+e,0):Math.min(e,h);if(c<d)for(;d<e;)d in this?this[c++]=this[d++]:(delete this[c++],d++);else for(e=Math.min(e,h+d-c),c+=e-d;e>d;)--e in this?this[--c]=this[e]:delete this[--c];return this}}); 108p("Array.prototype.entries",function(a){return a?a:function(){return ma(this,function(b,c){return[b,c]})}});p("Array.prototype.fill",function(a){return a?a:function(b,c,d){var e=this.length||0;0>c&&(c=Math.max(0,e+c));if(null==d||d>e)d=e;d=Number(d);0>d&&(d=Math.max(0,e+d));for(c=Number(c||0);c<d;c++)this[c]=b;return this}});p("Array.prototype.findIndex",function(a){return a?a:function(b,c){return na(this,b,c).J}}); 109p("Array.prototype.flat",function(a){return a?a:function(b){b=void 0===b?1:b;var c=[];Array.prototype.forEach.call(this,function(d){Array.isArray(d)&&0<b?(d=Array.prototype.flat.call(d,b-1),c.push.apply(c,d)):c.push(d)});return c}});p("Array.prototype.flatMap",function(a){return a?a:function(b,c){var d=[];Array.prototype.forEach.call(this,function(e,h){e=b.call(c,e,h,this);Array.isArray(e)?d.push.apply(d,e):d.push(e)});return d}});p("Array.of",function(a){return a?a:function(b){return Array.from(arguments)}}); 110p("globalThis",function(a){return a||l});p("Math.acosh",function(a){return a?a:function(b){b=Number(b);return Math.log(b+Math.sqrt(b*b-1))}});p("Math.asinh",function(a){return a?a:function(b){b=Number(b);if(0===b)return b;var c=Math.log(Math.abs(b)+Math.sqrt(b*b+1));return 0>b?-c:c}});p("Math.log1p",function(a){return a?a:function(b){b=Number(b);if(.25>b&&-.25<b){for(var c=b,d=1,e=b,h=0,f=1;h!=e;)c*=b,f*=-1,e=(h=e)+f*c/++d;return e}return Math.log(1+b)}}); 111p("Math.atanh",function(a){if(a)return a;var b=Math.log1p;return function(c){c=Number(c);return(b(c)-b(-c))/2}});p("Math.cbrt",function(a){return a?a:function(b){if(0===b)return b;b=Number(b);var c=Math.pow(Math.abs(b),1/3);return 0>b?-c:c}});p("Math.clz32",function(a){return a?a:function(b){b=Number(b)>>>0;if(0===b)return 32;var c=0;0===(b&4294901760)&&(b<<=16,c+=16);0===(b&4278190080)&&(b<<=8,c+=8);0===(b&4026531840)&&(b<<=4,c+=4);0===(b&3221225472)&&(b<<=2,c+=2);0===(b&2147483648)&&c++;return c}}); 112p("Math.cosh",function(a){if(a)return a;var b=Math.exp;return function(c){c=Number(c);return(b(c)+b(-c))/2}});p("Math.expm1",function(a){return a?a:function(b){b=Number(b);if(.25>b&&-.25<b){for(var c=b,d=1,e=b,h=0;h!=e;)c*=b/++d,e=(h=e)+c;return e}return Math.exp(b)-1}});p("Math.fround",function(a){if(a)return a;if("function"!==typeof Float32Array)return function(c){return c};var b=new Float32Array(1);return function(c){b[0]=c;return b[0]}}); 113p("Math.hypot",function(a){return a?a:function(b){if(2>arguments.length)return arguments.length?Math.abs(arguments[0]):0;var c,d,e;for(c=e=0;c<arguments.length;c++)e=Math.max(e,Math.abs(arguments[c]));if(1E100<e||1E-100>e){if(!e)return e;for(c=d=0;c<arguments.length;c++){var h=Number(arguments[c])/e;d+=h*h}return Math.sqrt(d)*e}for(c=d=0;c<arguments.length;c++)h=Number(arguments[c]),d+=h*h;return Math.sqrt(d)}});
114p("Math.imul",function(a){return a?a:function(b,c){b=Number(b);c=Number(c);var d=b&65535,e=c&65535;return d*e+((b>>>16&65535)*e+d*(c>>>16&65535)<<16>>>0)|0}});p("Math.log10",function(a){return a?a:function(b){return Math.log(b)/Math.LN10}});p("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});p("Math.sign",function(a){return a?a:function(b){b=Number(b);return 0===b||isNaN(b)?b:0<b?1:-1}}); 115p("Math.sinh",function(a){if(a)return a;var b=Math.exp;return function(c){c=Number(c);return 0===c?c:(b(c)-b(-c))/2}});p("Math.tanh",function(a){return a?a:function(b){b=Number(b);if(0===b)return b;var c=Math.exp(-2*Math.abs(b));c=(1-c)/(1+c);return 0>b?-c:c}});p("Number.EPSILON",function(){return Math.pow(2,-52)});p("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});p("Number.MIN_SAFE_INTEGER",function(){return-9007199254740991}); 116p("Number.isInteger",function(a){return a?a:function(b){return Number.isFinite(b)?b===Math.floor(b):!1}});p("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});p("Number.isSafeInteger",function(a){return a?a:function(b){return Number.isInteger(b)&&Math.abs(b)<=Number.MAX_SAFE_INTEGER}});p("Number.parseFloat",function(a){return a||parseFloat});p("Number.parseInt",function(a){return a||parseInt}); 117p("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)r(b,d)&&c.push([d,b[d]]);return c}});p("Object.fromEntries",function(a){return a?a:function(b){var c={};if(!(Symbol.iterator in b))throw new TypeError(""+b+" is not iterable");b=b[Symbol.iterator].call(b);for(var d=b.next();!d.done;d=b.next()){d=d.value;if(Object(d)!==d)throw new TypeError("iterable for fromEntries should yield objects");c[d[0]]=d[1]}return c}});p("Reflect",function(a){return a?a:{}}); 118p("Object.getOwnPropertySymbols",function(a){return a?a:function(){return[]}});p("Reflect.ownKeys",function(a){return a?a:function(b){var c=[],d=Object.getOwnPropertyNames(b);b=Object.getOwnPropertySymbols(b);for(var e=0;e<d.length;e++)("jscomp_symbol_"==d[e].substring(0,14)?b:c).push(d[e]);return c.concat(b)}});p("Object.getOwnPropertyDescriptors",function(a){return a?a:function(b){for(var c={},d=Reflect.ownKeys(b),e=0;e<d.length;e++)c[d[e]]=Object.getOwnPropertyDescriptor(b,d[e]);return c}}); 119p("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)r(b,d)&&c.push(b[d]);return c}});p("Object.hasOwn",function(a){return a?a:function(b,c){return Object.prototype.hasOwnProperty.call(b,c)}});p("Promise.allSettled",function(a){function b(d){return{status:"fulfilled",value:d}}function c(d){return{status:"rejected",reason:d}}return a?a:function(d){var e=this;d=Array.from(d,function(h){return e.resolve(h).then(b,c)});return e.all(d)}}); 120p("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});var pa="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b}; 121function qa(a,b){a.prototype=pa(b.prototype);a.prototype.constructor=a;if(t)t(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.T=b.prototype}p("AggregateError",function(a){function b(c,d){d=Error(d);"stack"in d&&(this.stack=d.stack);this.errors=c;this.message=d.message}if(a)return a;qa(b,Error);b.prototype.name="AggregateError";return b}); 122p("Promise.any",function(a){return a?a:function(b){b=b instanceof Array?b:Array.from(b);return Promise.all(b.map(function(c){return Promise.resolve(c).then(function(d){throw d;},function(d){return d})})).then(function(c){throw new AggregateError(c,"All promises were rejected");},function(c){return c})}});p("Reflect.apply",function(a){if(a)return a;var b=Function.prototype.apply;return function(c,d,e){return b.call(c,d,e)}}); 123var ta=function(){function a(){function c(){}new c;Reflect.construct(c,[],function(){});return new c instanceof c}if("undefined"!=typeof Reflect&&Reflect.construct){if(a())return Reflect.construct;var b=Reflect.construct;return function(c,d,e){c=b(c,d);e&&Reflect.setPrototypeOf(c,e.prototype);return c}}return function(c,d,e){void 0===e&&(e=c);
123e=pa(e.prototype||Object.prototype);return Function.prototype.apply.call(c,e,d)||e}}();p("Reflect.construct",function(){return ta}); 124p("Reflect.defineProperty",function(a){return a?a:function(b,c,d){try{Object.defineProperty(b,c,d);var e=Object.getOwnPropertyDescriptor(b,c);return e?e.configurable===(d.configurable||!1)&&e.enumerable===(d.enumerable||!1)&&("value"in e?e.value===d.value&&e.writable===(d.writable||!1):e.get===d.get&&e.set===d.set):!1}catch(h){return!1}}});p("Reflect.deleteProperty",function(a){return a?a:function(b,c){if(!r(b,c))return!0;try{return delete b[c]}catch(d){return!1}}}); 125p("Reflect.getOwnPropertyDescriptor",function(a){return a||Object.getOwnPropertyDescriptor});p("Reflect.getPrototypeOf",function(a){return a||Object.getPrototypeOf});function ua(a,b){for(;a;){var c=Reflect.getOwnPropertyDescriptor(a,b);if(c)return c;a=Reflect.getPrototypeOf(a)}}p("Reflect.get",function(a){return a?a:function(b,c,d){if(2>=arguments.length)return b[c];var e=ua(b,c);if(e)return e.get?e.get.call(d):e.value}});p("Reflect.has",function(a){return a?a:function(b,c){return c in b}}); 126p("Reflect.isExtensible",function(a){return a?a:"function"==typeof Object.isExtensible?Object.isExtensible:function(){return!0}});p("Reflect.preventExtensions",function(a){return a?a:"function"!=typeof Object.preventExtensions?function(){return!1}:function(b){Object.preventExtensions(b);return!Object.isExtensible(b)}}); 127p("Reflect.set",function(a){return a?a:function(b,c,d,e){var h=ua(b,c);return h?h.set?(h.set.call(3<arguments.length?e:b,d),!0):h.writable&&!Object.isFrozen(b)?(b[c]=d,!0):!1:Reflect.isExtensible(b)?(b[c]=d,!0):!1}});p("Reflect.setPrototypeOf",function(a){return a?a:t?function(b,c){try{return t(b,c),!0}catch(d){return!1}}:null}); 128p("Set",function(a){function b(c){this.g=new Map;if(c){c=q(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(q([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),h=e.next();if(h.done||h.value[0]!=c||h.value[1]!=c)return!1;h=e.next();return h.done||h.value[0]==c||4!=h.value[0].x|| 129h.value[1]!=h.value[0]?!1:e.next().done}catch(f){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]= 130b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(h){return c.call(d,h,h,e)})};return b});p("String.prototype.at",function(a){return a?a:oa});p("String.prototype.codePointAt",function(a){return a?a:function(b){var c=v(this,null,"codePointAt"),d=c.length;b=Number(b)||0;if(0<=b&&b<d){b|=0;var e=c.charCodeAt(b);if(55296>e||56319<e||b+1===d)return e;b=c.charCodeAt(b+1);return 56320>b||57343<b?e:1024*(e-55296)+b+9216}}}); 131p("String.fromCodePoint",function(a){return a?a:function(b){for(var c="",d=0;d<arguments.length;d++){var e=Number(arguments[d]);if(0>e||1114111<e||e!==Math.floor(e))throw new RangeError("invalid_code_point "+e);65535>=e?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(e>>>10&1023|55296),c+=String.fromCharCode(e&1023|56320))}return c}}); 132p("String.prototype.matchAll",function(a){return a?a:function(b){if(b instanceof RegExp&&!b.global)throw new TypeError("RegExp passed into String.prototype.matchAll() must have global tag.");var c=new RegExp(b,b instanceof RegExp?void 0:"g"),d=this,e=!1,h={next:function(){if(e)return{value:void 0,done:!0};var f=c.exec(d);if(!f)return e=!0,{value:void 0,done:!0};""===f[0]&&(c.lastIndex+=1);return{value:f,done:!1}}};h[Symbol.iterator]=function(){return h};return h}}); 133function va(a,b){a=void 0!==a?String(a):" ";return 0<b&&a?a.repeat(Math.ceil(b/a.length)).substring(0,b):""}p("String.prototype.padEnd",function(a){return a?a:function(b,c){var d=v(this,null,"padStart");return d+va(c,b-d.length)}});p("String.prototype.padStart",function(a){return a?a:function(b,c){var d=v(this,null,"padStart");return va(c,b-d.length)+d}}); 134p("String.raw",function(a){return a?a:function(b,c){if(null==b)throw new TypeError("Cannot convert undefined or null to object");for(var d=b.raw,e=d.length,h="",f=0;f<e;++f)h+=d[f],f+1<e&&f+1<arguments.length&&(h+=String(arguments[f+1]));return h}}); 135p("String.prototype.replaceAll",function(a){return a?a:function(b,c){if(b instanceof RegExp&&!b.global)throw new TypeError("String.prototype.replaceAll called with a non-global RegExp argument.");return b instanceof RegExp?this.replace(b,c):this.replace(new RegExp(String(b).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08"),"g"),c)}});p("String.prototype.trimRight",function(a){function b(){return this.replace(/[\s\xa0]+$/,"")}return a||b});
136p("String.prototype.trimEnd",function(a){return a||String.prototype.trimRight});function w(a){return a?a:oa}p("Int8Array.prototype.at",w);p("Uint8Array.prototype.at",w);p("Uint8ClampedArray.prototype.at",w);p("Int16Array.prototype.at",w);p("Uint16Array.prototype.at",w);p("Int32Array.prototype.at",w);p("Uint32Array.prototype.at",w);p("Float32Array.prototype.at",w);p("Float64Array.prototype.at",w);function x(a){return a?a:Array.prototype.copyWithin}p("Int8Array.prototype.copyWithin",x); 137p("Uint8Array.prototype.copyWithin",x);p("Uint8ClampedArray.prototype.copyWithin",x);p("Int16Array.prototype.copyWithin",x);p("Uint16Array.prototype.copyWithin",x);p("Int32Array.prototype.copyWithin",x);p("Uint32Array.prototype.copyWithin",x);p("Float32Array.prototype.copyWithin",x);p("Float64Array.prototype.copyWithin",x);function z(a){return a?a:Array.prototype.fill}p("Int8Array.prototype.fill",z);p("Uint8Array.prototype.fill",z);p("Uint8ClampedArray.prototype.fill",z); 138p("Int16Array.prototype.fill",z);p("Uint16Array.prototype.fill",z);p("Int32Array.prototype.fill",z);p("Uint32Array.prototype.fill",z);p("Float32Array.prototype.fill",z);p("Float64Array.prototype.fill",z); 139p("WeakSet",function(a){function b(c){this.g=new WeakMap;if(c){c=q(c);for(var d;!(d=c.next()).done;)this.add(d.value)}}if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(h){return!1}}())return a;b.prototype.add=function(c){this.g.set(c,!0);return this};b.prototype.has=function(c){return this.g.has(c)};b.prototype.delete=function(c){return this.g.delete(c)};return b}); 140var A=this||self;function B(a){a=a.split(".");for(var b=A,c=0;c<a.length;c++)if(b=b[a[c]],null==b)return null;return b}function wa(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function xa(a,b,c){return a.call.apply(a.bind,arguments)} 141function ya(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,d);return a.apply(b,e)}}return function(){return a.apply(b,arguments)}}function C(a,b,c){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?C=xa:C=ya;return C.apply(null,arguments)} 142function D(a,b){a=a.split(".");var c=A;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b}function E(a,b){function c(){}c.prototype=b.prototype;a.T=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.U=function(d,e,h){for(var f=Array(arguments.length-2),g=2;g<arguments.length;g++)f[g-2]=arguments[g];return b.prototype[e].apply(d,f)}}function za(a){return a};function F(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,F);else{var c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));void 0!==b&&(this.cause=b)}E(F,Error);F.prototype.name="CustomError";function H(a,b){this.g=a===Aa&&b||"";this.h=Ba}H.prototype.K=!0;H.prototype.I=function(){return this.g};function Ca(a){return a instanceof H&&a.constructor===H&&a.h===Ba?a.g:"type_error:Const"}function I(a){return new H(Aa,a)}var Ba={},Aa={};var Da={"gstatic.com":{loader:I("https://www.gstatic.com/charts/%{version}/loader.js"),debug:I("https://www.gstatic.com/charts/debug/%{version}/js/jsapi_debug_%{package}_module.js"),debug_i18n:I("https://www.gstatic.com/charts/debug/%{version}/i18n/jsapi_debug_i18n_%{package}_module__%{language}.js"),compiled:I("https://www.gstatic.com/charts/%{version}/js/jsapi_compiled_%{package}_module.js"),compiled_i18n:I("https://www.gstatic.com/charts/%{version}/i18n/jsapi_compiled_i18n_%{package}_module__%{language}.js"), 143css:I("https://www.gstatic.com/charts/%{version}/css/%{subdir}/%{filename}"),css2:I("https://www.gstatic.com/charts/%{version}/css/%{subdir1}/%{subdir2}/%{filename}"),third_party:I("https://www.gstatic.com/charts/%{version}/third_party/%{subdir}/%{filename}
143"),third_party2:I("https://www.gstatic.com/charts/%{version}/third_party/%{subdir1}/%{subdir2}/%{filename}"),third_party_gen:I("https://www.gstatic.com/charts/%{version}/third_party/%{subdir}/%{filename}")},"gstatic.cn":{loader:I("https://www.gstatic.cn/charts/%{version}/loader.js"), 144debug:I("https://www.gstatic.cn/charts/debug/%{version}/js/jsapi_debug_%{package}_module.js"),debug_i18n:I("https://www.gstatic.cn/charts/debug/%{version}/i18n/jsapi_debug_i18n_%{package}_module__%{language}.js"),compiled:I("https://www.gstatic.cn/charts/%{version}/js/jsapi_compiled_%{package}_module.js"),compiled_i18n:I("https://www.gstatic.cn/charts/%{version}/i18n/jsapi_compiled_i18n_%{package}_module__%{language}.js"),css:I("https://www.gstatic.cn/charts/%{version}/css/%{subdir}/%{filename}"), 145css2:I("https://www.gstatic.cn/charts/%{version}/css/%{subdir1}/%{subdir2}/%{filename}"),third_party:I("https://www.gstatic.cn/charts/%{version}/third_party/%{subdir}/%{filename}"),third_party2:I("https://www.gstatic.cn/charts/%{version}/third_party/%{subdir1}/%{subdir2}/%{filename}"),third_party_gen:I("https://www.gstatic.cn/charts/%{version}/third_party/%{subdir}/%{filename}")}},Ea=["default"];var Fa={"chrome-frame":{versions:{"1.0.0":{uncompressed:"CFInstall.js",compressed:"CFInstall.min.js"},"1.0.1":{uncompressed:"CFInstall.js",compressed:"CFInstall.min.js"},"1.0.2":{uncompressed:"CFInstall.js",compressed:"CFInstall.min.js"}},aliases:{1:"1.0.2","1.0":"1.0.2"}},swfobject:{versions:{"2.1":{uncompressed:"swfobject_src.js",compressed:"swfobject.js"},"2.2":{uncompressed:"swfobject_src.js",compressed:"swfobject.js"}},aliases:{2:"2.2"}},"ext-core":{versions:{"3.1.0":{uncompressed:"ext-core-debug.js", 146compressed:"ext-core.js"},"3.0.0":{uncompressed:"ext-core-debug.js",compressed:"ext-core.js"}},aliases:{3:"3.1.0","3.0":"3.0.0","3.1":"3.1.0"}},scriptaculous:{versions:{"1.8.3":{uncompressed:"scriptaculous.js",compressed:"scriptaculous.js"},"1.9.0":{uncompressed:"scriptaculous.js",compressed:"scriptaculous.js"},"1.8.1":{uncompressed:"scriptaculous.js",compressed:"scriptaculous.js"},"1.8.2":{uncompressed:"scriptaculous.js",compressed:"scriptaculous.js"}},aliases:{1:"1.9.0","1.8":"1.8.3","1.9":"1.9.0"}}, 147webfont:{versions:{"1.0.12":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.13":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.14":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.15":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.10":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.11":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.27":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.28":{uncompressed:"webfont_debug.js", 148compressed:"webfont.js"},"1.0.29":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.23":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.24":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.25":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.26":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.21":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.22":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.3":{uncompressed:"webfont_debug.js", 149compressed:"webfont.js"},"1.0.4":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.5":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.6":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.9":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.16":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.17":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.0":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.18":{uncompressed:"webfont_debug.js", 150compressed:"webfont.js"},"1.0.1":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.19":{uncompressed:"webfont_debug.js",compressed:"webfont.js"},"1.0.2":{uncompressed:"webfont_debug.js",compressed:"webfont.js"}},aliases:{1:"1.0.29","1.0":"1.0.29"}},jqueryui:{versions:{"1.8.17":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"},"1.8.16":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"},"1.8.15":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"},"1.8.14":{uncompressed:"jquery-ui.js", 151compressed:"jquery-ui.min.js"},"1.8.4":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"},"1.8.13":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"},"1.8.5":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"},"1.8.12":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"},"1.8.6":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"},"1.8.11":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"},"1.8.7":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"}, 152"1.8.10":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"},"1.8.8":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"},"1.8.9":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"},"1.6.0":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"},"1.7.0":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"},"1.5.2":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"},"1.8.0":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"},"1.7.1":{uncompressed:"jquery-ui.js", 153compressed:"jquery-ui.min.js"},"1.5.3":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"},"1.8.1":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"},"1.7.2":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"},"1.8.2":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"},"1.7.3":{uncompressed:"jquery-ui.js",compressed:"jquery-ui.min.js"}},aliases:{1:"1.8.17","1.5":"1.5.3","1.6":"1.6.0","1.7":"1.7.3","1.8":"1.8.17","1.8.3":"1.8.4"}},mootools:{versions:{"1.3.0":{uncompressed:"mootools.js", 154compressed:"mootools-yui-compressed.js"},"1.2.1":{uncompressed:"mootools.js",compressed:"mootools-yui-compressed.js"},"1.1.2":{uncompressed:"mootools.js",compressed:"mootools-yui-compressed.js"},"1.4.0":{uncompressed:"mootools.js",compressed:"mootools-yui-compressed.js"},"1.3.1":{uncompressed:"mootools.js",compressed:"mootools-yui-compressed.js"},"1.2.2":{uncompressed:"mootools.js",compressed:"mootools-yui-compressed.js"},"1.4.1":{uncompressed:"mootools.js",compressed:"mootools-yui-compressed.js"}, 155"1.3.2":{uncompressed:"mootools.js",compressed:"mootools-yui-compressed.js"},"1.2.3":{uncompressed:"mootools.js",compressed:"mootools-yui-compressed.js"},"1.4.2":{uncompressed:"mootools.js",compressed:"mootools-yui-compressed.js"},"1.2.4":{uncompressed:"mootools.js",compressed:"mootools-yui-compressed.js"},"1.2.5":{uncompressed:"mootools.js",compressed:"mootools-yui-compressed.js"},"1.1.1":{uncompressed:"mootools.js",compressed:"mootools-yui-compressed.js"}},aliases:{1:"1.1.2","1.1":"1.1.2","1.2":"1.2.5", 156"1.3":"1.3.2","1.4":"1.4.2","1.11":"1.1.1"}},yui:{versions:{"2.8.0r4":{uncompressed:"build/yuiloader/yuiloader.js",compressed:"build/yuiloader/yuiloader-min.js"},"2.9.0":{uncompressed:"build/yuiloader/yuiloader.js",compressed:"build/yuiloader/yuiloader-min.js"},"2.8.1":{uncompressed:"build/yuiloader/yuiloader.js",compressed:"build/yuiloader/yuiloader-min.js"},"2.6.0":{uncompressed:"build/yuiloader/yuiloader.js",compressed:"build/yuiloader/yuiloader-min.js"},"2.7.0":{uncompressed:"build/yuiloader/yuiloader.js", 157compressed:"build/yuiloader/yuiloader-min.js"},"3.3.0":{uncompressed:"build/yui/yui.js",compressed:"build/yui/yui-min.js"},"2.8.2r1":{uncompressed:"build/yuiloader/yuiloader.js",compressed:"build/yuiloader/yuiloader-min.js"}},aliases:{2:"2.9.0","2.6":"2.6.0","2.7":"2.7.0","2.8":"2.8.2r1","2.8.0":"2.8.0r4","2.8.2":"2.8.2r1","2.9":"2.9.0",3:"3.3.0","3.3":"3.3.0"}},prototype:{versions:{"1.6.1.0":{uncompressed:"prototype.js",compressed:"prototype.js"},"1.6.0.2":{uncompressed:"prototype.js",compressed:"prototype.js"}, 158"1.7.0.0":{uncompressed:"prototype.js",compressed:"prototype.js"},"1.6.0.3":{uncompressed:"prototype.js",compressed:"prototype.js"}}
158,aliases:{1:"1.7.0.0","1.6":"1.6.1.0","1.6.0":"1.6.0.3","1.6.1":"1.6.1.0","1.7":"1.7.0.0","1.7.0":"1.7.0.0"}},jquery:{versions:{"1.2.3":{uncompressed:"jquery.js",compressed:"jquery.min.js"},"1.2.6":{uncompressed:"jquery.js",compressed:"jquery.min.js"},"1.3.0":{uncompressed:"jquery.js",compressed:"jquery.min.js"},"1.3.1":{uncompressed:"jquery.js",compressed:"jquery.min.js"}, 159"1.3.2":{uncompressed:"jquery.js",compressed:"jquery.min.js"},"1.4.0":{uncompressed:"jquery.js",compressed:"jquery.min.js"},"1.4.1":{uncompressed:"jquery.js",compressed:"jquery.min.js"},"1.4.2":{uncompressed:"jquery.js",compressed:"jquery.min.js"},"1.4.3":{uncompressed:"jquery.js",compressed:"jquery.min.js"},"1.4.4":{uncompressed:"jquery.js",compressed:"jquery.min.js"},"1.5.0":{uncompressed:"jquery.js",compressed:"jquery.min.js"},"1.5.1":{uncompressed:"jquery.js",compressed:"jquery.min.js"},"1.5.2":{uncompressed:"jquery.js", 160compressed:"jquery.min.js"},"1.6.0":{uncompressed:"jquery.js",compressed:"jquery.min.js"},"1.6.1":{uncompressed:"jquery.js",compressed:"jquery.min.js"},"1.6.2":{uncompressed:"jquery.js",compressed:"jquery.min.js"},"1.6.3":{uncompressed:"jquery.js",compressed:"jquery.min.js"},"1.6.4":{uncompressed:"jquery.js",compressed:"jquery.min.js"},"1.7.0":{uncompressed:"jquery.js",compressed:"jquery.min.js"},"1.7.1":{uncompressed:"jquery.js",compressed:"jquery.min.js"}},aliases:{1:"1.7.1","1.2":"1.2.6","1.3":"1.3.2", 161"1.4":"1.4.4","1.5":"1.5.2","1.6":"1.6.4","1.7":"1.7.1"}},dojo:{versions:{"1.3.0":{uncompressed:"dojo/dojo.xd.js.uncompressed.js",compressed:"dojo/dojo.xd.js"},"1.4.0":{uncompressed:"dojo/dojo.xd.js.uncompressed.js",compressed:"dojo/dojo.xd.js"},"1.3.1":{uncompressed:"dojo/dojo.xd.js.uncompressed.js",compressed:"dojo/dojo.xd.js"},"1.5.0":{uncompressed:"dojo/dojo.xd.js.uncompressed.js",compressed:"dojo/dojo.xd.js"},"1.4.1":{uncompressed:"dojo/dojo.xd.js.uncompressed.js",compressed:"dojo/dojo.xd.js"}, 162"1.3.2":{uncompressed:"dojo/dojo.xd.js.uncompressed.js",compressed:"dojo/dojo.xd.js"},"1.2.3":{uncompressed:"dojo/dojo.xd.js.uncompressed.js",compressed:"dojo/dojo.xd.js"},"1.6.0":{uncompressed:"dojo/dojo.xd.js.uncompressed.js",compressed:"dojo/dojo.xd.js"},"1.5.1":{uncompressed:"dojo/dojo.xd.js.uncompressed.js",compressed:"dojo/dojo.xd.js"},"1.7.0":{uncompressed:"dojo/dojo.js.uncompressed.js",compressed:"dojo/dojo.js"},"1.6.1":{uncompressed:"dojo/dojo.xd.js.uncompressed.js",compressed:"dojo/dojo.xd.js"}, 163"1.4.3":{uncompressed:"dojo/dojo.xd.js.uncompressed.js",compressed:"dojo/dojo.xd.js"},"1.7.1":{uncompressed:"dojo/dojo.js.uncompressed.js",compressed:"dojo/dojo.js"},"1.7.2":{uncompressed:"dojo/dojo.js.uncompressed.js",compressed:"dojo/dojo.js"},"1.2.0":{uncompressed:"dojo/dojo.xd.js.uncompressed.js",compressed:"dojo/dojo.xd.js"},"1.1.1":{uncompressed:"dojo/dojo.xd.js.uncompressed.js",compressed:"dojo/dojo.xd.js"}},aliases:{1:"1.6.1","1.1":"1.1.1","1.2":"1.2.3","1.3":"1.3.2","1.4":"1.4.3","1.5":"1.5.1", 164"1.6":"1.6.1","1.7":"1.7.2"}}};var Ga={af:!0,am:!0,az:!0,ar:!0,arb:"ar",bg:!0,bn:!0,ca:!0,cs:!0,cmn:"zh",da:!0,de:!0,el:!0,en:!0,en_gb:!0,es:!0,es_419:!0,et:!0,eu:!0,fa:!0,fi:!0,fil:!0,fr:!0,fr_ca:!0,gl:!0,ka:!0,gu:!0,he:"iw",hi:!0,hr:!0,hu:!0,hy:!0,id:!0,"in":"id",is:!0,it:!0,iw:!0,ja:!0,ji:"yi",jv:!1,jw:"jv",km:!0,kn:!0,ko:!0,lo:!0,lt:!0,lv:!0,ml:!0,mn:!0,mo:"ro",mr:!0,ms:!0,nb:"no",ne:!0,nl:!0,no:!0,pl:!0,pt:"pt_br",pt_br:!0,pt_pt:!0,ro:!0,ru:!0,si:!0,sk:!0,sl:!0,sr:!0,sv:!0,sw:!0,swh:"sw",ta:!0,te:!0,th:!0,tl:"fil",tr:!0,uk:!0, 165ur:!0,vi:!0,yi:!1,zh:"zh_cn",zh_cn:!0,zh_hk:!0,zh_tw:!0,zsm:"ms",zu:!0};var Ha={1:"1.0","1.0":"current","1.1":"upcoming","1.2":"testing",41:"pre-45",42:"pre-45",43:"pre-45",44:"pre-45",46:"46.1","46.1":"46.2",48:"48.1",current:"51",upcoming:"52"};var Ia;function J(a,b){this.g=b===Ja?a:""}J.prototype.toString=function(){return this.g+""};J.prototype.K=!0;J.prototype.I=function(){return this.g.toString()};function Ka(a){return a instanceof J&&a.constructor===J?a.g:"type_error:TrustedResourceUrl"} 166function La(a,b){var c=Ca(a);if(!Ma.test(c))throw Error("Invalid TrustedResourceUrl format: "+c);a=c.replace(Na,function(d,e){if(!Object.prototype.hasOwnProperty.call(b,e))throw Error('Found marker, "'+e+'", in format str
166ing, "'+c+'", but no valid label mapping found in args: '+JSON.stringify(b));d=b[e];return d instanceof H?Ca(d):encodeURIComponent(String(d))});return Oa(a)} 167var Na=/%{(\w+)}/g,Ma=RegExp("^((https:)?//[0-9a-z.:[\\]-]+/|/[^/\\\\]|[^:/\\\\%]+/|[^:/\\\\%]*[?#]|about:blank#)","i"),Pa=/^([^?#]*)(\?[^#]*)?(#[\s\S]*)?/;function Qa(a,b,c){a=La(a,b);a=Pa.exec(Ka(a).toString());b=a[3]||"";return Oa(a[1]+Ra("?",a[2]||"",c)+Ra("#",b))}var Ja={}; 168function Oa(a){if(void 0===Ia){var b=null;var c=A.trustedTypes;if(c&&c.createPolicy){try{b=c.createPolicy("goog#html",{createHTML:za,createScript:za,createScriptURL:za})}catch(d){A.console&&A.console.error(d.message)}Ia=b}else Ia=b}a=(b=Ia)?b.createScriptURL(a):a;return new J(a,Ja)} 169function Ra(a,b,c){if(null==c)return b;if("string"===typeof c)return c?a+encodeURIComponent(c):"";for(var d in c)if(Object.prototype.hasOwnProperty.call(c,d)){var e=c[d];e=Array.isArray(e)?e:[e];for(var h=0;h<e.length;h++){var f=e[h];null!=f&&(b||(b=a),b+=(b.length>a.length?"&":"")+encodeURIComponent(d)+"="+encodeURIComponent(String(f)))}}return b};var Sa=Array.prototype.some?function(a,b){return Array.prototype.some.call(a,b,void 0)}:function(a,b){for(var c=a.length,d="string"===typeof a?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return!0;return!1};function Ta(){};function Ua(a,b){for(var c in a)b.call(void 0,a[c],c,a)}var Va="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Wa(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var h=0;h<Va.length;h++)c=Va[h],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var Xa,Ya=B("CLOSURE_FLAGS"),Za=Ya&&Ya[610401301];Xa=null!=Za?Za:!1;function $a(){var a=A.navigator;return a&&(a=a.userAgent)?a:""}var K,ab=A.navigator;K=ab?ab.userAgentData||null:null;function bb(a,b){a:{var c=(a.ownerDocument&&a.ownerDocument.defaultView||A).document;if(c.querySelector&&(c=c.querySelector("script[nonce]"))&&(c=c.nonce||c.getAttribute("nonce"))&&cb.test(c))break a;c=""}c&&a.setAttribute("nonce",c);a.src=Ka(b)}var cb=/^[\w+/_-]+[=]{0,2}$/;var db=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function eb(a,b){if(a){a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),e=null;if(0<=d){var h=a[c].substring(0,d);e=a[c].substring(d+1)}else h=a[c];b(h,e?decodeURIComponent(e.replace(/\+/g," ")):"")}}};function L(a){this.g=this.o=this.j="";this.u=null;this.m=this.h="";this.l=!1;var b;a instanceof L?(this.l=a.l,fb(this,a.j),this.o=a.o,this.g=a.g,gb(this,a.u),this.h=a.h,hb(this,ib(a.i)),this.m=a.m):a&&(b=String(a).match(db))?(this.l=!1,fb(this,b[1]||"",!0),this.o=M(b[2]||""),this.g=M(b[3]||"",!0),gb(this,b[4]),this.h=M(b[5]||"",!0),hb(this,b[6]||"",!0),this.m=M(b[7]||"")):(this.l=!1,this.i=new N(null,this.l))} 170L.prototype.toString=function(){var a=[],b=this.j;b&&a.push(O(b,jb,!0),":");var c=this.g;if(c||"file"==b)a.push("//"),(b=this.o)&&a.push(O(b,jb,!0),"@"),a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c=this.u,null!=c&&a.push(":",String(c));if(c=this.h)this.g&&"/"!=c.charAt(0)&&a.push("/"),a.push(O(c,"/"==c.charAt(0)?kb:lb,!0));(c=this.i.toString())&&a.push("?",c);(c=this.m)&&a.push("#",O(c,mb));return a.join("")}; 171L.prototype.resolve=function(a){var b=new L(this),c=!!a.j;c?fb(b,a.j):c=!!a.o;c?b.o=a.o:c=!!a.g;c?b.g=a.g:c=null!=a.u;var d=a.h;if(c)gb(b,a.u);else if(c=!!a.h){if("/"!=d.charAt(0))if(this.g&&!this.h)d="/"+d;else{var e=b.h.lastIndexOf("/");-1!=e&&(d=b.h.slice(0,e+1)+d)}e=d;if(".."==e||"."==e)d="";else if(-1!=e.indexOf("./")||-1!=e.indexOf("/.")){d=0==e.lastIndexOf("/",0);e=e.split("/");for(var h=[],f=0;f<e.length;){var g=e[f++];"."==g?d&&f==e.length&&h.push(""):".."==g?((1<h.length||1==h.length&&""!=h[0])&&h.pop(),d&&f==e.length&&h.push("")):(h.push(g),d=!0)}d=h.join("/")}else d=e}c?b.h=d:c=""!==a.i.toString();c?hb(b,ib(a.i)):c=!!a.m;c&&(b.m=a.m);return b};function fb(a,b,c){a.j=c?M(b,!0):b;a.j&&(a.j=a.j.replace(/:$/,""))}function gb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.u=b}else a.u=null}function hb(a,b,c){b instanceof N?(a.i=b,nb(a.i,a.l)):(c||(b=O(b,ob)),a.i=new N(b,a.l))} 172function M(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""}function O(a,b,c){return"string"===typeof a?(a=encodeURI(a).replace(b,pb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}
172function pb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var jb=/[#\/\?@]/g,lb=/[#\?:]/g,kb=/[#\?]/g,ob=/[#\?@]/g,mb=/#/g;function N(a,b){this.h=this.g=null;this.i=a||null;this.j=!!b} 173function P(a){a.g||(a.g=new Map,a.h=0,a.i&&eb(a.i,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))}N.prototype.add=function(a,b){P(this);this.i=null;a=Q(this,a);var c=this.g.get(a);c||this.g.set(a,c=[]);c.push(b);this.h+=1;return this};function qb(a,b){P(a);b=Q(a,b);a.g.has(b)&&(a.i=null,a.h-=a.g.get(b).length,a.g.delete(b))}function rb(a,b){P(a);b=Q(a,b);return a.g.has(b)} 174N.prototype.forEach=function(a,b){P(this);this.g.forEach(function(c,d){c.forEach(function(e){a.call(b,e,d,this)},this)},this)};function sb(a,b){P(a);var c=[];if("string"===typeof b)rb(a,b)&&(c=c.concat(a.g.get(Q(a,b))));else for(a=Array.from(a.g.values()),b=0;b<a.length;b++)c=c.concat(a[b]);return c}N.prototype.set=function(a,b){P(this);this.i=null;a=Q(this,a);rb(this,a)&&(this.h-=this.g.get(a).length);this.g.set(a,[b]);this.h+=1;return this}; 175N.prototype.get=function(a,b){if(!a)return b;a=sb(this,a);return 0<a.length?String(a[0]):b};N.prototype.toString=function(){if(this.i)return this.i;if(!this.g)return"";for(var a=[],b=Array.from(this.g.keys()),c=0;c<b.length;c++){var d=b[c],e=encodeURIComponent(String(d));d=sb(this,d);for(var h=0;h<d.length;h++){var f=e;""!==d[h]&&(f+="="+encodeURIComponent(String(d[h])));a.push(f)}}return this.i=a.join("&")};function ib(a){var b=new N;b.i=a.i;a.g&&(b.g=new Map(a.g),b.h=a.h);return b} 176function Q(a,b){b=String(b);a.j&&(b=b.toLowerCase());return b}function nb(a,b){b&&!a.j&&(P(a),a.i=null,a.g.forEach(function(c,d){var e=d.toLowerCase();if(d!=e&&(qb(this,d),qb(this,e),0<c.length)){this.i=null;d=this.g;var h=d.set;e=Q(this,e);var f=c.length;if(0<f){for(var g=Array(f),k=0;k<f;k++)g[k]=c[k];f=g}else f=[];h.call(d,e,f);this.h+=c.length}},a));a.j=b};function tb(a,b){Ua(b,function(c,d){c&&"object"==typeof c&&c.K&&(c=c.I());"style"==d?a.style.cssText=c:"class"==d?a.className=c:"for"==d?a.htmlFor=c:ub.hasOwnProperty(d)?a.setAttribute(ub[d],c):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,c):a[d]=c})} 177var ub={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function vb(a,b){b=String(b);"application/xhtml+xml"===a.contentType&&(b=b.toLowerCase());return a.createElement(b)}function wb(a){this.g=a||A.document||document};function xb(){};function yb(a,b){this.i=a;this.j=b;this.h=0;this.g=null}yb.prototype.get=function(){if(0<this.h){this.h--;var a=this.g;this.g=a.next;a.next=null}else a=this.i();return a};function zb(a,b){a.j(b);100>a.h&&(a.h++,b.next=a.g,a.g=b)};var Ab; 178function Bb(){var a=A.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&-1==$a().indexOf("Presto")&&(a=function(){var e=vb(document,"IFRAME");e.style.display="none";document.documentElement.appendChild(e);var h=e.contentWindow;e=h.document;e.open();e.close();var f="callImmediate"+Math.random(),g="file:"==h.location.protocol?"*":h.location.protocol+"//"+h.location.host;e=C(function(k){if(("*"==g||k.origin==g)&&k.data==f)this.port1.onmessage()},this); 179h.addEventListener("message",e,!1);this.port1={};this.port2={postMessage:function(){h.postMessage(f,g)}}});if("undefined"!==typeof a&&(Xa&&K&&0<K.brands.length||-1==$a().indexOf("Trident")&&-1==$a().indexOf("MSIE"))){var b=new a,c={},d=c;b.port1.onmessage=function(){if(void 0!==c.next){c=c.next;var e=c.H;c.H=null;e()}};return function(e){d.next={H:e};d=d.next;b.port2.postMessage(0)}}return function(e){A.setTimeout(e,0)}};function Cb(a){A.setTimeout(function(){throw a;},0)};function Db(){this.h=this.g=null}Db.prototype.add=function(a,b){var c=Eb.get();c.set(a,b);this.h?this.h.next=c:this.g=c;this.h=c};function Fb(){var a=Gb,b=null;a.g&&(b=a.g,a.g=a.g.next,a.g||(a.h=null),b.next=null);return b}var Eb=new yb(function(){return new Hb},function(a){return a.reset()});function Hb(){this.next=this.g=this.h=null}Hb.prototype.set=function(a,b){this.h=a;this.g=b;this.next=null};Hb.prototype.reset=function(){this.next=this.g=this.h=null};var Ib,Jb=!1,Gb=new Db;function Kb(a,b){Ib||Lb();Jb||(Ib(),Jb=!0);Gb.add(a,b)}
179function Lb(){if(A.Promise&&A.Promise.resolve){var a=A.Promise.resolve(void 0);Ib=function(){a.then(Mb)}}else Ib=function(){var b=Mb;"function"!==typeof A.setImmediate||A.Window&&A.Window.prototype&&(Xa&&K&&0<K.brands.length||-1==$a().indexOf("Edge"))&&A.Window.prototype.setImmediate==A.setImmediate?(Ab||(Ab=Bb()),Ab(b)):A.setImmediate(b)}} 180function Mb(){for(var a;a=Fb();){try{a.h.call(a.g)}catch(b){Cb(b)}zb(Eb,a)}Jb=!1};function Nb(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};function R(a){this.g=0;this.o=void 0;this.j=this.h=this.i=null;this.l=this.m=!1;if(a!=Ta)try{var b=this;a.call(void 0,function(c){S(b,2,c)},function(c){S(b,3,c)})}catch(c){S(this,3,c)}}function Ob(){this.next=this.i=this.h=this.j=this.g=null;this.l=!1}Ob.prototype.reset=function(){this.i=this.h=this.j=this.g=null;this.l=!1};var Pb=new yb(function(){return new Ob},function(a){a.reset()});function Qb(a,b,c){var d=Pb.get();d.j=a;d.h=b;d.i=c;return d} 181R.prototype.then=function(a,b,c){return Rb(this,"function"===typeof a?a:null,"function"===typeof b?b:null,c)};R.prototype.$goog_Thenable=!0;R.prototype.cancel=function(a){if(0==this.g){var b=new T(a);Kb(function(){Sb(this,b)},this)}};function Sb(a,b){if(0==a.g)if(a.i){var c=a.i;if(c.h){for(var d=0,e=null,h=null,f=c.h;f&&(f.l||(d++,f.g==a&&(e=f),!(e&&1<d)));f=f.next)e||(h=f);e&&(0==c.g&&1==d?Sb(c,b):(h?(d=h,d.next==c.j&&(c.j=d),d.next=d.next.next):Tb(c),Ub(c,e,3,b)))}a.i=null}else S(a,3,b)} 182function Vb(a,b){a.h||2!=a.g&&3!=a.g||Wb(a);a.j?a.j.next=b:a.h=b;a.j=b}function Rb(a,b,c,d){var e=Qb(null,null,null);e.g=new R(function(h,f){e.j=b?function(g){try{var k=b.call(d,g);h(k)}catch(m){f(m)}}:h;e.h=c?function(g){try{var k=c.call(d,g);void 0===k&&g instanceof T?f(g):h(k)}catch(m){f(m)}}:f});e.g.i=a;Vb(a,e);return e.g}R.prototype.A=function(a){this.g=0;S(this,2,a)};R.prototype.B=function(a){this.g=0;S(this,3,a)}; 183function S(a,b,c){if(0==a.g){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.g=1;a:{var d=c,e=a.A,h=a.B;if(d instanceof R){Vb(d,Qb(e||Ta,h||null,a));var f=!0}else if(Nb(d))d.then(e,h,a),f=!0;else{if(wa(d))try{var g=d.then;if("function"===typeof g){Xb(d,g,e,h,a);f=!0;break a}}catch(k){h.call(a,k);f=!0;break a}f=!1}}f||(a.o=c,a.g=b,a.i=null,Wb(a),3!=b||c instanceof T||Yb(a,c))}} 184function Xb(a,b,c,d,e){function h(k){g||(g=!0,d.call(e,k))}function f(k){g||(g=!0,c.call(e,k))}var g=!1;try{b.call(a,f,h)}catch(k){h(k)}}function Wb(a){a.m||(a.m=!0,Kb(a.u,a))}function Tb(a){var b=null;a.h&&(b=a.h,a.h=b.next,b.next=null);a.h||(a.j=null);return b}R.prototype.u=function(){for(var a;a=Tb(this);)Ub(this,a,this.g,this.o);this.m=!1}; 185function Ub(a,b,c,d){if(3==c&&b.h&&!b.l)for(;a&&a.l;a=a.i)a.l=!1;if(b.g)b.g.i=null,Zb(b,c,d);else try{b.l?b.j.call(b.i):Zb(b,c,d)}catch(e){$b.call(null,e)}zb(Pb,b)}function Zb(a,b,c){2==b?a.j.call(a.i,c):a.h&&a.h.call(a.i,c)}function Yb(a,b){a.l=!0;Kb(function(){a.l&&$b.call(null,b)})}var $b=Cb;function T(a){F.call(this,a)}E(T,F);T.prototype.name="cancel"; 186function U(a,b){this.l=[];this.D=a;this.C=b||null;this.j=this.i=!1;this.h=void 0;this.A=this.G=this.o=!1;this.m=0;this.g=null;this.u=0}E(U,xb);U.prototype.cancel=function(a){if(this.i)this.h instanceof U&&this.h.cancel();else{if(this.g){var b=this.g;delete this.g;a?b.cancel(a):(b.u--,0>=b.u&&b.cancel())}this.D?this.D.call(this.C,this):this.A=!0;this.i||(a=new V(this),ac(this),W(this,!1,a))}};U.prototype.B=function(a,b){this.o=!1;W(this,a,b)};function W(a,b,c){a.i=!0;a.h=c;a.j=!b;bc(a)} 187function ac(a){if(a.i){if(!a.A)throw new cc(a);a.A=!1}}function dc(a,b,c,d){a.l.push([b,c,d]);a.i&&bc(a)}U.prototype.then=function(a,b,c){var d,e,h=new R(function(f,g){e=f;d=g});dc(this,e,function(f){f instanceof V?h.cancel():d(f);return ec},this);return h.then(a,b,c)};U.prototype.$goog_Thenable=!0;function fc(a){return Sa(a.l,function(b){return"function"===typeof b[1]})}var ec={}; 188function bc(a){if(a.m&&a.i&&fc(a)){var b=a.m,c=gc[b];c&&(A.clearTimeout(c.g),delete gc[b]);a.m=0}a.g&&(a.g.u--,delete a.g);b=a.h;for(var d=c=!1;a.l.length&&!a.o;){var e=a.l.shift(),h=e[0],f=e[1];e=e[2];if(h=a.j?f:h)try{var g=h.call(e||a.C,b);g===ec&&(g=void 0);void 0!==g&&(a.j=a.j&&(g==b||g instanceof Error),a.h=b=g);if(Nb(b)||"function"===typeof A.Promise&&b instanceof A.Promise)d=!0,a.o=!0}catch(k){b=k,a.j=!0,fc(a)||(c=!0)}}a.h=b;d&&(g=C(a.B,a,!0),d=C(a.B,a,!1),b instanceof U?(dc(b,g,d),b.G=!0): 189b.then(g,d));c&&(b=new hc(b),gc[b.g]=b,a.m=b.g)}function cc(){F.call(this)}E(cc,F);cc.prototype.message="Deferred has already fired";cc.prototype.name="AlreadyCalledError";function V(){F.call(this)}E(V,F);V.prototype.message="Deferred was canceled";V.prototype.name="CanceledError";function hc(a){this.g=A.setTimeout(C(this.i,this),0);this.h=a}hc.prototype.i=function(){delete gc[this.g];throw this.h;};var gc={};function ic(a){var b;return(b=(a||document).getElementsByTagName("HEAD"))&&0!==b.length?b[0]:a.documentElement}function jc(){if(this&&this.L){var a=this.L;a&&"SCRIPT"==a.tagName&&kc(a,!0,this.M)}}function kc(a,b,c){null!=c&&A.clearTimeout(c);a.onload=function(){};a.onerror=function(){};a.onreadystatechange=function(){};b&&window.setTimeout(function(){a&&a.parentNode&&a.parentNode.removeChild(a)}
189,0)}function lc(a,b){var c="Jsloader error (code #"+a+")";b&&(c+=": "+b);F.call(this,c);this.code=a} 190E(lc,F); 191function mc(a){return Qa(a.format,a.R,a.X||{})} 192function nc(a){var b={timeout:3E4,attributes:{async:!1,defer:!1}},c=b.document||document,d=Ka(a).toString(),e=vb((new wb(c)).g,"SCRIPT"),h={L:e,M:void 0},f=new U(jc,h),g=null,k=null!=b.timeout?b.timeout:5E3;0<k&&(g=window.setTimeout(function(){kc(e,!0);var m=new lc(1,"Timeout reached for loading script "+d);ac(f);W(f,!1,m)},k),h.M=g);e.onload=e.onreadystatechange=function(){e.readyState&&"loaded"!=e.readyState&&"complete"!=e.readyState||(kc(e,b.V||!1,g),ac(f),W(f,!0,null))};e.onerror=function(){kc(e, 193!0,g);var m=new lc(0,"Error while loading script "+d);ac(f);W(f,!1,m)};h=b.attributes||{};Wa(h,{type:"text/javascript",charset:"UTF-8"});tb(e,h);bb(e,a);ic(c).appendChild(e);return f}function oc(a,b,c){c=c||{};a=Qa(a,b,c);var d=nc(a);return new Promise(function(e){dc(d,e,null)})}; 194function pc(){return new Promise(function(a){"undefined"===typeof window||"complete"===document.readyState?a():window.addEventListener?(document.addEventListener("DOMContentLoaded",a,!0),window.addEventListener("load",a,!0)):window.attachEvent?window.attachEvent("onload",a):"function"!==typeof window.onload?window.onload=a:window.onload=function(b){if(window.onload)window.onload(b);a()}})};var X="",Y="",qc,Z,rc=null,sc;function tc(a){var b=a,c,d=a.match(/^testing-/);d&&(b=b.replace(/^testing-/,""));a=b;do{if(b===Ha[b])throw Error("Infinite loop in version mapping: "+b);(c=Ha[b])&&(b=c)}while(c);c=(d?"testing-":"")+b;a="pre-45"==b?a:c;return{version:a,S:c}} 195function uc(a){var b=Da[sc].loader,c=tc(a);return oc(b,{version:c.S}).then(function(){var d=B("google.charts.loader.versionSpecific.load")||B("google.charts.loader.VersionSpecific.load")||B("google.charts.loader.publicLoad")||B("google.charts.versionSpecific.load");if(!d)throw Error("Bad version: "+a);rc=function(e){e=d(c.version,e);if(null==e||null==e.then){var h=B("google.charts.loader.publicSetOnLoadCallback")||B("google.charts.versionSpecific.setOnLoadCallback");e=new Promise(function(f){h(f)}); 196e.then=h}return e}})}function vc(a){"string"===typeof a&&(a=[a]);Array.isArray(a)&&0!==a.length||(a=Ea);var b=[];a.forEach(function(c){c=c.toLowerCase();b=b.concat(c.split(/[\s,]+\s*/))});return b}function wc(a){a=a||"";for(var b=a.replace(/-/g,"_").toLowerCase();"string"===typeof b;)a=b,b=Ga[b],b===a&&(b=!1);b||(a.match(/_[^_]+$/)?(a=a.replace(/_[^_]+$/,""),a=wc(a)):a="en");return a} 197function xc(a){a=a||"";""!==X&&X!==a&&(console.warn(" Attempting to load version '"+a+"' of Google Charts, but the previously loaded '"+(X+"' will be used instead.")),a=X);return X=a||""}function yc(a){a=a||"";""!==Y&&Y!==a&&(console.warn(" Attempting to load Google Charts for language '"+a+"', but the previously loaded '"+(Y+"' will be used instead.")),a=Y);"en"===a&&(a="");return Y=a||""}function zc(a){var b={},c;for(c in a)b[c]=a[c];return b} 198function Ac(a,b){b=zc(b);b.domain=sc;b.callback=Bc(b.callback);a=xc(a);var c=b.language;c=yc(wc(c));b.language=c;if(!qc){if(b.enableUrlSettings&&window.URLSearchParams)try{a=(new URLSearchParams(top.location.search)).get("charts-version")||a}catch(d){console.info("Failed to get charts-version from top URL",d)}qc=uc(a)}b.packages=vc(b.packages);return Z=qc.then(function(){return rc(b)})} 199function Cc(a){if(!Z)throw Error("Must call google.charts.load before google.charts.setOnLoadCallback");return a?Z.then(a):Z}D("google.charts.safeLoad",function(a){return Dc(Object.assign({},a,{safeMode:!0}))});function Dc(){var a=la.apply(0,arguments),b=0;"visualization"===a[b]&&b++;var c="current";if("string"===typeof a[b]||"number"===typeof a[b])c=String(a[b]),b++;var d={};wa(a[b])&&(d=a[b]);return Ac(c,d)}D("google.charts.load",Dc);D("google.charts.setOnLoadCallback",Cc); 200var Ec=I("https://maps.googleapis.com/maps/api/js?jsapiRedirect=true"),Fc=I("https://maps-api-ssl.google.com/maps?jsapiRedirect=true&file=googleapi"); 201function Gc(a,b,c){console.warn("Loading Maps API with the jsapi loader is deprecated.");c=c||{};a=c.key||c.client;var d=c.libraries,e=function(g){for(var k={},m=0;m<g.length;m++){var n=g[m];k[n[0]]=n[1]}return k}(c.other_params?c.other_params.split("&").map(function(g){return g.split("=")}):[]),h=Object.assign({},{key:a,W:d},e),f="2"===b?Fc:Ec;Z=new Promise(function(g){var k=Bc(c&&c.callback);oc(f,{},h).then(k).then(g)})}
201var Hc=I("https://www.gstatic.com/inputtools/js/ita/inputtools_3.js"); 202function Ic(a,b,c){wa(c)&&c.packages?(Array.isArray(c.packages)?c.packages:[c.packages]).includes("inputtools")?(console.warn('Loading "elements" with the jsapi loader is deprecated.\nPlease load '+(Hc+" directly.")),Z=new Promise(function(d){var e=Bc(c&&c.callback);oc(Hc,{},{}).then(e).then(d)})):console.error('Loading "elements" other than "inputtools" is unsupported.'):console.error("google.load of elements was invoked without specifying packages")}var Jc=I("https://ajax.googleapis.com/ajax/libs/%{module}/%{version}/%{file}"); 203function Kc(a,b){var c;do{if(a===b[a])throw Error("Infinite loop in version mapping for version "+a);(c=b[a])&&(a=c)}while(c);return a} 204function Lc(a,b,c){var d=Fa[a];if(d){b=Kc(b,d.aliases);d=d.versions[b];if(!d)throw Error("Unknown version, "+b+", of "+a+".");var e={module:a,version:b||"",file:d.compressed};b=Ka(mc({format:Jc,R:e})).toString();console.warn("Loading modules with the jsapi loader is deprecated.\nPlease load "+(a+" directly from "+b+"."));Z=new Promise(function(h){var f=Bc(c&&c.callback);oc(Jc,e).then(f).then(h)})}else setTimeout(function(){throw Error('Module "'+a+'" is not supported.');},0)} 205function Bc(a){return function(){if("function"===typeof a)a();else if("string"===typeof a&&""!==a)try{var b=B(a);if("function"!==typeof b)throw Error("Type of '"+a+"' is "+typeof b+".");b()}catch(c){throw Error("Callback of "+a+" failed with: "+c);}}}function Mc(){var a=la.apply(0,arguments);switch(a[0]){case "maps":Gc.apply(null,ea(a));break;case "elements":Ic.apply(null,ea(a));break;case "visualization":Dc.apply(null,ea(a));break;default:Lc.apply(null,ea(a))}}D("google.loader.LoadFailure",!1); 206if(sc)console.warn("Google Charts loader.js should only be loaded once.");else{Y=X="";rc=Z=qc=null;B("google.load")||(D("google.load",Mc),D("google.setOnLoadCallback",Cc));var Nc=document.getElementsByTagName("script"),Oc=(document.currentScript||Nc[Nc.length-1]).getAttribute("src"),Pc=new L(Oc),Qc=Pc.g;sc=Qc=Qc.match(/^www\.gstatic\.cn/)?"gstatic.cn":"gstatic.com";var Rc=new N(Pc.i.toString()),Sc=Rc.get("callback");if("string"===typeof Sc){var Tc=Bc(Sc);pc().then(Tc)}var Uc=Rc.get("autoload");if("string"===typeof Uc)try{if(""!==Uc)for(var Vc=JSON.parse(Uc).modules,Wc=0;Wc<Vc.length;Wc++){var Xc=Vc[Wc];Mc(Xc.name,Xc.version,Xc)}}catch(a){throw Error("Autoload failed with: "+a);}};}).call(this); 207var FrontendRegistration=function (){ 208let currentDate=new Date(); 209let eventStartDate=null; 210let eventEndDate=null; 211return { 212init: function (){ 213FrontendRegistration.actions.initCalendar(); 214if(jQuery(".wpem-matchmaking-chat-container").length){ 215var results=new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href); 216var receiver_id=results ? decodeURIComponent(results[1]):null; 217if(receiver_id){ 218setTimeout(function (){ 219var $chatItem=jQuery('.wpem-matchmaking-chat-user-list-item[data-receiver-id="' + receiver_id + '"]'); 220if($chatItem.length){ 221$chatItem.trigger('click'); 222}else{ 223console.warn('Chat user not found for receiver_id:', receiver_id); 224}}, 800); 225}} 226FrontendRegistration.actions.ToggleMeetingAvailabilityTimeSlots(); 227jQuery('#available_for_meeting').on("change", function(e){ 228FrontendRegistration.actions.ToggleMeetingAvailabilityTimeSlots(); 229}); 230jQuery(document).on("click", ".tickets_checkin",FrontendRegistration.actions.updateCheckin), jQuery(document).on("click", ".tickets_uncheckin", FrontendRegistration.actions.updateCheckin); 231jQuery(document).on("click", '.wp-view-registration-btn', function(e){ 232e.preventDefault(); 233var event_id=jQuery(this).attr('id'); 234localStorage.setItem('current_event_id', event_id); 235FrontendRegistration.actions.getAttendees(event_id, 1, true); 236}); 237jQuery('body').on('click', '.event-manager-remove-uploaded-file', function (){ 238jQuery(this).closest('.event-manager-uploaded-file').remove(); 239return false; 240}); 241jQuery('div.date-rule input[data-picker="datepicker"]').datepicker({ 242minDate: null, 243}); 244jQuery(document).on("click", ".wpem-attendee-modal-content .wpem-filter-submit .button-filter", function(e){ 245e.preventDefault(); 246var event_id=localStorage.getItem('current_event_id'); 247FrontendRegistration.actions.getAttendees(event_id, 1, false); 248});
249jQuery('.modal-toggle').on("click", function(e){ 250e.preventDefault(); 251jQuery('.wpem-attendee-modal').addClass('wpem-modal-open'); 252}); 253jQuery(document).on("click", ".wpem-attendee-modal-content .wpem-filter-submit .button-reset", function(e){ 254e.preventDefault(); 255var event_id=localStorage.getItem('current_event_id'); 256jQuery(".registration_byname").val(""); 257jQuery(".registration_status").val("").trigger("change"); 258jQuery(".attendee_status").val("").trigger("change"); 259jQuery(".registration_orderby").val("").trigger("change"); 260FrontendRegistration.actions.getAttendees(event_id); 261}); 262jQuery(document).on("click", ".wpem-registrations-pagination .wpem-pagination-link", function(e){ 263e.preventDefault(); 264var page=jQuery(this).data("paged"); 265jQuery(".wpem-registrations-pagination .wpem-pagination-link").removeClass('active disabled'); 266jQuery(this).addClass('active disabled'); 267var event_id=localStorage.getItem('current_event_id'); 268FrontendRegistration.actions.getAttendees(event_id, page); 269}); 270jQuery(document).on("submit", "#submit-match-making-form", function (e){ 271e.preventDefault(); 272FrontendRegistration.actions.submitProfileForm(); 273}); 274jQuery(document).on("submit", "#matchmaking-filter-form", function (e){ 275e.preventDefault(); 276FrontendRegistration.actions.filterAttendees(1,'all'); 277}); 278jQuery('.wpem-matchmaking-filter-reset-action').hide(); 279jQuery('.wpem-matchmaking-filter-reset-action').click(function (e){ 280e.preventDefault(); 281jQuery('#matchmaking-filter-form')[0].reset(); 282jQuery('#search_matchmaking_country, #user_interests, #user_skills').trigger('chosen:updated'); 283FrontendRegistration.actions.filterAttendees(1,'all'); 284}); 285jQuery(document).on("click", '.wpme-chat-button', function(){ 286var $btn=jQuery(this); 287var username=$btn.data('user-name'); 288var userid=$btn.data('reciever-user-id'); 289var user_email=$btn.data('user-email'); 290jQuery('#conversation-info-popup').removeClass('wpem-modal-open'); 291jQuery('.chat_email_msg').html(""); 292jQuery("#submit-match-making-contact-form")[0].reset(); 293jQuery.ajax({ 294type: 'POST', 295url: wpem_registrations_frontend.ajaxUrl, 296data: { 297action: 'wpem_chat_conversation_exists', 298receiver_id: userid, 299wpem_nonce: wpem_registrations_frontend.nonce, 300}, 301success: function (response){ 302if(response.success&&response.data.exists){ 303var redirectUrl=window.location.origin + window.location.pathname+'/?tab=chats'; 304window.location.href=redirectUrl; 305}else{ 306jQuery('.wpem-modal-header-title-text').text("Send Message " + username); 307jQuery('.user_chat_email').val(user_email); 308jQuery('.message_reciever_user_id').val(userid); 309jQuery('.attendee_chat_btn').addClass('wpem-modal-open'); 310}} 311}); 312}); 313if(window.location.search.indexOf('tab=chats')!==-1){ 314setTimeout(function(){ 315var $firstItem=jQuery('.wpem-matchmaking-chat-user-list .wpem-matchmaking-chat-user-list-item').first(); 316if($firstItem.length){ 317$firstItem.trigger('click'); 318}}, 2000); 319} 320jQuery(document).on("submit", "#submit-match-making-contact-form", function (e){ 321e.preventDefault(); 322FrontendRegistration.actions.ChatMessageFormSubmission(); 323}); 324jQuery(document).on("click", '#wpem_add_meeting_participant', function(){ 325const userId=jQuery(this).data('user-id').toString(); 326const userName=jQuery(this).data('user-name'); 327const userPhoto=jQuery(this).data('profile-pic'); 328if(!selectedParticipants.includes(userId)){ 329selectedParticipants.push(userId); 330jQuery('#selected_participant_ids').val(selectedParticipants.join(',')); 331const avatarHtml=` 332<div class="wpem-meeting-schedule-participant-avatar" data-user-id="${userId}"> 333<img class="wpem-active-participant" src="${userPhoto}" alt="${userName}" title="${userName}"> 334<span class="wpem-remove-participant-meeting"><i class="wpem-icon-close"></i></span> 335</div>`; 336jQuery(avatarHtml).insertBefore('.wpem-meeting-schedule-add-participant'); 337} 338jQuery('#participant-name').text(userName); 339jQuery('.wpem-meeting-schedule-participant-name').text(userName); 340jQuery('#meeting-request-popup').addClass('wpem-modal-open'); 341jQuery('#conversation-info-popup').removeClass('wpem-modal-open'); 342}); 343jQuery(document).on("click", '#wpem_meeting_participant', function(){ 344if(jQuery('#conversation-info-popup').hasClass('wpem-modal-open')){ 345jQuery('#conversation-info-popup').removeClass('wpem-modal-open'); 346} 347const userId=jQuery(this).data('user-id').toString(); 348const userName=jQuery(this).data('user-name'); 349const userPhoto=jQuery(this).data('profile-pic'); 350selectedParticipants.push(userId); 351jQuery('#selected_participant_ids').val(selectedParticipants); 352jQuery('.wpem-meeting-schedule-participant-avatar').remove(); 353const avatarHtml=` 354<div class="wpem-meeting-schedule-participant-avatar" data-user-id="${userId}"> 355<img class="wpem-active-participant" src="${userPhoto}" alt="${userName}" title="${userName}"> 356<span class="wpem-remove-participant-meeting"><i class="wpem-icon-close"></i></span> 357</div>`; 358jQuery(avatarHtml).insertBefore('.wpem-meeting-schedule-add-participant'); 359jQuery('#participant-name').text(userName); 360jQuery('.wpem-meeting-schedule-participant-name').text(userName); 361jQuery('#meeting-request-popup').addClass('wpem-modal-open'); 362}); 363jQuery(document).on("click", ".approve-attendee-btn", function(){ 364var id=jQuery(this).data('id'); 365FrontendRegistration.actions.AttendeeVisibilityApproved(id); 366}); 367if(jQuery('.wpem-matchmaking-filter-show-results').text()=='0 Results'){ 368jQuery('.matchmaking-list').html('<div><p class="event-manager-message wpem-alert wpem-alert-danger wpem-text-center"><i class="wpem-icon-user-check"></i> We donât have any attendees to show right now</p></div>'); 369} 370if(jQuery('.wpem-matchmaking-container').length){ 371jQuery('body').addClass('matchmaking-page'); 372} 373jQuery(document).on('click', '.pagination-number', function (e){ 374e.preventDefault();
375const page=parseInt(jQuery(this).data('page')); 376const selectedTab=jQuery('.wpem-matchmaking-tab.active').data('tab')||'all'; 377FrontendRegistration.actions.filterAttendees(page,selectedTab); 378}); 379jQuery(document).on('click', '.pagination-prev', function (e){ 380e.preventDefault(); 381let current=parseInt(jQuery('.matchmaking-pagination').data('current')); 382const selectedTab=jQuery('.wpem-matchmaking-tab.active').data('tab')||'all'; 383if(current > 1){ 384FrontendRegistration.actions.filterAttendees(current - 1, selectedTab); 385}}); 386jQuery(document).on('click', '.pagination-next', function (e){ 387e.preventDefault(); 388let current=parseInt(jQuery('.matchmaking-pagination').data('current')); 389let total=jQuery('.pagination-number').length; 390const selectedTab=jQuery('.wpem-matchmaking-tab.active').data('tab')||'all'; 391if(current < total){ 392FrontendRegistration.actions.filterAttendees(current + 1, selectedTab); 393}}); 394totalPages=parseInt(jQuery('.wpem-matchmaking-pagination').data('maxpages')); 395if(totalPages > 1){ 396var paginationHtml=FrontendRegistration.actions.generatePagination(totalPages, 1); 397jQuery('.wpem-matchmaking-pagination').html(paginationHtml).show(); 398}else{ 399jQuery('.wpem-matchmaking-pagination').empty().hide(); 400} 401if(jQuery('.wpem-matchmaking-tab.active').length===0){ 402jQuery('.wpem-matchmaking-tab.all').addClass('active'); 403} 404jQuery(document).on('click', '.wpem-matchmaking-chat-user-list-item', function (){ 405FrontendRegistration.actions.GetChatConversation(jQuery(this), true); 406}); 407jQuery(document).on('click', '.wpem-matchmaking-chat-send-message-btn', function(){ 408FrontendRegistration.actions.ChatSendMessageBtn(); 409}); 410jQuery(document).on('click', '.wpem-meeting-menu-btn', function(e){ 411e.preventDefault(); 412e.stopPropagation(); 413jQuery('.wpem-matchmaking-meeting-actions-dropdown-menu').not(jQuery(this).next()).slideUp(); 414jQuery(this).next('.wpem-matchmaking-meeting-actions-dropdown-menu').slideToggle(); 415}); 416jQuery(document).on('click', function(){ 417jQuery('.wpem-matchmaking-meeting-actions-dropdown-menu').slideUp(); 418}); 419jQuery(document).on('click', '.wpem-matchmaking-meeting-actions-dropdown-menu', function(e){ 420e.stopPropagation(); 421}); 422jQuery(document).on('click', '.wpem-meeting-accept-btn', function(){ 423FrontendRegistration.actions.AcceptMeetingRequest(jQuery(this)); 424}); 425jQuery(document).on('click', '.wpem-matchmaking-chat-detail-header-action-btn', function (e){ 426e.preventDefault(); 427var receiverId=jQuery('.wpem-matchmaking-chat-send-message-btn').data('receiver-id'); 428if(!receiverId){ 429alert('No conversation selected.'); 430return; 431} 432var $chatItem=jQuery('.wpem-matchmaking-chat-user-list-item[data-receiver-id="' + receiverId + '"]'); 433if($chatItem.length){ 434FrontendRegistration.actions.GetChatConversation($chatItem, true); 435}}); 436jQuery(document).on('click', '.cancel_meeting', function (e){ 437FrontendRegistration.actions.CancelMeeting(e); 438}); 439jQuery(document).on('click', '.edit_meeting', function (e){ 440const meetingId=jQuery(e.currentTarget).closest('.wpem-matchmaking-meeting-actions-dropdown').find('.cancel_meeting').data('meeting-id'); 441FrontendRegistration.actions.EditMeeting(e, meetingId); 442}); 443jQuery(document).on('click', '.wpem-reschedule-meeting-btn', function (e){ 444const meetingId=jQuery(this).data('meeting-id'); 445FrontendRegistration.actions.EditMeeting(e, meetingId); 446}); 447var currentMeetingStatus='upcoming'; 448function filterMeetings(status){ 449jQuery('.wpem-matchmaking-meeting-wrapper[data-meeting-status="' + status + '"]').show(); 450} 451var lastSelectedTab='#participants'; 452jQuery(document).on('click', '.tab-links a', function (e){ 453var target=jQuery(this).data('target'); 454if(!target) return; 455e.preventDefault(); 456lastSelectedTab=target; 457jQuery('.tab-links a').removeClass('active'); 458jQuery(this).addClass('active'); 459jQuery('.tab-content').hide(); 460if(target==='#participants'){ 461jQuery(target).show(); 462location.reload(); 463if(jQuery('.wpem-matchmaking-tab.your-matches').hasClass('active')){ 464FrontendRegistration.actions.YourMatches(function (){ 465jQuery(target).show(); 466}); 467}else{ 468jQuery('.wpem-matchmaking-filter-reset-action')[0].click(); 469}} 470if(target==='#meetings'){ 471jQuery(target).show(); 472filterMeetings(currentMeetingStatus); 473jQuery('.wpem-matchmaking-tab[data-status="upcoming"]').addClass('active'); 474} 475if(target==='#chats'){ 476jQuery(target).show(); 477var firstChatItem=jQuery('.wpem-matchmaking-chat-user-list-item').first(); 478if(firstChatItem.length){ 479firstChatItem.trigger('click'); 480}} 481}); 482jQuery(document).on('click', '.wpem-matchmaking-tab-filter-rights .wpem-matchmaking-tab', function (e){ 483e.preventDefault(); 484jQuery('.wpem-matchmaking-tab-filter-rights .wpem-matchmaking-tab').removeClass('active'); 485jQuery(this).addClass('active'); 486currentMeetingStatus=jQuery(this).data('status'); 487filterMeetings(currentMeetingStatus); 488}); 489jQuery(document).on('click', '.wpem-matchmaking-tab.all', function (){ 490jQuery('.wpem-matchmaking-tab').removeClass('active'); 491jQuery(this).addClass('active'); 492jQuery('#your-matches-settings').hide(); 493jQuery('#search_user_keywords').val(''); 494jQuery('#search_profession').val(''); 495jQuery('#search_matchmaking_country').val([]) .attr('data-placeholder', '') .removeAttr('data-multiple_text') .trigger('chosen:updated'); 496jQuery('#experience').val(''); 497jQuery('#user_interests').val('').trigger('change'); 498jQuery('#user_skills').val('').trigger('change'); 499jQuery('#search_event').val('').trigger('change'); 500FrontendRegistration.actions.filterAttendees(1,'all'); 501}); 502jQuery(document).on('click', '.wpem-matchmaking-tab.your-matches', function (e){ 503e.preventDefault(); 504jQuery('.wpem-matchmaking-tab').removeClass('active'); 505jQuery(this).addClass('active'); 506jQuery('#your-matches-settings').show(); 507FrontendRegistration.actions.YourMatches(e); 508}); 509filterMeetings(currentMeetingStatus); 510jQuery(document).on('change', '#meeting_start_time', function (){ 511const startTime=jQuery(this).val(); 512const disabledRange=['12:00am', startTime]; 513jQuery('#meeting_end_time').timepicker('option', { 514disableTimeRanges: [disabledRange] 515}); 516}); 517jQuery(document).on('change', '#meeting_event_id', function(){ 518if(jQuery(this).val()){ 519jQuery('#meeting_fields').slideDown(); 520const selected=jQuery(this).find('option:selected'); 521const startDateStr=selected.data('start'); 522const endDateStr=selected.data('end'); 523if(startDateStr&&endDateStr){ 524const minDate=new Date(startDateStr); 525const maxDate=new Date(endDateStr); 526const startTime=startDateStr.split(' ')[1].substring(0, 5); 527const endTime=endDateStr.split(' ')[1].substring(0, 5); 528jQuery('#meeting_date').datepicker('destroy').datepicker({ 529dateFormat: 'yy-mm-dd', 530changeMonth: true, 531changeYear: true, 532minDate: minDate, 533maxDate: maxDate 534}); 535jQuery('#meeting_start_time, #meeting_end_time').timepicker('option', { 536minTime: startTime, 537maxTime: endTime 538}); 539}}else{
540jQuery('#meeting_fields').slideUp(); 541}}); 542jQuery(document).on('click', '.wpem_meeting_availability_btn', function(){ 543jQuery('#availability_meeting_event_id').val(''); 544jQuery('.wpem-availability-meetings-date-list').html(''); 545jQuery('.availability_setting_update_msg').hide(); 546jQuery('.attendee-create-meeting').addClass('wpem-modal-open'); 547}); 548jQuery(document).on('click', '.wpem-availability-meetings-time-slot-item input[type="checkbox"][data-booked="1"]', function (e){ 549e.preventDefault(); 550return false; 551}); 552jQuery(document).on('submit', '#availability_form', function (e){ 553e.preventDefault(); 554FrontendRegistration.actions.SavedAvailability(this); 555}); 556let selectedParticipants=[]; 557const participantLimit=parseInt(jQuery('#meeting-request-popup').data('participant-limit')); 558function updateSelectedParticipants(){ 559const existing=jQuery('#selected_participant_ids').val(); 560selectedParticipants=existing ? existing.split(',').map(id=> id.trim()):[]; 561} 562function updateUIState(){ 563jQuery('#selected_participant_ids').val(selectedParticipants.join(',')); 564if(selectedParticipants.length >=participantLimit){ 565jQuery('.wpem-participant-limit-msg').show().text(`Maximum ${participantLimit} participants reached`); 566jQuery('.wpem-meeting-schedule-add-participant').prop('disabled', true); 567jQuery('.wpem-meeting-schedule-participant-dropdown').hide(); 568}else{ 569jQuery('.wpem-participant-limit-msg').hide(); 570jQuery('.wpem-meeting-schedule-add-participant').prop('disabled', false); 571}} 572updateSelectedParticipants(); 573updateUIState(); 574jQuery(document).on('click', '.wpem-meeting-schedule-participant-dropdown-list-item', function(){ 575const $this=jQuery(this); 576const userId=$this.data('user-id').toString(); 577const userName=$this.find('span').text(); 578const userAvatar=$this.find('img').attr('src'); 579if(selectedParticipants.includes(userId)) return; 580if(selectedParticipants.length >=participantLimit) return; 581selectedParticipants.push(userId); 582const avatarHtml=` 583<div class="wpem-meeting-schedule-participant-avatar" data-user-id="${userId}"> 584<img class="wpem-active-participant" src="${userAvatar}" alt="${userName}" title="${userName}"> 585<span class="wpem-remove-participant-meeting"><i class="wpem-icon-close"></i></span> 586</div>`; 587jQuery(avatarHtml).insertBefore('.wpem-meeting-schedule-add-participant'); 588$this.attr('style', 'display:none !important'); 589updateUIState(); 590}); 591jQuery(document).on('click', '.wpem-remove-participant-meeting', function(e){ 592e.stopPropagation(); 593const $wrapper=jQuery(this).closest('.wpem-meeting-schedule-participant-avatar'); 594const userId=$wrapper.data('user-id').toString(); 595selectedParticipants=selectedParticipants.filter(id=> id!==userId); 596$wrapper.remove(); 597jQuery(`.wpem-meeting-schedule-participant-dropdown-list-item[data-user-id="${userId}"]`).removeAttr('style'); 598updateUIState(); 599}); 600jQuery(document).on('click', '.wpem-meeting-schedule-add-participant', function(e){ 601e.stopPropagation();
602selectedParticipants.forEach(userId=> { 603jQuery(`.wpem-meeting-schedule-participant-dropdown-list-item[data-user-id="${userId}"]`).attr('style', 'display:none !important'); 604}); 605if(selectedParticipants.length >=participantLimit) return; 606jQuery('.wpem-meeting-schedule-participant-dropdown').toggle(); 607}); 608jQuery(document).on('click', function(e){ 609if(!jQuery(e.target).closest('.wpem-meeting-schedule-participant-dropdown').length && 610!jQuery(e.target).hasClass('wpem-meeting-schedule-add-participant')){ 611jQuery('.wpem-meeting-schedule-participant-dropdown').hide(); 612}}); 613jQuery(document).on('click', '.wpem-meeting-schedule-participant-close', function (e){ 614e.preventDefault(); 615jQuery('.wpem-meeting-schedule-participant-dropdown').hide(); 616}); 617jQuery(document).on('click', '.wpem-remove-participant-meeting', function (){ 618const $wrapper=jQuery(this).closest('.wpem-meeting-schedule-participant-avatar'); 619const userId=$wrapper.data('user-id').toString(); 620selectedParticipants=selectedParticipants.filter(id=> id!==userId); 621jQuery('#selected_participant_ids').val(selectedParticipants.join(',')); 622jQuery(`.wpem-meeting-schedule-participant-dropdown-list-item[data-user-id="${userId}"]`) 623.removeAttr('style'); 624$wrapper.remove(); 625}); 626const $calendarBody=jQuery('.wpem-meeting-schedule-calendar-table tbody'); 627const $monthLabel=jQuery('.wpem-meeting-schedule-datepicker-current'); 628jQuery(document).on('click', '.calendar-day-container', function (){ 629const $dayNumber=jQuery(this).find('.day-number'); 630if($dayNumber.length===0) return; 631if($dayNumber.css('pointer-events')==='none') return; 632const dateNum=parseInt($dayNumber.text()); 633const monthYear=jQuery('.wpem-meeting-schedule-datepicker-current').text().trim(); 634const formattedDate=moment(`${monthYear} ${dateNum}`, 'MMMM YYYY DD').format('YYYY-MM-DD'); 635jQuery('#selected_meeting_date').val(formattedDate); 636jQuery('.calendar-day-container').removeClass('active-date'); 637jQuery(this).addClass('active-date'); 638const eventId=jQuery('#meeting_create_event_id').val(); 639const participants=getSelectedParticipantIds(); 640if(eventId&&formattedDate&&participants.length > 0){ 641FrontendRegistration.actions.ShowCommonMeetingSlots(eventId, formattedDate, participants); 642}}); 643jQuery(document).on('click', '.wpem-meeting-schedule-datepicker-prev', function (){ 644currentDate.setMonth(currentDate.getMonth() - 1); 645FrontendRegistration.actions.renderCalendar(currentDate); 646}); 647jQuery(document).on('click', '.wpem-meeting-schedule-datepicker-next', function (){ 648currentDate.setMonth(currentDate.getMonth() + 1); 649FrontendRegistration.actions.renderCalendar(currentDate); 650}); 651function getSelectedParticipantIds(){ 652var ids=jQuery('#selected_participant_ids').val(); 653if(!ids) return []; 654return ids.split(',').map(function (id){ 655return parseInt(id.trim(), 10); 656}).filter(Boolean); 657} 658jQuery(document).on('click', '.wpem-meeting-schedule-participant-dropdown-list-item', function (){ 659var userId=jQuery(this).data('user-id'); 660var existing=jQuery('.wpem-meeting-schedule-participant[data-user-id="' + userId + '"]'); 661if(existing.length===0){ 662var avatar=jQuery(this).find('img').attr('src'); 663var name=jQuery(this).find('span').text(); 664var html='<div class="wpem-meeting-schedule-participant wpem-d-flex wpem-align-items-center wpem-justify-content-center wpem-mb-1" data-user-id="' + userId + '">' + 665'<div class="wpem-meeting-schedule-participant-avatar">' + 666'<img class="wpem-active-participant" src="' + avatar + '" alt="' + name + '">' + 667'<span class="wpem-remove-participant-meeting"><i class="wpem-icon-close"></i></span>' + 668'</div>' + 669'</div>'; 670jQuery('.wpem-meeting-schedule-participant-add-participant').before(html); 671} 672var updatedIds=getSelectedParticipantIds(); 673updatedIds.push(userId); 674updatedIds=Array.from(new Set(updatedIds)); 675jQuery('#selected_participant_ids').val(updatedIds.join(',')); 676var eventId=jQuery('#meeting_create_event_id').val(); 677var date=jQuery('#selected_meeting_date').val(); 678if(eventId&&date&&updatedIds.length > 0){ 679FrontendRegistration.actions.ShowCommonMeetingSlots(eventId, date, updatedIds); 680}}); 681jQuery(document).on('click', '.wpem-remove-participant-meeting', function (){ 682var removedUserId=jQuery(this).closest('.wpem-meeting-schedule-participant').data('user-id'); 683jQuery(this).closest('.wpem-meeting-schedule-participant').remove(); 684var updatedIds=getSelectedParticipantIds().filter(function (id){ 685return id!==removedUserId; 686}); 687jQuery('#selected_participant_ids').val(updatedIds.join(',')); 688var eventId=jQuery('#meeting_create_event_id').val(); 689var date=jQuery('#selected_meeting_date').val(); 690if(eventId&&date&&updatedIds.length > 0){ 691FrontendRegistration.actions.ShowCommonMeetingSlots(eventId, date, userIds); 692}}); 693jQuery(document).on('change', 'input[name="time_slot"]', function (){ 694var selectedSlot=jQuery(this).val(); 695jQuery('#selected_time_slot').val(selectedSlot); 696}); 697jQuery(document).on('click', '.wpem-send-meeting-request', function(){ 698FrontendRegistration.actions.CreateMeetingRequestSubmit(); 699}); 700jQuery('#chat-file-upload').on('change', function (){ 701const file=this.files[0]; 702if(file){ 703const fileName=file.name; 704const $textarea=jQuery('.wpem-matchmaking-chat-send-message-textarea'); 705let currentText=$textarea.val();
706$textarea.val(currentText + (currentText ? '\n':'') + fileName); 707}}); 708jQuery(document).on('click', '.wpem_conversation_info', function (){ 709FrontendRegistration.actions.ConversationInfoBtn(this); 710}); 711jQuery(document).on('click', '.wpem-matchmaking-tab[data-status]', function(e){ 712e.preventDefault(); 713var targetStatus=jQuery(this).data('status'); 714jQuery('.wpem-matchmaking-tab').removeClass('active'); 715jQuery(this).addClass('active'); 716jQuery('.wpem-meetings-status-container').hide(); 717jQuery('.wpem-meetings-status-container[data-status="' + targetStatus + '"]').show(); 718}); 719jQuery(document).on('change', '.check-all-slots', function (){ 720const container=jQuery(this).closest('.wpem-availability-meetings-date-item-body'); 721const isChecked=jQuery(this).is(':checked'); 722container.find('.wpem-availability-meetings-time-slot-item input[type="checkbox"]').prop('checked', isChecked); 723}); 724jQuery(document).on('change', '.wpem-availability-meetings-time-slot-item input[type="checkbox"]', function (){ 725const container=jQuery(this).closest('.wpem-availability-meetings-date-item-body'); 726const allCheckboxes=container.find('.wpem-availability-meetings-time-slot-item input[type="checkbox"]'); 727const allChecked=allCheckboxes.length===allCheckboxes.filter(':checked').length; 728container.find('.check-all-slots').prop('checked', allChecked); 729}); 730jQuery('#user-profile-settings-form').on('submit', function (e){ 731e.preventDefault(); 732FrontendRegistration.actions.SaveUserProfileSettings(); 733}); 734jQuery(document).on('input', '#participantSearch', function (){ 735FrontendRegistration.actions.SearchMeetingParticipants(this); 736}); 737FrontendRegistration.actions.toggleTimezoneDropdown(); 738jQuery('input[name="timezone_settings"]').on('change', function(){ 739FrontendRegistration.actions.toggleTimezoneDropdown(); 740}); 741jQuery(document).on('change', 'input[name="match_filter"]', FrontendRegistration.actions.YourMatches); 742jQuery(document).on('click', '.wpem-matchmaking-chat-user-list-header-add-conversation-btn', function(){ 743jQuery('.wpem-add-new-conversation-participant-modal').addClass('wpem-modal-open'); 744}); 745jQuery(document).on('change', '#new_receiver_id', function (){ 746let new_receiver_id=jQuery(this).val(); 747jQuery('#message_reciever_user_id').val(new_receiver_id); 748}); 749jQuery(document).on("submit", "#submit-add-new-conversation", function (e){ 750e.preventDefault(); 751FrontendRegistration.actions.AddNewConverasation(e, jQuery(this)); 752}); 753jQuery("#wpem-matchmaking-filter-action").click(function(){ 754jQuery("#wpem-matchmaking-filter-dropdown").toggle(); 755}); 756jQuery('.wpem-tab-button').on('click', function(){ 757var target=jQuery(this).data('tab'); 758jQuery('.wpem-tab-button').removeClass('wpem-tab-active'); 759jQuery('.wpem-tab-content').removeClass('wpem-tab-active'); 760jQuery(this).addClass('wpem-tab-active'); 761jQuery('#' + target).addClass('wpem-tab-active'); 762}); 763jQuery(".wpem-matchmaking-chat-mobile-device-back-btn").click(function(){ 764jQuery(".wpem-matchmaking-chat-wrapper").removeClass("active"); 765}); 766jQuery(document).on('click', '.delete_meeting', function (e){ 767FrontendRegistration.actions.DeleteMeeting(e); 768}); 769}, 770actions: { 771initCalendar: function (){ 772if(typeof moment==='undefined'){ 773return; 774} 775const currentDate=moment(); 776const monthYear=currentDate.format('MMMM YYYY'); 777jQuery('#calendar-month-label').text(monthYear); 778const prevBtn=document.querySelector('.wpem-meeting-schedule-datepicker-prev'); 779const nextBtn=document.querySelector('.wpem-meeting-schedule-datepicker-next'); 780prevBtn.addEventListener('click', ()=> { 781currentDate.subtract(1, 'month'); 782this.renderCalendar(currentDate); 783}); 784nextBtn.addEventListener('click', ()=> { 785currentDate.add(1, 'month'); 786this.renderCalendar(currentDate); 787}); 788this.renderCalendar(currentDate); 789}, 790renderCalendar: function (date){ 791const momentDate=moment(date); 792const year=momentDate.year(); 793const month=momentDate.month(); 794const firstDay=new Date(year, month, 1).getDay(); 795const daysInMonth=new Date(year, month + 1, 0).getDate(); 796const monthLabel=document.querySelector('.wpem-meeting-schedule-datepicker-current'); 797const calendarBody=document.querySelector('.wpem-meeting-schedule-calendar-table tbody'); 798const monthNames=["January", "February", "March", "April", "May", "June",
799"July", "August", "September", "October", "November", "December"]; 800monthLabel.textContent=`${monthNames[month]} ${year}`; 801calendarBody.innerHTML=''; 802let row=document.createElement('tr'); 803for (let i=0; i < firstDay; i++){ 804row.appendChild(document.createElement('td')); 805} 806for (let day=1; day <=daysInMonth; day++){ 807const cell=document.createElement('td'); 808cell.className='calendar-day-container'; 809const div=document.createElement('div'); 810div.className='day-number'; 811div.textContent=day; 812const today=new Date(); 813const cellDate=new Date(year, month, day); 814if(day===today.getDate() && 815month===today.getMonth() && 816year===today.getFullYear() 817){ 818cell.classList.add('today'); 819} 820if(cellDate < new Date(today.getFullYear(), today.getMonth(), today.getDate())){ 821cell.classList.add('disabled'); 822cell.style.pointerEvents='none'; 823cell.style.opacity='0.5'; 824} 825cell.appendChild(div); 826row.appendChild(cell); 827if((row.children.length % 7)===0){ 828calendarBody.appendChild(row); 829row=document.createElement('tr'); 830}} 831if(row.children.length > 0){ 832while (row.children.length < 7){ 833row.appendChild(document.createElement('td')); 834} 835calendarBody.appendChild(row); 836}}, 837updateCheckin: function (t){ 838jQuery(this).closest("span").add(jQuery(this).closest("td").find(".registration-checkin-hidden")).toggleClass("registration-checkin-hidden"); 839var e=jQuery(this).data("value"), 840i=jQuery(this).data("post-id"), 841n=localStorage.getItem('current_event_id'); 842s=jQuery(this).data("source"); 843jQuery.ajax({ 844type: "POST", 845url: wpem_registrations_frontend.ajaxUrl, 846data: { 847check_in_value: e, 848registration_id: i, 849event_id: n, 850source: s, 851action: "update_event_registration_checkin_data" 852}, 853beforeSend: function (t, e){}, 854success: function (t){ 855jQuery(".check_in_total").html(t); 856}, 857error: function (t, e, i){}, 858complete: function (t, e){}, 859}), 860t.preventDefault(); 861}, 862getAttendees: function(event_id, page=1, open_modal=true){ 863var registration_byname=jQuery(".registration_byname").val(); 864var registration_status=jQuery(".registration_status").val(); 865var attendee_status=jQuery(".attendee_status").val(); 866var registration_orderby=jQuery(".registration_orderby").val(); 867jQuery('.wpem-attendee-modal').addClass('wpem-modal-open'); 868jQuery(".wpem-attendee-modal-content").html("<p class='loading-text'>Loading...</p>"); 869jQuery.ajax({ 870type: "get", 871url: wpem_registrations_frontend.ajaxUrl, 872data: { 873action: 'get_event_attendees', 874event_id: event_id, 875registration_byname: registration_byname, 876registration_status: registration_status, 877attendee_status: attendee_status, 878registration_orderby: registration_orderby, 879paged: page, 880wpem_nonce: wpem_registrations_frontend.nonce 881}, 882success: function(response){ 883jQuery(".wpem-attendee-modal-content").html(response.html); 884jQuery('.wpem-attendee-modal').addClass('wpem-modal-open'); 885}}); 886}, 887submitProfileForm: function (){ 888var form=jQuery("#submit-match-making-form"); 889var formData=form.serialize(); 890formData +="&action=submit_match_making_profile"; 891jQuery.ajax({ 892type: "POST", 893url: wpem_registrations_frontend.ajaxUrl, 894data: formData, 895dataType: "json", 896beforeSend: function (){ 897form.find("input[type='submit']").prop("disabled", true).val("Submitting..."); 898}, 899success: function (response){ 900if(response.success){ 901const url=new URL(window.location.href); 902url.searchParams.delete('action'); 903window.location.href=url.toString(); 904}else{ 905jQuery('html, body').animate({ 906scrollTop: 0 907}, 1000); 908jQuery('.wpem-alert-success').show().text(response.data.message).css({'color': '#721c24','background-color': '#f8d7da','border-color': '#f5c6cb'}); 909}}, 910error: function (){ 911alert("An error occurred. Please try again."); 912}, 913complete: function (){ 914form.find("input[type='submit']").prop("disabled", false).val("Submit"); 915}}); 916}, 917filterAttendees: function (page=1){ 918jQuery("#matchmaking-filter-form").show(); 919if(typeof page!=='number'||isNaN(page)){ 920page=1; 921} 922let form=jQuery('#matchmaking-filter-form'); 923let currentPage=parseInt(jQuery('.matchmaking-pagination .current-page').val()||1); 924let perPage=jQuery('.matchmaking-list').data('per-page'); 925let experienceValue=form.find('#experience').val(); 926let experienceRange={}; 927if(experienceValue==="entry"){ 928experienceRange={ min: 0, max: 2 };}else if(experienceValue==="mid"){ 929experienceRange={ min: 3, max: 5 };}else if(experienceValue==="senior"){ 930experienceRange={ min: 6, max: 100 };}
931let matchMode=jQuery('input[name="match_filter"]:checked').val()||'exact'; 932var filters={ 933name: form.find('#search_user_keywords').val(), 934profession: form.find('#search_profession').val(), 935country: form.find('#search_matchmaking_country').val(), 936experience: experienceRange, 937interests: form.find('#user_interests').val(), 938skills: form.find('#user_skills').val(), 939event_id: form.find('#search_event').val(), 940match_mode: matchMode, 941}; 942jQuery.ajax({ 943url: wpem_registrations_frontend.ajaxUrl, 944type: 'POST', 945data: { 946action: 'wpem_get_match_making_filter_user', 947wpem_nonce: wpem_registrations_frontend.nonce, 948filters: filters, 949page: page, 950per_page: perPage 951}, 952beforeSend: function (){ 953jQuery('.matchmaking-list').css('position', 'relative'); 954jQuery('.matchmaking-list').append('<div class="loader-overlay" style="position:absolute;top:0;left:0;width:100%;height: 400px;background:rgba(255,255,255,0.6);display:flex;justify-content:center;align-items:center;z-index:99;"><i class="fa fa-spinner fa-spin fa-2x"></i></div>'); 955jQuery('.matchmaking-list').children().not('.loader-overlay').css('filter', 'blur(3px)'); 956}, 957success: function (response){ 958if(response.success==true){ 959jQuery('.matchmaking-list .loader-overlay').remove(); 960jQuery("#wpem-matchmaking-filter-dropdown").slideUp(); 961const tempHTML=jQuery('<div>').html(response.data.html); 962const updatedList=tempHTML.find('.matchmaking-list'); 963jQuery('.matchmaking-list').replaceWith(updatedList); 964const isFilterActive = 965(filters.name&&filters.name.trim()!=='') || 966(filters.profession&&filters.profession.trim()!=='') || 967(Array.isArray(filters.country)&&filters.country.length > 0) || 968(Array.isArray(filters.skills)&&filters.skills.length > 0) || 969(Array.isArray(filters.interests)&&filters.interests.length > 0) || 970(filters.experience&&Object.keys(filters.experience).length > 0) || 971(filters.event_id&&filters.event_id.toString().trim()!==''); 972if(isFilterActive){ 973jQuery('.wpem-matchmaking-filter-reset-action').show(); 974}else{ 975jQuery('.wpem-matchmaking-filter-reset-action').hide(); 976} 977jQuery("#search_event").val(filters.event_id); 978if(jQuery.trim(jQuery('.wpem-matchmaking-lists').html())===''){ 979jQuery('.wpem-matchmaking-lists').html('<p>No users found.</p>'); 980} 981jQuery("#search_user_keywords").val(filters.name); 982jQuery("#search_profession").val(filters.profession); 983jQuery("#experience").val(experienceValue); 984jQuery('.wpem-matchmaking-filter-show-results').text(response.data.total_users + ' Results'); 985if(response.data.total_users > perPage){ 986let paginationHTML=FrontendRegistration.actions.generatePagination(response.data.total_pages, response.data.current_page); 987jQuery('.wpem-matchmaking-pagination').html(paginationHTML); 988}else{ 989jQuery('.wpem-matchmaking-pagination').empty(); 990} 991if(response.data.total_users===0||jQuery.trim(jQuery('.matchmaking-list').html())===''){ 992jQuery('.matchmaking-list').html('<div><p class="event-manager-message wpem-alert wpem-alert-danger wpem-text-center"><i class="wpem-icon-user-check"></i> There are no Attendees found with your match</p></div>'); 993jQuery('.wpem-matchmaking-filter-show-results').text('0 Results'); 994} 995jQuery('.wpem-matchmaking-container .wpem-matchmaking-main-header').remove(); 996jQuery('.wpem-matchmaking-tab').removeClass('active'); 997jQuery('.wpem-matchmaking-tab[data-tab="all"]').addClass('active'); 998jQuery("#search_matchmaking_country").val(filters.country).chosen().trigger("chosen:updated"); 999jQuery("#user_interests").val(filters.interests).chosen().trigger("chosen:updated"); 1000jQuery("#user_skills").val(filters.skills).chosen().trigger("chosen:updated"); 1001}else{ 1002jQuery('.matchmaking-list .loader-overlay').remove(); 1003jQuery('.matchmaking-list').children().css('filter', ''); 1004jQuery('.wpem-matchmaking-filter-show-results').text('0 Results'); 1005jQuery('.matchmaking-list').html('<div><p class="event-manager-message wpem-alert wpem-alert-danger wpem-text-center"><i class="wpem-icon-user-check"></i> ' + response.data.message + '</p></div>'); 1006}} 1007}); 1008}, 1009ChatMessageFormSubmission:function (e){ 1010var form=jQuery("#submit-match-making-contact-form"); 1011var formData=form.serialize(); 1012var receiver_id=jQuery('#message_reciever_user_id').val(); 1013jQuery.ajax({ 1014type: "POST", 1015url: wpem_registrations_frontend.ajaxUrl, 1016data: formData + "&action=wpem_send_matchmaking_user_message", 1017beforeSend: function (){ 1018jQuery('#submit-match-making-form').val("Sending...").prop("disabled", true); 1019}, 1020success: function (response){ 1021if(receiver_id!=null||receiver_id!=undefined||receiver_id!=''||receiver_id!=0){ 1022var redirectUrl=window.location.origin + window.location.pathname+'/?tab=chats'; 1023if(receiver_id){ 1024redirectUrl +="&receiver_id=" + receiver_id; 1025} 1026window.location.href=redirectUrl; 1027$chatUserItem=jQuery('.wpem-matchmaking-chat-user-list-item[data-receiver-id="' + receiver_id + '"]'); 1028}else{ 1029$chatUserItem=jQuery('.wpem-matchmaking-chat-user-list-item').first(); 1030} 1031if($chatUserItem.length){ 1032$chatUserItem.trigger('click'); 1033} 1034jQuery("#submit-match-making-contact-form")[0].reset(); 1035jQuery('.attendee_chat_btn').removeClass('wpem-modal-open'); 1036jQuery('[data-target="#chats"]').addClass('active').trigger('click'); 1037setTimeout(function (){ 1038var $firstChatItem=jQuery('.wpem-matchmaking-chat-user-list-item').first(); 1039var receiverId=$firstChatItem.data('receiver-id'); 1040if($firstChatItem.length&&receiverId){ 1041$firstChatItem.trigger('click'); 1042}else{ 1043console.warn('No chat user found or missing receiver ID.'); 1044}}, 1000); 1045}}); 1046}, 1047AddNewConverasation:function(e, form){ 1048e.preventDefault(); 1049let formData=form.serialize(); 1050jQuery.ajax({ 1051type: "POST", 1052url: wpem_registrations_frontend.ajaxUrl, 1053data: formData, 1054beforeSend: function (){ 1055jQuery('.wpem-matchmaking-new-chat-send-message-btn').text("Sending...").prop("disabled", true); 1056}, 1057success: function (response){ 1058if(response.success){ 1059form[0].reset(); 1060jQuery('.wpem-matchmaking-new-chat-send-message-btn').text("Send Message").prop("disabled", false); 1061jQuery('.wpem-add-new-conversation-participant-modal').removeClass('wpem-modal-open'); 1062location.reload(); 1063}else{ 1064alert("Error: " + response.data); 1065jQuery('.wpem-matchmaking-new-chat-send-message-btn').text("Send Message").prop("disabled", false); 1066}}, 1067error: function(xhr, status, error){ 1068alert("AJAX Error: " + error); 1069jQuery('.wpem-matchmaking-new-chat-send-message-btn').text("Send Message").prop("disabled", false); 1070}}); 1071}, 1072AttendeeVisibilityApproved:function(id){ 1073var $this=jQuery('#approve_attendee_' + id); 1074var registrationId=id; 1075var isApproved=$this.hasClass("approved") ? 1:0; 1076var userId=$this.data('user-id'); 1077var email=$this.data('email'); 1078var newApproved=isApproved ? 0:1; 1079var newText=newApproved ? "Disapprove":"Approve"; 1080var newTooltip=newApproved ? wpem_registrations_frontend.declineTooltip:wpem_registrations_frontend.approveTooltip; 1081var newClass=newApproved ? "approved":"disapproved"; 1082var oldClass=newApproved ? "disapproved":"approved"; 1083jQuery('.approve-attendee-btn').each(function(){ 1084var $btn=jQuery(this); 1085if($btn.data('user-id')===userId||$btn.data('email')===email){ 1086$btn.text(newText).removeClass(oldClass).addClass(newClass); 1087}}); 1088jQuery.ajax({ 1089url: wpem_registrations_frontend.ajaxUrl, 1090type: "POST", 1091data: { 1092action: "toggle_attendee_matchmaking_approval", 1093registration_id: registrationId, 1094approved: newApproved 1095}, 1096success: function(response){ 1097if(response.success){ 1098}else{ 1099console.error("Error:", response.data); 1100}}, 1101error: function(){ 1102alert("Something went wrong! Please try again."); 1103}}); 1104}, 1105generatePagination: function(totalPages, currentPage){ 1106let html='<nav class="event-manager-pagination-2">'; 1107html +='<ul class="matchmaking-pagination page-numbers" data-current="' + currentPage + '" data-total="' + totalPages + '">'; 1108if(currentPage > 1){ 1109html +='<li><a class="pagination-prev page-numbers prev" href="#" data-page="' + (currentPage - 1) + '">â</a></li>'; 1110} 1111for (let i=1; i <=totalPages; i++){ 1112let activeClass=i===currentPage ? 'active current':'';
1113html +='<li><a class="pagination-number page-numbers ' + activeClass + '" href="#" data-page="' + i + '">' + i + '</a></li>'; 1114} 1115if(currentPage < totalPages){ 1116html +='<li><a class="pagination-next page-numbers next" href="#" data-page="' + (currentPage + 1) + '">â</a></li>'; 1117} 1118html +='</ul>'; 1119html +='</nav>'; 1120return html; 1121}, 1122YourMatches: function (e, page=1){ 1123jQuery("#matchmaking-filter-form").hide(); 1124if(typeof page!=='number'||isNaN(page)){ 1125page=1; 1126} 1127let perPage=jQuery('.matchmaking-list').data('per-page'); 1128jQuery.ajax({ 1129url: wpem_registrations_frontend.ajaxUrl, 1130type: 'POST', 1131data: { 1132action: 'wpem_get_match_making_filter_user', 1133filters_type: jQuery('input[name="match_filter"]:checked').val(), 1134wpem_nonce: wpem_registrations_frontend.nonce, 1135page: page, 1136per_page: perPage 1137}, 1138beforeSend: function (){ 1139jQuery('.matchmaking-list').css('position', 'relative'); 1140jQuery('.matchmaking-list').append('<div class="loader-overlay" style="position:absolute;top:0;left:0;width:100%;height: 400px;background:rgba(255,255,255,0.6);display:flex;justify-content:center;align-items:center;z-index:99;"><i class="fa fa-spinner fa-spin fa-2x"></i></div>'); 1141jQuery('.matchmaking-list').children().not('.loader-overlay').css('filter', 'blur(3px)'); 1142}, 1143success: function (response){ 1144if(response.success==true){ 1145jQuery('.matchmaking-list .loader-overlay').remove(); 1146jQuery('.matchmaking-list').css('position', ''); 1147jQuery('.matchmaking-list').html(response.data.html); 1148if(jQuery.trim(jQuery('.wpem-matchmaking-lists').html())===''){ 1149jQuery('.wpem-matchmaking-lists').html('<p>No users found.</p>'); 1150} 1151jQuery('.wpem-matchmaking-filter-show-results').text(response.data.total_users + ' Results'); 1152if(response.data.total_users > perPage){ 1153let paginationHTML=FrontendRegistration.actions.generatePagination(response.data.total_pages, response.data.current_page); 1154jQuery('.wpem-matchmaking-pagination').html(paginationHTML); 1155}else{ 1156jQuery('.wpem-matchmaking-pagination').empty(); 1157} 1158if(response.data.total_users===0||jQuery.trim(jQuery('.matchmaking-list').html())===''){ 1159jQuery('.matchmaking-list').html('<div><p class="event-manager-message wpem-alert wpem-alert-danger wpem-text-center"><i class="wpem-icon-user-check"></i> There are no Attendees found with your match</p></div>'); 1160jQuery('.wpem-matchmaking-filter-show-results').text('0 Results'); 1161} 1162jQuery('.wpem-matchmaking-container .wpem-matchmaking-main-header').remove(); 1163jQuery('.wpem-matchmaking-tab').removeClass('active'); 1164jQuery('.wpem-matchmaking-tab[data-tab="your-matches"]').addClass('active'); 1165}else{ 1166jQuery('.matchmaking-list .loader-overlay').remove(); 1167jQuery('.matchmaking-list').children().css('filter', ''); 1168jQuery('.wpem-matchmaking-filter-show-results').text('0 Results'); 1169jQuery('.matchmaking-list').html('<div><p class="event-manager-message wpem-alert wpem-alert-danger wpem-text-center"><i class="wpem-icon-user-check"></i> ' + response.data.message + '</p></div>'); 1170}} 1171}); 1172}, 1173GetChatConversation: function ($this, preventLoop=false){ 1174var receiverId=$this.attr('data-receiver-id'); 1175var parentId=$this.attr('data-parent-id'); 1176var profileUrl=$this.attr('data-profile-url'); 1177jQuery('.wpem-matchmaking-chat-user-list-item').removeClass('active'); 1178$this.addClass('active'); 1179var userName=$this.find('.wpem-matchmaking-chat-user-list-name-text').text(); 1180jQuery('.wpem-matchmaking-chat-detail-header-profile-name') 1181.html('<a href="' + profileUrl + '">' + userName + '</a>'); 1182jQuery('.wpem-matchmaking-chat-detail-header-profile-designation') 1183.text($this.data('profession')); 1184jQuery('.wpem-matchmaking-chat-send-message-btn') 1185.data('receiver-id', receiverId); 1186jQuery.ajax({ 1187url: wpem_registrations_frontend.ajaxUrl, 1188type: 'POST', 1189data: { 1190action: 'get_chat_conversation', 1191receiver_id: receiverId, 1192parent_id: parentId, 1193}, 1194success: function (response){ 1195if(response.success){ 1196jQuery('.wpem-matchmaking-chat-detail-content').html(response.data.html); 1197jQuery('.wpem-matchmaking-chat-wrapper').addClass('active'); 1198jQuery('.wpem_conversation_info').attr('data-receiver-id', receiverId); 1199if(response.data.user_list){ 1200jQuery('.wpem-matchmaking-chat-user-list').html(response.data.user_list); 1201if(!preventLoop){ 1202var first=jQuery('.wpem-matchmaking-chat-user-list-item').first(); 1203if(first.data('receiver-id')!==receiverId){ 1204FrontendRegistration.actions.GetChatConversation(first, true); 1205}} 1206}}else{ 1207jQuery('.wpem-matchmaking-chat-detail-content').html('<p>No conversation found.</p>'); 1208}} 1209}); 1210}, 1211ChatSendMessageBtn: function (){ 1212const message=jQuery('.wpem-matchmaking-chat-send-message-textarea').val(); 1213const receiver_id=jQuery('.wpem-matchmaking-chat-send-message-btn').data('receiver-id'); 1214const fileInput=document.getElementById('chat-file-upload'); 1215const file=fileInput.files[0]; 1216if(!message.trim()&&!file){ 1217return; 1218} 1219const formData=new FormData(); 1220formData.append('action', 'wpem_send_match_making_chat_message'); 1221formData.append('message', message); 1222formData.append('receiver_id', receiver_id); 1223if(file){ 1224formData.append('file', file); 1225} 1226jQuery.ajax({ 1227url: wpem_registrations_frontend.ajaxUrl, 1228type: 'POST', 1229data: formData, 1230processData: false, 1231contentType: false, 1232beforeSend: function (){ 1233jQuery('.wpem-matchmaking-chat-send-message-btn').prop('disabled', true); 1234}, 1235success: function (response){ 1236if(response.success){ 1237jQuery('.wpem-matchmaking-chat-send-message-textarea').val(''); 1238document.getElementById('chat-file-upload').value=''; 1239const $userItem=jQuery('.wpem-matchmaking-chat-user-list-item[data-receiver-id="' + receiver_id + '"]'); 1240if(message){ 1241$userItem.find('.wpem-matchmaking-chat-user-list-message').text(message); 1242}else if(file){ 1243$userItem.find('.wpem-matchmaking-chat-user-list-message').text('File: ' + file.name); 1244} 1245jQuery('.wpem-matchmaking-chat-detail-content').append(response.data.html); 1246jQuery('.wpem-matchmaking-chat-detail-content').scrollTop(jQuery('.wpem-matchmaking-chat-detail-content')[0].scrollHeight); 1247}else{ 1248alert(response.data.message||'Failed to send message.'); 1249}}, 1250complete: function (){ 1251jQuery('.wpem-matchmaking-chat-send-message-btn').prop('disabled', false); 1252}}); 1253}, 1254AcceptMeetingRequest:function ($button){ 1255var meetingId=$button.attr('data-meeting-id'); 1256var nextStatus=parseInt($button.attr('data-next-status')); 1257jQuery.ajax({ 1258url: wpem_registrations_frontend.ajaxUrl, 1259type: 'POST', 1260data: { 1261action: 'wpem_accept_meeting', 1262meeting_id: meetingId, 1263status: nextStatus, 1264wpem_nonce: wpem_registrations_frontend.nonce, 1265}, 1266success: function (response){ 1267if(response.success){ 1268window.location.reload(); 1269}else{ 1270alert(response.data?.message||'Something went wrong.'); 1271}}, 1272error: function (){ 1273alert('AJAX request failed.'); 1274}}); 1275}, 1276CancelMeeting:function (e){ 1277e.preventDefault(); 1278if(!confirm('Are you sure you want to cancel this meeting?')) return; 1279var meetingId=jQuery(e.currentTarget).data('meeting-id'); 1280var button=jQuery(this); 1281jQuery.ajax({ 1282url: wpem_registrations_frontend.ajaxUrl, 1283type: 'POST', 1284data: { 1285action: 'wpem_cancel_matchmaking_meeting', 1286meeting_id: meetingId, 1287wpem_nonce: wpem_registrations_frontend.nonce, 1288}, 1289success: function (response){ 1290if(response.success){ 1291jQuery(e.currentTarget).text('Cancelled').closest('.wpem-matchmaking-meeting-actions-dropdown-menu').hide(); 1292location.reload(); 1293}else{ 1294alert('Failed to cancel meeting. Try again.'); 1295}} 1296}); 1297}, 1298EditMeeting:function (e, meetingId=null){ 1299e.preventDefault(); 1300jQuery.ajax({ 1301url: wpem_registrations_frontend.ajaxUrl, 1302type: 'POST', 1303data: { 1304action: 'wpem_get_meeting_details', 1305meeting_id: meetingId, 1306}, 1307success: function(response){ 1308if(response.success){ 1309const m=response.data; 1310const formattedStartTime=m.meeting_start_time.substring(0, 5); 1311jQuery('#meeting_id').val(m.id); 1312if(jQuery('.wpem-meeting-schedule-container').length){ 1313jQuery('.wpem-meeting-schedule-container').append('<input type="hidden" id="meeting_id" name="meeting_id" value="' + m.i
1313d + '">' 1314); 1315} 1316jQuery('.meeting-modal-header').text('Edit Meeting'); 1317jQuery('#meeting_date').val(m.meeting_date); 1318jQuery('#meeting_create_event_id').val(m.event_id).trigger('change'); 1319jQuery('#meeting_start_time').val(m.meeting_start_time); 1320jQuery('#meeting_end_time').val(m.meeting_end_time); 1321jQuery('#meeting_description').val(m.message); 1322m.participant_ids.forEach(function(participantId){ 1323const $participantElement=jQuery(`.wpem-meeting-schedule-participant-dropdown-list-item[data-user-id="${participantId}"]`); 1324if($participantElement.length){ 1325$participantElement.trigger('click'); 1326}}); 1327const selectedDate=new Date(m.meeting_date); 1328currentDate=new Date(selectedDate.getFullYear(), selectedDate.getMonth(), 1); 1329FrontendRegistration.actions.renderCalendar(currentDate); 1330setTimeout(function(){ 1331const day=selectedDate.getDate(); 1332jQuery('.calendar-day-container .day-number').each(function(){ 1333if(parseInt(jQuery(this).text())===day){ 1334jQuery(this).trigger('click'); 1335}}); 1336}, 100); 1337jQuery('.wpem-booked-slot-container').show(); 1338jQuery('.wpem-booked-slot').html(` 1339<div class="wpem-booked-slot-item"> 1340<span class="wpem-booked-slot-time">${formattedStartTime}</span> 1341<span class="wpem-booked-slot-badge">(Booked)</span> 1342</div> 1343`); 1344function checkTimeSlotWhenReady(){ 1345const $slot=jQuery(`input[name="time_slot"][value="${formattedStartTime}"]`); 1346if($slot.length){ 1347$slot.prop('checked', true); 1348}else{ 1349setTimeout(checkTimeSlotWhenReady, 100); 1350}} 1351setTimeout(checkTimeSlotWhenReady, 200); 1352jQuery('#meeting-request-popup').addClass('wpem-modal-open'); 1353}else{ 1354alert('Could not fetch meeting details'); 1355}} 1356}); 1357}, 1358SavedAvailability:function(selectElement){ 1359const $select=jQuery(selectElement); 1360const formData=$select.serialize(); 1361const nonce=jQuery('#wpem_save_meeting_availability_nonce').val(); 1362jQuery.ajax({ 1363url: wpem_registrations_frontend.ajaxUrl, 1364type: 'POST', 1365data: { 1366action: 'wpem_save_meeting_availability', 1367form_data: formData, 1368wpem_save_meeting_availability_nonce: nonce 1369}, 1370success: function (response){ 1371if(response.success){ 1372jQuery('.availability_setting_msg').show(); 1373jQuery('.availability_setting_update_msg').text(response.data); 1374setTimeout(function (){ 1375jQuery('#availability-popup').removeClass('wpem-modal-open'); 1376}, 2000); 1377}else{ 1378alert('Error: ' + response.data); 1379}} 1380}); 1381}, 1382ShowCommonMeetingSlots:function(eventId, date, userIds){ 1383jQuery.ajax({ 1384url: wpem_registrations_frontend.ajaxUrl, 1385type: 'POST', 1386data: { 1387action: 'wpem_get_common_available_slots_for_meeting', 1388event_id: eventId, 1389date: date, 1390user_ids: userIds, 1391wpem_nonce: wpem_registrations_frontend.nonce, 1392}, 1393success: function (res){ 1394var wrapper=jQuery('.wpem-availability-meeting-request-time-slot'); 1395wrapper.empty(); 1396if(res.data&&res.data.common_slots&&res.data.common_slots.length > 0){ 1397res.data.common_slots.forEach(function (slotObj, index){ 1398const slot=slotObj.time; 1399const isBooked=slotObj.is_booked; 1400const inputId='time_slot_' + index; 1401const html=` 1402<div class="wpem-availability-meetings-time-slot-item wpem-mb-2"> 1403<input type="radio" name="time_slot" id="${inputId}" value="${slot}" ${isBooked ? 'disabled':''}> 1404<label for="${inputId}" ${isBooked ? 'style="color: #aaa; text-decoration: line-through;" title="Slot already booked"':''}> 1405${slot} 1406</label> 1407</div> 1408`; 1409wrapper.append(html); 1410}); 1411}else{ 1412wrapper.html('<div class="wpem-text-muted" style="padding: 1rem; text-align: center; color: #888;">No slots found</div>'); 1413}} 1414}); 1415}, 1416CreateMeetingRequestSubmit: function (){ 1417const selectedIdsRaw=jQuery('#selected_participant_ids').val(); 1418const allIds=selectedIdsRaw 1419? selectedIdsRaw.split(',').map(id=> parseInt(id.trim())).filter(id=> !isNaN(id)) 1420: []; 1421if(allIds.length===0){ 1422alert('Please select at least one participant.'); 1423return; 1424} 1425const userId=allIds[0]; 1426const participantIds=allIds; 1427const eventId=jQuery('#meeting_create_event_id').val(); 1428if(jQuery('#meeting_id').length){ 1429var meetingId=jQuery('#meeting_id').val(); 1430}else{ 1431var meetingId=0; 1432} 1433const meetingDate=jQuery('#selected_meeting_date').val(); 1434const selectedSlot=jQuery('input[name="time_slot"]:checked').val(); 1435const meeting_description=jQuery('#meeting_description').val(); 1436if(!eventId||!meetingDate||!selectedSlot||participantIds.length===0){ 1437alert('Please select all required fields.'); 1438return; 1439} 1440const data={ 1441action: 'wpem_create_matchmaking_meeting_submission', 1442user_id: userId, 1443meeting_id: meetingId, 1444event_id: eventId, 1445meeting_date: meetingDate, 1446meeting_slot: selectedSlot, 1447participant_ids: participantIds, 1448meeting_description: meeting_description 1449}; 1450jQuery.ajax({ 1451type: 'POST', 1452url: wpem_registrations_frontend.ajaxUrl, 1453data: data, 1454dataType: 'json', 1455success: function (response){ 1456if(response.success){ 1457jQuery('.wpem-meeting-create-msg').show(); 1458setTimeout(function (){ 1459jQuery('#meeting-request-popup').removeClass('wpem-modal-open'); 1460}, 2000); 1461const url=new URL(window.location); 1462url.searchParams.set('tab', 'meetings'); 1463window.location.href=url.toString(); 1464}else{ 1465alert("Error: " + (response.data?.message||'Unknown error')); 1466}}, 1467error: function (xhr, status, error){ 1468console.error("AJAX Error:", status, error); 1469}}); 1470}, 1471ConversationInfoBtn: function (el){ 1472var ids=jQuery(el); 1473const currentUserId=ids.data('current-user'); 1474const receiverId=jQuery(el).attr('data-receiver-id'); 1475const $popup=jQuery('.conversation-info-popup'); 1476const $container=$popup.find('.wpem-conversation-members-container'); 1477const $aboutContainer=jQuery('#tab2 .wpem-conversation-about-container ul'); 1478$container.empty(); 1479$aboutContainer.empty(); 1480jQuery.ajax({ 1481url: wpem_registrations_frontend.ajaxUrl, 1482type: 'POST', 1483data: { 1484action: 'wpem_get_conversation_members', 1485current_user_id: currentUserId, 1486receiver_user_id: receiverId 1487}, 1488success: function (response){ 1489if(response.success){ 1490$container.html(response.data.html); 1491$aboutContainer.html(response.data.about_html); 1492$popup.addClass('wpem-modal-open'); 1493}else{ 1494alert('Failed to load conversation info.'); 1495}} 1496}); 1497}, 1498SaveUserProfileSettings: function(){ 1499var $button=jQuery("#save-settings-btn"); 1500var originalText=$button.text(); 1501var $messageBox=jQuery(".event-manager-message.wpem-alert-success"); 1502var formData=jQuery("#user-profile-settings-form").serializeArray(); 1503jQuery.ajax({ 1504url: wpem_registrations_frontend.ajaxUrl, 1505type: 'POST', 1506data: { 1507action: 'wpem_save_matchmaking_profile', 1508formData:formData, 1509wpem_nonce: wpem_registrations_frontend.nonce, 1510}, 1511success: function (response){ 1512if(response.success){ 1513$messageBox 1514.text("Settings saved successfully.") 1515.fadeIn(); 1516jQuery('html, body').animate({ 1517scrollTop: $messageBox.offset().top - 100 1518}, 500); 1519}else{ 1520alert(response.data?.message||'Error saving settings.'); 1521$button.prop("disabled", false).text(originalText); 1522}}, 1523error: function (){ 1524alert('AJAX request failed.'); 1525$button.prop("disabled", false).text(originalText); 1526}}); 1527}, 1528ToggleMeetingAvailabilityTimeSlots: function(){ 1529let value=jQuery('#available_for_meeting').is(':checked') ? 1:0; 1530if(value==1){ 1531jQuery('.wpem-availability-meetings-date-item').show(); 1532}else{ 1533jQuery('.wpem-availability-meetings-date-item').hide(); 1534}}, 1535SearchMeetingParticipants:function(inputEl){ 1536var search_keyword=jQuery(inputEl).val().toLowerCase().trim(); 1537jQuery('.wpem-meeting-schedule-participant-dropdown-list-item').each(function (){ 1538var name=jQuery(this).attr('data-user-name')||jQuery(this).text(); 1539name=name.toLowerCase().trim(); 1540var match=(search_keyword==='')||(name.indexOf(search_keyword)!==-1); 1541jQuery(this).toggleClass('wpem-hidden', !match); 1542}); 1543}, 1544toggleTimezoneDropdown:function(){ 1545if(jQuery('input[name="timezone_settings"]:checked').val()==='custom'){ 1546jQuery('.wpem-timezone-dropdown').slideDown(); 1547}else{
1548jQuery('.wpem-timezone-dropdown').slideUp(); 1549}}, 1550DeleteMeeting: function (e){ 1551e.preventDefault(); 1552var $btn=jQuery(e.currentTarget); 1553var meetingId=$btn.data('meeting-id'); 1554if(!meetingId){ 1555return; 1556} 1557if(!confirm('Are you sure you want to delete this meeting? This action cannot be undone.')){ 1558return; 1559} 1560jQuery.ajax({ 1561url: wpem_registrations_frontend.ajaxUrl, 1562type: 'POST', 1563data: { 1564action: 'wpem_delete_matchmaking_meeting', 1565meeting_id: meetingId, 1566wpem_nonce: wpem_registrations_frontend.nonce, 1567}, 1568success: function (response){ 1569if(response.success){ 1570var $meetingElement=$btn.closest('.wpem-matchmaking-meeting-wrapper'); 1571var $dateGroup=$meetingElement.closest('.wpem-matchmaking-date-group'); 1572$meetingElement.fadeOut(300, function(){ 1573jQuery(this).remove(); 1574if($dateGroup.find('.wpem-matchmaking-meeting-wrapper').length===0){ 1575$dateGroup.fadeOut(300, function(){ 1576jQuery(this).remove(); 1577}); 1578}}); 1579}else{ 1580alert(response.data?.message||'Error deleting meeting.'); 1581}}, 1582error: function (){ 1583alert('Error deleting meeting.'); 1584}}); 1585}, 1586}, 1587};}; 1588(FrontendRegistration=FrontendRegistration()), 1589jQuery(document).ready(function (t){ 1590FrontendRegistration.init(); 1591}); 1592!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../keycode"],e):e(jQuery)}(function(V){"use strict";var n;function e(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:"",selectMonthLabel:"Select month",selectYearLabel:"Select year"},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,onUpdateDatepicker:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},V.extend(this._defaults,this.regional[""]),this.regional.en=V.extend(!0,{},this.regional[""]),this.regional["en-US"]=V.extend(!0,{},this.regional.en),this.dpDiv=a(V("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function a(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",t,function(){V(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",t,d)}function d(){V.datepicker._isDisabledDatepicker((n.inline?n.dpDiv.parent():n.input)[0])||(V(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),V(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).addClass("ui-datepicker-next-hover"))}function c(e,t){for(var a in V.extend(e,t),t)null==t[a]&&(e[a]=t[a])}return V.extend(V.ui,{datepicker:{version:"1.14.2"}}),V.extend(e.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return c(this._defaults,e||{}),this},_attachDatepicker:function(e,t){var a,i=e.nodeName.toLowerCase(),s="div"===i||"span"===i;
vendor: 32,543 bytes, line 1592
1592e.id||(this.uuid+=1,e.id="dp"+this.uuid),(a=this._newInst(V(e),s)).settings=V.extend({},t||{}),"input"===i?this._connectDatepicker(e,a):s&&this._inlineDatepicker(e,a)},_newInst:function(e,t){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:t?a(V("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,t){var a=V(e);t.append=V([]),t.trigger=V([]),a.hasClass(this.markerClassName)||(this._attachments(a,t),a.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(t),V.data(e,"datepicker",t),t.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,t){var a,i=this._get(t,"appendText"),s=this._get(t,"isRTL");t.append&&t.append.remove(),i&&(t.append=V("<span>").addClass(this._appendClass).text(i),e[s?"before":"after"](t.append)),e.off("focus",this._showDatepicker),t.trigger&&t.trigger.remove(),"focus"!==(i=this._get(t,"showOn"))&&"both"!==i||e.on("focus",this._showDatepicker),"button"!==i&&"both"!==i||(i=this._get(t,"buttonText"),a=this._get(t,"buttonImage"),this._get(t,"buttonImageOnly")?t.trigger=V("<img>").addClass(this._triggerClass).attr({src:a,alt:i,title:i}):(t.trigger=V("<button type='button'>").addClass(this._triggerClass),a?t.trigger.html(V("<img>").attr({src:a,alt:i,title:i})):t.trigger.text(i)),e[s?"before":"after"](t.trigger),t.trigger.on("click",function(){return V.datepicker._datepickerShowing&&V.datepicker._lastInput===e[0]?V.datepicker._hideDatepicker():(V.datepicker._datepickerShowing&&V.datepicker._lastInput!==e[0]&&V.datepicker._hideDatepicker(),V.datepicker._showDatepicker(e[0])),!1}))},_autoSize:function(e){var t,a,i,s,r,n;this._get(e,"autoSize")&&!e.inline&&(r=new Date(2009,11,20),(n=this._get(e,"dateFormat")).match(/[DM]/)&&(r.setMonth((t=function(e){for(s=i=a=0;s<e.length;s++)e[s].length>a&&(a=e[s].length,i=s);return i})(this._get(e,n.match(/MM/)?"monthNames":"monthNamesShort"))),r.setDate(t(this._get(e,n.match(/DD/)?"dayNames":"dayNamesShort"))+20-r.getDay())),e.input.attr("size",this._formatDate(e,r).length))},_inlineDatepicker:function(e,t){var a=V(e);a.hasClass(this.markerClassName)||(a.addClass(this.markerClassName).append(t.dpDiv),V.data(e,"datepicker",t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block"))},_dialogDatepicker:function(e,t,a,i,s){var r,n=this._dialogInst;return n||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=V("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),V("body").append(this._dialogInput),(n=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},V.data(this._dialogInput[0],"datepicker",n)),c(n.settings,i||{}),t=t&&t.constructor===Date?this._formatDate(n,t):t,this._dialogInput.val(t),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,this._pos||(r=document.documentElement.clientWidth,i=document.documentElement.clientHeight,t=document.documentElement.scrollLeft||document.body.scrollLeft,s=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[r/2-100+t,i/2-150+s]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),n.settings.onSelect=a,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),V.blockUI&&V.blockUI(this.dpDiv),V.data(this._dialogInput[0],"datepicker",n),this},_destroyDatepicker:function(e){var t,a=V(e),i=V.data(e,"datepicker");a.hasClass(this.markerClassName)&&(t=e.nodeName.toLowerCase(),V.removeData(e,"datepicker"),"input"===t?(i.append.remove(),i.trigger.remove(),a.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==t&&"span"!==t||a.removeClass(this.markerClassName).empty(),V.datepicker._hideDatepicker(),n===i)&&(n=null,this._curInst=null)},_enableDatepicker:function(t){var e,a=V(t),i=V.data(t,"datepicker");a.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!1,i.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==e&&"span"!==e||((i=a.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=V.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var e,a=V(t),i=V.data(t,"datepicker");a.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!0,i.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==e&&"span"!==e||((i=a.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=V.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(e)for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(e){try{return V.data(e,"datepicker")}catch(e){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,t,a){var i,s,r=this._getInst(e);if(2===arguments.length&&"string"==typeof t)return"defaults"===t?V.extend({},V.datepicker._defaults):r?"all"===t?V.extend({},r.settings):this._get(r,t):null;i=t||{},"string"==typeof t&&((i={})[t]=a),r&&(this._curInst===r&&this._hideDatepicker(),t=this._getDateDatepicker(e,!0),a=this._getMinMaxDate(r,"min"),s=this._getMinMaxDate(r,"max"),c(r.settings,i),null!==a&&void 0!==i.dateFormat&&void 0===i.minDate&&(r.settings.minDate=this._formatDate(r,a)),null!==s&&void 0!==i.dateFormat&&void 0===i.maxDate&&(r.settings.maxDate=this._formatDate(r,s)),"disabled"in i&&(i.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(V(e),r),this._autoSize(r),this._setDate(r,t),this._updateAlternate(r),this._updateDatepicker(r))},_changeDatepicker:function(e,t,a){this._optionDatepicker(e,t,a)},_refreshDatepicker:function(e){e=this._getInst(e);e&&this._updateDatepicker(e)},_setDateDatepicker:function(e,t){e=this._getInst(e);e&&(this._setDate(e,t),this._updateDatepicker(e),this._updateAlternate(e))},_getDateDatepicker:function(e,t){e=this._getInst(e);return e&&!e.inline&&this._setDateFromField(e,t),e?this._getDate(e):null},_doKeyDown:function(e){var t,a,i=V.datepicker._getInst(e.target),s=!0,r=i.dpDiv.is(".ui-datepicker-rtl");if(i._keyEvent=!0,V.datepicker._datepickerShowing)switch(e.keyCode){case 9:V.datepicker._hideDatepicker(),s=!1;break;case 13:return(a=V("td."+V.datepicker._dayOverClass+":not(."+V.datepicker._currentClass+")",i.dpDiv))[0]&&V.datepicker._selectDay(e.target,i.selectedMonth,i.selectedYear,a[0]),(a=V.datepicker._get(i,"onSelect"))?(t=V.datepicker._formatDate(i),a.apply(i.input?i.input[0]:null,[t,i])):V.datepicker._hideDatepicker(),!1;case 27:V.datepicker._hideDatepicker();break;case 33:V.datepicker._adjustDate(e.target,e.ctrlKey?-V.datepicker._get(i,"stepBigMonths"):-V.datepicker._get(i,"stepMonths"),"M");break;case 34:V.datepicker._adjustDate(e.target,e.ctrlKey?+V.datepicker._get(i,"stepBigMonths"):+V.datepicker._get(i,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&V.datepicker._clearDate(e.target),s=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&V.datepicker._gotoToday(e.target),s=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&V.datepicker._adjustDate(e.target,r?1:-1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&V.datepicker._adjustDate(e.target,e.ctrlKey?-V.datepicker._get(i,"stepBigMonths"):-V.datepicker._get(i,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&V.datepicker._adjustDate(e.target,-7,"D"),s=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&V.datepicker._adjustDate(e.target,r?-1:1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&V.datepicker._adjustDate(e.target,e.ctrlKey?+V.datepicker._get(i,"stepBigMonths"):+V.datepicker._get(i,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&V.datepicker._adjustDate(e.target,7,"D"),s=e.ctrlKey||e.metaKey;break;default:s=!1}else 36===e.keyCode&&e.ctrlKey?V.datepicker._showDatepicker(this):s=!1;s&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var t,a=V.datepicker._getInst(e.target);if(V.datepicker._get(a,"constrainInput"))return a=V.datepicker._possibleChars(V.datepicker._get(a,"dateFormat")),t=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||t<" "||!a||-1<a.indexOf(t)},_doKeyUp:function(e){e=V.datepicker._getInst(e.target);if(e.input.val()!==e.lastVal)try{V.datepicker.parseDate(V.datepicker._get(e,"dateFormat"),e.input?e.input.val():null,V.datepicker._getFormatConfig(e))&&(V.datepicker._setDateFromField(e),V.datepicker._updateAlternate(e),V.datepicker._updateDatepicker(e))}catch(e){}return!0},_showDatepicker:function(e){var t,a,i,s;"input"!==(e=e.target||e).nodeName.toLowerCase()&&(e=V("input",e.parentNode)[0]),V.datepicker._isDisabledDatepicker(e)||V.datepicker._lastInput===e||(s=V.datepicker._getInst(e),V.datepicker._curInst&&V.datepicker._curInst!==s&&(V.datepicker._curInst.dpDiv.stop(!0,!0),s)&&V.datepicker._datepickerShowing&&V.datepicker._hideDatepicker(V.datepicker._curInst.input[0]),!1===(a=(a=V.datepicker._get(s,"beforeShow"))?a.apply(e,[e,s]):{}))||(c(s.settings,a),s.lastVal=null,V.datepicker._lastInput=e,V.datepicker._setDateFromField(s),V.datepicker._inDialog&&(e.value=""),V.datepicker._pos||(V.datepicker._pos=V.datepicker._findPos(e),V.datepicker._pos[1]+=e.offsetHeight),t=!1,V(e).parents().each(function(){return!(t|="fixed"===V(this).css("position"))}),a={left:V.datepicker._pos[0],top:V.datepicker._pos[1]},V.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),V.datepicker._updateDatepicker(s),a=V.datepicker._checkOffset(s,a,t),s.dpDiv.css({position:V.datepicker._inDialog&&V.blockUI?"static":t?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"}),s.inline)||(a=V.datepicker._get(s,"showAnim"),i=V.datepicker._get(s,"duration"),s.dpDiv.css("z-index",function(e){for(var t;e.length&&e[0]!==document;){if(("absolute"===(t=e.css("position"))||"relative"===t||"fixed"===t)&&(t=parseInt(e.css("zIndex"),10),!isNaN(t))&&0!==t)return t;e=e.parent()}return 0}(V(e))+1),V.datepicker._datepickerShowing=!0,V.effects&&V.effects.effect[a]?s.dpDiv.show(a,V.datepicker._get(s,"showOptions"),i):s.dpDiv[a||"show"](a?i:null),V.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),V.datepicker._curInst=s)},_updateDatepicker:function(e){this.maxRows=4,(n=e).dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var t,a=this._getNumberOfMonths(e),i=a[1],s=e.dpDiv.find("."+this._dayOverClass+" a"),r=V.datepicker._get(e,"onUpdateDatepicker");0<s.length&&d.apply(s.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<i&&e.dpDiv.addClass("ui-datepicker-multi-"+i).css("width",17*i+"em"),e.dpDiv[(1!==a[0]||1!==a[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===V.datepicker._curInst&&V.datepicker._datepickerShowing&&V.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(t=e.yearshtml,setTimeout(function(){t===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year").first().replaceWith(e.yearshtml),t=e.yearshtml=null},0)),r&&r.apply(e.input?e.input[0]:null,[e])},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")},_checkOffset:function(e,t,a){var i=e.dpDiv.outerWidth(),s=e.dpDiv.outerHeight(),r=e.input?e.input.outerWidth():0,n=e.input?e.input.outerHeight():0,d=document.documentElement.clientWidth+(a?0:V(document).scrollLeft()),c=document.documentElement.clientHeight+(a?0:V(document).scrollTop());return t.left-=this._get(e,"isRTL")?i-r:0,t.left-=a&&t.left===e.input.offset().left?V(document).scrollLeft():0,t.top-=a&&t.top===e.input.offset().top+n?V(document).scrollTop():0,t.left-=Math.min(t.left,d<t.left+i&&i<d?Math.abs(t.left+i-d):0),t.top-=Math.min(t.top,c<t.top+s&&s<c?Math.abs(s+n):0),t},_findPos:function(e){for(var t=this._getInst(e),a=this._get(t,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||V.expr.pseudos.hidden(e));)e=e[a?"previousSibling":"nextSibling"];return[(t=V(e).offset()).left,t.top]},_hideDatepicker:function(e){var t,a,i=this._curInst;!i||e&&i!==V.data(e,"datepicker")||this._datepickerShowing&&(e=this._get(i,"showAnim"),a=this._get(i,"duration"),t=function(){V.datepicker._tidyDialog(i)},V.effects&&V.effects.effect[e]?i.dpDiv.hide(e,V.datepicker._get(i,"showOptions"),a,t):i.dpDiv["slideDown"===e?"slideUp":"fadeIn"===e?"fadeOut":"hide"](e?a:null,t),e||t(),this._datepickerShowing=!1,(a=this._get(i,"onClose"))&&a.apply(i.input?i.input[0]:null,[i.input?i.input.val():"",i]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),V.blockUI)&&(V.unblockUI(),V("body").append(this.dpDiv)),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){var t;V.datepicker._curInst&&(e=V(e.target),t=V.datepicker._getInst(e[0]),!(e[0].id===V.datepicker._mainDivId||0!==e.parents("#"+V.datepicker._mainDivId).length||e.hasClass(V.datepicker.markerClassName)||e.closest("."+V.datepicker._triggerClass).length||!V.datepicker._datepickerShowing||V.datepicker._inDialog&&V.blockUI)||e.hasClass(V.datepicker.markerClassName)&&V.datepicker._curInst!==t)&&V.datepicker._hideDatepicker()},_adjustDate:function(e,t,a){var e=V(e),i=this._getInst(e[0]);this._isDisabledDatepicker(e[0])||(this._adjustInstDate(i,t,a),this._updateDatepicker(i))},_gotoToday:function(e){var t,e=V(e),a=this._getInst(e[0]);this._get(a,"gotoCurrent")&&a.currentDay?(a.selectedDay=a.currentDay,a.drawMonth=a.selectedMonth=a.currentMonth,a.drawYear=a.selectedYear=a.currentYear):(t=new Date,a.selectedDay=t.getDate(),a.drawMonth=a.selectedMonth=t.getMonth(),a.drawYear=a.selectedYear=t.getFullYear()),this._notifyChange(a),this._adjustDate(e)},_selectMonthYear:function(e,t,a){var e=V(e),i=this._getInst(e[0]);i["selected"+("M"===a?"Month":"Year")]=i["draw"+("M"===a?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10),this._notifyChange(i),this._adjustDate(e)},_selectDay:function(e,t,a,i){var s=V(e);V(i).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||((s=this._getInst(s[0])).selectedDay=s.currentDay=parseInt(V("a",i).attr("data-date")),s.selectedMonth=s.currentMonth=t,s.selectedYear=s.currentYear=a,this._selectDate(e,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear)))},_clearDate:function(e){e=V(e);this._selectDate(e,"")},_selectDate:function(e,t){var a,e=V(e),e=this._getInst(e[0]);t=null!=t?t:this._formatDate(e),e.input&&e.input.val(t),this._updateAlternate(e),(a=this._get(e,"onSelect"))?a.apply(e.input?e.input[0]:null,[t,e]):e.input&&e.input.trigger("change"),e.inline?this._updateDatepicker(e):(this._hideDatepicker(),this._lastInput=e.input[0],"object"!=typeof e.input[0]&&e.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var t,a,i=this._get(e,"altField");i&&(a=this._get(e,"altFormat")||this._get(e,"dateFormat"),t=this._getDate(e),a=this.formatDate(a,t,this._getFormatConfig(e)),V(document).find(i).val(a))},noWeekends:function(e){e=e.getDay();return[0<e&&e<6,""]},iso8601Week:function(e){var t,e=new Date(e.getTime());return e.setDate(e.getDate()+4-(e.getDay()||7)),t=e.getTime(),e.setMonth(0),e.setDate(1),Math.floor(Math.round((t-e)/864e5)/7)+1},parseDate:function(t,s,e){if(null==t||null==s)throw"Invalid arguments";if(""===(s="object"==typeof s?s.toString():s+""))return null;for(var a,i,r=0,n=(e?e.shortYearCutoff:null)||this._defaults.shortYearCutoff,n="string"!=typeof n?n:(new Date).getFullYear()%100+parseInt(n,10),d=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,c=(e?e.dayNames:null)||this._defaults.dayNames,o=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,l=(e?e.monthNames:null)||this._defaults.monthNames,h=-1,u=-1,p=-1,g=-1,_=!1,f=function(e){e=y+1<t.length&&t.charAt(y+1)===e;return e&&y++,e},k=function(e){var t=f(e),t="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,e=new RegExp("^\\d{"+("y"===e?t:1)+","+t+"}"),t=s.substring(r).match(e);if(t)return r+=t[0].length,parseInt(t[0],10);throw"Missing number at position "+r},D=function(e,t,a){var i=-1,e=V.map(f(e)?a:t,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(V.each(e,function(e,t){var a=t[1];if(s.substr(r,a.length).toLowerCase()===a.toLowerCase())return i=t[0],r+=a.length,!1}),-1!==i)return i+1;throw"Unknown name at position "+r},m=function(){if(s.charAt(r)!==t.charAt(y))throw"Unexpected literal at position "+r;r++},y=0;y<t.length;y++)if(_)"'"!==t.charAt(y)||f("'")?m():_=!1;else switch(t.charAt(y)){case"d":p=k("d");break;case"D":D("D",d,c);break;case"o":g=k("o");break;case"m":u=k("m");break;case"M":u=D("M",o,l);break;case"y":h=k("y");break;case"@":h=(i=new Date(k("@"))).getFullYear(),u=i.getMonth()+1,p=i.getDate();break;case"!":h=(i=new Date((k("!")-this._ticksTo1970)/1e4)).getFullYear(),u=i.getMonth()+1,p=i.getDate();break;case"'":f("'")?m():_=!0;break;default:m()}if(r<s.length&&(e=s.substr(r),!/^\s+/.test(e)))throw"Extra/unparsed characters found in date: "+e;if(-1===h?h=(new Date).getFullYear():h<100&&(h+=(new Date).getFullYear()-(new Date).getFullYear()%100+(h<=n?0:-100)),-1<g)for(u=1,p=g;;){if(p<=(a=this._getDaysInMonth(h,u-1)))break;u++,p-=a}if((i=this._daylightSavingAdjust(new Date(h,u-1,p))).getFullYear()!==h||i.getMonth()+1!==u||i.getDate()!==p)throw"Invalid date";return i},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,a){if(!e)return"";function i(e,t,a){var i=""+t;if(l(e))for(;i.length<a;)i="0"+i;return i}function s(e,t,a,i){return(l(e)?i:a)[t]}var r,n=(a?a.dayNamesShort:null)||this._defaults.dayNamesShort,d=(a?a.dayNames:null)||this._defaults.dayNames,c=(a?a.monthNamesShort:null)||this._defaults.monthNamesShort,o=(a?a.monthNames:null)||this._defaults.monthNames,l=function(e){e=r+1<t.length&&t.charAt(r+1)===e;return e&&r++,e},h="",u=!1;if(e)for(r=0;r<t.length;r++)if(u)"'"!==t.charAt(r)||l("'")?h+=t.charAt(r):u=!1;else switch(t.charAt(r)){case"d":h+=i("d",e.getDate(),2);break;case"D":h+=s("D",e.getDay(),n,d);break;case"o":h+=i("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":h+=i("m",e.getMonth()+1,2);break;case"M":h+=s("M",e.getMonth(),c,o);break;case"y":h+=l("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":h+=e.getTime();break;case"!":h+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?h+="'":u=!0;break;default:h+=t.charAt(r)}return h},_possibleChars:function(t){for(var e="",a=!1,i=function(e){e=s+1<t.length&&t.charAt(s+1)===e;return e&&s++,e},s=0;s<t.length;s++)if(a)"'"!==t.charAt(s)||i("'")?e+=t.charAt(s):a=!1;else switch(t.charAt(s)){case"d":case"m":case"y":case"@":e+="0123456789";break;case"D":case"M":return null;case"'":i("'")?e+="'":a=!0;break;default:e+=t.charAt(s)}return e},_get:function(e,t){return(void 0!==e.settings[t]?e.settings:this._defaults)[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var a=this._get(e,"dateFormat"),i=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),r=s,n=this._getFormatConfig(e);try{r=this.parseDate(a,i,n)||s}catch(e){i=t?"":i}e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),e.currentDay=i?r.getDate():0,e.currentMonth=i?r.getMonth():0,e.currentYear=i?r.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(d,e,t){var a,i=null==e||""===e?t:"string"==typeof e?function(e){try{return V.datepicker.parseDate(V.datepicker._get(d,"dateFormat"),e,V.datepicker._getFormatConfig(d))}catch(e){}for(var t=(e.toLowerCase().match(/^c/)?V.datepicker._getDate(d):null)||new Date,a=t.getFullYear(),i=t.getMonth(),s=t.getDate(),r=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,n=r.exec(e);n;){switch(n[2]||"d"){case"d":case"D":s+=parseInt(n[1],10);break;case"w":case"W":s+=7*parseInt(n[1],10);break;case"m":case"M":i+=parseInt(n[1],10),s=Math.min(s,V.datepicker._getDaysInMonth(a,i));break;case"y":case"Y":a+=parseInt(n[1],10),s=Math.min(s,V.datepicker._getDaysInMonth(a,i))}n=r.exec(e)}return new Date(a,i,s)}(e):"number"==typeof e?isNaN(e)?t:(i=e,(a=new Date).setDate(a.getDate()+i),a):new Date(e.getTime());return(i=i&&"Invalid Date"===i.toString()?t:i)&&(i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0)),this._daylightSavingAdjust(i)},_daylightSavingAdjust:function(e){return e?(e.setHours(12<e.getHours()?e.getHours()+2:0),e):null},_setDate:function(e,t,a){var i=!t,s=e.selectedMonth,r=e.selectedYear,t=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=t.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=t.getMonth(),e.drawYear=e.selectedYear=e.currentYear=t.getFullYear(),s===e.selectedMonth&&r===e.selectedYear||a||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(i?"":this._formatDate(e))},_getDate:function(e){return!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay))},_attachHandlers:function(e){var t=this._get(e,"stepMonths"),a="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){V.datepicker._adjustDate(a,-t,"M")},next:function(){V.datepicker._adjustDate(a,+t,"M")},hide:function(){V.datepicker._hideDatepicker()},today:function(){V.datepicker._gotoToday(a)},selectDay:function(){return V.datepicker._selectDay(a,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return V.datepicker._selectMonthYear(a,this,"M"),!1},selectYear:function(){return V.datepicker._selectMonthYear(a,this,"Y"),!1}};V(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,a,i,s,r,O,L,R,H,n,d,W,c,o,l,h,u,p,g,_,f,k,E,D,m,U,y,P,z,v,M,b,w=new Date,B=this._daylightSavingAdjust(new Date(w.getFullYear(),w.getMonth(),w.getDate())),C=this._get(e,"isRTL"),w=this._get(e,"showButtonPanel"),I=this._get(e,"hideIfNoPrevNext"),x=this._get(e,"navigationAsDateFormat"),Y=this._getNumberOfMonths(e),S=this._get(e,"showCurrentAtPos"),F=this._get(e,"stepMonths"),J=1!==Y[0]||1!==Y[1],N=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),T=this._getMinMaxDate(e,"min"),A=this._getMinMaxDate(e,"max"),K=e.drawMonth-S,j=e.drawYear;if(K<0&&(K+=12,j--),A)for(t=this._daylightSavingAdjust(new Date(A.getFullYear(),A.getMonth()-Y[0]*Y[1]+1,A.getDate())),t=T&&t<T?T:t;this._daylightSavingAdjust(new Date(j,K,1))>t;)--K<0&&(K=11,j--);for(e.drawMonth=K,e.drawYear=j,S=this._get(e,"prevText"),S=x?this.formatDate(S,this._daylightSavingAdjust(new Date(j,K-F,1)),this._getFormatConfig(e)):S,a=this._canAdjustMonth(e,-1,j,K)?V("<a>").attr({class:"ui-datepicker-prev ui-corner-all","data-handler":"prev","data-event":"click",title:S}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(C?"e":"w")).text(S))[0].outerHTML:I?"":V("<a>").attr({class:"ui-datepicker-prev ui-corner-all ui-state-disabled",title:S}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(C?"e":"w")).text(S))[0].outerHTML,S=this._get(e,"nextText"),S=x?this.formatDate(S,this._daylightSavingAdjust(new Date(j,K+F,1)),this._getFormatConfig(e)):S,i=this._canAdjustMonth(e,1,j,K)?V("<a>").attr({class:"ui-datepicker-next ui-corner-all","data-handler":"next","data-event":"click",title:S}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(C?"w":"e")).text(S))[0].outerHTML:I?"":V("<a>").attr({class:"ui-datepicker-next ui-corner-all ui-state-disabled",title:S}).append(V("<span>").attr("class","ui-icon ui-icon-circle-triangle-"+(C?"w":"e")).text(S))[0].outerHTML,F=this._get(e,"currentText"),I=this._get(e,"gotoCurrent")&&e.currentDay?N:B,F=x?this.formatDate(F,I,this._getFormatConfig(e)):F,S="",e.inline||(S=V("<button>").attr({type:"button",class:"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all","data-handler":"hide","data-event":"click"}).text(this._get(e,"closeText"))[0].outerHTML),x="",w&&(x=V("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(C?S:"").append(this._isInRange(e,I)?V("<button>").attr({type:"button",class:"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all","data-handler":"today","data-event":"click"}).text(F):"").append(C?"":S)[0].outerHTML),s=parseInt(this._get(e,"firstDay"),10),s=isNaN(s)?0:s,r=this._get(e,"showWeek"),O=this._get(e,"dayNames"),L=this._get(e,"dayNamesMin"),R=this._get(e,"monthNames"),H=this._get(e,"monthNamesShort"),n=this._get(e,"beforeShowDay"),d=this._get(e,"showOtherMonths"),W=this._get(e,"selectOtherMonths"),c=this._getDefaultDate(e),o="",h=0;h<Y[0];h++){for(u="",this.maxRows=4,p=0;p<Y[1];p++){if(g=this._daylightSavingAdjust(new Date(j,K,e.selectedDay)),_=" ui-corner-all",f="",J){if(f+="<div class='ui-datepicker-group",1<Y[1])switch(p){case 0:f+=" ui-datepicker-group-first",_=" ui-corner-"+(C?"right":"left");break;case Y[1]-1:f+=" ui-datepicker-group-last",_=" ui-corner-"+(C?"left":"right");break;default:f+=" ui-datepicker-group-middle",_=""}f+="'>"}for(f+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+_+"'>"+(/all|left/.test(_)&&0===h?C?i:a:"")+(/all|right/.test(_)&&0===h?C?a:i:"")+this._generateMonthYearHeader(e,K,j,T,A,0<h||0<p,R,H)+"</div><table class='ui-datepicker-calendar'><thead><tr>",k=r?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",l=0;l<7;l++)k+="<th scope='col'"+(5<=(l+s+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+O[E=(l+s)%7]+"'>"+L[E]+"</span></th>";for(f+=k+"</tr></thead><tbody>",m=this._getDaysInMonth(j,K),j===e.selectedYear&&K===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,m)),D=(this._getFirstDayOfMonth(j,K)-s+7)%7,m=Math.ceil((D+m)/7),U=J&&this.maxRows>m?this.maxRows:m,this.maxRows=U,y=this._daylightSavingAdjust(new Date(j,K,1-D)),P=0;P<U;P++){for(f+="<tr>",z=r?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(y)+"</td>":"",l=0;l<7;l++)v=n?n.apply(e.input?e.input[0]:null,[y]):[!0,""],b=(M=y.getMonth()!==K)&&!W||!v[0]||T&&y<T||A&&A<y,z+="<td class='"+(5<=(l+s+6)%7?" ui-datepicker-week-end":"")+(M?" ui-datepicker-other-month":"")+(y.getTime()===g.getTime()&&K===e.selectedMonth&&e._keyEvent||c.getTime()===y.getTime()&&c.getTime()===g.getTime()?" "+this._dayOverClass:"")+(b?" "+this._unselectableClass+" ui-state-disabled":"")+(M&&!d?"":" "+v[1]+(y.getTime()===N.getTime()?" "+this._currentClass:"")+(y.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(M&&!d||!v[2]?"":" title='"+v[2].replace(/'/g,"'")+"'")+(b?"":" data-handler='selectDay' data-event='click' data-month='"+y.getMonth()+"' data-year='"+y.getFullYear()+"'")+">"+(M&&!d?" ":b?"<span class='ui-state-default'>"+y.getDate()+"</span>":"<a class='ui-state-default"+(y.getTime()===B.getTime()?" ui-state-highlight":"")+(y.getTime()===N.getTime()?" ui-state-active":"")+(M?" ui-priority-secondary":"")+"' href='#' aria-current='"+(y.getTime()===N.getTime()?"true":"false")+"' data-date='"+y.getDate()+"'>"+y.getDate()+"</a>")+"</td>",y.setDate(y.getDate()+1),y=this._daylightSavingAdjust(y);f+=z+"</tr>"}11<++K&&(K=0,j++),u+=f+="</tbody></table>"+(J?"</div>"+(0<Y[0]&&p===Y[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}o+=u}return o+=x,e._keyEvent=!1,o},_generateMonthYearHeader:function(e,t,a,i,s,r,n,d){var c,o,l,h,u,p,g=this._get(e,"changeMonth"),_=this._get(e,"changeYear"),f=this._get(e,"showMonthAfterYear"),k=this._get(e,"selectMonthLabel"),D=this._get(e,"selectYearLabel"),m="<div class='ui-datepicker-title'>",y="";if(r||!g)y+="<span class='ui-datepicker-month'>"+n[t]+"</span>";else{for(c=i&&i.getFullYear()===a,o=s&&s.getFullYear()===a,y+="<select class='ui-datepicker-month' aria-label='"+k+"' data-handler='selectMonth' data-event='change'>",l=0;l<12;l++)(!c||l>=i.getMonth())&&(!o||l<=s.getMonth())&&(y+="<option value='"+l+"'"+(l===t?" selected='selected'":"")+">"+d[l]+"</option>");y+="</select>"}if(f||(m+=y+(!r&&g&&_?"":" ")),!e.yearshtml)if(e.yearshtml="",r||!_)m+="<span class='ui-datepicker-year'>"+a+"</span>";else{for(n=this._get(e,"yearRange").split(":"),h=(new Date).getFullYear(),u=(k=function(e){e=e.match(/c[+\-].*/)?a+parseInt(e.substring(1),10):e.match(/[+\-].*/)?h+parseInt(e,10):parseInt(e,10);return isNaN(e)?h:e})(n[0]),p=Math.max(u,k(n[1]||"")),u=i?Math.max(u,i.getFullYear()):u,p=s?Math.min(p,s.getFullYear()):p,e.yearshtml+="<select class='ui-datepicker-year' aria-label='"+D+"' data-handler='selectYear' data-event='change'>";u<=p;u++)e.yearshtml+="<option value='"+u+"'"+(u===a?" selected='selected'":"")+">"+u+"</option>";e.yearshtml+="</select>",m+=e.yearshtml,e.yearshtml=null}return m+=this._get(e,"yearSuffix"),f&&(m+=(!r&&g&&_?"":" ")+y),m+="</div>"},_adjustInstDate:function(e,t,a){var i=e.selectedYear+("Y"===a?t:0),s=e.selectedMonth+("M"===a?t:0),t=Math.min(e.selectedDay,this._getDaysInMonth(i,s))+("D"===a?t:0),i=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(i,s,t)));e.selectedDay=i.getDate(),e.drawMonth=e.selectedMonth=i.getMonth(),e.drawYear=e.selectedYear=i.getFullYear(),"M"!==a&&"Y"!==a||this._notifyChange(e)},_restrictMinMax:function(e,t){var a=this._getMinMaxDate(e,"min"),e=this._getMinMaxDate(e,"max"),a=a&&t<a?a:t;return e&&e<a?e:a},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){e=this._get(e,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,a,i){var s=this._getNumberOfMonths(e),a=this._daylightSavingAdjust(new Date(a,i+(t<0?t:s[0]*s[1]),1));return t<0&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(e,a)},_isInRange:function(e,t){var a,i=this._getMinMaxDate(e,"min"),s=this._getMinMaxDate(e,"max"),r=null,n=null,e=this._get(e,"yearRange");return e&&(e=e.split(":"),a=(new Date).getFullYear(),r=parseInt(e[0],10),n=parseInt(e[1],10),e[0].match(/[+\-].*/)&&(r+=a),e[1].match(/[+\-].*/))&&(n+=a),(!i||t.getTime()>=i.getTime())&&(!s||t.getTime()<=s.getTime())&&(!r||t.getFullYear()>=r)&&(!n||t.getFullYear()<=n)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return{shortYearCutoff:"string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,a,i){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);i=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(i,a,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),i,this._getFormatConfig(e))}}),V.fn.datepicker=function(e){if(!this.length)return this;V.datepicker.initialized||(V(document).on("mousedown",V.datepicker._checkExternalClick),V.datepicker.initialized=!0),0===V("#"+V.datepicker._mainDivId).length&&V("body").append(V.datepicker.dpDiv);
vendor: 543 bytes, line 1592
1592var t=Array.prototype.slice.call(arguments,1);return"string"==typeof e&&("isDisabled"===e||"getDate"===e||"widget"===e)||"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?V.datepicker["_"+e+"Datepicker"].apply(V.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?V.datepicker["_"+e+"Datepicker"].apply(V.datepicker,[this].concat(t)):V.datepicker._attachDatepicker(this,e)})},V.datepicker=new e,V.datepicker.initialized=!1,V.datepicker.uuid=(new Date).getTime(),V.datepicker.version="1.14.2",V.datepicker});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.