!function(){"use strict";var e={};function n(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}(function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e);var t=window.wp.element,r=window.lodash,o=window.wp.hooks,i=window.nisje.pluginEvents,u=window.nisje.settings,c=window.nisje.components;function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}(0,o.addFilter)("EventFormEditInitialState","normisjon-event-taxonomies",(function(e,n){return(0,u.getOption)("normisjonEventTaxonomies",[]).forEach((function(t){var o=(0,r.get)(n,t.key,[]);(0,r.isEmpty)(o)||(e[t.key]=o[0])})),e})),(0,u.registerPlugin)("normisjon",{render:function(){var e=(0,u.getOption)("normisjonEventTaxonomies",[]);return(0,t.createElement)(i.EventCreateControls,null,(function(o){var i=o.values,u=o.setValues;return e.map((function(e){var o=(0,r.get)(i,e.key,0);return(0,t.createElement)(c.SelectControl,{key:e.key,label:e.name,value:o,options:e.options,onChange:function(t){return u(a(a({},i),{},n({},e.key,t)))}})}))}))}}),(window.nisje=window.nisje||{}).pluginNormisjon=e}();