!function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return i(e,[{key:"show",value:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(e.style.display=null),e.classList.remove("hidden")}},{key:"hide",value:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(e.style.display="none"),e.classList.add("hidden")}},{key:"showSpinner",value:function(e){e.classList.add("is-active")}},{key:"hideSpinner",value:function(e){e.classList.remove("is-active")}},{key:"enableElement",value:function(e){e.classList.remove("disabled")}},{key:"disableElement",value:function(e){e.classList.add("disabled")}}]),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=n(0),r=(i=a)&&i.__esModule?i:{default:i};var c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.ajaxUrl=ajaxurl,this.tools=new r.default}return o(e,[{key:"init",value:function(){var e=this;this.mainNotice=document.querySelector(".js-classic-editor-notice"),this.mainNotice&&(this.nonce=this.mainNotice.dataset.nonce,this.action=this.mainNotice.dataset.action,this.mainNotice.querySelector(".js-minimize").onclick=function(){return e.minimize()},this.mainNotice.querySelector(".js-request-activation").onclick=function(){return e.requestActivation()}),this.minimizedNotice=document.querySelector(".js-classic-editor-notice-minimized"),this.minimizedNotice&&(this.minimizedNotice.querySelector(".js-maximize").onclick=function(){return e.maximize()})}},{key:"minimize",value:function(){this.tools.hide(this.mainNotice,!0),this.tools.show(this.minimizedNotice,!0),this.ajax({command:"minimize"})}},{key:"maximize",value:function(){this.tools.show(this.mainNotice,!0),this.tools.hide(this.minimizedNotice,!0),this.ajax({command:"maximize"})}},{key:"requestActivation",value:function(){var e=this;this.ajax({command:"requestActivation",manager:this.mainNotice.querySelector(".js-translation-managers").value}).then(function(t){return e.activationResponse(t)})}},{key:"activationResponse",value:function(e){alert(e)}},{key:"ajax",value:function(e){e.nonce=this.nonce,e.action=this.action;var t=Object.keys(e).map(function(t){return t+"="+e[t]}).join("&");return fetch(this.ajaxUrl,{method:"POST",body:t,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},credentials:"same-origin"}).then(function(e){if(!e.ok)throw new Error(e.statusText);return e.json()}).then(function(e){return e.data.message})}}]),e}();t.default=c},function(e,t,n){"use strict";var i,o=n(1),a=(i=o)&&i.__esModule?i:{default:i};document.addEventListener("DOMContentLoaded",function(){(new a.default).init()})},function(e,t,n){e.exports=n(2)}]);