!function(){"use strict";varn={d:function(t,r){for(vareinr)n.o(r,e)&&!n.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},o:function(n,t){returnObject.prototype.hasOwnProperty.call(n,t)},r:function(n){"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})}},t={};n.r(t),n.d(t,{actions:function(){returnS},addAction:function(){returnv},addFilter:function(){returnm},applyFilters:function(){returnk},createHooks:function(){returnh},currentAction:function(){returnw},currentFilter:function(){returnI},defaultHooks:function(){returnf},didAction:function(){returnO},didFilter:function(){returnj},doAction:function(){returnb},doingAction:function(){returnx},doingFilter:function(){returnT},filters:function(){returnz},hasAction:function(){return_},hasFilter:function(){returng},removeAction:function(){returnp},removeAllActions:function(){returny},removeAllFilters:function(){returnF},removeFilter:function(){returnA}});varr=function(n){return"string"!=typeofn||""===n?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(n)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};vare=function(n){return"string"!=typeofn||""===n?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(n)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(n)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};varo=function(n,t){returnfunction(o,i,c){lets=arguments.length>3&&void0!==arguments[3]?arguments[3]:10;constu=n[t];if(!e(o))return;if(!r(i))return;if("function"!=typeofc)returnvoidconsole.error("The hook callback must be a function.");if("number"!=typeofs)returnvoidconsole.error("If specified, the hook priority must be a number.");constl={callback:c,priority:s,namespace:i};if(u[o]){constn=u[o].handlers;lett;for(t=n.length;t>0&&!(s>=n[t-1].priority);t--);t===n.length?n[t]=l:n.splice(t,0,l),u.__current.forEach((n=>{n.name===o&&n.currentIndex>=t&&n.currentIndex++}))}elseu[o]={handlers:[l],runs:0};"hookAdded"!==o&&n.doAction("hookAdded",o,i,c,s)}};vari=function(n,t){leto=arguments.length>2&&void0!==arguments[2]&&arguments[2];returnfunction(i,c){consts=n[t];if(!e(i))return;if(!o&&!r(c))return;if(!s[i])return0;letu=0;if(o)u=s[i].handlers.length,s[i]={runs:s[i].runs,handlers:[]};else{constn=s[i].handlers;for(lett=n.length-1;t>=0;t--)n[t].namespace===c&&(n.splice(t,1),u++,s.__current.forEach((n=>{n.name===i&&n.currentIndex>=t&&n.currentIndex--})))}return"hookRemoved"!==i&&n.doAction("hookRemoved",i,c),u}};varc=function(n,t){returnfunction(r,e){consto=n[t];returnvoid0!==e?rino&&o[r].handlers.some((n=>n.namespace===e)):rino}};vars=function(n,t){letr=arguments.length>2&&void0!==arguments[2]&&arguments[2];returnfunction(e){consto=n[t];o[e]||(o[e]={handlers:[],runs:0}),o[e].runs++;consti=o[e].handlers;for(varc=arguments.length,s=newArray(c>1?c-1:0),u=1;u<c;u++)s[u-1]=arguments[u];if(!i||!i.length)returnr?s[0]:void0;constl={name:e,currentIndex:0};for(o.__current.push(l);l.currentIndex<i.length;){constn=i[l.currentIndex].callback.apply(null,s);r&&(s[0]=n),l.currentIndex++}returno.__current.pop(),r?s[0]:void0}};varu=function(n,t){returnfunction(){varr,e;consto=n[t];returnnull!==(r=null===(e=o.__current[o.__current.length-1])||void0===e?void0:e.name)&&void0!==r?r:null}};varl=function(n,t){returnfunction(r){conste=n[t];returnvoid0===r?void0!==e.__current[0]:!!e.__current[0]&&r===e.__current[0].name}};vara=function(n,t){returnfunction(r){consto=n[t];if(e(r))returno[r]&&o[r].runs?o[r].runs:0}};classd{constructor(){this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=o(this,"actions"),this.addFilter=o(this,"filters"),this.removeAction=i(this,"actions"),this.removeFilter=i(