(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{setup:()=>s,speak:()=>d});const n=window.wp.domReady;var o=e.n(n);function i(e="polite"){const t=document.createElement("div");t.id=`a11y-speak-${e}`,t.className="a11y-speak-region",t.setAttribute("style","position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip-path:inset(50%);border:0;word-wrap:normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");const{body:n}=document;return n&&n.appendChild(t),t}const a=window.wp.i18n;let r="";function d(e,t){!function(){const e=document.getElementsByClassName("a11y-speak-region"),t=document.getElementById("a11y-speak-intro-text");for(let t=0;t<e.length;t++)e[t].textContent="";t&&t.setAttribute("hidden","hidden")}(),e=function(e){return e=e.replace(/<[^<>]+>/g," "),r===e&&(e+=" "),r=e,e}(e);const n=document.getElementById("a11y-speak-intro-text"),o=document.getElementById("a11y-speak-assertive"),i=document.getElementById("a11y-speak-polite");o&&"assertive"===t?o.textContent=e:i&&(i.textContent=e),n&&n.removeAttribute("hidden")}function s(){const e=document.getElementById("a11y-speak-intro-text"),t=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");null===e&&function(){const e=document.createElement("p");e.id="a11y-speak-intro-text",e.className="a11y-speak-intro-text",e.textContent=(0,a.__)("Notifications"),e.setAttribute("style","position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip-path:inset(50%);border:0;word-wrap:normal !important;"),e.setAttribute("hidden","");const{body:t}=document;t&&t.appendChild(e)}(),null===t&&i("assertive"),null===n&&i("polite")}o()(s),(window.wp=window.wp||{}).a11y=t})();
(t=>{t.fn.textareaCount=function(i,r){var o,l=t(this),c=0,u=i.maxCharacterSize,s=0,f=0,h={};function d(r){for(var a=0,e=0;e<r.length;e++)"\n"===r.charAt(e)&&a++;return a}function p(){return-1!==navigator.appVersion.toLowerCase().indexOf("win")}function g(r){return(r+" ").replace(/^[^A-Za-z0-9]+/gi,"").replace(/[^A-Za-z0-9]+/gi," ").split(" ")}function m(r){return r.length-1}function a(){var r,a,e,t=l.val(),n=("function"==typeof i.charCounter?i.charCounter:h[i.charCounter])(t);return 0<i.maxCharacterSize?(r=d(t=i.truncate&&n>=i.maxCharacterSize?t.substring(0,i.maxCharacterSize):t),a=i.maxCharacterSize,p()&&(a=i.maxCharacterSize-r),i.truncate&&a<n&&(e=this.scrollTop,l.val(t.substring(0,a)),this.scrollTop=e),o.removeClass(i.warningStyle+" "+i.errorStyle),a-n<=i.warningNumber&&o.addClass(i.warningStyle),a-n<0&&o.addClass(i.errorStyle),c=n,p()&&(c=n+r),f=m(g(l.val())),s=u-c):(r=d(t),c=n,p()&&(c=n+r),f=m(g(l.val()))),e=(e=(e=i.displayFormat).replace("#input",c)).replace("#words",f),e=0<u?(e=e.replace("#max",u)).replace("#left",s):e}function e(){o.html(a()),void 0!==r&&r.call(this,{input:c,max:u,left:s,words:f})}h.standard=function(r){return r.length},h.twitter=function(r){var a=Array(23).join("*"),e=new RegExp("(https?://)?([a-z0-9+!*(),;?&=$_.-]+(:[a-z0-9+!*(),;?&=$_.-]+)?@)?([a-z0-9-.]*)\\.(travel|museum|[a-z]{2,4})(:[0-9]{2,5})?(/([a-z0-9+$_-]\\.?)+)*/?(\\?[a-z+&$_.-][a-z0-9;:@&%=+/$_.-]*)?(#[a-z_.-][a-z0-9+$_.-]*)?","gi");return r.replace(e,a).length},i=t.extend({maxCharacterSize:-1,truncate:!0,charCounter:"standard",originalStyle:"originalTextareaInfo",warningStyle:"warningTextareaInfo",errorStyle:"errorTextareaInfo",warningNumber:20,displayFormat:"#input characters | #words words"},i),t("<div class='charleft'>&nbsp;</div>").insertAfter(l),(o=l.next(".charleft")).addClass(i.originalStyle),e(),l.bind("keyup",function(){e()}).bind("mouseover paste",function(){setTimeout(function(){e()},10)})}})(jQuery);