!function(){"use strict";var e={n:function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,{a:r}),r},d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t);var r={};e.r(r),e.d(r,{createErrorNotice:function(){return w},createInfoNotice:function(){return m},createNotice:function(){return g},removeNotice:function(){return j}});var n={};e.r(n),e.d(n,{getNotices:function(){return E}});var o=window.wp.data;function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var u=window.lodash,a=(0,window.nisje.data.onSubKey)("context")((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CREATE_NOTICE":return[].concat(c((0,u.reject)(e,{id:t.notice.id})),[t.notice]);case"REMOVE_NOTICE":return(0,u.reject)(e,{id:t.id});default:return e}}));function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=window.regeneratorRuntime,d=e.n(l),p="global",b="info",y=d().mark(g);function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(){var e,t,r,n,o,i,c,a,s,l,v,g,m,w,j,h=arguments;return d().wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(e=h.length>0&&void 0!==h[0]?h[0]:b,t=h.length>1?h[1]:void 0,r=h.length>2&&void 0!==h[2]?h[2]:{},n=r.autoDismiss,o=void 0===n?5e3:n,i=r.context,c=void 0===i?p:i,a=r.id,s=void 0===a?(0,u.uniqueId)(c):a,l=r.isDismissible,v=void 0===l||l,g=r.speak,m=void 0===g||g,w=f(r,["autoDismiss","context","id","isDismissible","speak"]),t=String(t),!m){d.next=8;break}return d.next=8,{type:"SPEAK",message:t};case 8:return j=O({autoDismiss:o,content:t,id:s,isDismissible:v,status:e},w),d.next=11,{type:"CREATE_NOTICE",context:c,notice:j};case 11:case"end":return d.stop()}}),y)}function m(e,t){return g("info-dark",e,t)}function w(e,t){return g("error",e,t)}function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;return{type:"REMOVE_NOTICE",id:e,context:t}}var h=[];function E(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;return e[t]||h}var S=window.wp.a11y,P={SPEAK:function(e){(0,S.speak)(e.message,"assertive")}};(0,o.registerStore)("nisje/notices",{reducer:a,actions:r,selectors:n,controls:P}),(window.nisje=window.nisje||{}).notices=t}();