PageSourceSearch

https://turismotalavera.com/wp-content/plugins/stachethemes-event-…/js/3328-lazy.js?hash=252e9adcaf68b8781720

js turismotalavera.com collected 2026-10-02 12:21:23 UTC 28,942 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkstec=globalThis.webpackChunkstec||[]).push([[3328],{98196:(e,t,a)=>{a.r(t),a.d(t,{flushApiCache:()=>c,newApiDelete:()=>u,newApiGet:()=>l,newApiPost:()=>d,newApiPut:()=>m,testFetchUrl:()=>n,useApiGet:()=>i});var r=a(73772),s=a(26878);const __=r.__,n=e=>{const t=STEC_VARIABLES.rest_url+"wp/v2",a=STEC_VARIABLES.rest_url+"stec/v5";switch(e){case"COMMENTS":return`${t}/comments`;case"USERS":return`${t}/users`;case"STEC-USERS":return`${a}/users`;case"SETTINGS":return`${a}/settings`;case"PERMISSIONS":return`${a}/permissions`;case"CALENDARS":return`${a}/calendars`;case"CATEGORIES":return`${a}/categories`;case"ORGANIZERS":return`${a}/organizers`;case"GUESTS":return`${a}/guests`;case"LOCATIONS":return`${a}/locations`;case"EVENTS":return`${a}/events`;case"EVENTS/ARCHIVE":return`${a}/events/archive`;case"EVENTS/UNARCHIVE":return`${a}/events/unarchive`;case"EVENTS/EMPTY-ARCHIVE":return`${a}/events/empty-archive`;case"DELETE-FROM-CALENDAR":return`${a}/delete-from-calendar`;case"DASHBOARD/COUNTERS":return`${a}/dashboard-counters`;case"UPLOAD-IMAGES":return`${a}/upload-images`;default:return e}},o={},c=({group:e=!1,key:t=!1}={})=>{e?t?o[e]&&o[e][t]&&delete o[e][t]:o[e]&&delete o[e]:t?o[t]&&delete o[t]:Object.keys(o).forEach((e=>delete o[e]))},i=e=>{const{route:t,args:a,cacheGroup:r,cacheKey:n,errorMessage:c=__("An error occurred while fetching the data.","stachethemes_event_calendar_lite"),waitExec:i=!1,includeResponseHeaders:d=!1,includeResponseStatus:m=!1,headers:u={"Content-Type":"application/json","X-WP-Nonce":STEC_VARIABLES.api_nonce}}=e,[h,_]=(0,s.useState)(null),[p,g]=(0,s.useState)(null),[y,f]=(0,s.useState)(!0),S=JSON.stringify(e);(0,s.useEffect)((()=>{let e=!0;const s=new AbortController;return i||(async()=>{f(!0);let i=!1;if(n&&(i=r?o[r]?.[n]:o[n]),i)_(i),f(!1),g(!1);else try{const i=await l({route:t,args:a,abortController:s,includeResponseHeaders:d,includeResponseStatus:m,cacheGroup:r,cacheKey:n,headers:u,errorMessage:c});e&&(_(i),f(!1),g(!1),n)&&((r?o[r]:o)[n]=i)}catch(t){if(e&&!s.signal.aborted){let e=c;"auto"===c&&t.message&&"string"==typeof t.message&&(e=t.message),g(e)}}finally{f(!1)}})(),()=>{e=!1,s.abort()}}),[S]);let E=!1;y||!h&&!p||(E=!0);let w=!1,v=!1,A="";return E&&h&&(d&&(v=h.headers),m&&(A=h.status),w=d||m?h.data:h),{data:w,headers:v,status:A,error:p,isLoading:y,ready:E}},l=({route:e,args:t,abortController:a,cacheGroup:r,cacheKey:s,includeResponseHeaders:c=!1,includeResponseStatus:i=!1,headers:l={"Content-Type":"application/json","X-WP-Nonce":STEC_VARIABLES.api_nonce},translateErrorCode:d=!1,errorMessage:m=__("Sorry, something went wrong","stachethemes_event_calendar_lite"),expectType:u="json"})=>{let h=n(e);t&&(h+=`/${t.toString()}`);return(async()=>{const e=window.stecFilterApiTimeoutDelay||3e4,t={method:"GET",headers:l};a||(a=new AbortController);const n=setTimeout((()=>{a.abort()}),e);t.signal=a.signal;let _=!1;if(s&&(_=r?o[r]?.[s]:o[s]),_)return _;try{const e=await fetch(h,t);let a;switch(u){case"json":default:a=await e.json();break;case"text":a=await e.text()}if(!e.ok)throw"auto"===(m=d&&d[a.code]?d[a.code]:"auto"===m&&a&&a.message?a.message:m||__("Sorry, something went wrong","stachethemes_event_calendar_lite"))&&(m=__("Sorry, something went wrong","stachethemes_event_calendar_lite")),new Error(m);if(!0===c&&(a={data:a,headers:e.headers}),!0===i&&(c?a.status=e.status:a={data:a,status:e.status}),s){r&&"object"!=typeof o[r]&&(o[r]={});(r?o[r]:o)[s]=a}return a}catch(e){if(!a.signal.aborted)throw e}finally{clearTimeout(n)}})()},d=async({route:e,args:t,abortController:a,includeResponseHeaders:r=!1,includeResponseStatus:s=!1,hasFiles:o=!1,data:c,headers:i={},translateErrorCode:l=!1,errorMessage:d=__("Sorry, something went wrong","stachethemes_event_calendar_lite")})=>{let m=n(e);t&&(m+=`/${t.toString()}`),i["X-WP-Nonce"]||(i["X-WP-Nonce"]=STEC_VARIABLES.api_nonce),o||i["Content-Type"]||(i["Content-Type"]="application/json");return(async()=>{const e=window.stecFilterApiTimeoutDelay||3e4,t={method:"POST",body:o?c:JSON.stringify(c||""),headers:i};a||(a=new AbortController);const n=setTimeout((()=>{a.abort()}),e);t.signal=a.signal;try{const e=await fetch(m,t);let a=await e.json();if(!e.ok)throw"auto"===(d=l&&l[a.code]?l[a.code]:"auto"===d&&a&&a.message?a.message:d||__("Sorry, something went wrong","stachethemes_event_calendar_lite"))&&(d=__("Sorry, something went wrong","stachethemes_event_calendar_lite")),new Error(d);return!0===r&&(a={data:a,headers:e.headers}),!0===s&&(r?a.status=e.status:a={data:a,status:e.status}),a}catch(e){if(!a.signal.aborted)throw e}finally{clearTimeout(n)}})()},m=async({route:e,args:t,abortController:a,includeResponseHeaders:r=!1,includeResponseStatus:s=!1,hasFiles:o=!1,data:c,headers:i={},translateErrorCode:l=!1,errorMessage:d=__("Sorry, something went wrong","stachethemes_event_calendar_lite")})=>{let m=n(e);t&&(m+=`/${t.toString()}`),i["X-WP-Nonce"]||(i["X-WP-Nonce"]=STEC_VARIABLES.api_nonce),o||i["Content-Type"]||(i["Content-Type"]="application/json");return(async()=>{const e=window.stecFilterApiTimeoutDelay||3e4,t={method:"PUT",body:o?c:JSON.stringify(c||""),headers:i};a||(a=new AbortController);const n=setTimeout((()=>{a.abort()}),e);t.signal=a.signal;try{const e=await fetch(m,t);let a=await e.json();if(!e.ok)throw"auto"===(d=l&&l[a.code]?l[a.code]:"auto"===d&&a&&a.message?a.message:d||__("Sorry, something went wrong","stachethemes_event_calendar_lite"))&&(d=__("Sorry, something went wrong","stachethemes_event_calendar_lite")),new Error(d);return!0===r&&(a={data:a,headers:e.headers}),!0===s&&(r?a.status=e.status:a={data:a,status:e.status}),a}catch(e){if(!a.signal.aborted)throw e}finally{clearTimeout(n)}})()},u=({route:e,args:t,abortController:a,includeResponseHeaders:r=!1,includeResponseStatus:s=!1,headers:o={},translateErrorCode:c=!1,errorMessage:i=__("Sorry, something went wrong","stachethemes_event_calendar_lite")})=>{let l=n(e);t&&(l+=`/${t.toString()}`),o["X-WP-Nonce"]||(o["X-WP-Nonce"]=STEC_VARIABLES.api_nonce),o["Content-Type"]||(o["Content-Type"]="application/json");return(async()=>{const e=window.stecFilterApiTimeoutDelay||3e4,t={method:"DELETE",headers:o};a||(a=new AbortController);const n=setTimeout((()=>{a.abort()}),e);t.signal=a.signal;try{const e=await fetch(l,t);let a=await e.json();if(!e.ok)throw"auto"===(i=c&&c[a.code]?c[a.code]:"auto"===i&&a&&a.message?a.message:i||__("Sorry, something went wrong","stachethemes_event_calendar_lite"))&&(i=__("Sorry, something went wrong","stachethemes_event_calendar_lite")),new Error(i);return!0===r&&(a={data:a,headers:e.headers}),!0===s&&(r?a.status=e.status:a={data:a,status:e.status}),a}catch(e){if(!a.signal.aborted)throw e}finally{clearTimeout(n)}})()}},32891:(e,t,a)=>{a.r(t),a.d(t,{default:()=>s});var r=a(8403);const s=e=>{const t=e.type?e.type:"icon",a=e.textColor?e.textColor:"#fff",s=e.backgroundColor?e.backgroundColor:"#000";
1return React.createElement(r.StecDiv,{className:`stec-thumbnail ${e.size||""}`,style:{backgroundColor:s}},"icon"===t&&e.icon&&React.createElement(r.StecDiv,{className:"stec-thumbnail-icon",style:{color:a}},React.createElement("i",{className:e.icon})),"date"===t&&e.month&&e.day&&React.createElement(React.Fragment,null,React.createElement(r.StecDiv,{className:"stec-thumbnail-date"},React.createElement(r.StecSpan,{className:"stec-thumbnail-date-day",style:{color:a}},e.day),React.createElement(r.StecSpan,{className:"stec-thumbnail-date-month",style:{color:a}},e.month))),"image"===t&&e.image&&React.createElement(React.Fragment,null,React.createElement(r.StecDiv,{className:"stec-thumbnail-image",style:{backgroundImage:`url(${e.image})`}})))}},6405:(e,t,a)=>{a.r(t),a.d(t,{MediaFrame:()=>p,beautifyDate:()=>v,beautifyEventTimespan:()=>w,calculateMasonryColumns:()=>P,canModerateCalendar:()=>$,centerScrollElement:()=>g,eventHasHealthMeasures:()=>R,getCellColor:()=>A,getColorBrightness:()=>T,getDayLabels:()=>y,getEventMapMarkerIcon:()=>M,getEventMomentWithOffset:()=>z,getEventPermalink:()=>N,getEventSortedImages:()=>Y,getEventThumbnailByType:()=>b,getFirstDayOfMonthInView:()=>B,getFirstDayOfWeekInView:()=>O,getGmapOverlayIcon:()=>I,getGoogleCalImportLink:()=>D,getImageUrl:()=>m,getIsEventScheduled:()=>C,getMediaSizes:()=>c,getMonthLabel:()=>S,getMonthLabels:()=>f,getPluginUrl:()=>d,getRegexByType:()=>h,getTimeFormat:()=>E,getTzAbbr:()=>l,getUtcOffset:()=>i,getWpDateformat:()=>k,htmlEntities:()=>L,isMobile:()=>u,onResizeEnd:()=>_,sortEventsByFeatured:()=>x});var r=a(32891),s=a(28698),n=a(73772),o=a(26960);const __=n.__,c=()=>"function"==typeof window.stecFilterMediaSizes?window.stecFilterMediaSizes():{mobile:660,tablet:1050},i=e=>{const t=e.utcOffset()/60;return 0===t?"UTC":`UTC${t>0?"+":""}${t}`},l=(e,{timezone:t="UTC",userTime:a=!1})=>{const r=a?Intl.DateTimeFormat().resolvedOptions().timeZone:t;return e.tz(r).format("z")},d=e=>{const t=new URL(STEC_VARIABLES.plugin_url);return e&&(t.pathname+=e),t},m=e=>new URL(`${STEC_VARIABLES.plugin_url}assets/images/${e}`),u=()=>/Mobi|Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),h=e=>{switch(e){case"title":return/\S+/;case"slug":return/\S*/;case"email":return/^$|^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;case"required_email":return/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;case"end_date":case"start_date":return/[0-9]{4}-[0-9]{2}-[0-9]{2}(T[0-9]{2}:[0-9]{2})?/;case"coordinates":return/^[-]?\d{1,2}(\.\d+)?,\s*[-]?\d{1,3}(\.\d+)?$/;case"text":return/[\w\u00C0-\u017F]/;case"phone":return/^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/;default:return null}},_=(e,t=100)=>{window.addEventListener("resize",(e=>{let a;return r=>{a&&clearTimeout(a),a=setTimeout(e,t,r)}})((function(t){"function"==typeof e&&e()})))},p=e=>new Promise((t=>{const a=window.wp.media({button:{text:e.buttonText},library:{type:e.libraryType},frame:"select",title:e.title,multiple:e.multiple});a.open(),a.on("select",(()=>{const e=a.state().get("selection").toJSON();return t(e)}))})),g=(e,t)=>{const a=t.current.offsetTop,r=t.current.clientHeight/2,s=e.current.clientHeight/2;e.current.scrollTo({top:a-s-r})},y=(e="")=>{const t=[__("Sunday","stachethemes_event_calendar_lite"),__("Monday","stachethemes_event_calendar_lite"),__("Tuesday","stachethemes_event_calendar_lite"),__("Wednesday","stachethemes_event_calendar_lite"),__("Thursday","stachethemes_event_calendar_lite"),__("Friday","stachethemes_event_calendar_lite"),__("Saturday","stachethemes_event_calendar_lite")];return"short"===e?t.map((e=>e.substring(0,3))):t},f=(e="")=>{const t=[__("January","stachethemes_event_calendar_lite"),__("February","stachethemes_event_calendar_lite"),__("March","stachethemes_event_calendar_lite"),__("April","stachethemes_event_calendar_lite"),__("May","stachethemes_event_calendar_lite"),__("June","stachethemes_event_calendar_lite"),__("July","stachethemes_event_calendar_lite"),__("August","stachethemes_event_calendar_lite"),__("September","stachethemes_event_calendar_lite"),__("October","stachethemes_event_calendar_lite"),__("November","stachethemes_event_calendar_lite"),__("December","stachethemes_event_calendar_lite")];return"short"===e?t.map((e=>e.substring(0,3))):t},S=(e,t="")=>{const a=[__("January","stachethemes_event_calendar_lite"),__("February","stachethemes_event_calendar_lite"),__("March","stachethemes_event_calendar_lite"),__("April","stachethemes_event_calendar_lite"),__("May","stachethemes_event_calendar_lite"),__("June","stachethemes_event_calendar_lite"),__("July","stachethemes_event_calendar_lite"),__("August","stachethemes_event_calendar_lite"),__("September","stachethemes_event_calendar_lite"),__("October","stachethemes_event_calendar_lite"),__("November","stachethemes_event_calendar_lite"),__("December","stachethemes_event_calendar_lite")][parseInt(e,10)];return"short"===t?a.substring(0,3):a},E=()=>{const e=STEC_VARIABLES.time_format;let t;switch(e){case"stec_24":t="HH:mm";break;case"stec_12":t="hh:mm a";break;case"wp":t=k("time");break;default:t=e||k("time")}return t},w=({event:e,dateFormat:t=STEC_VARIABLES.date_format,timeFormat:a=STEC_VARIABLES.time_format,showUtcOffset:r=!1,fullMonth:s=!1,forceHideEnd:n=!1,showInUserTimezone:o=!1,print:c=!1})=>{const l=moment.tz(e.meta.start_date,e.meta.timezone),d=moment.tz(e.meta.end_date,e.meta.timezone),m=n||e.meta.hide_end,u=[],h=s?"MMMM":"MMM";let _,p,g=e.meta.all_day;switch(o&&(l.local(),d.local(),g&&l.hour()>0&&(g=!1,59===d.minute()&&d.add(1,"minute"))),t){case"stec_dmy":_=`D ${h}, YYYY`;break;case"stec_mdy":_=`${h} D, YYYY`;break;case"stec_ymd":_=`YYYY, ${h} D`;break;case"wp":_=k("date");break;default:_=t||k("date")}switch(a){case"stec_24":p="HH:mm";break;case"stec_12":p="hh:mm a";break;case"wp":p=k("time");break;default:p=a||k("time")}if(u.push(l.format(_)),g||u.push(l.format(p)),!m){const e=d.isSame(l,"day");e&&g||u.push(" - "),e||u.push(d.format(_)),g||u.push(d.format(p))}if(r){const e=i(l);u.push(`(${e})`)}let y=u.join(" ");return"function"==typeof window.stecFilterBeautifyEventTimespan&&(y=window.stecFilterBeautifyEventTimespan({event:e,dateFormat:t,timeFormat:a,showUtcOffset:r,fullMonth:s,forceHideEnd:n,showInUserTimezone:o,print:c},y)),y},v=(e,t,a=STEC_VARIABLES.date_format,r=STEC_VARIABLES.time_format)=>{const s=moment(e);
1if(!s.isValid())return"";const n={stec_dmy:"D MMMM, YYYY",stec_mdy:"MMMM D, YYYY",stec_ymd:"YYYY, MMMM D",wp:k("date")}[a]||k("date"),o={stec_24:"HH:mm",stec_12:"hh:mm a",wp:k("time")}[r]||STEC_VARIABLES.time_format,c=t?n:`${n} ${o}`;let i=s.format(c);return"function"==typeof window.stecFilterBeautifyDate&&(i=window.stecFilterBeautifyDate({date:e,allDay:t,dateFormat:a,timeFormat:r},i)),i},A=(e,t="event")=>{let a=e.meta.color;switch(t){case"calendar":e.calendar&&(a=e.calendar.color);break;case"category":Array.isArray(e.categories)&&e.categories[0]&&(a=e.categories[0].color);break;case"organizer":Array.isArray(e.organizers)&&e.organizers[0]&&(a=e.organizers[0].color)}return a},b=(e,t="",a="event")=>{const s=(a,s,n)=>{switch(a){case"image":{const e=s?.image[0]?.sizes?.thumbnail;return React.createElement(r.default,{type:"image",image:e,backgroundColor:n,size:t})}case"date":{const a=moment.utc(e.meta.start_date),s=a.date(),o=a.month(),c=S(o,"short");return React.createElement(r.default,{type:"date",day:s,month:c,backgroundColor:n,size:t})}default:return React.createElement(r.default,{type:"icon",icon:s.icon,backgroundColor:n,size:t})}};if("calendar"===a&&e.calendar){const t=e.calendar,{thumbnail:a,color:r}=t;return s(a.type,a,r)}if("category"===a&&Array.isArray(e.categories)&&e.categories[0]){const t=e.categories[0],{thumbnail:a,color:r}=t;return s(a.type,a,r)}if("organizer"===a&&Array.isArray(e.organizers)&&e.organizers[0]){const t=e.organizers[0];let a="icon",r="",n=t.color;return t.photo&&t.photo.id&&(r={image:[t.photo]},a="image"),s(a,r,n)}return s(e.meta.thumbnail.type,e.meta.thumbnail,e.meta.color)},T=e=>{const[t,a,r]=e.substring(1).match(/.{2}/g).map((e=>parseInt(e,16)));return.2126*t+.7152*a+.0722*r},C=e=>!["EventCancelled","EventPostponed"].includes(e.meta.event_status),R=e=>!!e.meta.health_measures&&(!(!e.meta.health_measures.custom||""===e.meta.health_measures.custom)||Object.values(e.meta.health_measures).some((e=>!0===e))),M=(e,t="event")=>{const a=document.createElement("stec-div");let r=b(e,"",t);return(0,s.createRoot)(a).render(r),a},I=(e,t="event")=>{function a(e){this.thumbnailSource=t,this.event=e,this.eventListeners=[]}a.prototype=new google.maps.OverlayView,a.prototype.addListener=function(e,t){this.eventListeners.push({event:e,fn:t})},a.prototype.onAdd=function(){this.StecDiv=M(this.event,this.thumbnailSource),this.StecDiv.className="stec-gmap-overlay-pin",this.StecDiv.style="position: absolute";const e=this.getPanes();if(!e)return;const t=e.overlayMouseTarget.appendChild(this.StecDiv);this.eventListeners.forEach((e=>{t.addEventListener(e.event,(function(t){"function"==typeof e.fn&&e.fn(t)}))}))},a.prototype.draw=function(){const t=this.getProjection();if(!t)return;const a=e.location.coordinates.split(","),r=Number(a[0]),s=Number(a[1]),n=t.fromLatLngToDivPixel(new google.maps.LatLng(r,s)),o=this.StecDiv;o.style.left=n.x-28+"px",o.style.top=n.y-57+"px"},a.prototype.onRemove=function(){this.StecDiv&&(this.StecDiv.parentNode.removeChild(this.StecDiv),this.StecDiv=null)};return new a(e)},D=e=>{const t=moment.tz(e.meta.start_date,e.meta.timezone),a=moment.tz(e.meta.end_date,e.meta.timezone);let r,s;e.all_day?(r=t.format("YYYYMMDD"),s=moment(a).add(1,"day").format("YYYYMMDD")):(r=t.utc().format("YYYYMMDDTHHmmss")+"Z",s=a.utc().format("YYYYMMDDTHHmmss")+"Z");const n=e.location?[e.location.postal_code,e.location.address,e.location.city,e.location.state,e.location.country].filter(Boolean).join(", "):"",o=e.short_description;return`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${e.title}&dates=${r}/${s}&details=${o}&location=${n}&sf=true&output=xml`},Y=e=>{if(e.meta.images.length<=0)return[];const t=(0,o.cloneDeep)(e.meta.images);return t.sort((({order:e},{order:t})=>e-t)),t},$=e=>{try{return!0===STEC_VARIABLES?.current_user?.capability?.super||!(!Array.isArray(STEC_VARIABLES?.current_user?.capability?.moderate?.stec_cal)||!STEC_VARIABLES.current_user.capability.moderate.stec_cal.includes(e))}catch(e){return!1}},k=(e=!1)=>{let t=[];switch(e){case"date":t=[STEC_VARIABLES.wpdate_format];break;case"time":t=[STEC_VARIABLES.wptime_format];break;default:t=[STEC_VARIABLES.wpdate_format,STEC_VARIABLES.wptime_format]}t=t.join(" ");const a={A:"A",a:"a",B:"",c:"YYYY-MM-DD[T]HH:mm:ssZ",D:"ddd",d:"DD",e:"zz",F:"MMMM",G:"H",g:"h",H:"HH",h:"h
1h",I:"",i:"mm",j:"D",L:"",l:"dddd",M:"MMM",m:"MM",N:"E",n:"M",O:"ZZ",o:"YYYY",P:"Z",r:"ddd, DD MMM YYYY HH:mm:ss ZZ",S:"o",s:"ss",T:"z",t:"",U:"X",u:"SSSSSS",v:"SSS",W:"W",w:"e",Y:"YYYY",y:"YY",Z:"",z:"DDD"};let r=t.split("");return r=r.map((e=>a[e]?a[e]:e)),r.join("")},L=e=>"string"!=typeof e?e:e.replace(/&amp;|&lt;|&gt;|&quot;|&#039;/g,(e=>{switch(e){case"&amp;":return"&";case"&lt;":return"<";case"&gt;":return">";case"&quot;":return'"';case"&#039;":return"'"}})),N=e=>{let t=e.permalink;return e.repeat_offset&&e.repeat_offset>0&&("/"!==t.slice(-1)&&(t+="/"),t+=`${e.meta.start_date}`),t},x=e=>{if(!e||!e.length)return e;const t=e.filter((e=>!0===e.meta.featured)),a=e.filter((e=>!0!==e.meta.featured));return t.sort(((e,t)=>moment.utc(e.meta.start_date_utc).diff(moment.utc(t.meta.start_date_utc)))),[...t,...a]},B=(e,t)=>{const a="string"==typeof e?e:e.format("YYYY-MM-DD"),r=moment.utc(a).startOf("month"),s=(r.day()-t+7)%7,n=moment.utc(r).subtract(s,"days").format("YYYY-MM-DD");return moment(n).startOf("day")},O=(e,t)=>{const a="string"==typeof e?e:e.format("YYYY-MM-DD"),r=moment.utc(a).startOf("day"),s=(r.day()-t+7)%7,n=moment.utc(r).subtract(s,"days").format("YYYY-MM-DD");return moment(n).startOf("day")},z=(e,t,a)=>{const r=moment.utc(e).add(t,"seconds").format("YYYY-MM-DD HH:mm:ss");return moment.tz(r,a)},P=({gridContainerWidth:e,columnsCount:t,minWidth:a,gutter:r})=>{if("init"===e)return t;let s=r,n=Math.max(1,Math.floor((e+s)/(a+s)));n>t&&(n=t);const o=e-(n*a+(n-1)*s);return o>0&&(s+=Math.floor(o/(n-1))),n}},13328:(e,t,a)=>{a.r(t),a.d(t,{WithMaybeDisplayPermissions:()=>y,useElementWidth:()=>c,useEventById:()=>g,useOutsideHandler:()=>l,usePermissions:()=>_,usePostItems:()=>u,usePostItemsAll:()=>h,useResponsiveClass:()=>i,useTaxonomyItems:()=>d,useTaxonomyItemsAll:()=>m,useUsers:()=>p});var r=a(98196),s=a(6405),n=a(51527),o=a(26878);const c=e=>{const[t,a]=(0,o.useState)("init");return(0,o.useEffect)((()=>{const t=e.current;const r=new ResizeObserver((e=>{if(e[0]&&e[0].contentRect){(e=>{a(e)})(e[0].contentRect.width)}}));return t&&r.observe(t),()=>{clearTimeout(undefined),t&&r.unobserve(t)}}),[e,a]),t},i=e=>{(0,o.useEffect)((()=>{const t=e.current;let a;const r=new ResizeObserver((e=>{if(e[0]&&e[0].contentRect){(e=>{clearTimeout(a),a=setTimeout((()=>{let a="";const{mobile:r,tablet:n}=(0,s.getMediaSizes)();e<r?a="mobile":e<n&&(a="tablet"),t.classList.remove("tablet","mobile"),a&&t.classList.add(a)}),100)})(e[0].contentRect.width)}}));return t&&r.observe(t),()=>{clearTimeout(a),t&&r.unobserve(t)}}),[e])},l=(e,t)=>{const a=(0,o.useCallback)((a=>{e.current&&!e.current.contains(a.target)&&"function"==typeof t&&t(a)}),[e,t]);(0,o.useEffect)((()=>{if("function"==typeof t)return document.addEventListener("mousedown",a),()=>{document.removeEventListener("mousedown",a)}}),[t,a])},d=e=>{let t=!1;switch(e.taxonomy){case"stec_cal":t="CALENDARS";break;case"stec_cat":t="CATEGORIES";break;case"stec_loc":t="LOCATIONS";break;case"stec_org":t="ORGANIZERS";break;case"stec_gst":t="GUESTS";break;default:t=!1}const{data:a,ready:s,headers:n,error:o}=(0,r.useApiGet)({route:t,args:`?search=${e.search||""}&page=${e.page}&permission_type=${e.permissionType}&per_page=${e.perPage}`,includeResponseHeaders:!0,cacheKey:!1,seed:e.seed||0});let c=[],i=0;return s&&a&&!o&&(i=parseInt(n.get("x-wp-totalpages"),10),c=a),{items:c,totalPages:i,ready:s,error:o}},m=e=>{const[t,a]=(0,o.useState)({items:[],totalPages:0,ready:!1,error:!1});return(0,o.useEffect)((()=>{let t=!0;const s=new AbortController;let n=!1;switch(e.taxonomy){case"stec_cal":n="CALENDARS";break;case"stec_cat":n="CATEGORIES";break;case"stec_loc":n="LOCATIONS";break;case"stec_org":n="ORGANIZERS";break;case"stec_gst":n="GUESTS";break;default:n=!1}const o=async(a=1,c=[])=>{if(!1===t)return;const i=`?page=${a}&permission_type=${e.permissionType}&per_page=${e.perPage}`,l=`taxonomy-${e.taxonomy}`,d=JSON.stringify({route:n,args:i}),m=await(0,r.newApiGet)({route:n,args:i,abortController:s,cacheGroup:l,cacheKey:d,includeResponseHeaders:!0,seed:e.seed||0}),u=parseInt(m.headers.get("x-wp-totalpages"),10),h=m.data;return c=[...c,...h],u>a?await o(a+1,c):(m.data=c,m)};return(async()=>{try{const e=await o(),t=parseInt(e.headers.get("x-wp-totalpages"),10),r=e.data;a({items:r,totalPages:t,ready:!0,error:!1})}catch(e){if(s.signal.aborted||!1===t)return;a({items:[],totalPages:0,ready:!0,error:!0})}})(),()=>{t=!1,a({items:[],totalPages:0,ready:!1,error:!1}),s.abort()}}),[e.perPage,e.permissionType,e.seed,e.taxonomy]),t},u=e=>{let t=!1;if("stec_event"===e.postType)t="EVENTS";else t=!1;let a="view";"edit_permission"===e.permissionType&&(a="edit");const s=[`page=${e.page}`,`context=${a}`,`permission_type=${e.permissionType||"read_permission"}`,`per_page=${e.perPage}
1`],n={search:e.search,calendar:e.calendar,category:e.category,guest:e.guest,organizer:e.organizer,location:e.location,min_date:e.min_date,max_date:e.max_date,status:e.status};Object.entries(n).forEach((e=>{const[t,a]=e;a&&s.push(`${t}=${a}`)}));const{data:o,ready:c,error:i,headers:l}=(0,r.useApiGet)({route:t,args:`?${s.join("&")}`,includeResponseHeaders:!0,cacheKey:!1,seed:e.seed||0});let d=[],m=0;return c&&o&&!i&&(m=parseInt(l.get("x-wp-totalpages"),10),d=o),{items:d,totalPages:m,ready:c,error:i}},h=e=>{const[t,a]=(0,o.useState)({items:[],ready:!1,error:!1}),s=JSON.stringify(e);return(0,o.useEffect)((()=>{let t=!0;const s=new AbortController;let n=!1;if("stec_event"===e.post_type)n="EVENTS";else n=!1;const o=async(a=1,c=[])=>{if(!1===t)return;let i=e.context||"view";"edit_permission"===e.permissionType&&(i="edit");const l=[`page=${a}`,`context=${i}`,`permission_type=${e.permissionType||"read_permission"}`,`per_page=${e.perPage}`,`calendar=${e.calendar}`,`category=${e.category}`,`guest=${e.guest}`,`organizer=${e.organizer}`,`location=${e.location}`,`min_date=${e.minDate}`,`max_date=${e.maxDate}`,`minmax_intersect=${e.minMaxIntersect}`,`featured=${e.featured}`,`read_permission=${e.readPermission}`,`author=${e.author}`,`status=${e.status}`,`event_status=${e.eventStatus}`,`include=${e.include}`,`template_type=${e.templateType}`].filter((e=>{const t=e.split("=")[1];return void 0!==t&&"undefined"!==t&&""!==t})),d=await(0,r.newApiGet)({route:n,args:`?${l.join("&")}`,abortController:s,includeResponseHeaders:!0,seed:e.seed||0}),m=parseInt(d.headers.get("x-wp-totalpages"),10),u=d.data;return c=[...c,...u],m>a?await o(a+1,c):c};return(async()=>{try{const e=await o();t&&a({items:e,ready:!0,error:!1})}catch(e){t&&a({items:[],ready:!0,error:!0})}})(),()=>{t=!1,a({items:[],ready:!1,error:!1}),s.abort()}}),[s]),t},_=()=>{const{data:e,ready:t,error:a}=(0,r.useApiGet)({route:"PERMISSIONS",cacheKey:"usePermissions"});return{items:e,ready:t,error:a}},p=()=>{const[e,t]=(0,o.useState)({ready:!1,error:!1,items:[]});return(0,o.useEffect)((()=>{const a=new AbortController,s=async(e=1,t=[])=>{const n=JSON.stringify({route:"USERS",args:`?page=${e}`}),o=await(0,r.newApiGet)({route:"USERS",args:`?page=${e}`,cacheKey:n,abortController:a,includeResponseHeaders:!0}),c=parseInt(o.headers.get("x-wp-totalpages"),10),i=o.data;return t=[...t,...i],c>e?await s(e+1,t):t};return!1===e.ready&&(async()=>{try{const e=await s();t({items:e,ready:!0})}catch(e){if(a.signal.aborted)return;t({items:[],ready:!0,error:!0})}})(),()=>{a.abort()}}),[t,e.ready]),e},g=({id:e,permissionType:t="read_permission",offsetDate:a=!1})=>{const[s,c]=(0,o.useState)({item:[],ready:!1,error:!1});return(0,o.useEffect)((()=>{let s=!0;const o=new AbortController;return(async()=>{try{let i="event";"edit_permission"===t&&(i="edit");const l=await(0,r.newApiGet)({route:"EVENTS",args:`${e}?context=${i}&permission_type=${t}&start_date=${a||""}`,abortController:o});if(!s)return;let d;if(a&&a!==l.meta.start_date){const e=moment.tz(a,l.meta.timezone),t=await(0,n.getWorkerEventsBetween)({startRange:moment(e).startOf("day").utc().format("YYYY-MM-DD HH:mm:ss"),endRange:moment(e).endOf("day").utc().format("YYYY-MM-DD HH:mm:ss"),minDate:moment(e).startOf("day").utc().format("YYYY-MM-DD HH:mm:ss"),limit:1,filters:{},threadIndex:"SINGLE_PAGE_EVENT_RECURRENCE",events:[l]});if(!(Array.isArray(t)&&t.length>0))throw"occurrence_not_found";d=t[0]}else d=l;s&&c({item:d,ready:!0,error:!1})}catch(e){s&&c({item:[],ready:!0,error:!0})}})(),()=>{s=!1,o.abort()}}),[e,t,a]),s},y=({children:e,type:t=""})=>{let a=!1;switch(t){case"read_permission":a=!STEC_VARIABLES?.enforce_private_front;break;case"use_permission":case"edit_permission":a=!STEC_VARIABLES?.enforce_private_admin;break;default:a=!1}return!1===a?null:e}},8403:(e,t,a)=>{a.r(t),a.d(t,{StecDiv:()=>s,StecInputCheckBox:()=>n,StecSpan:()=>o});var r=a(58168);const s=React.forwardRef(((e,t)=>{if(!0===window.DISABLE_STEC_WEB_COMPONENTS)return React.createElement("div",(0,r.default)({ref:t},e));{let a={...e};return a.className&&(a.class=a.className),delete a.className,React.createElement("stec-div",(0,r.default)({ref:t},a))}}));s.displayName="StecDiv";const n=React.forwardRef(((e,t)=>{if(!0===window.DISABLE_STEC_WEB_COMPONENTS)return React.createElement("input",(0,r.default)({type:"checkbox",ref:t},e,{title:e.hint}));{let a={...e},s=e.checked?["stec-input-type-checkbox","fa-solid fa-check"]:["stec-input-type-checkbox"];a.class&&(s.push(a.class),delete a.class);const n=t=>{e.onChange&&e.onChange({...t,target:{...t.target,checked:!e.checked}})};return React.createElement("stec-checkbox",(0,r.default)({title:e.hint,tabIndex:0,class:s.join(" "),ref:t},a,{onClick:e=>{n(e)},onKeyDown:e=>{" "===e.key&&(n(e),e.preventDefault())}}))}}));n.displayName="StecInputCheckBox";const o=React.forwardRef(((e,t)=>{if(!0===window.DISABLE_STEC_WEB_COMPONENTS)return React.createElement("span",(0,r.default)({ref:t},e));{let a={...e};return a.className&&(a.class=a.className,delete a.className),React.createElement("stec-span",(0,r.default)({ref:t},a))}}));o.displayName="StecSpan"},51527:(e,t,a)=>{a.r(t),a.d(t,{getWorkerEventsBetween:()=>s,getWorkerEventsFilters:()=>n,getWorkerEventsSearchByText:()=>o});const r=[],s=e=>new Promise((t=>{r[e.threadIndex]instanceof Worker&&r[e.threadIndex].terminate();const a=`${STEC_VARIABLES.workers_url}events.js?ver${STEC_VARIABLES.version}`;r[e.threadIndex]=new Worker(a),"function"==typeof window.stecFilterGetWorkerEventsBetween&&(e.stecFilterGetWorkerEventsBetween=`return ${window.stecFilterGetWorkerEventsBetween.toString()};`),r[e.threadIndex].postMessage({task:"getEventsBetween",params:e,depScripts:[STEC_VARIABLES.moment_url,STEC_VARIABLES.moment_tz_url,STEC_VARIABLES.rrule_url]}),r[e.threadIndex].onmessage=a=>(r[e.threadIndex].terminate(),t(a.data))})),n=e=>new Promise((t=>{r[e.threadIndex]instanceof Worker&&r[e.threadIndex].terminate();const a=`${STEC_VARIABLES.workers_url}events.js?ver${STEC_VARIABLES.version}`;r[e.threadIndex]=new Worker(a),r[e.threadIndex].postMessage({task:"getEventsFilters",params:e,depScripts:[]}),r[e.threadIndex].onmessage=a=>(r[e.threadIndex].terminate(),t(a.data))})),o=e=>new Promise((t=>{r[e.threadIndex]instanceof Worker&&r[e.threadIndex].terminate();const a=`${STEC_VARIABLES.workers_url}events.js?ver${STEC_VARIABLES.version}`;r[e.threadIndex]=new Worker(a),r[e.threadIndex].postMessage({task:"getWorkerEventsSearchByText",params:e,depScripts:[STEC_VARIABLES.moment_url,STEC_VARIABLES.moment_tz_url,STEC_VARIABLES.rrule_url]}),r[e.threadIndex].onmessage=a=>(r[e.threadIndex].terminate(),t(a.data))}))}}]);

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.