"use strict";(self.webpackChunkcircle=self.webpackChunkcircle||[]).push([[7209],{93008:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"toggleSpaceGroupMemberSelect",value:function(){this.spaceGroupMemberSelectTarget.classList.toggle("disable-element")}},{key:"toggleSpaceMemberSelect",value:function(){this.spaceMemberSelectTarget.classList.toggle("disable-element")}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr);c.targets=["spaceMemberSelect","spaceGroupMemberSelect"]},32960:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"toggle",value:function(){this.sendEmailTarget.classList.toggle("hidden")}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr);c.targets=["sendEmail"]},84619:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"toggle",value:function(){this.submenuTarget.classList.toggle("hidden"),this.caretTarget.classList.toggle("rotate-90"),this.caretTarget.classList.contains("text-gray-400")?(this.caretTarget.classList.remove("text-gray-400"),this.caretTarget.classList.add("text-gray-300")):this.caretTarget.classList.contains("text-gray-300")&&(this.caretTarget.classList.remove("text-gray-300"),this.caretTarget.classList.add("text-gray-400"))}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr);c.targets=["submenu","caret"]},16216:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"initialize",value:function(){this.showTab(this.element.dataset.currentTabIndex||0)}},{key:"change",value:function(t){t.preventDefault(),this.index=this.tabTargets.indexOf(t.target.dataset.adminTabsIndex),this.showTab(t.target.dataset.adminTabsIndex)}},{key:"showTab",value:function(t){this.tabPanelTargets.forEach((function(e){e.dataset.adminTabsIndex==t?e.classList.remove("hidden"):e.classList.add("hidden")})),this.tabTargets.forEach((function(e){e.dataset.adminTabsIndex==t?(e.classList.remove("border-transparent","text-gray-500","hover:text-gray-700","hover:border-gray-300"),e.classList.add("active","border-indigo-500","text-indigo-600")):(e.classList.remove("active","border-indigo-500","text-indigo-600"),e.classList.add("border-transparent","text-gray-500","hover:text-gray-700","hover:border-gray-300"))}))}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr);c.targets=["tab","tabPanel"]},5312:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"connect",value:function(){}},{key:"toggleCustomSignUp",value:function(t){t.target.checked&&!this.customSignUpTarget.checked&&(this.customSignUpTarget.checked=!0,this.customSignUpTarget.dispatchEvent(new Event("change")))}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr);c.targets=["customSignUp"]},37428:(t,e,n)=>{n.r(e),n.d(e,{default:()=>f});var r=n(67931),o=n(70360);function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=s(t);if(e){var o=s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}var u="form-control--has-error-v2",l="invisible",f=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(f,t);var e,n,r,s=c(f);function f(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=s.call.apply(s,[this].concat(n))).onFieldKeyUp=function(){var e=t.checkPasswordAreEqual(),n=t.checkPasswordFormat();t.updateFieldsErrorClasses({passwordHasError:!n,confirmationHasError:!e})},t.checkPasswordFormat=function(){return!t.passwordField.value||o.zU.test(t.passwordField.value)},t.checkPasswordAreEqual=function(){return t.passwordField.value===t.passwordConfirmationField.value},t.updateFieldsErrorClasses=function(e){var n=e.passwordHasError,r=void 0!==n&&n,o=e.confirmationHasError,i=void 0!==o&&o,a=t.passwordField,c=t.passwordConfirmationField,s=t.passwordFormatError,f=t.passwordConfirmationError;r&&a.value.length>0?(a.classList.add(u),s.classList.remove(l)):(a.classList.remove(u),s.classList.add(l)),i&&c.value.length>0?(c.classList.add(u),f.classList.remove(l)):(c.classList.remove(u),f.classList.add(l)),r||i?t.saveButton.setAttribute("disabled",!0):t.saveButton.removeAttribute("disabled")},t}return e=f,(n=[{key:"connect",value:function(){this.passwordField=document.getElementById("user_password"),this.passwordConfirmationField=document.getElementById("user_password_confirmation"),this.saveButton=document.getElementById("save-button"),this.passwordField.addEventListener("keyup",this.onFieldKeyUp),this.passwordConfirmationField.addEventListener("keyup",this.onFieldKeyUp),this.passwordFormatError=document.getElementById("password-format-error"),this.passwordConfirmationError=document.getElementById("password-confirmation-error")}},{key:"disconnect",value:function(){this.passwordField.removeEventListener("keyup",this.onPasswordFieldKey),this.passwordConfirmationField.removeEventListener("keyup",this.onPasswordConfirmFieldKeyUp)}}])&&i(e.prototype,n),r&&i(e,r),f}(r.Qr)},70507:(t,e,n)=>{n.r(e),n.d(e,{default:()=>f});var r=n(91296),o=n.n(r);function i(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return c=t.done,t},e:function(t){s=!0,i=t},f:function(){try{c||null==n.return||n.return()}finally{if(s)throw i}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function u(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=l(t);if(e){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}var f=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(l,t);var e,n,r,a=u(l);function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return e=l,(n=[{key:"connect",value:function(){this.resultsTarget.hidden=!0,this.inputTarget.setAttribute("autocomplete","off"),this.inputTarget.setAttribute("spellcheck","false"),this.mouseDown=!1,this.onInputChange=o()(this.onInputChange.bind(this),300),this.onResultsClick=this.onResultsClick.bind(this),this.onResultsMouseDown=this.onResultsMouseDown.bind(this),this.onInputBlur=this.onInputBlur.bind(this),this.onWindowClick=this.onWindowClick.bind(this),this.onKeydown=this.onKeydown.bind(this),this.inputTarget.addEventListener("keydown",this.onKeydown),this.inputTarget.addEventListener("blur",this.onInputBlur),this.inputTarget.addEventListener("input",this.onInputChange),this.resultsTarget.addEventListener("mousedown",this.onResultsMouseDown),this.resultsTarget.addEventListener("mouseover",this.onResultsMouseDown),this.resultsTarget.addEventListener("click",this.onResultsClick),window.addEventListener("click",this.onWindowClick)}},{key:"disconnect",value:function(){this.inputTarget.removeEventListener("keydown",this.onKeydown),this.inputTarget.removeEventListener("focus",this.onInputFocus),this.inputTarget.removeEventListener("blur",this.onInputBlur),this.inputTarget.removeEventListener("input",this.onInputChange),this.resultsTarget.removeEventListener("mousedown",this.onResultsMouseDown),this.resultsTarget.removeEventListener("click",this.onResultsClick),window.removeEventListener("click",this.onInputBlur)}},{key:"sibling",value:function(t){var e=Array.from(this.resultsTarget.querySelectorAll('[role="option"]')),n=this.resultsTarget.querySelector('[aria-selected="true"]'),r=e.indexOf(n),o=t?e[r+1]:e[r-1],i=t?e[0]:e[e.length-1];return o||i}},{key:"select",value:function(t){var e,n=i(this.resultsTarget.querySelectorAll('[aria-selected="true"]'));try{for(n.s();!(e=n.n()).done;){var r=e.value;r.removeAttribute("aria-selected"),r.classList.remove("active")}}catch(o){n.e(o)}finally{n.f()}t.setAttribute("aria-selected","true"),t.classList.add("active"),this.inputTarget.setAttribute("aria-activedescendant",t.id)}},{key:"unselectAll",value:function(){for(var t=this.resultsTarget.getElementsByClassName("search-results__item"),e=0;e<t.length;e++)t[e].classList.remove("active")}},{key:"onKeydown",value:function(t){switch(t.key){case"Escape":this.resultsTarget.hidden||(this.hideAndRemoveOptions(),t.stopPropagation(),t.preventDefault());break;case"ArrowDown":var e=this.sibling(!0);this.unselectAll(),e&&this.select(e),t.preventDefault();break;case"ArrowUp":var n=this.sibling(!1);this.unselectAll(),n&&this.select(n),t.preventDefault();break;case"Tab":var r=this.resultsTarget.querySelector('[aria-selected="true"]');r&&this.commit(r);break;case"Enter":t.preventDefault();var o=this.resultsTarget.querySelector('[aria-selected="true"]');o&&!this.resultsTarget.hidden&&this.commit(o)}}},{key:"onInputBlur",value:function(){this.mouseDown||(this.resultsTarget.hidden=!0)}},{key:"onWindowClick",value:function(){this.resultsTarget.hidden=!0}},{key:"commit",value:function(t){if("true"!==t.getAttribute("aria-disabled")){t.getElementsByTagName("a")[0].click(),this.resultsTarget.hidden=!0;var e=t.textContent.trim(),n=t.getAttribute("data-autocomplete-value")||e;this.inputTarget.focus(),this.hideAndRemoveOptions(),this.element.dispatchEvent(new CustomEvent("autocomplete.change",{bubbles:!0,detail:{value:n,textValue:e}}))}}},{key:"onResultsClick",value:function(t){if(t.target instanceof Element){var e=t.target.closest('[role="option"]');e&&this.commit(e)}}},{key:"onResultsMouseDown",value:function(t){var e=this;this.mouseDown=!0,this.unselectAll(),t.target.parentNode.classList.add("active"),this.resultsTarget.addEventListener("mouseup",(function(){return e.mouseDown=!1}),{once:!0})}},{key:"clear",value:function(){var t=this.inputTarget.value;t&&""!==t&&(this.inputTarget.value="",this.clearTarget.classList.add("hidden"))}},{key:"onInputChange",value:function(){var t=this.inputTarget.value,e=this.clearTarget.classList.contains("hidden");"v2-search"===this.inputTarget.getAttribute("data-name")&&this.removeAmountEl(),t&&""!==t&&e?this.clearTarget.classList.remove("hidden"):""===t&&this.clearTarget.classList.add("hidden"),this.element.removeAttribute("value"),this.fetchResults()}},{key:"identifyOptions",value:function(){var t,e=0,n=i(this.resultsTarget.querySelectorAll('[role="option"]:not([id])'));try{for(n.s();!(t=n.n()).done;)t.value.id="".concat(this.resultsTarget.id,"-option-").concat(e++)}catch(r){n.e(r)}finally{n.f()}}},{key:"hideAndRemoveOptions",value:function(){this.resultsTarget.hidden=!0,this.resultsTarget.innerHTML=null}},{key:"removeAmountEl",value:function(){var t=this.resultsTarget.parentNode.parentNode.getElementsByClassName("search-results__amount");t.length>0&&t[0].remove()}},{key:"fetchResults",value:function(){var t=this,e=this.inputTarget.value.trim();if(!e||e.length<this.minLength)this.hideAndRemoveOptions();else if(this.src){var n=new URL(this.src,window.location.href),r=new URLSearchParams(n.search.slice(1));r.append("q",e),n.search=r.toString(),this.element.dispatchEvent(new CustomEvent("loadstart"));var o,i=this.inputTarget.getAttribute("data-name"),a=this.element.parentElement,c=a.lastElementChild.firstElementChild,s=document.createElement("div");s.classList.add("trix-preloader","search-preloader"),"v1-search"===i?(o=a.lastElementChild).classList.add("hidden"):"v2-search"===i&&(c.nextSibling.classList.add("search-loading"),this.toggleV2SearchIcon()),a.appendChild(s),fetch(n.toString()).then((function(t){return t.text()})).then((function(e){if(t.resultsTarget.innerHTML=e,"v1-search"===i)o.classList.remove("hidden"),a.getElementsByTagName("svg")[0].classList.remove("hidden");else if("v2-search"===i){c.firstElementChild.classList.remove("search-loading");var n=document.createElement("div");n.classList.add("search-results__amount");var r=(l=e,f=document.createElement("div"),f.innerHTML=l,f).getElementsByTagName("li"),u=r.length;u>=1&&"No results"!==r[0].innerText?(t.resultsTarget.classList.add("has-results"),n.innerHTML=1===u?u+" Result":u+" Results",t.resultsTarget.parentNode.parentNode.appendChild(n)):u<1&&"No results"===r[0].innerText&&t.resultsTarget.classList.remove("has-results")}var l,f;s.remove(),"v2-search"===i&&t.toggleV2SearchIcon();var p=t.resultsTarget.getElementsByTagName("li")[0];p.classList.add("active"),p.setAttribute("aria-selected","true"),t.inputTarget.setAttribute("aria-activedescendant",p.id),t.identifyOptions(),t.resultsTarget.hidden=!1,t.element.dispatchEvent(new CustomEvent("load")),t.element.dispatchEvent(new CustomEvent("loadend"))})).catch((function(){t.element.dispatchEvent(new CustomEvent("error")),t.element.dispatchEvent(new CustomEvent("loadend"))}))}}},{key:"toggleV2SearchIcon",value:function(){var t=this.element.parentElement.lastElementChild.firstElementChild.getElementsByClassName("search-modal__search-icon")[0].getElementsByClassName("icon-search")[0];t&&t.classList.toggle("opacity-0")}},{key:"open",value:function(){this.resultsTarget.hidden&&(this.resultsTarget.hidden=!1,this.element.setAttribute("aria-expanded","true"),this.element.dispatchEvent(new CustomEvent("toggle",{detail:{input:this.input,results:this.results}})))}},{key:"close",value:function(){this.resultsTarget.hidden||(this.resultsTarget.hidden=!0,this.inputTarget.removeAttribute("aria-activedescendant"),this.element.setAttribute("aria-expanded","false"),this.element.dispatchEvent(new CustomEvent("toggle",{detail:{input:this.input,results:this.results}})))}},{key:"src",get:function(){return this.data.get("url")}},{key:"minLength",get:function(){var t=this.data.get("min-length");return t?parseInt(t,10):0}}])&&c(e.prototype,n),r&&c(e,r),l}(n(67931).Qr);f.targets=["input","hidden","results","clear"]},79374:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"goBack",value:function(t){t.preventDefault();var e=this.element.dataset.fallbackUrl||"/",n=window.location.href;window.location.href=e,setTimeout((function(){window.location.href==n&&(window.location.href=e)}),500)}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr);c.targets=[]},14522:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"connect",value:function(){this.homeTarget.classList.contains("active")}},{key:"openHome",value:function(t){t.preventDefault(),this.homeTarget.classList.contains("active")?this.scrollToTop():this.homeTarget.classList.add("active"),this.closeAllDropdowns(),this.markAllExceptInactive(this.homeTarget),this.removeMobileBodyNoscroll()}},{key:"openSearch",value:function(t){t.preventDefault(),this.closeAllDropdowns(),this.searchTarget.classList.add("active"),document.getElementById("search-window-dropdown").classList.remove("hidden"),this.focusSearchInput(),this.markAllExceptInactive(this.searchTarget),this.addMobileBodyNoscroll()}},{key:"openAddPost",value:function(t){this.openHome(t);var e=document.getElementById("sidebar--right__btn-quick-post"),n=document.getElementById("space__action__btn-new-post");e?e.click():n&&n.click()}},{key:"openNotifications",value:function(t){t.preventDefault(),this.closeAllDropdowns(),this.notificationsTarget.classList.add("active"),this.markAllExceptInactive(this.notificationsTarget),this.addMobileBodyNoscroll()}},{key:"openMessages",value:function(t){t.preventDefault(),this.messagesTarget.classList.add("active"),this.markAllExceptInactive(this.messagesTarget),this.addMobileBodyNoscroll()}},{key:"addMobileBodyNoscroll",value:function(){document.body.classList.add("fixed")}},{key:"removeMobileBodyNoscroll",value:function(){document.body.classList.remove("fixed")}},{key:"markAllExceptInactive",value:function(t){var e=[this.searchTarget,this.notificationsTarget,this.homeTarget,this.addPostTarget];this.hasMessagesTarget&&e.push(this.messagesTarget);for(var n=0;n<e.length;n++)e[n]!==t&&e[n].classList.remove("active")}},{key:"scrollToTop",value:function(){window.scrollTo({top:0,behavior:"smooth"})}},{key:"closeAllDropdowns",value:function(){for(var t=document.getElementsByClassName("dropdown-menu--bottom-bar"),e=0;e<t.length;e++)t[e].classList.add("hidden")}},{key:"focusSearchInput",value:function(){document.getElementsByClassName("bottom-bar-search-input")[0].focus()}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr);c.targets=["home","notifications","search","messages","addPost"]},94431:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"connect",value:function(){this.notificationPopupTarget&&(this.showNotificationPermissionPopup(),this.seekPermission())}},{key:"seekPermission",value:function(){var t=this;"Notification"in window?"granted"===Notification.permission?this.addServiceWorker():"denied"!==Notification.permission&&this.enableNotificationTarget.addEventListener("click",(function(){Notification.requestPermission().then(t.addServiceWorker()),t.notificationPopupTarget.classList.add("hide-notification-popup")})):console.error("This browser does not support desktop notification")}},{key:"addServiceWorker",value:function(){"serviceWorker"in navigator&&(navigator.serviceWorker.register("/serviceworker.js"),navigator.serviceWorker.ready.then((function(t){t.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:window.vapidPublicKey}).then((function(t){fetch("/desktop_browsers",{body:JSON.stringify({browser:t.toJSON()}),method:"POST",dataType:"script",credentials:"include",headers:{Accept:"application/json","Content-Type":"application/json"}})}))})).catch((function(t){console.error("Registration failed",":^(",t)})))}},{key:"hideNotificationPermissionPopup",value:function(){this.notificationPopupTarget.classList.add("hide-notification-popup"),fetch("/members/browser_notifications",{method:"PUT",dataType:"script",credentials:"include",headers:{Accept:"application/json","Content-Type":"application/json"}}).then((function(){window.location.reload()})).catch((function(t){console.error("Disabling browser notification failed",":^(",t)}))}},{key:"showNotificationPermissionPopup",value:function(){"Notification"in window?"default"!==Notification.permission||window.location.href.includes("profile?new_state=true")||this.notificationPopupTarget.classList.remove("hide-notification-popup"):console.warn("This browser does not support desktop notifications.")}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr);c.targets=["notificationPopup","enableNotification"]},16187:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"copy",value:function(t){t.preventDefault(),this.sourceTarget.select(),document.execCommand("copy")}},{key:"copyText",value:function(){var t=document.createElement("input");t.style="position: absolute; left: -1000px; top: -1000px",t.value=this.element.dataset.source,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}},{key:"copyWithPrefix",value:function(){var t=document.createElement("input");t.style="position: absolute; left: -1000px; top: -1000px",t.value=(this.element.dataset.prefix?this.element.dataset.prefix:"")+this.sourceTarget.value,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),this.sourceTarget.select(),event.preventDefault()}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr);c.targets=["source"]},94033:(t,e,n)=>{n.r(e),n.d(e,{default:()=>l});var r=n(67931);function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}function a(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}var s="group-open",u="group-closed",l=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(l,t);var e,n,r,c=a(l);function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),c.apply(this,arguments)}return e=l,(n=[{key:"connect",value:function(){"true"==this.element.dataset.communityMember&&this.blockChildrenTarget.childElementCount>0?"true"==this.element.dataset.collapsed?(this.triangleTarget.classList.remove(s),this.triangleTarget.classList.add(u)):(this.triangleTarget.classList.add(s),this.triangleTarget.classList.remove(u)):(this.triangleTarget.classList.remove(s),this.triangleTarget.classList.add(u))}},{key:"toggleChildrenVisibility",value:function(t){t.preventDefault(),this.blockChildrenTarget.childElementCount>0&&"true"==this.element.dataset.communityMember&&(this.blockChildrenTarget.classList.toggle("hidden"),this.blockChildrenTarget.classList.contains("hidden")?(this.triangleTarget.classList.remove(s),this.triangleTarget.classList.add(u)):(this.triangleTarget.classList.add(s),this.triangleTarget.classList.remove(u)),this.postToggleEndpoint())}},{key:"postToggleEndpoint",value:function(){fetch(this.element.dataset.collapsibleUrl,{body:JSON.stringify(),method:"POST",dataType:"script",credentials:"include",headers:{Accept:"application/json","Content-Type":"application/json"}})}}])&&o(e.prototype,n),r&&o(e,r),l}(r.Qr);l.targets=["trigger","blockChildren","triangle"]},69113:(t,e,n)=>{n.r(e),n.d(e,{default:()=>u});var r=n(42202),o=n.n(r);function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=s(t);if(e){var o=s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}var u=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(u,t);var e,n,r,s=c(u);function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),s.apply(this,arguments)}return e=u,(n=[{key:"connect",value:function(){this.initializeColorPicker(),this.colorPicker.setColor(this.element.dataset.defaultColor)}},{key:"initializeColorPicker",value:function(){this.colorPicker=new(o()),this.colorPicker.setColor(this.colorInputTarget.value),this.colorPicker.onChange(this.updateColors.bind(this))}},{key:"loadColorPicker",value:function(){this.colorPicker.appendTo(this.colorPickerTarget)}},{key:"focusColorPickerInput",value:function(){this.colorInputTarget.focus()}},{key:"updateColors",value:function(){this.colorHex=this.colorPicker.getHexString(),this.colorPreviewTarget.style.background=this.colorHex,this.colorInputTarget.value=this.colorHex}},{key:"removeColorPicker",value:function(){this.colorPreviewTarget.style.background=this.colorInputTarget.value,this.colorPicker.remove(),this.initializeColorPicker()}}])&&i(e.prototype,n),r&&i(e,r),u}(n(67931).Qr);u.targets=["colorPicker","colorPreview","colorInput"]},86840:(t,e,n)=>{n.r(e),n.d(e,{default:()=>u});var r=n(67931),o=n(22837);function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=s(t);if(e){var o=s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}var u=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(u,t);var e,n,r,s=c(u);function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),s.apply(this,arguments)}return e=u,(n=[{key:"validate",value:function(t){this.element.dataset.buttonClicked=!0,!this.isRichTextProcessing&&this.bodyValue.length||(this.element.dataset.buttonClicked=!1,t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}},{key:"success",value:function(t){this.bodyTarget.value="";var e,n=t.detail[0].comment_html,r=t.detail[0].post_id,o=t.detail[0].comment.id,i=t.detail[0].parent_comment_id,a=document.querySelector(".post__comments[data-post-id='".concat(r,"'] .infinity_scroll"));if(i){var c=a.getElementsByClassName("comment--".concat(i))[0];c.getElementsByClassName("post__replies")[0]?(e=c.getElementsByClassName("post__replies")[0].lastChild.previousElementSibling).insertAdjacentHTML("afterend",n):(e=c.getElementsByClassName("post__content")[0]).insertAdjacentHTML("afterend","<div class='post__replies'>"+n+"</div>")}else 0!=a.childElementCount?(e=a.lastChild.previousElementSibling).insertAdjacentHTML("afterend",n):((e=a).parentElement.classList.remove("hidden"),e.innerHTML=n);this.element.dataset.buttonClicked=!1;var s=this.bodyTarget.parentNode.parentNode.parentNode;s.classList.add("short"),!i&&s.classList.contains("fixed-bottom")&&(location.hash="#comment_"+o),a.getElementsByClassName("comment--".concat(o))[0].classList.add("just-added"),window.loadOembed()}},{key:"isRichTextProcessing",get:function(){return JSON.parse(this.bodyTarget.getAttribute("data-richtext-processing"))}},{key:"bodyValue",get:function(){return this.bodyTarget.value}},{key:"addFixedClass",value:function(){var t=document.getElementsByClassName("main__footer")[0];if(t){var e=t.getElementsByClassName("post__reply")[0],n=document.getElementsByClassName("post__post")[0];t.getBoundingClientRect().top+e.clientHeight-18>=window.innerHeight?(e.classList.add("fixed-bottom"),e.style.width=n.offsetWidth+"px"):(e.classList.remove("fixed-bottom"),e.style.width=null)}else window.removeEventListener("resize",this.addFixedClass),window.removeEventListener("scroll",this.addFixedClass)}},{key:"openShortForm",value:function(t){if("true"==this.element.dataset.isLoggedIn){var e=t.target.parentNode.parentNode.parentNode;e.classList.remove("short"),e.getElementsByTagName("trix-editor")[0].focus()}else window.location=this.element.dataset.signInPath+"?alert=Hey,+there!+%20+You+need+to+sign+in+to+write+a+comment."}},{key:"closeShortForm",value:function(t){this.element.dataset.buttonClicked||setTimeout((function(){document.activeElement.classList.contains("btn-primary")||document.activeElement.classList.contains("trix-content")||document.activeElement.parentElement.classList.contains("trix-content")||document.activeElement.classList.contains("trix-button")||-1!=document.activeElement.parentElement.className.indexOf("trix-dialog")||t.target.parentNode.parentNode.parentNode.classList.add("short")}),1)}},{key:"toggleReplyForm",value:function(t){var e,n;if(t.preventDefault(),t.target.parentElement.dataset.parentCommentId?(e=document.getElementById("form-reply-to-parent-"+t.target.parentElement.dataset.parentCommentId),n=t.target.parentElement.dataset.replyToName):t.target.dataset.parentCommentId?(e=document.getElementById("form-reply-to-parent-"+t.target.dataset.parentCommentId),n=t.target.dataset.replyToName):e=this.replyFormTarget,e.classList.contains("hidden")){e.classList.remove("hidden");var r=e.getElementsByTagName("trix-editor")[0],o=r.getBoundingClientRect().top+window.pageYOffset-200;window.scrollTo({top:o,behavior:"smooth"}),r.editor.setSelectedRange([0,1e4]),r.editor.deleteInDirection("backward"),r.focus(),r.editor.setSelectedRange([0,0]),n&&""!=n&&this.initializeReplyFormWithMention(r,n)}else e.classList.add("hidden")}},{key:"initializeReplyFormWithMention",value:function(t,e){fetch("/users/mentions.json?query=".concat(e,"&is_private_space=").concat(t.dataset.isPrivateSpace,"&space_id=").concat(t.dataset.spaceId)).then((function(t){return t.json()})).then((function(n){var r;n.forEach((function(t){t.just_name==e&&(r=t)}));var i=new o.default.Attachment({content:r.content,contentType:"mention",sgid:r.sgid});t.editor.insertAttachment(i),t.editor.insertString(" ")}))}}])&&i(e.prototype,n),r&&i(e,r),u}(r.Qr);u.targets=["replyForm","body"]},50721:(t,e,n)=>{n.r(e),n.d(e,{default:()=>u});var r=n(67931);function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}function a(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}var s=n(16244),u=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(u,t);var e,n,r,c=a(u);function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=c.call.apply(c,[this].concat(n))).validateDomain=function(){var e=s.parse(t.customDomainTarget.value);s.isValid(t.customDomainTarget.value)?(t.customDomainTarget.classList.remove("invalid-cname"),t.customDomainTarget.classList.add("valid-cname"),t.customHostTarget.classList.remove("host-placeholder"),null==e.subdomain?(t.customHostTarget.innerText="www",t.rootDomainWarningTarget.style.display="block"):(t.customHostTarget.innerText=e.subdomain,t.rootDomainWarningTarget.style.display="none")):(t.customDomainTarget.classList.remove("valid-cname"),t.customDomainTarget.classList.add("invalid-cname"),t.rootDomainWarningTarget.style.display="none",t.customHostTarget.classList.add("host-placeholder"),t.customHostTarget.innerText="my-custom-subdomain")},t}return e=u,(n=[{key:"connect",value:function(){this.customDomainTarget.onkeyup=this.validateDomain}}])&&o(e.prototype,n),r&&o(e,r),u}(r.Qr);u.targets=["customDomain","customHost","rootDomainWarning"]},77706:(t,e,n)=>{n.r(e),n.d(e,{default:()=>l});var r=n(78527),o=n(67931),i=n(82255);function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}function s(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}var l=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(l,t);var e,n,o,u=s(l);function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),u.apply(this,arguments)}return e=l,(n=[{key:"connect",value:function(){this.element.dataset.timeSelect?(0,r.default)(this.element,{enableTime:!0,dateFormat:"F j, Y G:i K",maxDate:"today"}):(0,r.default)(this.element,{mode:"range",dateFormat:"j M Y",maxDate:"today",onClose:function(t){if("URLSearchParams"in window){var e=new URLSearchParams(window.location.search);e.set(this.element.dataset.minDateParam,(0,i.L)(t[0]).replace(/\//g,"-")),e.set(this.element.dataset.maxDateParam,(0,i.L)(t[1]).replace(/\//g,"-")),window.location.search=e.toString()}}.bind(this)})}}])&&a(e.prototype,n),o&&a(e,o),l}(o.Qr);l.targets=["dateInput"]},19441:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"connect",value:function(){var t=this,e=this.element,n=this.element,r=n.href,o=n.dataset.fileName;e.addEventListener("click",(function(e){e.preventDefault(),t.download(r,o)}))}},{key:"download",value:function(t,e){fetch(t).then((function(t){return t.blob()})).then((function(t){var n=document.createElement("a");n.href=URL.createObjectURL(t),n.setAttribute("download",e),n.click()}))}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr)},71826:(t,e,n)=>{n.r(e),n.d(e,{default:()=>u});var r=n(67931),o=n(34128);function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=s(t);if(e){var o=s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}var u=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(u,t);var e,n,r,s=c(u);function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),s.apply(this,arguments)}return e=u,(n=[{key:"connect",value:function(){this.toggleClass=this.data.get("class")||"hidden"}},{key:"toggle",value:function(){this.menuTarget.classList.toggle(this.toggleClass)}},{key:"show",value:function(){this.menuTarget.classList.remove(this.toggleClass)}},{key:"hide",value:function(t){!1!==this.element.contains(t.target)||this.menuTarget.classList.contains(this.toggleClass)||this.menuTarget.classList.add(this.toggleClass)}},{key:"hideModal",value:function(t){this.menuTarget.firstElementChild.contains(t.target)||this.menuTarget.classList.add(this.toggleClass)}},{key:"optionSelect",value:function(t){var e,n,r,i=this,a=(e={},n=this.element.dataset.fieldName,r=t.target.dataset.sort,n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e);(0,o.t5)(this.element.dataset.onOptionChangeUrl,{method:"PATCH",body:JSON.stringify(a)}).then((function(){window.location=i.element.dataset.onSuccessUrl}))}}])&&i(e.prototype,n),r&&i(e,r),u}(r.Qr);u.targets=["menu"]},24062:(t,e,n)=>{n.r(e),n.d(e,{default:()=>s});var r=n(76030);function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}function a(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}var s=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(u,t);var e,n,c,s=a(u);function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),s.apply(this,arguments)}return e=u,(n=[{key:"connect",value:function(){var t=this,e=document.querySelector(this.data.get("height"));e&&(this.element.style.height="".concat(e.clientHeight,"px"));var n=this.element.clientHeight,o=location.href.split("?")[0];window.history.pushState("object",document.title,o),(0,r.Z)({targets:this.element,translateY:[{value:-n,duration:0},{value:0,duration:400,easing:"easeOutElastic"},{value:-n,duration:350,delay:2500,easing:"easeInQuad"}],complete:function(){t.element.parentNode.removeChild(t.element)}})}}])&&o(e.prototype,n),c&&o(e,c),u}(n(67931).Qr)},6e4:(t,e,n)=>{n.r(e),n.d(e,{default:()=>u});var r=n(31304),o=n.n(r);function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=s(t);if(e){var o=s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}var u=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(u,t);var e,n,r,s=c(u);function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),s.apply(this,arguments)}return e=u,(n=[{key:"previewImage",value:function(){var t=this.fileTarget.files[0],e=this.previewTarget,n=new FileReader;e.style.display="block",n.onloadend=function(){e.src=n.result},t?n.readAsDataURL(t):e.src="",this.buttonTarget.innerHTML=this.buttonTarget.dataset.buttonText}},{key:"nameToSlug",value:function(){this.outputSlugTarget.value=o()(this.inputNameTarget.value,{replacement:"-",remove:/[*+~.;()'"!:@]/g,lower:!0})}},{key:"selfToSlug",value:function(){this.outputSlugTarget.value=o()(this.outputSlugTarget.value,{replacement:"-",remove:/[*+~.;()'"!:@]/g,lower:!0})}},{key:"deleteImage",value:function(t){var e=this;t.preventDefault(),fetch(this.element.dataset.deleteImagePath,{method:"DELETE",dataType:"script",credentials:"include",headers:{Accept:"application/json","Content-Type":"application/json"}}).then((function(t){return t.json()})).then((function(t){t.success&&(e.previewTarget.src="",e.previewTarget.classList.add("hidden"),e.removeImageButtonTarget.remove(),e.buttonTarget.innerHTML=e.element.dataset.btnUpdateText,e.buttonTarget.parentElement.classList.remove("btn-half"),e.buttonTarget.parentElement.classList.add("btn-full"))}))}}])&&i(e.prototype,n),r&&i(e,r),u}(n(67931).Qr);u.targets=["preview","file","inputName","outputSlug","button","removeImageButton"]},55552:(t,e,n)=>{var r=n(67931),o=n(99074),i=n(57328),a=n(69230),c=r.Mx.start(),s=n(67074);c.load((0,o.X)(s)),c.register("modal",i.u_),c.register("tabs",i.mQ),c.register("my-tabs",a.TabsController)},83723:(t,e,n)=>{n.r(e),n.d(e,{default:()=>l});var r=n(91296),o=n.n(r),i=n(67931);function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}function s(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}var l=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(u,t);var e,n,r,i=s(u);function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),i.apply(this,arguments)}return e=u,(n=[{key:"initialize",value:function(){this.page=2,this.url=new URL(this.element.dataset.url)}},{key:"connect",value:function(){var t=this;this.debouncedScrollHandler=o()((function(){if(!t.loading&&t.hasFooterTarget){var e=t.footerTarget.getBoundingClientRect(),n=window.innerHeight,r=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;n-e.top>-1e3&&!r&&t.fetchNewPage()}}),50),this.debouncedScrollHandler(),document.addEventListener("turbolinks:load",this.debouncedScrollHandler),document.addEventListener("turbolinks:click",this.debouncedScrollHandler),window.addEventListener("scroll",this.debouncedScrollHandler,{passive:!0})}},{key:"disconnect",value:function(){this.hasFooterTarget&&(window.removeEventListener("scroll",this.debouncedScrollHandler),document.removeEventListener("turbolinks:load",this.debouncedScrollHandler),document.removeEventListener("turbolinks:click",this.debouncedScrollHandler),this.footerTarget.classList.add("invisible"))}},{key:"loadMore",value:function(t){t.preventDefault(),this.fetchNewPage()}},{key:"getUrl",value:function(){return this.url.searchParams.set("page",this.page),this.url.href}},{key:"setLoadingState",value:function(){this.loading=!0,this.buttonTarget.classList.add("invisible"),this.loaderTarget.classList.remove("invisible")}},{key:"resetLoadingState",value:function(){this.loading=!1,this.buttonTarget.classList.remove("invisible"),this.loaderTarget.classList.add("invisible")}},{key:"fetchNewPage",value:function(){var t=this;this.loading||this.element.dataset.lastPageReached||(this.setLoadingState(),fetch(this.getUrl()).then((function(t){return t.json()})).then((function(e){var n=e.content,r=e.hasNextPage;t.hasContentTarget?t.contentTarget.insertAdjacentHTML("beforeend",n):t.footerTarget.insertAdjacentHTML("beforebegin",n),t.page++,r?t.resetLoadingState():(t.element.dataset.lastPageReached=!0,t.disconnect())})))}}])&&a(e.prototype,n),r&&a(e,r),u}(i.Qr);l.targets=["footer","loader","button","content"]},22010:(t,e,n)=>{n.r(e),n.d(e,{default:()=>f});var r=n(64687),o=n.n(r);function i(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(u){return void n(u)}c.done?e(s):Promise.resolve(s).then(r,o)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function c(t){i(a,r,o,c,s,"next",t)}function s(t){i(a,r,o,c,s,"throw",t)}c(void 0)}))}}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function u(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=l(t);if(e){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}var f=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(l,t);var e,n,r,i=u(l);function l(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).loadData=a(o().mark((function e(){var n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.data.get("url"),e.next=3,fetch(n);case 3:if(!(r=e.sent).ok){e.next=8;break}return e.next=7,r.text();case 7:t.element.innerHTML=e.sent;case 8:case"end":return e.stop()}}),e)}))),t}return e=l,(n=[{key:"connect",value:function(){this.loadData()}}])&&c(e.prototype,n),r&&c(e,r),l}(n(67931).Qr)},62505:(t,e,n)=>{n.r(e),n.d(e,{default:()=>u});var r=n(67931),o=n(79253);function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=s(t);if(e){var o=s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}var u=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(u,t);var e,n,r,s=c(u);function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),s.apply(this,arguments)}return e=u,(n=[{key:"like",value:function(t){t.preventDefault(),this.likeCount=parseInt(this.element.dataset.likeCount),this.incremented="true"==this.element.dataset.incremented,this.type=this.element.dataset.type,this.id=parseInt(this.element.dataset.id),this.incremented?(this.likeCount--,"comment"==this.element.dataset.context?(this.performCommentDecrements(),this.removeUserAvatar()):"list"==this.element.dataset.context?this.performListDecrements():(this.performPostDecrements(),this.likeCount<3&&this.removeUserAvatar()),this.postDecrementLike(this.id,this.type),this.removeLikedClass()):(this.likeCount++,"comment"==this.element.dataset.context?(this.performCommentIncrements(),this.showUserAvatar()):"list"==this.element.dataset.context?this.performListIncrements():(this.performPostIncrements(),this.likeCount<4&&this.showUserAvatar()),this.postIncrementLike(this.id,this.type),this.addLikedClass()),this.element.dataset.incremented=!this.incremented,this.element.dataset.likeCount=this.likeCount}},{key:"postIncrementLike",value:function(t,e){fetch(this.element.dataset.likeUrl,{body:JSON.stringify({user_like:{user_likeable_id:t,user_likeable_type:e}}),method:"POST",dataType:"script",credentials:"include",headers:{Accept:"application/json","Content-Type":"application/json"}})}},{key:"postDecrementLike",value:function(t,e){fetch(this.element.dataset.likeUrl,{body:JSON.stringify({user_like:{user_likeable_id:t,user_likeable_type:e}}),method:"DELETE",dataType:"script",credentials:"include",headers:{Accept:"application/json","Content-Type":"application/json"}})}},{key:"performCommentIncrements",value:function(){1==this.likeCount?this.incrementOneCommentLike():this.likeCount>1&&this.incrementCommentLikes()}},{key:"performCommentDecrements",value:function(){0==this.likeCount?this.resetLikeCountContent():this.decrementCommentLikes()}},{key:"performPostIncrements",value:function(){1==this.likeCount?this.addLikedByCurrentUser():2==this.likeCount?this.addAndOther():this.likeCount>2&&this.incrementAndOther()}},{key:"performPostDecrements",value:function(){0==this.likeCount?this.resetLikeWrapperContent():1==this.likeCount?this.removeAndOther():this.likeCount>1&&this.decrementAndOther()}},{key:"performListIncrements",value:function(){this.incrementCount()}},{key:"performListDecrements",value:function(){this.decrementCount()}},{key:"addLikedClass",value:function(){for(var t=0;t<this.likeButtonTargets.length;t++)this.likeButtonTargets[t].classList.add("liked")}},{key:"removeLikedClass",value:function(){for(var t=0;t<this.likeButtonTargets.length;t++)this.likeButtonTargets[t].classList.remove("liked")}},{key:"showUserAvatar",value:function(){this.currentUserAvatarTarget.style.display="inline"}},{key:"removeUserAvatar",value:function(){this.currentUserAvatarTarget.style.display="none"}},{key:"resetLikeWrapperContent",value:function(){this.likedByStringTarget.innerHTML="",this.likedByWrapperTarget.classList.add("no-padding")}},{key:"resetLikeCountContent",value:function(){this.likeCountTarget.innerHTML=""}},{key:"addLikedByCurrentUser",value:function(){this.likedByStringTarget.style.display="inline",this.likedByWrapperTarget.classList.remove("no-padding"),this.likedByStringTarget.innerHTML=this.element.dataset.likedByString+" "+this.element.dataset.currentUserName}},{key:"addAndOther",value:function(){this.likedByStringTarget.style.display="inline",this.likeCountTarget.style.display="inline",this.likeCountTarget.innerHTML="and 1 "+this.element.dataset.otherString,this.likeCountTarget._tippy||(0,o.ZP)(this.likeCountTarget),-1==this.likedByStringTarget.innerHTML.indexOf(this.element.dataset.currentUserName)&&this.updateTooltip(this.likeCountTarget,this.likeCountTarget.dataset.tippyContent+this.element.dataset.currentUserName,this.element.dataset.currentUserName)}},{key:"removeAndOther",value:function(){this.likedByStringTarget.style.display="none",this.likeCountTarget.innerHTML="Liked by 1 "+this.element.dataset.otherString,this.likeCountTarget._tippy.destroy()}},{key:"incrementAndOther",value:function(){var t=this.likeCount-1;this.likeCountTarget.style.display="inline",this.likeCountTarget.innerHTML=this.element.dataset.andString+" "+t+" "+this.element.dataset.othersString,this.likeCountTarget._tippy||(0,o.ZP)(this.likeCountTarget),this.updateTooltip(this.likeCountTarget,this.likeCountTarget.dataset.tippyContent+this.element.dataset.currentUserName,this.element.dataset.currentUserName)}},{key:"decrementAndOther",value:function(){var t=this.likeCount-1;this.likeCountTarget.style.display="inline",this.likeCountTarget.innerHTML=this.element.dataset.andString+" "+t+" "+this.element.dataset.othersString,this.updateTooltip(this.likeCountTarget,this.likeCountTarget.dataset.tippyContent.replace(this.element.dataset.currentUserName+"<br>",""))}},{key:"incrementOneCommentLike",value:function(){this.likeCountTarget.style.display="inline",this.likeCountTarget.innerHTML="1 like",this.updateTooltip(this.likeCountTarget,this.likeCountTarget.dataset.tippyContent+this.element.dataset.currentUserName,this.element.dataset.currentUserName)}},{key:"incrementCommentLikes",value:function(){this.likeCountTarget.style.display="inline",this.likeCountTarget.innerHTML=this.likeCount+" likes",this.updateTooltip(this.likeCountTarget,this.likeCountTarget.dataset.tippyContent+this.element.dataset.currentUserName,this.element.dataset.currentUserName)}},{key:"decrementCommentLikes",value:function(){this.likeCountTarget.style.display="inline",this.updateTooltip(this.likeCountTarget,this.likeCountTarget.dataset.tippyContent.replace(this.element.dataset.currentUserName+"<br>",""),this.element.dataset.currentUserName),this.likeCountTarget.innerHTML=this.likeCount+" likes"}},{key:"updateTooltip",value:function(t,e,n){if(-1==t.dataset.tippyContent.indexOf(n)){var r=t._tippy;r&&r.setContent(e)}}},{key:"incrementCount",value:function(){var t=this.likeCount;this.likeCountTarget.style.display="inline",this.likeCountTarget.innerHTML=t}},{key:"decrementCount",value:function(){var t=this.likeCount;this.likeCountTarget.style.display="inline",this.likeCountTarget.innerHTML=t}},{key:"expandCommentForm",value:function(){var t=document.getElementById("comment-form"),e=t.querySelector("trix-editor"),n=t.classList.contains("short");t.scrollIntoView(),setTimeout((function(){e.editor.setSelectedRange([0,0])}),100),n&&t.classList.remove("short")}}])&&i(e.prototype,n),r&&i(e,r),u}(r.Qr);u.targets=["likeButton","likeCount","likeWrapper","likedByString","currentUserAvatar","likedByWrapper"]},72567:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"memberPublicUid",get:function(){return this.data.get("member-publicuid")}},{key:"openMemberProfileEdit",value:function(){var t=this.memberPublicUid;this.element.dispatchEvent(new CustomEvent("open-member-profile-edit",{detail:{memberPublicUid:t},bubbles:!0}))}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr)},80916:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"connect",value:function(){this.isOpenClass="is-open",this.sidebar=document.querySelector("[data-target='nav']")}},{key:"toggleNav",value:function(t){t.preventDefault(),this.sidebar.classList.contains(this.isOpenClass)?this.closeNav():this.openNav()}},{key:"openNav",value:function(){this.sidebar.classList.add(this.isOpenClass),document.body.classList.add(this.isOpenClass),document.querySelector(".mobile-overlay").addEventListener("click",this.closeNav)}},{key:"closeNav",value:function(){document.querySelector("[data-target='nav']").classList.remove("is-open"),document.body.classList.remove("is-open"),document.querySelector(".mobile-overlay").removeEventListener("click",this.closeNav)}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr)},72089:(t,e,n)=>{n.r(e),n.d(e,{default:()=>u});var r=n(29933),o=n.n(r);function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=s(t);if(e){var o=s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}var u=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(u,t);var e,n,r,s=c(u);function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),s.apply(this,arguments)}return e=u,(n=[{key:"connect",value:function(){var t=this;this.slideout=new(o())({touch:!1,panel:this.panelTarget,menu:this.menuTarget,padding:window.outerWidth-50,tolerance:70}),window.mobileDrawer=this.slideout,this.menuZIndex=this.menuTarget.style.zIndex;var e=function(e){e&&e.preventDefault(),t.slideout.close()};this.slideout.on("beforeopen",(function(){this.panel.classList.add("panel-open")})).on("open",(function(){this.panel.addEventListener("click",e)})).on("beforeclose",(function(){this.panel.classList.remove("panel-open")})).on("close",(function(){this.panel.removeEventListener("click",e)}))}},{key:"disconnect",value:function(){this.slideout.destroy()}},{key:"onOverlayOpen",value:function(t){t.preventDefault(),this.menuTarget.style.zIndex=1e3}},{key:"onOverlayClose",value:function(t){t.preventDefault(),this.menuTarget.style.zIndex=this.menuZIndex,this.close()}},{key:"close",value:function(t){t&&t.preventDefault(),this.slideout.close()}},{key:"toggle",value:function(t){t.preventDefault(),this.slideout.toggle()}},{key:"open",value:function(t){t.preventDefault(),this.slideout.open()}}])&&i(e.prototype,n),r&&i(e,r),u}(n(67931).Qr);u.targets=["menu","panel"]},17830:(t,e,n)=>{n.r(e),n.d(e,{default:()=>y});var r=n(78527),o=n(70592),i=n.n(o),a=n(67931),c=n(82255);function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(t,e){return p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},p(t,e)}function d(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h(t);if(e){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var y=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)}(s,t);var e,n,o,a=d(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return e=s,(n=[{key:"connect",value:function(){var t={mode:"range",dateFormat:"j M Y",maxDate:"today",plugins:[new(i())({shorthand:!0,dateFormat:"M Y",altFormat:"F Y"})]};(0,r.default)(this.monthInputRangeToTarget,u(u({},t),{},{onClose:function(t){if("URLSearchParams"in window){var e=(0,c.q)(t[0]),n=(0,c.L)(new Date(this.monthInputRangeFromTarget.value)).replace(/\//g,"-"),r=(0,c.L)(e).replace(/\//g,"-");this.setURLParams(this.monthInputRangeToTarget,n,r)}}.bind(this)})),(0,r.default)(this.monthInputRangeFromTarget,u(u({},t),{},{onClose:function(t){if("URLSearchParams"in window){var e=(0,c.q)(new Date(this.monthInputRangeToTarget.value)),n=(0,c.L)(t[0]).replace(/\//g,"-"),r=(0,c.L)(e).replace(/\//g,"-");this.setURLParams(this.monthInputRangeFromTarget,n,r)}}.bind(this)}))}},{key:"setURLParams",value:function(t,e,n){var r=new URLSearchParams(window.location.search);r.set(t.dataset.minDateParam,e),r.set(t.dataset.maxDateParam,n),window.location.search=r.toString()}}])&&f(e.prototype,n),o&&f(e,o),s}(a.Qr);y.targets=["monthInputRangeTo","monthInputRangeFrom"]},46614:(t,e,n)=>{n.r(e),n.d(e,{default:()=>s});var r=n(49466);function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}function a(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}var s=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(u,t);var e,n,c,s=a(u);function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),s.apply(this,arguments)}return e=u,(n=[{key:"connect",value:function(){new r.Z({select:this.slimSelectTarget,placeholder:this.element.dataset.placeholder,searchText:this.element.dataset.searchText,searchPlaceholder:this.element.dataset.searchPlaceholder?this.element.dataset.searchPlaceholder:"",showContent:this.element.dataset.direction?this.element.dataset.direction:"up",addable:function(t){return!!this.element.dataset.addable&&{text:t,value:t}}.bind(this),allowDeselect:!0,closeOnSelect:!!this.element.dataset.disableAutoReopen&&this.element.dataset.disableAutoReopen,limit:!!this.element.dataset.limit&&this.element.dataset.limit})}}])&&o(e.prototype,n),c&&o(e,c),u}(n(67931).Qr);s.targets=["slimSelect"]},45344:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"setAllInAppNotificationSetting",value:function(t){var e=t.target.value;this.inAppNotificationSettingTargets.map((function(t){""!=e&&(t.value=e)}))}},{key:"setAllMobileNotificationSetting",value:function(t){var e=t.target.value;this.mobileNotificationSettingTargets.map((function(t){""!=e&&(t.value=e)}))}},{key:"setAllEmailNotificationType",value:function(t){var e=t.target.value;this.emailNotificationTypeTargets.map((function(t){""!=e&&(t.value=e)}))}},{key:"setAllToggleEmailNotifications",value:function(t){var e=t.target.checked;this.toggleEmailNotificationsTargets.map((function(t){t.checked!=e&&(t.checked=e)}))}},{key:"setAllToggleInAppNotifications",value:function(t){var e=t.target.checked;this.toggleInAppNotificationsTargets.map((function(t){t.checked!=e&&(t.checked=e)}))}},{key:"setAllToggleMobileNotifications",value:function(t){var e=t.target.checked;this.toggleMobileNotificationsTargets.map((function(t){t.checked!=e&&(t.checked=e)}))}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr);c.targets=["inAppNotificationSetting","emailNotificationType","mobileNotificationSetting","toggleInAppNotifications","toggleEmailNotifications","toggleMobileNotifications"]},42382:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"connect",value:function(){this.updateModal()}},{key:"updateModal",value:function(){""!=this.titleTarget.value&&(document.getElementsByClassName("modal__title")[0].innerHTML=this.replaceCustomStrings(this.titleTarget.value)),""!=this.descriptionTarget.innerHTML.length&&(document.querySelectorAll(".modal__description .trix-content")[0].innerHTML=this.replaceCustomStrings(this.descriptionTarget.innerHTML)),""!=this.buttonLabelTarget.value.length&&(document.getElementsByClassName("modal__button-label")[0].innerHTML=this.buttonLabelTarget.value),""!=this.buttonUrlTarget.value.length&&(document.getElementsByClassName("modal__button-label")[0].href=this.buttonUrlTarget.value)}},{key:"replaceCustomStrings",value:function(t){return t=t.replace("{first_name}",this.element.dataset.userFirstName).replace("{community_name}",this.element.dataset.communityName)}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr);c.targets=["title","description","buttonLabel","buttonUrl"]},72802:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"keyup",value:function(t){t.target.selectionStart>5&&(this.setCursorPos(t.target,0),this.buttonTarget.click())}},{key:"setCursorPos",value:function(t,e){if(t.setSelectionRange)t.setSelectionRange(e,e);else if(t.createTextRange){var n=t.createTextRange();n.collapse(!0),n.moveEnd("character",e),n.moveStart("character",e),n.select()}t.scrollLeft=0}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr);c.targets=["field","button"]},88643:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=c.call.apply(c,[this].concat(n))).open=function(e){e&&e.preventDefault(),t.lockScroll(),document.body.insertAdjacentHTML("beforeend",t._modalContentHTML()),t.modal=document.querySelector("#".concat(t.modalContainerId)),t.modal.querySelectorAll("[data-action='click->popup#close']").forEach((function(e){e.addEventListener("click",t.close)})),t.data.get("disable-backdrop")||(document.body.insertAdjacentHTML("beforeend",t.backgroundHtml),t.background=document.querySelector("#".concat(t.backgroundId)))},t.closeBackground=function(e){if(t.modal){var n=document.querySelector(".modal__inner");n&&t.allowBackgroundClose&&t.modal.contains(e.target)&&!n.contains(e.target)&&!t.element.contains(e.target)&&t.close(e)}},t.close=function(e){(t.background||t.modal)&&(e.preventDefault(),t.unlockScroll(),t.background&&t.background.remove(),t.modal&&t.modal.remove())},t.closeWithKeyboard=function(e){27!==e.keyCode||t.containerTarget.classList.contains(t.toggleClass)||t.close(e)},t.lockScroll=function(){var e=window.innerWidth-document.documentElement.clientWidth;document.body.style.paddingRight="".concat(e,"px"),t.saveScrollPosition(),document.body.classList.add("fixed","inset-x-0","overflow-hidden"),document.body.style.top="-".concat(t.scrollPosition,"px")},t.unlockScroll=function(){document.body.style.paddingRight=null,document.body.classList.remove("fixed","inset-x-0","overflow-hidden"),t.restoreScrollPosition(),document.body.style.top=null},t.saveScrollPosition=function(){t.scrollPosition=window.pageYOffset||document.body.scrollTop},t.restoreScrollPosition=function(){document.documentElement.scrollTop=t.scrollPosition},t}return e=s,(n=[{key:"connect",value:function(){this.toggleClass="hidden",this.backgroundHtml=this._backgroundHTML(),this.backgroundId="modal-background",this.modalContainerId="modal-container-",this.modalInnerHtml=this.containerTarget.innerHTML,this.containerTarget.innerHTML="",this.allowBackgroundClose="true"===(this.data.get("allowBackgroundClose")||"true"),this.element.dataset.open&&this.open(),window.addEventListener("click",this.closeBackground)}},{key:"disconnect",value:function(){window.removeEventListener("click",this.closeBackground)}},{key:"_backgroundHTML",value:function(){return'<div id="modal-background" class="modal-background"></div>'}},{key:"_modalContentHTML",value:function(){return'<div id="'.concat(this.modalContainerId,'" class="modal-container">').concat(this.modalInnerHtml,"</div>")}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr);c.targets=["container"]},45593:(t,e,n)=>{n.r(e),n.d(e,{default:()=>p});var r=n(86254),o=n(56163),i=n.n(o);function a(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}function l(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var p=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(f,t);var e,n,o,c=l(f);function f(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),c.apply(this,arguments)}return e=f,(n=[{key:"connect",value:function(){this.openDownloadLinksInNewWindow(),this.enableTruncation(),this.makeAllLinksOpenInNewWindow(),this.convertNonLinksToLinks(),this.addNoDownloadAttrToVideo(),this.transformDataBackgroundImage()}},{key:"convertNonLinksToLinks",value:function(){var t=this.element.getElementsByClassName("post__inside")[0],e="";void 0!==t&&(e=t.innerHTML,e=i()(e,{defaultProtocol:"https",target:{url:"_blank"},ignoreTags:["a","style","script","img","iframe","action-text-attachment","video","audio"],validate:{url:function(t){return/^[^A-Z]/.test(t)}}}),t.innerHTML=e)}},{key:"addNoDownloadAttrToVideo",value:function(){var t=this.element.getElementsByTagName("video");if(t.length>0)for(var e=0;e<t.length;e++)t[e].setAttribute("controlsList","nodownload")}},{key:"enableTruncation",value:function(){var t=this.element.getElementsByClassName("post__inside")[0],e=this.element.getElementsByClassName("post__expand")[0];e&&new r.do((function(n){var r,o=a(n);try{for(o.s();!(r=o.n()).done;){var i=r.value,c=i.target.scrollHeight>i.contentRect.height;i.target.classList[c?"add":"remove"]("truncated"),e.innerHTML=c?e.dataset.showMore:e.dataset.showLess,0!==i.contentRect.height&&i.contentRect.height||(t.style["-webkit-line-clamp"]="unset")}}catch(s){o.e(s)}finally{o.f()}})).observe(t)}},{key:"toggleExpandClass",value:function(t){var e=!t.target.classList.contains("expanded");t.target.classList[e?"add":"remove"]("expanded"),t.target.innerHTML=e?t.target.dataset.showMore:t.target.dataset.showLess}},{key:"makeAllLinksOpenInNewWindow",value:function(){var t=this.element.getElementsByTagName("a");if(t.length>0)for(var e=0;e<t.length;e++){var n=t[e];"A"!==n.tagName||n.isContentEditable||n.host===window.location.host||n.setAttribute("target","_blank")}}},{key:"openDownloadLinksInNewWindow",value:function(){var t=this.element.getElementsByClassName("attachment__link");if(t.length>0)for(var e=0;e<t.length;e++)t[e].setAttribute("target","_blank")}},{key:"transformDataBackgroundImage",value:function(){this.element.querySelectorAll("[data-background-image]").forEach((function(t){var e=document.createElement("img");e.src=t.dataset.backgroundImage,t.style.backgroundImage='url("'.concat(t.dataset.backgroundImage,'")'),e.onload=function(){var e=t.parentElement;e.classList.add("show"),e.classList.remove("hide")}}))}},{key:"downloadAttachment",value:function(t){t.preventDefault(),t.stopPropagation();var e=t.currentTarget.dataset,n=e.url,r=e.fileName,o=e.logUrl;this.download(n,r),this.trackDownload(o)}},{key:"download",value:function(t,e){var n=document.createElement("a");n.href=t,n.download=e,n.setAttribute("download",e),n.click()}},{key:"trackDownload",value:function(t){fetch(t,{method:"POST"})}}])&&s(e.prototype,n),o&&s(e,o),f}(n(67931).Qr)},11922:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"connect",value:function(){this.submitFormShortcut()}},{key:"submitFormShortcut",value:function(){var t=this.element;document.addEventListener("keydown",(function(e){"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&t.submit()}))}},{key:"validate",value:function(t){this.isRichTextProcessing&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}},{key:"isRichTextProcessing",get:function(){return JSON.parse(this.element.querySelector("trix-editor").getAttribute("data-richtext-processing"))}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr)},11192:(t,e,n)=>{n.r(e),n.d(e,{default:()=>s});var r=n(67142);function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}function a(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}var s=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(u,t);var e,n,c,s=a(u);function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),s.apply(this,arguments)}return e=u,(n=[{key:"connect",value:function(){var t=this.element.dataset.name;if(!this.element.querySelector(".user__initials")){var e=document.createElement("div");e.classList.add("user__initials","text-white"),e.style="background-color: ".concat((0,r.DX)(t),";"),e.innerText=(0,r.Qe)(t),this.element.appendChild(e)}}}])&&o(e.prototype,n),c&&o(e,c),u}(n(67931).Qr)},99375:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"toggle",value:function(){document.querySelectorAll(".view-space .post__reply form").forEach((function(t){t.style.zIndex="-1000"})),document.querySelectorAll(".view-post .post__reply").forEach((function(t){t.style.zIndex="-1000"}))}},{key:"hide",value:function(){document.querySelectorAll(".view-space .post__reply form").forEach((function(t){t.style.zIndex=null})),document.querySelectorAll(".view-post .post__reply").forEach((function(t){t.style.zIndex=null}))}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr)},56219:(t,e,n)=>{n.r(e),n.d(e,{default:()=>rt});n(67294);var r=n(73935),o=n(67931),i=n(12006),a=n(48339),c=n(779),s=n(58521),u=n(57263),l=n(64117),f=n(5947),p=n(86112),d=n(25669),h=n(62128),y=n(60761),v=n(78250),g=n(13997),b=n(92543),m=n(98550),w=n(18134),T=n(77495),O=n(52422),k=n(70117),_=n(87648),P=n(35589),j=n(1614),E=n(25872),R=n(59896),C=n(7275),L=n(81208),S=n(61286),x=n(73234),B=n(22977),A=n(29710),N=n(61577),I=n(62199),D=n(20882),M=n(42590),F=n(63055),H=n(66047),U=n(94621),Q=n(27799),q=n(82253),W=n(50730),z=n(11835),V=n(44825),K=n(85893);function J(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Y(t,e){return Y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Y(t,e)}function Z(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=G(t);if(e){var o=G(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function G(t){return G=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},G(t)}function $(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function X(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function tt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var et,nt={RichTextInput:H.Z,CommentsForm:h.tV,CommentsList:h.B2,Notifications:j.T,NotificationsDropdown:E.f,NotificationCount:P.T,CommunitySwitcher:y.H,CommunitySwitcherWithProviders:y.P,HomePage:b.p,WelcomeBanner:T.B,HomeRightSidebar:m.v,OpenQPModal:M.h,QPEditPost:F.R,SuggestedSpacesCarousel:w.z,LandingPageSettings:k.Q,CookieStatus:v.O,SpaceCoverImage:function(){return null},CreateSpaceButton:Q.l,EditSpaceButton:q.c,PostsPostViewList:I.c,SearchV2:g._,"Spaces.New":W.J,"Posts.Show":D.d,"Events.New":function(){return null},MemberDirectory:_.MemberDirectory,App:d.g,CommunityMemberSelect:z.N,PaywallPrices:L.O,GDPRCookieBanner:s.J,Checkout:N.h,"PaywallCoupons.List":R.Z.List,AppBarWrapper:V.R,CommunityOnboardingGettingStartedSection:a.W,StandaloneTipTapBlockEditor:(et=f.R,function(t){return(0,K.jsx)(l.e$,{children:(0,K.jsx)(et,X({},t))})}),PaywallsAdmin:A.u,PaywallGroupsAdmin:C.S,PaywallSubscriptionsAdminIndex:B.y,PaywallChargesAdminIndex:x.y,BulkImportTrialPaywallSubscriptionFormRailsView:S.y,InvitationLinkInformation:O.w,DebugSessions:i.C,VideoPlayer:p.Y,LiveStreamSettings:u.L,AnalyticsHeader:c.X,SsoInfoMessage:U.T},rt=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Y(t,e)}(a,t);var e,n,o,i=Z(a);function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),i.apply(this,arguments)}return e=a,(n=[{key:"connect",value:function(){var t=this.element.dataset,e=t.component,n=t.props,o=n?JSON.parse(n):{},i=nt[e];i?r.render((0,K.jsx)(i,X({},o)),this.element):console.error("Error: invalid component - ".concat(e))}},{key:"disconnect",value:function(){r.unmountComponentAtNode(this.element)}}])&&J(e.prototype,n),o&&J(e,o),a}(o.Qr)},64023:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"submitForm",value:function(t){"production"===window.RAILS_ENV||"staging"===window.RAILS_ENV?(t.preventDefault(),grecaptcha.execute()):this.formTarget.submit()}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr)},22998:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"connect",value:function(){this.excludeChildClass=["block-header","block-header__title","block-header__actions","block--space-group"]}},{key:"dragstart",value:function(t){this.excludeChildClass.some((function(e){return t.target.classList.contains(e)}))?this.currentTarget=null:this.currentTarget=t.target,this.currentTarget.classList.add("selected"),t.dataTransfer.effectAllowed="move"}},{key:"dragover",value:function(t){if(t.preventDefault(),!this.currentTarget)return!0;var e=t.target.closest(".nav-link");return this.draggableTargets.indexOf(t.target)<this.draggableTargets.indexOf(this.currentTarget)?e.classList.add("drag-over-top"):e.classList.add("drag-over-bottom"),!0}},{key:"dragenter",value:function(t){t.preventDefault()}},{key:"dragleave",value:function(t){t.preventDefault();var e=t.target.closest(".nav-link");e.classList.remove("drag-over-top"),e.classList.remove("drag-over-bottom")}},{key:"drop",value:function(t){if(!this.currentTarget)return!0;var e=t.target.closest(".nav-link"),n=this.currentTarget;if(!e||!n)return!0;var r=e.compareDocumentPosition(n);4&r?e.insertAdjacentElement("beforebegin",n):2&r&&e.insertAdjacentElement("afterend",n),t.preventDefault()}},{key:"dragend",value:function(){var t=[];if(!this.currentTarget)return!0;this.draggableTargets.forEach((function(e,n){e.classList.remove("drag-over-top"),e.classList.remove("drag-over-bottom"),t[n]=e.getAttribute("data-id")})),fetch(this.element.dataset.saveUrl,{body:JSON.stringify({order_array:t}),method:"POST",dataType:"script",credentials:"include",headers:{Accept:"application/json","Content-Type":"application/json"}}).then((function(t){return t.json()})).then((function(){var t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search;window.history.pushState({path:t},"",t)})),setTimeout(function(){this.currentTarget.classList.remove("selected")}.bind(this),500)}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr);c.targets=["draggable"]},43522:(t,e,n)=>{n.r(e),n.d(e,{default:()=>u});var r=n(67931);function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}function a(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}var s=".block--space-group",u=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(u,t);var e,n,r,c=a(u);function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),c.apply(this,arguments)}return e=u,(n=[{key:"connect",value:function(){this.excludeChildClass=["nav-link","space__name","block-content"],this.currentTarget=null}},{key:"dragstart",value:function(t){var e=this;if(this.excludeChildClass.some((function(e){return t.target.classList.contains(e)}))?this.currentTarget=null:this.currentTarget=t.target.closest(s),this.excludeChildClass.some((function(e){return t.target.classList.contains(e)})))return!0;t.dataTransfer.setData("application/drag-key",this.currentTarget.getAttribute("data-id")),t.dataTransfer.effectAllowed="move",this.parentDraggableTargets.forEach((function(t,n){e.parentDraggableTargets.indexOf(e.currentTarget)!=n&&t.childNodes.forEach((function(t){"#text"!=t.nodeName&&(t.style.pointerEvents="none")}))}))}},{key:"dragover",value:function(t){return t.preventDefault(),!this.currentTarget||(-1==this.parentDraggableTargets.indexOf(this.currentTarget)||""!=t.dataTransfer.getData("application/drag-key")||this.parentDraggableTargets.indexOf(t.target.closest(s))==this.parentDraggableTargets.indexOf(this.currentTarget)||(this.parentDraggableTargets.indexOf(t.target.closest(s))<this.parentDraggableTargets.indexOf(this.currentTarget)?t.target.closest(s).classList.add("drag-over-top"):t.target.closest(s).classList.add("drag-over-bottom")),!0)}},{key:"dragenter",value:function(t){t.preventDefault()}},{key:"dragleave",value:function(t){if(t.preventDefault(),!this.currentTarget)return!0;t.target.closest(s).classList.remove("drag-over-top"),t.target.closest(s).classList.remove("drag-over-bottom")}},{key:"drop",value:function(t){if(!this.currentTarget)return!0;var e=t.target.closest(s),n=this.currentTarget;if(!e||!n)return!0;var r=e.compareDocumentPosition(n);4&r?e.insertAdjacentElement("beforebegin",n):2&r&&e.insertAdjacentElement("afterend",n),t.preventDefault()}},{key:"dragend",value:function(){var t=[];if(!this.currentTarget)return!0;this.parentDraggableTargets.forEach((function(e,n){e.childNodes.forEach((function(t){"#text"!=t.nodeName&&(t.style.pointerEvents="default")})),e.classList.remove("drag-over-top"),e.classList.remove("drag-over-bottom"),t[n]=e.getAttribute("data-id")})),fetch(this.element.dataset.saveUrl,{body:JSON.stringify({order_array:t}),method:"POST",dataType:"script",credentials:"include",headers:{Accept:"application/json","Content-Type":"application/json"}}).then((function(t){return t.json()})).then((function(){var t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search;Turbolinks.visit(t)})),this.currentTarget=null}}])&&o(e.prototype,n),r&&o(e,r),u}(r.Qr);u.targets=["parentDraggable"]},26037:(t,e,n)=>{n.r(e),n.d(e,{default:()=>v});var r=n(91296),o=n.n(r),i=n(67931),a=n(66577),c=n.n(a),s=n(22837),u=n(41431),l=n(61530);function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(t,e){return p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},p(t,e)}function d(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h(t);if(e){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var y="trix-active",v=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)}(a,t);var e,n,r,i=d(a);function a(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).removeAttachment=function(e){e.preventDefault();var n=e.target.closest("[data-trix-attachment]"),r=new u.f(t.editor);r.recordUndoEntry("remove attachment"),r.removeAttachmentById(parseInt(n.dataset.trixId,10))},t}return e=a,(n=[{key:"connect",value:function(){this.editor=this.fieldTarget.editor,this.uploadingFilesCount=0,this.processing=!1,this.element.dataset.mentionsEnabled&&this.initializeTribute(),this.element.dataset.embedsEnabled&&this.activateEmbed(),this.activeHr(),this.overrideTheAttachmentBehaviour()}},{key:"overrideTheAttachmentBehaviour",value:function(){var t=this;this.fieldTarget.addEventListener("trix-file-accept",(function(e){e.preventDefault(),t.incrementUploadingFileCount(),new l.g(e.file,t.fieldTarget,t.decrementUploadingFileCount.bind(t)).start()})),this.fieldTarget.addEventListener("trix-change",(function(t){var e=t.target.editor,n=e.getPosition()||0;e.composition.attachments.forEach((function(t){if(t.attributes.values.url&&t.attributes.values.url.startsWith("blob")){var r=e.getDocument().getRangeOfAttachment(t);e.setSelectedRange(r),e.deleteInDirection("backward"),n>r[1]&&n--}})),n=Math.max(n,0),e.setSelectedRange([n,n])}))}},{key:"processing",set:function(t){this.data.set("processing",t)}},{key:"incrementUploadingFileCount",value:function(){this.uploadingFilesCount++,this.processing=this.uploadingFilesCount>0}},{key:"decrementUploadingFileCount",value:function(){this.uploadingFilesCount--,this.processing=this.uploadingFilesCount>0}},{key:"initializeTribute",value:function(){this.tribute=new(c())({allowSpaces:!0,lookup:"just_name",values:this.fetchUsers.bind(this),menuItemTemplate:function(t){return t.original.name}}),this.tribute.attach(this.fieldTarget),this.fieldTarget.addEventListener("tribute-replaced",this.replaced),this.tribute.range.pasteHtml=this._pasteHtml.bind(this)}},{key:"disconnect",value:function(){this.tribute&&this.tribute.detach(this.fieldTarget)}},{key:"fetchUsers",value:function(t,e){fetch("/users/mentions.json?query=".concat(t,"&is_private_space=").concat(this.element.dataset.isPrivateSpace,"&space_id=").concat(this.element.dataset.spaceId)).then((function(t){return t.json()})).then((function(t){return e(t)})).catch((function(){return e([])}))}},{key:"replaced",value:function(t){var e=t.detail.item.original,n=new s.default.Attachment({content:e.content,contentType:"mention",sgid:e.sgid});this.editor.insertAttachment(n),this.editor.insertString(" ")}},{key:"_pasteHtml",value:function(t,e,n){var r=this.editor.getPosition();this.editor.setSelectedRange([r-n,r]),this.editor.deleteInDirection("backward")}},{key:"activeHr",value:function(){var t=this;this.element.addEventListener("trix-initialize",(function(t){t.target.toolbarElement.querySelector("[data-trix-button-group=block-tools]").insertAdjacentHTML("afterbegin",'\n        <button type="button" class="trix-button" data-trix-action="x-horizontal-rule" title="Horizontal Rule" tabindex="-1">\u2501</button>\n      ')})),this.element.addEventListener("trix-action-invoke",(function(e){if("x-horizontal-rule"==e.actionName){var n=e.target.editor,r=new s.default.Attachment({content:"<hr>",contentType:"vnd.rubyonrails.horizontal-rule.html"});n.insertAttachment(r),t.fieldTarget.dispatchEvent(new Event("change"))}}))}},{key:"activateEmbed",value:function(){var t=this.fieldTarget.toolbarElement.querySelector(".trix-embed-button"),e=this.fieldTarget.toolbarElement.querySelector(".trix-dialog--embed");this.editor=this.fieldTarget.editor;var n=this.fieldTarget.toolbarElement.querySelector(".trix-button-group--block-tools"),r=this.fieldTarget.toolbarElement.querySelector(".trix-dialogs");t||e||(n.insertAdjacentHTML("beforeend",'<button type="button" class="trix-button trix-embed-button" data-trix-attribute="embed" data-trix-action="embed" title="Embed" tabindex="-1">Embed</button>'),r.insertAdjacentHTML("beforeend",'<div class="trix-dialog trix-dialog--link trix-dialog--embed" data-trix-dialog="embed" data-trix-dialog-attribute="embed">\n    <div class="trix-dialog__link-fields">\n    <input type="text" name="embed" class="trix-input trix-input--dialog" placeholder="Paste a YouTube, Vimeo, Twitter, Facebook, Instagram, or other URL" aria-label="embed code" required="" data-trix-input="" disabled="disabled">\n      <div class="trix-button-group">\n        <input type="button" class="trix-button trix-button--dialog" data-trix-custom="add-embed" value="Add">\n      </div>\n    </div>\n  </div>')),this.element.parentElement.querySelector('[data-trix-action="embed"]').addEventListener("click",function(t){var e=this;this.debouncedScrollHandler=o()((function(){var n=e.element.parentElement.querySelector('[data-trix-dialog="embed"]'),r=e.element.parentElement.querySelector('[name="embed"]');t.target.classList.contains(y)?(t.target.classList.remove(y),n.classList.remove(y),n.dataset.trixActive=!1,r.blur(),n.removeAttribute("data-trix-active"),r.setAttribute("disabled","disabled")):(t.target.classList.add(y),n.classList.add(y),n.dataset.trixActive=!0,r.removeAttribute("disabled"),r.focus())}),50),this.debouncedScrollHandler()}.bind(this)),this.element.parentElement.querySelector('[data-trix-custom="add-embed"]').addEventListener("click",function(){var t=this,e=this.element.parentElement.querySelector('[name="embed"]').value;e&&fetch(this.element.parentElement.querySelector("[data-embeds-path]").dataset.embedsPath,{body:JSON.stringify({embed:{content:e,embed_format:"oembed"}}),method:"POST",dataType:"script",credentials:"include",headers:{Accept:"application/json","Content-Type":"application/json"}}).then((function(t){return t.json()})).then((function(e){var n=new s.default.Attachment({content:e.content,contentType:"embed",sgid:e.sgid});t.editor.insertAttachment(n),t.editor.insertLineBreak(),t.fieldTarget.dispatchEvent(new Event("change"))}));var n=this.element.parentElement.querySelector('[data-trix-action="embed"]'),r=this.element.parentElement.querySelector('[data-trix-dialog="embed"]'),o=this.element.parentElement.querySelector('[name="embed"]');n.classList.contains(y)&&(n.classList.remove(y),r.classList.remove(y),delete r.dataset.trixActive,o.setAttribute("disabled","disabled"))}.bind(this))}},{key:"activateAutoLinker",value:function(){var t;document.execCommand("AutoUrlDetect",!1,!1),this.element.addEventListener("trix-change",(function(){if(!0!==t){var e=document.querySelector("trix-editor"),n=e.editor.getSelectedRange(),r=e.editor.getDocument().toString();if(null===r.substring(n[0]-1,n[0]).match(/\s/))return!0;var o=r.lastIndexOf(" ",n[0]-2),i=r.substring(o+1,n[0]-1);if(!i.match(/^(http:\/\/|https:\/\/)?[a-z0-9\-.]+?\.[a-z]+[/]?.*$/i)||["e.g.","i.e.","e.g","i.e"].includes(i))return!0;if(e.editor.setSelectedRange([o+1,n[0]-1]),!1!==e.editor.attributeIsActive("href"))return e.editor.setSelectedRange([n[0],n[1]]),!0;var a=i;-1==a.indexOf("://")&&(a="https://"+a);var c=i.replace("http://","").replace("https://","").replace(/^www\./,"");c.length>40&&(c=c.substr(0,37)+"...");var s=n[0]-(i.length-c.length);return t=!0,e.editor.recordUndoEntry("Auto Link"),e.editor.deleteInDirection("forward"),e.editor.insertString(c),e.editor.setSelectedRange([o+1,o+1+c.length]),e.editor.activateAttribute("href",a),e.editor.setSelectedRange([s-1,s-1]),e.editor.setSelectedRange([s,s]),t=!1,!0}}))}}])&&f(e.prototype,n),r&&f(e,r),a}(i.Qr);v.targets=["field"]},64230:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"redirectToParamPath",value:function(t){var e=new URLSearchParams(window.location.search);e.set(this.element.dataset.param,t.target.value),window.location.search=e}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr)},16267:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"updateButtonProps",value:function(){this.copyLinkButtonTarget.innerHTML=this.copyLinkButtonTarget.dataset.linkCopiedText,this.copyLinkButtonTarget.classList.contains("share-to-web-url__btn-copied")||this.copyLinkButtonTarget.classList.add("share-to-web-url__btn-copied")}},{key:"toggleFieldDescription",value:function(t,e){t.innerHTML=e}},{key:"setInputValueForShareUrl",value:function(t){this.inputForShareUrlTarget.value=t}},{key:"toggleCheckboxForMinimalLayout",value:function(t){this.hasCheckboxMinimalLayoutTarget&&(this.checkboxMinimalLayoutTarget.checked=t)}},{key:"uncheckCheckboxForShowPostTeaser",value:function(){this.checkboxShowTeaserTarget.checked=!1}},{key:"success",value:function(t){var e=t.detail[0],n=this.checkboxShareToWebTarget.dataset.shareToWebOnDescription,r=this.checkboxShareToWebTarget.dataset.shareToWebOffDescription,o=e.share_post_link,i=e.minimal_layout,a=e.post_id,c=e.share_post_enabled,s=document.querySelector(".share-to-web-".concat(a," .field-description"));c?(this.toggleFieldDescription(s,n),this.setInputValueForShareUrl(o),this.toggleCheckboxForMinimalLayout(i)):(this.uncheckCheckboxForShowPostTeaser(),this.toggleFieldDescription(s,r))}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr);c.targets=["copyLinkButton","checkboxShowTeaser","inputForShareUrl","checkboxShareToWeb","checkboxMinimalLayout"]},14746:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"focus",value:function(){document.getElementById("user_email").focus()}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr);c.targets=["email"]},13186:(t,e,n)=>{n.r(e),n.d(e,{default:()=>s});var r=n(90161);function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}function a(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}var s=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(u,t);var e,n,c,s=a(u);function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),s.apply(this,arguments)}return e=u,(n=[{key:"connect",value:function(){this.linkTargets.forEach((function(t){document.location.href.startsWith("".concat(t.href,"/"))||document.location.href===t.href?(t.classList.add("nav-link--active"),t.classList.remove("nav-link--inactive"),(0,r.Z)(t,{scrollMode:"if-needed",block:"center",inline:"center"})):(t.classList.remove("nav-link--active"),t.classList.add("nav-link--inactive"))}))}}])&&o(e.prototype,n),c&&o(e,c),u}(n(67931).Qr);s.targets=["link"]},99859:(t,e,n)=>{n.r(e),n.d(e,{default:()=>f});var r=n(67931);function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}function a(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}var s="sidebar--floating",u="has-sidebar",l="header--floating",f=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(f,t);var e,n,r,c=a(f);function f(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),c.apply(this,arguments)}return e=f,(n=[{key:"connect",value:function(){this.hasLayoutTarget&&this.hasSidebarTarget&&this.hasSidebarBtnTarget&&this.initMenu(this.layoutTarget,this.sidebarTarget,this.sidebarBtnTarget),this.hideFloating()}},{key:"toggleSidebarIcon",value:function(){var t=this;function e(t,e,n){t.classList.contains(s)?(e.classList.add("hidden"),n.classList.remove("hidden")):(e.classList.remove("hidden"),n.classList.add("hidden"))}e(this.sidebarTarget,this.arrowIconTarget,this.menuIconTarget),window.addEventListener("resize",(function(){e(t.sidebarTarget,t.arrowIconTarget,t.menuIconTarget)}))}},{key:"initMenu",value:function(t,e,n){var r=window.matchMedia("(min-width: 992px)");window.addEventListener("resize",(function(){!r.matches&&e.classList.contains(s)?t.classList.remove(u):r.matches||e.classList.contains(s)?r.matches&&e.classList.remove("sidebar--mobile-open"):(t.classList.add(u),e.classList.remove("hidden")),!r.matches&&n.parentElement.classList.contains(l)?n.parentElement.classList.remove(l):r.matches&&e.classList.contains(s)&&n.parentElement.classList.add(l)}))}},{key:"toggleFloating",value:function(){var t,e,n;this.toggleSidebarIcon(),this.hasSidebarTarget&&this.hasLayoutTarget&&(this.layoutTarget.classList.toggle(u),t=this.sidebarTarget,e=this.sidebarBtnTarget,n=this.layoutTarget,window.matchMedia("(min-width: 992px)").matches?(t.classList.toggle(s),t.classList.remove("sidebar--mobile-open"),e.parentElement.classList.toggle(l)):(t.classList.remove(s),t.classList.toggle("sidebar--mobile-open"),e.parentElement.classList.remove(l),n.classList.remove(u)))}},{key:"showFloating",value:function(){this.hasSidebarTarget&&this.sidebarTarget.classList.remove("hidden")}},{key:"hideFloating",value:function(){var t=this;this.toggleSidebarIcon(),window.addEventListener("mouseover",(function(e){t.sidebarTarget.contains(e.target)||t.sidebarBtnTarget.contains(e.target)?t.sidebarTarget.classList.remove("hidden"):t.layoutTarget.classList.contains(u)||t.sidebarTarget.classList.add("hidden")}))}}])&&o(e.prototype,n),r&&o(e,r),f}(r.Qr);f.targets=["layout","sidebar","sidebarBtn","arrowIcon","menuIcon"]},69230:(t,e,n)=>{n.r(e),n.d(e,{TabsController:()=>f,default:()=>f});var r=n(67931);function o(t){return"show"+((e=t).charAt(0).toUpperCase()+e.slice(1));var e}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.controller=e}var e,n,r;return e=t,n=[{key:"selectedContent",get:function(){return this.findContent(this.selectedTabName)}},{key:"previousContent",get:function(){return this.findContent(this.previousTabName)}},{key:"selectedTab",get:function(){return this.findTab(this.selectedTabName)},set:function(t){this.data.set("selectedTab",t)}},{key:"previousTab",get:function(){var t=this.previousTabName;return t&&this.findTab(t)},set:function(t){this.data.set("previousTab",t)}},{key:"setSelectedTab",value:function(t){(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(this.previousTab=this.selectedTabName),this.selectedTab=t}},{key:"selectedTabName",get:function(){return this.data.get("selectedTab")}},{key:"previousTabName",get:function(){return this.data.get("previousTab")}},{key:"findContent",value:function(t){return this.targets.find(t)}},{key:"findTab",value:function(t){var e=this.tabSelector(t);return this.element.querySelector(e)}},{key:"tabSelector",value:function(t){return"[data-action$='".concat(this.identifier,"#").concat(o(t),"']")}},{key:"identifier",get:function(){return this.controller.identifier}},{key:"element",get:function(){return this.controller.element}},{key:"data",get:function(){return this.controller.data}},{key:"targets",get:function(){return this.controller.targets}}],n&&i(e.prototype,n),r&&i(e,r),t}();function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function u(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=l(t);if(e){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}var f=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(l,t);var e,n,r,i=u(l);function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),i.apply(this,arguments)}return e=l,(n=[{key:"initialize",value:function(){var t,e;e=(t=this).constructor.prototype,t._tabs.forEach((function(t){o(t)in e||(e[o(t)]=function(e){e&&e.preventDefault(),this._tabState.setSelectedTab(t),this.selectedTab!==this.previousTab&&(this._showSelectedTabContent(),this._addSelectedTabClass(),this.selected())})})),this._tabState=new a(this)}},{key:"connect",value:function(){this._tabs.length>0&&(this._hideTabs(),this._tabState.setSelectedTab(this._initialTabName,!1),this._showSelectedTabContent(),this._addSelectedTabClass())}},{key:"selected",value:function(){}},{key:"selectedContent",get:function(){return this._tabState.selectedContent}},{key:"previousContent",get:function(){return this._tabState.previousContent}},{key:"selectedTab",get:function(){return this._tabState.selectedTab}},{key:"previousTab",get:function(){return this._tabState.previousTab}},{key:"_hideTabs",value:function(){var t=this;this._tabs.forEach((function(e){t._initialTabName!==e&&t._hideContent(t.targets.find(e))}))}},{key:"_initialTabName",get:function(){return this._tabState.selectedTabName||this._tabs[0]}},{key:"_tabs",get:function(){var t=this.element.dataset.tabs;return t?t.trim().split(/\s+/):this.constructor.tabs}},{key:"_selectedTabClass",get:function(){return this.element.dataset.selectedTabClass||this.constructor.selectedTabClass||"selected-tab"}},{key:"_showSelectedTabContent",value:function(){this._showContent(this.selectedContent),this._hideContent(this.previousContent)}},{key:"_hideContent",value:function(t){t&&(t.style.display="none")}},{key:"_showContent",value:function(t){t&&(t.style.display="")}},{key:"_addSelectedTabClass",value:function(){this.selectedTab.classList.add(this._selectedTabClass),this._removeSelectedTabClassFromPreviousTab()}},{key:"_removeSelectedTabClassFromPreviousTab",value:function(){this.previousTab&&this.previousTab.classList.remove(this._selectedTabClass)}}])&&c(e.prototype,n),r&&c(e,r),l}(r.Qr);f.tabs=[],f.selectedTabClass=""},92254:(t,e,n)=>{n.r(e),n.d(e,{default:()=>l});var r=n(64687),o=n.n(r);function i(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(u){return void n(u)}c.done?e(s):Promise.resolve(s).then(r,o)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}function s(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}var l=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(p,t);var e,n,r,u,l,f=s(p);function p(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,p);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=f.call.apply(f,[this].concat(n))).isSubmitting=!1,t.setSubmitting=function(e){t.isSubmitting=e},t}return e=p,n=[{key:"connect",value:function(){var t=document.querySelector('meta[name="stripe-key"]');if(null!==t){var e=t.getAttribute("content");this.stripe=Stripe(e);var n=this.stripe.elements();this.card=n.create("card"),this.card.mount(this.cardTarget),this.card.addEventListener("change",this.changed.bind(this))}}},{key:"changed",value:function(t){t.error?this.errorTarget.textContent=t.error.message:this.errorTarget.textContent=""}},{key:"submit",value:(u=o().mark((function t(e){var n=this;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.isSubmitting){t.next=2;break}return t.abrupt("return");case 2:return this.setSubmitting(!0),e.preventDefault(),t.next=6,this.stripe.createToken(this.card).then((function(t){t.error?n.errorTarget.textContent=t.error.message:n.handleToken(t.token)}));case 6:this.setSubmitting(!1);case 7:case"end":return t.stop()}}),t,this)})),l=function(){var t=this,e=arguments;return new Promise((function(n,r){var o=u.apply(t,e);function a(t){i(o,n,r,a,c,"next",t)}function c(t){i(o,n,r,a,c,"throw",t)}a(void 0)}))},function(t){return l.apply(this,arguments)})},{key:"handleToken",value:function(t){this.addHiddenField("community[processor]","stripe"),this.addHiddenField("community[card_token]",t.id),Rails.fire(this.formTarget,"submit")}},{key:"addHiddenField",value:function(t,e){var n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",t),n.setAttribute("value",e),this.formTarget.appendChild(n)}}],n&&a(e.prototype,n),r&&a(e,r),p}(n(67931).Qr);l.targets=["card","error","form"]},28277:(t,e,n)=>{n.r(e),n.d(e,{default:()=>u});var r=n(67931);function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}function a(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}var s=n(36464),u=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(u,t);var e,n,r,c=a(u);function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),c.apply(this,arguments)}return e=u,(n=[{key:"connect",value:function(){var t=this.element.dataset.timestamp;this.element.innerHTML=s(new Date(t))}}])&&o(e.prototype,n),r&&o(e,r),u}(r.Qr);u.targets=["timestamp"]},75467:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"connect",value:function(){var t=this;this.toggleClass=this.data.get("class")||"hidden",(window.location.hash==this.element.dataset.path||this.element.dataset.open)&&this.toggle(),this.toggleTriggerTarget.dataset.open&&("true"==this.toggleTriggerTarget.dataset.open?(this.toggleTriggerTarget.classList.add("open"),this.toggleableTargets.forEach((function(e){e.classList.remove(t.toggleClass)}))):(this.toggleTriggerTarget.classList.remove("open"),this.toggleableTargets.forEach((function(e){e.classList.add(t.toggleClass)}))))}},{key:"toggle",value:function(t){var e=this;t&&t.preventDefault(),t&&"change"==t.type&&"true"!=t.target.value||(history.pushState(null,null,this.element.dataset.path),this.toggleTriggerTarget.classList.add("hidden"),this.toggleTriggerTarget.classList.toggle("open"),this.element.dataset.inputFocus&&setTimeout(function(){document.getElementById(this.element.dataset.inputFocus).focus()}.bind(this),100),this.toggleableTargets.forEach((function(t){t.classList.toggle(e.toggleClass)})))}},{key:"done",value:function(){this.toggleTriggerTarget.classList.show("hidden")}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr);c.targets=["toggleable","toggleTrigger"]},25040:(t,e,n)=>{n.r(e),n.d(e,{default:()=>p});n(67294);var r=n(73935),o=n(67931),i=n(91699),a=n(83729),c=n(85893);function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}function l(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var p=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(p,t);var e,n,o,f=l(p);function p(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,p);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=f.call.apply(f,[this].concat(n))).hideAttachmentPreview=function(){t.divElement.remove()},t}return e=p,(n=[{key:"connect",value:function(){this.contentPath=this.data.get("parentContentPath"),this.trixContentAttachmentPreviewHelperService=new i.W(this.element),this.showAttachmentPreview=this._showAttachmentPreview.bind(this),this.trixContentAttachmentPreviewHelperService.addAttachmentClickEventHandler(this.showAttachmentPreview)}},{key:"_showAttachmentPreview",value:function(t){var e=t.attachments,n=t.currentIndex;this.divElement=document.createElement("div"),document.querySelector("body").append(this.divElement),r.render((0,c.jsx)(a._,{attachments:e,currentIndex:n,onClose:this.hideAttachmentPreview,show:!0,path:this.contentPath}),this.divElement)}}])&&s(e.prototype,n),o&&s(e,o),p}(o.Qr)},18251:(t,e,n)=>{function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}n.r(e),n.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,t);var e,n,a,c=i(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return e=s,(n=[{key:"connect",value:function(){this.updateSpaceLastSeenPost()}},{key:"updateSpaceLastSeenPost",value:function(){var t=this.element.dataset,e=t.url,n=t.readCount,r=t.totalCount,o=t.spaceId;e&&parseInt(r,10)>parseInt(n,10)&&fetch(e,{method:"PATCH",dataType:"script",credentials:"include",headers:{Accept:"application/json","Content-Type":"application/json"}}).then((function(t){return t.json()})).then((function(){var t=document.querySelectorAll(".unread_posts_count_".concat(o));if(t.length>0)for(var e=0;e<t.length;e++)t[e].remove()}))}}])&&r(e.prototype,n),a&&r(e,a),s}(n(67931).Qr)},84633:(t,e,n)=>{n.r(e),n.d(e,{default:()=>u});var r=n(67931);function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}function a(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}var s="You have attempted to leave this page.  If you have made any changes to the fields without clicking the Save button, your changes will be lost.  Are you sure you want to exit this page?",u=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(u,t);var e,n,r,c=a(u);function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),c.apply(this,arguments)}return e=u,(n=[{key:"formIsChanged",value:function(){this.setChanged("true")}},{key:"leavingPage",value:function(t){if(this.isFormChanged()){if("turbolinks:before-visit"!=t.type)return t.returnValue=s,t.returnValue;window.confirm(s)||t.preventDefault()}}},{key:"allowFormSubmission",value:function(){this.setChanged("false")}},{key:"setChanged",value:function(t){this.data.set("changed",t)}},{key:"isFormChanged",value:function(){return"true"==this.data.get("changed")}}])&&o(e.prototype,n),r&&o(e,r),u}(r.Qr)},87169:(t,e,n)=>{n.r(e),n.d(e,{default:()=>l});var r=n(67931),o=n(70360);function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=s(t);if(e){var o=s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}var u="is-invalid",l=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(l,t);var e,n,r,s=c(l);function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),s.apply(this,arguments)}return e=l,(n=[{key:"checkPassword",value:function(t){return o.zU.test(t)}},{key:"validatePassword",value:function(){this.checkPassword(this.passwordFieldTarget.value)||(this.passwordErrorMessageTarget.classList.remove("hidden"),this.passwordFieldTarget.classList.add(u))}},{key:"validateConfirmPassword",value:function(){this.passwordFieldTarget.value!=this.confirmPasswordFieldTarget.value&&(this.confirmPasswordErrorMessageTarget.classList.remove("hidden"),this.confirmPasswordFieldTarget.classList.add(u))}},{key:"resetPasswordValidation",value:function(){this.passwordErrorMessageTarget.classList.add("hidden"),this.passwordFieldTarget.classList.remove(u)}},{key:"resetConfirmPasswordValidation",value:function(){this.confirmPasswordErrorMessageTarget.classList.add("hidden"),this.confirmPasswordFieldTarget.classList.remove(u)}},{key:"resetNameValidation",value:function(){this.nameErrorMessageTarget.classList.add("hidden"),this.nameFieldTarget.classList.remove(u)}},{key:"submitForm",value:function(t){t.preventDefault(),document.getElementById("confirmPassword")?this.passwordFieldTarget.value==this.confirmPasswordFieldTarget.value?this.validateAndFormSubmit():(this.confirmPasswordErrorMessageTarget.classList.remove("hidden"),this.confirmPasswordFieldTarget.classList.add(u)):this.validateAndFormSubmit()}},{key:"validateAndFormSubmit",value:function(){this.checkPassword(this.passwordFieldTarget.value)?"production"===window.RAILS_ENV||"staging"===window.RAILS_ENV?grecaptcha.execute():this.formTarget.submit():(this.passwordErrorMessageTarget.classList.remove("hidden"),this.passwordFieldTarget.classList.add(u))}},{key:"validateName",value:function(){this.nameFieldTarget.value.length>0||(this.nameErrorMessageTarget.classList.remove("hidden"),this.nameFieldTarget.classList.add(u))}}])&&i(e.prototype,n),r&&i(e,r),l}(r.Qr);l.targets=["passwordField","confirmPasswordField","passwordErrorMessage","confirmPasswordErrorMessage","form","nameErrorMessage","nameField"]}}]);
//# sourceMappingURL=/packs/js/7209-edb3fce5b594a3a0c3da.js.map