Post and Page Builder by BoldGrid – Visual Drag and Drop Editor - Version 1.13.4

Version Description

Release Date: August 28th, 2020

  • Fix: Issue causing editor selection to switch back to Post and Page Builder after loading WordPress Editor.
Download this release

Release Info

Developer rramo012
Plugin Icon 128x128 Post and Page Builder by BoldGrid – Visual Drag and Drop Editor
Version 1.13.4
Comparing to
See all releases

Code changes from version 1.13.3 to 1.13.4

assets/dist/gutenberg.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s="./assets/js/gutenberg.js")}({"./assets/image/boldgrid-logo.svg":function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" clip-rule="evenodd" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="1"><g fill="#f95b26"><path d="M31.224 38.994h-17.48c-.87 0-1.652-.706-1.652-1.677v-8.562c0-.883.696-1.677 1.652-1.677h17.48c.87 0 1.653.706 1.653 1.677v8.65c-.087.883-.783 1.589-1.653 1.589zM24.354 22.93H13.571c-.783 0-1.392-.619-1.392-1.413v-9.004c0-.794.609-1.412 1.392-1.412h10.783c.783 0 1.392.618 1.392 1.412v9.004c0 .794-.61 1.412-1.392 1.412z"></path></g><path d="M41.051 47.115H9.396c-3.218 0-5.913-2.737-5.913-6.003V8.982c0-3.265 2.695-6.002 5.913-6.002h31.655c3.218 0 5.914 2.737 5.914 6.003v1.324a1.57 1.57 0 0 1-1.565 1.589 1.57 1.57 0 0 1-1.566-1.59V8.984c0-1.5-1.217-2.737-2.696-2.737H9.396C7.918 6.246 6.7 7.482 6.7 8.983v32.13c0 1.5 1.218 2.736 2.696 2.736h31.655c1.479 0 2.696-1.236 2.696-2.737V25.49c0-1.5-1.217-2.736-2.696-2.736H34.53a1.57 1.57 0 0 1-1.565-1.59 1.57 1.57 0 0 1 1.565-1.588h6.522c3.305 0 5.914 2.736 5.914 6.002v15.624c0 3.177-2.696 5.914-5.914 5.914z" fill="#f95b26"></path></svg>'},"./assets/js/forms/editor-select/control.js":function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return u});var i=n("./node_modules/@boldgrid/controls/src/controls/mat-menu/index.js"),o=n("./assets/js/forms/utility.js"),r=n("./assets/js/view/loading/index.js"),s=n("./assets/js/forms/editor-select/style.scss"),a=(n.n(s),function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}()),u=function(){function t(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,t),this.labels=[{name:"bgppb",value:"bgppb",label:'<img src="'+BoldgridEditor.plugin_url+'/assets/image/boldgrid-logo.svg"/> <span>Post and Page Builder</span>'},{name:"modern",value:"modern",label:"<span>WordPress Editor</span>"},{name:"classic",value:"classic",label:"<span>Classic Editor</span>"},{name:"default",value:"default",label:"<span>Default</span>"}],this.labels=this._filterAvailableEditors(this.labels),this.loading=new r.a}return a(t,[{key:"init",value:function(){this.$element=e(this._getHtml()),this.menu=this._renderMenu(),this._setupMenu(),this._setupClick(),this.$element.show(),e("#screen-meta-links").prepend(this.$element),this.setEditorOverrideInput(e("form#post"))}},{key:"changeType",value:function(e){var t=this;this.loading.show(),(new o.a).postForm({bgppb_default_editor_post:e},!1),setTimeout(function(){return t.loading.hide()},3e3)}},{key:"setEditorOverrideInput",value:function(t){var n=e("<input/>");n.attr("type","hidden").attr("name","bgppb_default_editor_post").val(BoldgridEditor.editor_override).attr("value",BoldgridEditor.editor_override),t.append(n)}},{key:"_filterAvailableEditors",value:function(e){return e.filter(function(e){return-1!==BoldgridEditor.plugin_configs.valid_editors.indexOf(e.name)})}},{key:"_setupMenu",value:function(){var t=this;this.$element.find("[data-action]").on("click",function(n){var i=e(n.currentTarget).attr("data-action");t.changeType(i)})}},{key:"_renderMenu",value:function(){var e=new i.a({name:"bgppb-choose-editor",options:this.labels.filter(function(e){return"default"!==e.value}),selected:BoldgridEditor.globalSettings.current_editor});return this.$element.find(".menu-container").append(e.render()),e}},{key:"_setupClick",value:function(){var e=this;this.$element.find(".current-editor").on("click",function(t){t.preventDefault(),e.menu.menu.open||e.menu.show()})}},{key:"_getHtml",value:function(){return'\n\t\t\t<div id="bgppb-choose-editor" class="screen-meta-toggle">\n\t\t\t\t<span class="label">\n\t\t\t\t\t<span>Editor</span>\n\t\t\t\t</span>\n\t\t\t\t<span class="current-editor show-settings button">\n\t\t\t\t\t'+this.labels.find(function(e){return e.name===BoldgridEditor.globalSettings.current_editor}).label+'\n\t\t\t\t</span>\n\t\t\t\t<span class="menu-container"></span>\n\t\t\t</div>\n\t\t'}}]),t}()}).call(this,n("jquery"))},"./assets/js/forms/editor-select/index.js":function(e,t,n){"use strict";var i=n("./assets/js/forms/editor-select/control.js");n.d(t,"a",function(){return i.a})},"./assets/js/forms/editor-select/style.scss":function(){},"./assets/js/forms/utility.js":function(e,t,n){"use strict";(function(e,i){n.d(t,"a",function(){return r});var o=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return o(t,[{key:"postForm",value:function(t){var n=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1],o=e("<form method='POST' style='display:none;'></form>").appendTo(document.body);for(var r in n&&o.attr("target","_blank"),t)t.hasOwnProperty(r)&&i('<input type="hidden" />').attr({name:r,value:t[r]}).appendTo(o);o.submit(),o.remove()}}]),t}()}).call(this,n("jquery"),n("jquery"))},"./assets/js/gutenberg.js":function(e,t,n){"use strict";n.r(t),(new(n("./assets/js/view/gutenberg/page.js").a)).init()},"./assets/js/view/gutenberg/page.js":function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return l});var i=n("./assets/js/forms/editor-select/index.js"),o=n("./assets/js/view/loading/index.js"),r=n("./assets/js/view/gutenberg/style.scss"),s=(n.n(r),function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}()),a=wp.i18n.__,u=wp.element.createElement,c=wp.plugins.registerPlugin,l=function(){function t(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,t),this.editorSelect=new i.a,this.loading=new o.a}return s(t,[{key:"init",value:function(){var t=this;e(function(){return t._onload()})}},{key:"_onload",value:function(){this._bindSidebarOpen(),this.registerPlugin({pluginName:"bgppb",type:"bgppb",label:"Post and Page Builder",icon:u("img",{src:BoldgridEditor.plugin_url+"/assets/image/boldgrid-logo.svg"})}),this.registerPlugin({pluginName:"bgppb-classic",type:"classic",label:"Classic Editor",icon:"edit"}),this.editorSelect.setEditorOverrideInput(e("form.metabox-base-form"))}},{key:"_bindSidebarOpen",value:function(){var e=this;wp.data.subscribe(function(){var t=wp.data.select("core/edit-post").getActiveGeneralSidebarName();"bgppb-classic/bgppb-classic"===t?e.editorSelect.changeType("classic"):"bgppb/bgppb"===t&&e.editorSelect.changeType("bgppb")})}},{key:"registerPlugin",value:function(e){c(e.pluginName,{icon:e.icon||"",render:function(){return u(wp.editPost.PluginSidebarMoreMenuItem,{target:e.pluginName},a(e.label))}})}}]),t}()}).call(this,n("jquery"))},"./assets/js/view/gutenberg/style.scss":function(){},"./assets/js/view/loading/element.js":function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return a});var i=n("./assets/js/view/loading/style.scss"),o=(n.n(i),n("./assets/image/boldgrid-logo.svg")),r=n.n(o),s=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return s(t,[{key:"show",value:function(){this._getElement().show()}},{key:"hide",value:function(){this._getElement().hide()}},{key:"_getElement",value:function(){return this.$element||(this.$element=e(this._getHTML()),e("body").append(this.$element)),this.$element}},{key:"_getHTML",value:function(){return'\n\t\t\t<div class="bgppb-page-loading">\n\t\t\t\t<span class="bgppb-page-loading__logo">'+r.a+'</span>\n\t\t\t\t<span class="bgppb-page-loading__spinner"></span>\n\t\t\t</div>\n\t\t'}}]),t}()}).call(this,n("jquery"))},"./assets/js/view/loading/index.js":function(e,t,n){"use strict";var i=n("./assets/js/view/loading/element.js");n.d(t,"a",function(){return i.a})},"./assets/js/view/loading/style.scss":function(){},"./node_modules/@boldgrid/controls/src/controls/mat-menu/index.js":function(e,t,n){"use strict";var i=n("./node_modules/@material/menu/dist/mdc.menu.js"),o=n("./node_modules/@boldgrid/controls/src/controls/mat-menu/template.html"),r=n.n(o),s=(n("./node_modules/@boldgrid/controls/src/controls/mat-menu/style.scss"),function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}()),a=window.jQuery,u=function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.options=t||{},this.template=_.template(r.a)}return s(e,[{key:"render",value:function(){return this.$menu=a(this.template(this.options)),this.menu=new i.MDCMenu(this.$menu[0]),this.$menu}},{key:"show",value:function(){var e=this;this.menu.open=!0,setTimeout(function(){e.$menu.find(".mdc-menu-item--selected").focus()},250)}},{key:"hide",value:function(){this.menu.open=!1}}]),e}();n.d(t,"a",function(){return u})},"./node_modules/@boldgrid/controls/src/controls/mat-menu/style.scss":function(){},"./node_modules/@boldgrid/controls/src/controls/mat-menu/template.html":function(e){e.exports='<div class="mdc-menu mdc-menu-surface" tabindex=-1> <ul class=mdc-list role=menu aria-hidden=true aria-orientation=vertical> <% _.each( options, function ( setting ) { %> <li data-action="<%= setting.name %>" class="mdc-list-item <%= setting.name === selected ? \'mdc-menu-item--selected\' : \'\' %>" role=menuitem> <span class=mdc-list-item__text><%= setting.label %></span> </li> <% } ); %> </ul> </div> '},"./node_modules/@material/menu/dist/mdc.menu.js":function(e,t,n){(function(e){var n,i,o,r,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};r=function(){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=48)}([function(e,t){"use strict";var n=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),i=function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.adapter_=t}return n(e,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),n(e,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),e}();t.a=i},function(e,t,n){"use strict";var i=n(0),o=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:void 0;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.root_=t;for(var i=arguments.length,o=Array(2<i?i-2:0),r=2;r<i;r++)o[r-2]=arguments[r];this.initialize.apply(this,o),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return o(e,null,[{key:"attachTo",value:function(t){return new e(t,new i.a)}}]),o(e,[{key:"initialize",value:function(){}},{key:"getDefaultFoundation",value:function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")}},{key:"initialSyncWithDOM",value:function(){}},{key:"destroy",value:function(){this.foundation_.destroy()}},{key:"listen",value:function(e,t){this.root_.addEventListener(e,t)}},{key:"unlisten",value:function(e,t){this.root_.removeEventListener(e,t)}},{key:"emit",value:function(e,t){var n,i=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2];"function"==typeof CustomEvent?n=new CustomEvent(e,{detail:t,bubbles:i}):(n=document.createEvent("CustomEvent")).initCustomEvent(e,i,!1,t),this.root_.dispatchEvent(n)}}]),e}();t.a=r},,,,,,,,,,function(e,t,n){"use strict";function i(e,t){if(e.closest)return e.closest(t);for(var n=e;n;){if(o(n,t))return n;n=n.parentElement}return null}function o(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"closest",function(){return i}),n.d(t,"matches",function(){return o})},function(){"use strict";var e=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}e(t,[{key:"getListItemCount",value:function(){}},{key:"getFocusedElementIndex",value:function(){}},{key:"setAttributeForElementIndex",value:function(){}},{key:"removeAttributeForElementIndex",value:function(){}},{key:"addClassForElementIndex",value:function(){}},{key:"removeClassForElementIndex",value:function(){}},{key:"focusItemAtIndex",value:function(){}},{key:"setTabIndexForListItemChildren",value:function(){}},{key:"followHref",value:function(){}},{key:"toggleCheckbox",value:function(){}}])}()},function(e,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"a",function(){return i});var i={ROOT:"mdc-list",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated"},o={ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_SELECTED:"aria-selected",CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"]:not(:disabled), input[type="radio"]:not(:disabled)',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"."+i.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+i.LIST_ITEM_CLASS+" a",FOCUSABLE_CHILD_ELEMENTS:"."+i.LIST_ITEM_CLASS+" button:not(:disabled), ."+i.LIST_ITEM_CLASS+" a,\n ."+i.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+i.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled)',ENABLED_ITEMS_SELECTOR:".mdc-list-item:not(.mdc-list-item--disabled)"}},,function(e,t,n){"use strict";var i=n(0),o=(n(12),n(13)),r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=["input","button","textarea","select"],c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":s(t))&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r(t.defaultAdapter,e)));return n.wrapFocus_=!1,n.isVertical_=!0,n.isSingleSelectionList_=!1,n.selectedIndex_=-1,n.useActivatedClass_=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":s(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.a),a(t,null,[{key:"strings",get:function(){return o.b}},{key:"cssClasses",get:function(){return o.a}},{key:"defaultAdapter",get:function(){return{getListItemCount:function(){},getFocusedElementIndex:function(){},setAttributeForElementIndex:function(){},removeAttributeForElementIndex:function(){},addClassForElementIndex:function(){},removeClassForElementIndex:function(){},focusItemAtIndex:function(){},setTabIndexForListItemChildren:function(){},followHref:function(){},toggleCheckbox:function(){}}}}]),a(t,[{key:"setWrapFocus",value:function(e){this.wrapFocus_=e}},{key:"setVerticalOrientation",value:function(e){this.isVertical_=e}},{key:"setSingleSelection",value:function(e){this.isSingleSelectionList_=e}},{key:"setUseActivatedClass",value:function(e){this.useActivatedClass_=e}},{key:"setSelectedIndex",value:function(e){if(e!==this.selectedIndex_){var t=this.useActivatedClass_?o.a.LIST_ITEM_ACTIVATED_CLASS:o.a.LIST_ITEM_SELECTED_CLASS;0<=this.selectedIndex_&&(this.adapter_.removeAttributeForElementIndex(this.selectedIndex_,o.b.ARIA_SELECTED),this.adapter_.removeClassForElementIndex(this.selectedIndex_,t),this.adapter_.setAttributeForElementIndex(this.selectedIndex_,"tabindex",-1)),0<=e&&this.adapter_.getListItemCount()>e&&(this.selectedIndex_=e,this.adapter_.setAttributeForElementIndex(this.selectedIndex_,o.b.ARIA_SELECTED,!0),this.adapter_.addClassForElementIndex(this.selectedIndex_,t),this.adapter_.setAttributeForElementIndex(this.selectedIndex_,"tabindex",0),0!==this.selectedIndex_&&this.adapter_.setAttributeForElementIndex(0,"tabindex",-1))}}},{key:"handleFocusIn",value:function(e,t){0<=t&&this.adapter_.setTabIndexForListItemChildren(t,0)}},{key:"handleFocusOut",value:function(e,t){0<=t&&this.adapter_.setTabIndexForListItemChildren(t,-1)}},{key:"handleKeydown",value:function(e,t,n){var i="ArrowLeft"===e.key||37===e.keyCode,o="ArrowUp"===e.key||38===e.keyCode,r="ArrowRight"===e.key||39===e.keyCode,s="ArrowDown"===e.key||40===e.keyCode,a="Home"===e.key||36===e.keyCode,u="End"===e.key||35===e.keyCode,c="Enter"===e.key||13===e.keyCode,l="Space"===e.key||32===e.keyCode,f=this.adapter_.getFocusedElementIndex();if(!(-1===f&&(f=n,0>f)))if(this.isVertical_&&s||!this.isVertical_&&r)this.preventDefaultEvent_(e),this.focusNextElement(f);else if(this.isVertical_&&o||!this.isVertical_&&i)this.preventDefaultEvent_(e),this.focusPrevElement(f);else if(a)this.preventDefaultEvent_(e),this.focusFirstElement();else if(u)this.preventDefaultEvent_(e),this.focusLastElement();else if(c||l){t&&(this.isSingleSelectionList_&&(this.setSelectedIndex(f),this.preventDefaultEvent_(e)),this.adapter_.followHref(f)),this.adapter_.toggleCheckbox(n)&&this.preventDefaultEvent_(e)}}},{key:"handleClick",value:function(e,t){-1===e||(t&&this.adapter_.toggleCheckbox(e),this.isSingleSelectionList_&&this.setSelectedIndex(e))}},{key:"preventDefaultEvent_",value:function(e){var t=(""+e.target.tagName).toLowerCase();-1===u.indexOf(t)&&e.preventDefault()}},{key:"focusNextElement",value:function(e){var t=e+1;if(t>=this.adapter_.getListItemCount()){if(!this.wrapFocus_)return;t=0}this.adapter_.focusItemAtIndex(t)}},{key:"focusPrevElement",value:function(e){var t=e-1;if(0>t){if(!this.wrapFocus_)return;t=this.adapter_.getListItemCount()-1}this.adapter_.focusItemAtIndex(t)}},{key:"focusFirstElement",value:function(){0<this.adapter_.getListItemCount()&&this.adapter_.focusItemAtIndex(0)}},{key:"focusLastElement",value:function(){var e=this.adapter_.getListItemCount()-1;0<=e&&this.adapter_.focusItemAtIndex(e)}}]),t}();t.a=c},function(e,t,n){"use strict";function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"b",function(){return c}),n.d(t,"a",function(){});var o=n(0),r=(n(21),n(17)),a=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},u=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":s(t))&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a(t.defaultAdapter,e)));return n.isOpen_=!1,n.openAnimationEndTimerId_=0,n.closeAnimationEndTimerId_=0,n.animationRequestId_=0,n.dimensions_,n.anchorCorner_=r.a.TOP_START,n.anchorMargin_={top:0,right:0,bottom:0,left:0},n.measures_=null,n.quickOpen_=!1,n.hoistedElement_=!1,n.isFixedPosition_=!1,n.position_={x:0,y:0},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":s(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.a),u(t,null,[{key:"cssClasses",get:function(){return r.c}},{key:"strings",get:function(){return r.e}},{key:"numbers",get:function(){return r.d}},{key:"Corner",get:function(){return r.a}},{key:"defaultAdapter",get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},notifyClose:function(){},notifyOpen:function(){},isElementInContainer:function(){return!1},isRtl:function(){return!1},setTransformOrigin:function(){},isFocused:function(){return!1},saveFocus:function(){},restoreFocus:function(){},isFirstElementFocused:function(){},isLastElementFocused:function(){},focusFirstElement:function(){},focusLastElement:function(){},getInnerDimensions:function(){return{}},getAnchorDimensions:function(){return{}},getWindowDimensions:function(){return{}},getBodyDimensions:function(){return{}},getWindowScroll:function(){return{}},setPosition:function(){},setMaxHeight:function(){}}}}]),u(t,[{key:"init",value:function(){var e=t.cssClasses,n=e.ROOT,i=e.OPEN;if(!this.adapter_.hasClass(n))throw new Error(n+" class required in root element.");this.adapter_.hasClass(i)&&(this.isOpen_=!0)}},{key:"destroy",value:function(){clearTimeout(this.openAnimationEndTimerId_),clearTimeout(this.closeAnimationEndTimerId_),cancelAnimationFrame(this.animationRequestId_)}},{key:"setAnchorCorner",value:function(e){this.anchorCorner_=e}},{key:"setAnchorMargin",value:function(e){this.anchorMargin_.top="number"==typeof e.top?e.top:0,this.anchorMargin_.right="number"==typeof e.right?e.right:0,this.anchorMargin_.bottom="number"==typeof e.bottom?e.bottom:0,this.anchorMargin_.left="number"==typeof e.left?e.left:0}},{key:"setIsHoisted",value:function(e){this.hoistedElement_=e}},{key:"setFixedPosition",value:function(e){this.isFixedPosition_=e}},{key:"setAbsolutePosition",value:function(e,t){this.position_.x=this.typeCheckisFinite_(e)?e:0,this.position_.y=this.typeCheckisFinite_(t)?t:0}},{key:"setQuickOpen",value:function(e){this.quickOpen_=e}},{key:"handleBodyClick",value:function(e){var t=e.target;this.adapter_.isElementInContainer(t)||this.close()}},{key:"handleKeydown",value:function(e){var t=e.keyCode,n=e.key,i=e.shiftKey;"Escape"===n||27===t?this.close():("Tab"===n||9===t)&&(this.adapter_.isLastElementFocused()&&!i?(this.adapter_.focusFirstElement(),e.preventDefault()):this.adapter_.isFirstElementFocused()&&i&&(this.adapter_.focusLastElement(),e.preventDefault()))}},{key:"getAutoLayoutMeasurements_",value:function(){var e=this.adapter_.getAnchorDimensions(),t=this.adapter_.getWindowDimensions(),n=this.adapter_.getBodyDimensions(),i=this.adapter_.getWindowScroll();return e||(e={x:this.position_.x,y:this.position_.y,top:this.position_.y,bottom:this.position_.y,left:this.position_.x,right:this.position_.x,height:0,width:0}),{viewport:t,bodyDimensions:n,windowScroll:i,viewportDistance:{top:e.top,right:t.width-e.right,left:e.left,bottom:t.height-e.bottom},anchorHeight:e.height,anchorWidth:e.width,surfaceHeight:this.dimensions_.height,surfaceWidth:this.dimensions_.width}}},{key:"getOriginCorner_",value:function(){var e=r.a.TOP_LEFT,t=this.measures_,n=t.viewportDistance,i=t.anchorHeight,o=t.anchorWidth,s=t.surfaceHeight,a=t.surfaceWidth,u=!!(this.anchorCorner_&r.b.BOTTOM),c=u?n.top+i+this.anchorMargin_.bottom:n.top+this.anchorMargin_.top,l=s-(u?n.bottom-this.anchorMargin_.bottom:n.bottom+i-this.anchorMargin_.top);0<l&&s-c<l&&(e|=r.b.BOTTOM);var f=this.adapter_.isRtl(),d=!!(this.anchorCorner_&r.b.FLIP_RTL),h=!!(this.anchorCorner_&r.b.RIGHT),_=h&&!f||!h&&d&&f,m=a-(_?n.left+o+this.anchorMargin_.right:n.left+this.anchorMargin_.left),p=a-(_?n.right-this.anchorMargin_.right:n.right+o-this.anchorMargin_.left);return(0>m&&_&&f||h&&!_&&0>m||0<p&&m<p)&&(e|=r.b.RIGHT),e}},{key:"getHorizontalOriginOffset_",value:function(e){var t=this.measures_.anchorWidth,n=!!(e&r.b.RIGHT),i=!!(this.anchorCorner_&r.b.RIGHT);if(n){var o=i?t-this.anchorMargin_.left:this.anchorMargin_.right;return this.hoistedElement_||this.isFixedPosition_?o-(this.measures_.viewport.width-this.measures_.bodyDimensions.width):o}return i?t-this.anchorMargin_.right:this.anchorMargin_.left}},{key:"getVerticalOriginOffset_",value:function(e){var t=this.measures_.anchorHeight,n=!!(e&r.b.BOTTOM),i=!!(this.anchorCorner_&r.b.BOTTOM);return n?i?t-this.anchorMargin_.top:-this.anchorMargin_.bottom:i?t+this.anchorMargin_.bottom:this.anchorMargin_.top}},{key:"getMenuSurfaceMaxHeight_",value:function(e){var n=0,i=this.measures_.viewportDistance,o=!!(e&r.b.BOTTOM),s=t.numbers.MARGIN_TO_EDGE;return o?(n=i.top+this.anchorMargin_.top-s,!(this.anchorCorner_&r.b.BOTTOM)&&(n+=this.measures_.anchorHeight)):(n=i.bottom-this.anchorMargin_.bottom+this.measures_.anchorHeight-s,this.anchorCorner_&r.b.BOTTOM&&(n-=this.measures_.anchorHeight)),n}},{key:"autoPosition_",value:function(){var e;this.measures_=this.getAutoLayoutMeasurements_();var t=this.getOriginCorner_(),n=this.getMenuSurfaceMaxHeight_(t),o=t&r.b.BOTTOM?"bottom":"top",s=t&r.b.RIGHT?"right":"left",a=this.getHorizontalOriginOffset_(t),u=this.getVerticalOriginOffset_(t),c=(i(e={},s,a||"0"),i(e,o,u||"0"),e),l=this.measures_,f=l.anchorWidth,d=l.surfaceWidth;for(var h in f/d>r.d.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(s="center"),(this.hoistedElement_||this.isFixedPosition_)&&(c=this.adjustPositionForHoistedElement_(c)),c)c.hasOwnProperty(h)&&"0"!==c[h]&&(c[h]=parseInt(c[h],10)+"px");this.adapter_.setTransformOrigin(s+" "+o),this.adapter_.setPosition(c),this.adapter_.setMaxHeight(n?n+"px":""),this.measures_=null}},{key:"adjustPositionForHoistedElement_",value:function(e){var t=this.measures_,n=t.windowScroll,i=t.viewportDistance;for(var o in e)e.hasOwnProperty(o)&&(i.hasOwnProperty(o)&&(e[o]=parseInt(e[o],10)+i[o]),this.isFixedPosition_||("top"===o?e[o]=parseInt(e[o],10)+n.y:"bottom"===o?e[o]=parseInt(e[o],10)-n.y:"left"===o?e[o]=parseInt(e[o],10)+n.x:"right"===o&&(e[o]=parseInt(e[o],10)-n.x)));return e}},{key:"open",value:function(){var e=this;this.adapter_.saveFocus(),this.quickOpen_||this.adapter_.addClass(t.cssClasses.ANIMATING_OPEN),this.animationRequestId_=requestAnimationFrame(function(){e.adapter_.addClass(t.cssClasses.OPEN),e.dimensions_=e.adapter_.getInnerDimensions(),e.autoPosition_(),e.quickOpen_?e.adapter_.notifyOpen():e.openAnimationEndTimerId_=setTimeout(function(){e.openAnimationEndTimerId_=0,e.adapter_.removeClass(t.cssClasses.ANIMATING_OPEN),e.adapter_.notifyOpen()},r.d.TRANSITION_OPEN_DURATION)}),this.isOpen_=!0}},{key:"close",value:function(){var e=this;this.quickOpen_||this.adapter_.addClass(t.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){e.adapter_.removeClass(t.cssClasses.OPEN),e.quickOpen_?e.adapter_.notifyClose():e.closeAnimationEndTimerId_=setTimeout(function(){e.closeAnimationEndTimerId_=0,e.adapter_.removeClass(t.cssClasses.ANIMATING_CLOSED),e.adapter_.notifyClose()},r.d.TRANSITION_CLOSE_DURATION)}),this.isOpen_=!1,this.maybeRestoreFocus_()}},{key:"maybeRestoreFocus_",value:function(){(this.adapter_.isFocused()||this.adapter_.isElementInContainer(document.activeElement))&&this.adapter_.restoreFocus()}},{key:"isOpen",value:function(){return this.isOpen_}},{key:"typeCheckisFinite_",value:function(e){return"number"==typeof e&&isFinite(e)}}]),t}()},function(e,t,n){"use strict";n.d(t,"c",function(){return i}),n.d(t,"e",function(){return o}),n.d(t,"d",function(){return r}),n.d(t,"b",function(){return s}),n.d(t,"a",function(){return a});var i={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},o={CLOSED_EVENT:"MDCMenuSurface:closed",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:'button:not(:disabled), [href]:not([aria-disabled="true"]), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'},r={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67},s={BOTTOM:1,CENTER:2,RIGHT:4,FLIP_RTL:8},a={TOP_LEFT:0,TOP_RIGHT:s.RIGHT,BOTTOM_LEFT:s.BOTTOM,BOTTOM_RIGHT:s.BOTTOM|s.RIGHT,TOP_START:s.FLIP_RTL,TOP_END:s.FLIP_RTL|s.RIGHT,BOTTOM_START:s.BOTTOM|s.FLIP_RTL,BOTTOM_END:s.BOTTOM|s.RIGHT|s.FLIP_RTL}},,,,function(){"use strict";var e=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}e(t,[{key:"addClass",value:function(){}},{key:"removeClass",value:function(){}},{key:"hasClass",value:function(){}},{key:"hasAnchor",value:function(){}},{key:"notifyClose",value:function(){}},{key:"notifyOpen",value:function(){}},{key:"isElementInContainer",value:function(){}},{key:"isRtl",value:function(){}},{key:"setTransformOrigin",value:function(){}},{key:"isFocused",value:function(){}},{key:"saveFocus",value:function(){}},{key:"restoreFocus",value:function(){}},{key:"isFirstElementFocused",value:function(){}},{key:"isLastElementFocused",value:function(){}},{key:"focusFirstElement",value:function(){}},{key:"focusLastElement",value:function(){}},{key:"getInnerDimensions",value:function(){}},{key:"getAnchorDimensions",value:function(){}},{key:"getWindowDimensions",value:function(){}},{key:"getBodyDimensions",value:function(){}},{key:"getWindowScroll",value:function(){}},{key:"setPosition",value:function(){}},{key:"setMaxHeight",value:function(){}}])}()},,,,function(e,t,n){"use strict";function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":s(t))&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"MDCList",function(){return f});var o=n(1),r=n(15),a=(n(12),n(11)),u=n(13);n.d(t,"MDCListFoundation",function(){return r.a});var c=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},l=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=Array(n),r=0;r<n;r++)o[r]=arguments[r];var s=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o)));return s.handleKeydown_,s.handleClick_,s.focusInEventListener_,s.focusOutEventListener_,s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":s(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.a),l(t,[{key:"destroy",value:function(){this.root_.removeEventListener("keydown",this.handleKeydown_),this.root_.removeEventListener("click",this.handleClick_),this.root_.removeEventListener("focusin",this.focusInEventListener_),this.root_.removeEventListener("focusout",this.focusOutEventListener_)}},{key:"initialSyncWithDOM",value:function(){this.handleClick_=this.handleClickEvent_.bind(this),this.handleKeydown_=this.handleKeydownEvent_.bind(this),this.focusInEventListener_=this.handleFocusInEvent_.bind(this),this.focusOutEventListener_=this.handleFocusOutEvent_.bind(this),this.root_.addEventListener("keydown",this.handleKeydown_),this.root_.addEventListener("focusin",this.focusInEventListener_),this.root_.addEventListener("focusout",this.focusOutEventListener_),this.root_.addEventListener("click",this.handleClick_),this.layout(),this.initializeListType()}},{key:"layout",value:function(){var e=this.root_.getAttribute(u.b.ARIA_ORIENTATION);this.vertical=e!==u.b.ARIA_ORIENTATION_HORIZONTAL,[].slice.call(this.root_.querySelectorAll(".mdc-list-item:not([tabindex])")).forEach(function(e){e.setAttribute("tabindex",-1)}),[].slice.call(this.root_.querySelectorAll(u.b.FOCUSABLE_CHILD_ELEMENTS)).forEach(function(e){return e.setAttribute("tabindex",-1)})}},{key:"getListItemIndex_",value:function(e){for(var t=e.target,n=-1;!t.classList.contains(u.a.LIST_ITEM_CLASS)&&!t.classList.contains(u.a.ROOT);)t=t.parentElement;return t.classList.contains(u.a.LIST_ITEM_CLASS)&&(n=this.listElements.indexOf(t)),n}},{key:"handleFocusInEvent_",value:function(e){var t=this.getListItemIndex_(e);this.foundation_.handleFocusIn(e,t)}},{key:"handleFocusOutEvent_",value:function(e){var t=this.getListItemIndex_(e);this.foundation_.handleFocusOut(e,t)}},{key:"handleKeydownEvent_",value:function(e){var t=this.getListItemIndex_(e);0<=t&&this.foundation_.handleKeydown(e,e.target.classList.contains(u.a.LIST_ITEM_CLASS),t)}},{key:"handleClickEvent_",value:function(e){var t=this.getListItemIndex_(e),n=!Object(a.matches)(e.target,u.b.CHECKBOX_RADIO_SELECTOR);this.foundation_.handleClick(t,n)}},{key:"initializeListType",value:function(){var e=this.root_.querySelector("."+u.a.LIST_ITEM_ACTIVATED_CLASS+", ."+u.a.LIST_ITEM_SELECTED_CLASS);e&&(e.classList.contains(u.a.LIST_ITEM_ACTIVATED_CLASS)&&this.foundation_.setUseActivatedClass(!0),this.singleSelection=!0,this.selectedIndex=this.listElements.indexOf(e))}},{key:"getDefaultFoundation",value:function(){var e=this;return new r.a(c({getListItemCount:function(){return e.listElements.length},getFocusedElementIndex:function(){return e.listElements.indexOf(document.activeElement)},setAttributeForElementIndex:function(t,n,i){var o=e.listElements[t];o&&o.setAttribute(n,i)},removeAttributeForElementIndex:function(t,n){var i=e.listElements[t];i&&i.removeAttribute(n)},addClassForElementIndex:function(t,n){var i=e.listElements[t];i&&i.classList.add(n)},removeClassForElementIndex:function(t,n){var i=e.listElements[t];i&&i.classList.remove(n)},focusItemAtIndex:function(t){var n=e.listElements[t];n&&n.focus()},setTabIndexForListItemChildren:function(t,n){var i=e.listElements[t];[].slice.call(i.querySelectorAll(u.b.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX)).forEach(function(e){return e.setAttribute("tabindex",n)})},followHref:function(t){var n=e.listElements[t];n&&n.href&&n.click()},toggleCheckbox:function(t){var n=!1,i=e.listElements[t];return[].slice.call(i.querySelectorAll(u.b.CHECKBOX_RADIO_SELECTOR)).forEach(function(e){var t=document.createEvent("Event");t.initEvent("change",!0,!0),e.checked&&"radio"===e.type||(e.checked=!e.checked,e.dispatchEvent(t)),n=!0}),n}}))}},{key:"vertical",set:function(e){this.foundation_.setVerticalOrientation(e)}},{key:"listElements",get:function(){return[].slice.call(this.root_.querySelectorAll(u.b.ENABLED_ITEMS_SELECTOR))}},{key:"wrapFocus",set:function(e){this.foundation_.setWrapFocus(e)}},{key:"singleSelection",set:function(e){this.foundation_.setSingleSelection(e)}},{key:"selectedIndex",set:function(e){this.foundation_.setSelectedIndex(e)}}],[{key:"attachTo",value:function(e){return new t(e)}}]),t}()},,function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return o});var i={ROOT:"mdc-menu",MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group"},o={SELECTED_EVENT:"MDCMenu:selected",ARIA_SELECTED_ATTR:"aria-selected",LIST_SELECTOR:".mdc-list",CHECKBOX_SELECTOR:'input[type="checkbox"]'}},,,,,,,function(e,t,n){"use strict";function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":s(t))&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"MDCMenuSurface",function(){return f});var o=n(1),r=n(35),a=n(16),u=(n(21),n(17));n.d(t,"MDCMenuSurfaceFoundation",function(){return a.b}),n.d(t,"AnchorMargin",function(){return a.a}),n.d(t,"Corner",function(){return u.a}),n.d(t,"CornerBit",function(){return u.b}),n.d(t,"util",function(){return r});var c=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},l=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=Array(n),r=0;r<n;r++)o[r]=arguments[r];var s=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o)));return s.previousFocus_,s.anchorElement,s.firstFocusableElement_,s.lastFocusableElement_,s.handleKeydown_,s.handleBodyClick_,s.registerBodyClickListener_,s.deregisterBodyClickListener_,s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":s(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.a),l(t,[{key:"initialSyncWithDOM",value:function(){var e=this;this.root_.parentElement&&this.root_.parentElement.classList.contains(u.c.ANCHOR)&&(this.anchorElement=this.root_.parentElement),this.root_.classList.contains(u.c.FIXED)&&this.setFixedPosition(!0),this.handleKeydown_=function(t){return e.foundation_.handleKeydown(t)},this.handleBodyClick_=function(t){return e.foundation_.handleBodyClick(t)},this.registerBodyClickListener_=function(){return document.body.addEventListener("click",e.handleBodyClick_)},this.deregisterBodyClickListener_=function(){return document.body.removeEventListener("click",e.handleBodyClick_)},this.root_.addEventListener("keydown",this.handleKeydown_),this.root_.addEventListener(u.e.OPENED_EVENT,this.registerBodyClickListener_),this.root_.addEventListener(u.e.CLOSED_EVENT,this.deregisterBodyClickListener_)}},{key:"destroy",value:function(){this.root_.removeEventListener("keydown",this.handleKeydown_),this.root_.removeEventListener(u.e.OPENED_EVENT,this.registerBodyClickListener_),this.root_.removeEventListener(u.e.CLOSED_EVENT,this.deregisterBodyClickListener_),function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var s=o.get;return void 0===s?void 0:s.call(i)}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"hoistMenuToBody",value:function(){document.body.appendChild(this.root_.parentElement.removeChild(this.root_)),this.setIsHoisted(!0)}},{key:"setIsHoisted",value:function(e){this.foundation_.setIsHoisted(e)}},{key:"setMenuSurfaceAnchorElement",value:function(e){this.anchorElement=e}},{key:"setFixedPosition",value:function(e){e?this.root_.classList.add(u.c.FIXED):this.root_.classList.remove(u.c.FIXED),this.foundation_.setFixedPosition(e)}},{key:"setAbsolutePosition",value:function(e,t){this.foundation_.setAbsolutePosition(e,t),this.setIsHoisted(!0)}},{key:"setAnchorCorner",value:function(e){this.foundation_.setAnchorCorner(e)}},{key:"setAnchorMargin",value:function(e){this.foundation_.setAnchorMargin(e)}},{key:"getDefaultFoundation",value:function(){var e=this;return new a.b(c({addClass:function(t){return e.root_.classList.add(t)},removeClass:function(t){return e.root_.classList.remove(t)},hasClass:function(t){return e.root_.classList.contains(t)},hasAnchor:function(){return!!e.anchorElement},notifyClose:function(){return e.emit(a.b.strings.CLOSED_EVENT,{})},notifyOpen:function(){return e.emit(a.b.strings.OPENED_EVENT,{})},isElementInContainer:function(t){return e.root_===t||e.root_.contains(t)},isRtl:function(){return"rtl"===getComputedStyle(e.root_).getPropertyValue("direction")},setTransformOrigin:function(t){e.root_.style[r.getTransformPropertyName(window)+"-origin"]=t}},this.getFocusAdapterMethods_(),this.getDimensionAdapterMethods_()))}},{key:"getFocusAdapterMethods_",value:function(){var e=this;return{isFocused:function(){return document.activeElement===e.root_},saveFocus:function(){e.previousFocus_=document.activeElement},restoreFocus:function(){e.root_.contains(document.activeElement)&&e.previousFocus_&&e.previousFocus_.focus&&e.previousFocus_.focus()},isFirstElementFocused:function(){return e.firstFocusableElement_&&e.firstFocusableElement_===document.activeElement},isLastElementFocused:function(){return e.lastFocusableElement_&&e.lastFocusableElement_===document.activeElement},focusFirstElement:function(){return e.firstFocusableElement_&&e.firstFocusableElement_.focus&&e.firstFocusableElement_.focus()},focusLastElement:function(){return e.lastFocusableElement_&&e.lastFocusableElement_.focus&&e.lastFocusableElement_.focus()}}}},{key:"getDimensionAdapterMethods_",value:function(){var e=this;return{getInnerDimensions:function(){return{width:e.root_.offsetWidth,height:e.root_.offsetHeight}},getAnchorDimensions:function(){return e.anchorElement&&e.anchorElement.getBoundingClientRect()},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(t){e.root_.style.left="left"in t?t.left:null,e.root_.style.right="right"in t?t.right:null,e.root_.style.top="top"in t?t.top:null,e.root_.style.bottom="bottom"in t?t.bottom:null},setMaxHeight:function(t){e.root_.style.maxHeight=t}}}},{key:"open",get:function(){return this.foundation_.isOpen()},set:function(e){if(e){var t=this.root_.querySelectorAll(u.e.FOCUSABLE_ELEMENTS);this.firstFocusableElement_=0<t.length?t[0]:null,this.lastFocusableElement_=0<t.length?t[t.length-1]:null,this.foundation_.open()}else this.foundation_.close()}},{key:"quickOpen",set:function(e){this.foundation_.setQuickOpen(e)}}],[{key:"attachTo",value:function(e){return new t(e)}}]),t}()},function(e,t,n){"use strict";function i(e){var t=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1];if(void 0===o||t){var n="transform"in e.document.createElement("div").style?"transform":"webkitTransform";o=n}return o}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"getTransformPropertyName",function(){return i});var o=void 0},,,,,,,,,,,,,function(e,t,n){"use strict";function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":s(t))&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"MDCMenu",function(){return d});var o=n(1),r=n(49),a=n(27),u=n(34),c=n(16),l=n(25);n.d(t,"MDCMenuFoundation",function(){return r.a}),n.d(t,"AnchorMargin",function(){return c.a}),n.d(t,"Corner",function(){return u.Corner});var f=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),d=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=Array(n),r=0;r<n;r++)o[r]=arguments[r];var s=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o)));return s.menuSurface_,s.list_,s.handleKeydown_,s.handleClick_,s.afterOpenedCallback_,s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":s(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.a),f(t,[{key:"initialize",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:function(e){return new u.MDCMenuSurface(e)},t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(e){return new l.MDCList(e)};this.menuSurface_=e(this.root_);var n=this.root_.querySelector(a.b.LIST_SELECTOR);n&&(this.list_=t(n),this.list_.wrapFocus=!0)}},{key:"initialSyncWithDOM",value:function(){var e=this;this.afterOpenedCallback_=function(){return e.handleAfterOpened_()},this.handleKeydown_=function(t){return e.foundation_.handleKeydown(t)},this.handleClick_=function(t){return e.foundation_.handleClick(t)},this.menuSurface_.listen(c.b.strings.OPENED_EVENT,this.afterOpenedCallback_),this.listen("keydown",this.handleKeydown_),this.listen("click",this.handleClick_)}},{key:"destroy",value:function(){this.list_&&this.list_.destroy(),this.menuSurface_.destroy(),this.menuSurface_.unlisten(c.b.strings.OPENED_EVENT,this.afterOpenedCallback_),this.unlisten("keydown",this.handleKeydown_),this.unlisten("click",this.handleClick_),function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var s=o.get;return void 0===s?void 0:s.call(i)}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"setAnchorCorner",value:function(e){this.menuSurface_.setAnchorCorner(e)}},{key:"setAnchorMargin",value:function(e){this.menuSurface_.setAnchorMargin(e)}},{key:"getOptionByIndex",value:function(e){return e<this.items.length?this.items[e]:null}},{key:"setFixedPosition",value:function(e){this.menuSurface_.setFixedPosition(e)}},{key:"hoistMenuToBody",value:function(){this.menuSurface_.hoistMenuToBody()}},{key:"setIsHoisted",value:function(e){this.menuSurface_.setIsHoisted(e)}},{key:"setAbsolutePosition",value:function(e,t){this.menuSurface_.setAbsolutePosition(e,t)}},{key:"setAnchorElement",value:function(e){this.menuSurface_.anchorElement=e}},{key:"handleAfterOpened_",value:function(){var e=this.items;0<e.length&&e[0].focus()}},{key:"getDefaultFoundation",value:function(){var e=this;return new r.a({addClassToElementAtIndex:function(t,n){e.items[t].classList.add(n)},removeClassFromElementAtIndex:function(t,n){e.items[t].classList.remove(n)},addAttributeToElementAtIndex:function(t,n,i){e.items[t].setAttribute(n,i)},removeAttributeFromElementAtIndex:function(t,n){e.items[t].removeAttribute(n)},elementContainsClass:function(e,t){return e.classList.contains(t)},closeSurface:function(){return e.open=!1},getElementIndex:function(t){return e.items.indexOf(t)},getParentElement:function(e){return e.parentElement},getSelectedElementIndex:function(t){return e.items.indexOf(t.querySelector("."+a.a.MENU_SELECTED_LIST_ITEM))},notifySelected:function(t){return e.emit(a.b.SELECTED_EVENT,{index:t.index,item:e.items[t.index]})}})}},{key:"open",get:function(){return this.menuSurface_.open},set:function(e){this.menuSurface_.open=e}},{key:"items",get:function(){return this.list_.listElements}},{key:"quickOpen",set:function(e){this.menuSurface_.quickOpen=e}}],[{key:"attachTo",value:function(e){return new t(e)}}]),t}()},function(e,t,n){"use strict";n.d(t,"a",function(){return f});var i=n(0),o=(n(50),n(27)),r=n(16),a=n(15),u=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},c=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=["input","button","textarea","select","a"],f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":s(t))&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,u(t.defaultAdapter,e)));return n.closeAnimationEndTimerId_=0,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":s(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.a),c(t,null,[{key:"cssClasses",get:function(){return o.a}},{key:"strings",get:function(){return o.b}},{key:"defaultAdapter",get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},elementContainsClass:function(){},closeSurface:function(){},getElementIndex:function(){},getParentElement:function(){},getSelectedElementIndex:function(){},notifySelected:function(){}}}}]),c(t,[{key:"destroy",value:function(){this.closeAnimationEndTimerId_&&clearTimeout(this.closeAnimationEndTimerId_),this.adapter_.closeSurface()}},{key:"handleKeydown",value:function(e){var t=e.key,n=e.keyCode;"Space"===t||32===n||"Enter"===t||13===n?this.handleAction_(e):("Tab"===t||9===n)&&this.adapter_.closeSurface()}},{key:"handleClick",value:function(e){this.handleAction_(e)}},{key:"handleAction_",value:function(e){var t=this.getListItem_(e.target);t&&(this.handleSelection(t),this.preventDefaultEvent_(e))}},{key:"handleSelection",value:function(e){var t=this,n=this.adapter_.getElementIndex(e);0>n||(this.adapter_.notifySelected({index:n}),this.adapter_.closeSurface(),this.closeAnimationEndTimerId_=setTimeout(function(){var i=t.getSelectionGroup_(e);null!==i&&t.handleSelectionGroup_(i,n)},r.b.numbers.TRANSITION_CLOSE_DURATION))}},{key:"handleSelectionGroup_",value:function(e,t){var n=this.adapter_.getSelectedElementIndex(e);0<=n&&(this.adapter_.removeAttributeFromElementAtIndex(n,o.b.ARIA_SELECTED_ATTR),this.adapter_.removeClassFromElementAtIndex(n,o.a.MENU_SELECTED_LIST_ITEM)),this.adapter_.addClassToElementAtIndex(t,o.a.MENU_SELECTED_LIST_ITEM),this.adapter_.addAttributeToElementAtIndex(t,o.b.ARIA_SELECTED_ATTR,"true")}},{key:"getSelectionGroup_",value:function(e){for(var t=this.adapter_.getParentElement(e),n=this.adapter_.elementContainsClass(t,o.a.MENU_SELECTION_GROUP);!n&&!this.adapter_.elementContainsClass(t,a.a.cssClasses.ROOT);)t=this.adapter_.getParentElement(t),n=this.adapter_.elementContainsClass(t,o.a.MENU_SELECTION_GROUP);return n?t:null}},{key:"getListItem_",value:function(e){for(var t=this.adapter_.elementContainsClass(e,a.a.cssClasses.LIST_ITEM_CLASS);!t;){if(!(e=this.adapter_.getParentElement(e)))return null;t=this.adapter_.elementContainsClass(e,a.a.cssClasses.LIST_ITEM_CLASS)}return e}},{key:"preventDefaultEvent_",value:function(e){var t=(""+e.target.tagName).toLowerCase();-1===l.indexOf(t)&&e.preventDefault()}}]),t}()},function(){"use strict";var e=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}e(t,[{key:"addClassToElementAtIndex",value:function(){}},{key:"removeClassFromElementAtIndex",value:function(){}},{key:"addAttributeToElementAtIndex",value:function(){}},{key:"removeAttributeFromElementAtIndex",value:function(){}},{key:"elementContainsClass",value:function(){}},{key:"closeSurface",value:function(){}},{key:"getElementIndex",value:function(){}},{key:"getParentElement",value:function(){}},{key:"getSelectedElementIndex",value:function(){}},{key:"notifySelected",value:function(){}}])}()}])},"object"===s(t)&&"object"===s(e)?e.exports=r():(i=[],void 0===(o="function"==typeof(n=r)?n.apply(t,i):n)||(e.exports=o))}).call(this,n("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/webpack/buildin/module.js":function(e){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],!e.children&&(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},jquery:function(e){e.exports=jQuery}});
1
+ !function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s="./assets/js/gutenberg.js")}({"./assets/image/boldgrid-logo.svg":function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" clip-rule="evenodd" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="1"><g fill="#f95b26"><path d="M31.224 38.994h-17.48c-.87 0-1.652-.706-1.652-1.677v-8.562c0-.883.696-1.677 1.652-1.677h17.48c.87 0 1.653.706 1.653 1.677v8.65c-.087.883-.783 1.589-1.653 1.589zM24.354 22.93H13.571c-.783 0-1.392-.619-1.392-1.413v-9.004c0-.794.609-1.412 1.392-1.412h10.783c.783 0 1.392.618 1.392 1.412v9.004c0 .794-.61 1.412-1.392 1.412z"></path></g><path d="M41.051 47.115H9.396c-3.218 0-5.913-2.737-5.913-6.003V8.982c0-3.265 2.695-6.002 5.913-6.002h31.655c3.218 0 5.914 2.737 5.914 6.003v1.324a1.57 1.57 0 0 1-1.565 1.589 1.57 1.57 0 0 1-1.566-1.59V8.984c0-1.5-1.217-2.737-2.696-2.737H9.396C7.918 6.246 6.7 7.482 6.7 8.983v32.13c0 1.5 1.218 2.736 2.696 2.736h31.655c1.479 0 2.696-1.236 2.696-2.737V25.49c0-1.5-1.217-2.736-2.696-2.736H34.53a1.57 1.57 0 0 1-1.565-1.59 1.57 1.57 0 0 1 1.565-1.588h6.522c3.305 0 5.914 2.736 5.914 6.002v15.624c0 3.177-2.696 5.914-5.914 5.914z" fill="#f95b26"></path></svg>'},"./assets/js/forms/editor-select/control.js":function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return u});var i=n("./node_modules/@boldgrid/controls/src/controls/mat-menu/index.js"),o=n("./assets/js/forms/utility.js"),r=n("./assets/js/view/loading/index.js"),s=n("./assets/js/forms/editor-select/style.scss"),a=(n.n(s),function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}()),u=function(){function t(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,t),this.labels=[{name:"bgppb",value:"bgppb",label:'<img src="'+BoldgridEditor.plugin_url+'/assets/image/boldgrid-logo.svg"/> <span>Post and Page Builder</span>'},{name:"modern",value:"modern",label:"<span>WordPress Editor</span>"},{name:"classic",value:"classic",label:"<span>Classic Editor</span>"},{name:"default",value:"default",label:"<span>Default</span>"}],this.labels=this._filterAvailableEditors(this.labels),this.loading=new r.a}return a(t,[{key:"init",value:function(){this.$element=e(this._getHtml()),this.menu=this._renderMenu(),this._setupMenu(),this._setupClick(),this.$element.show(),e("#screen-meta-links").prepend(this.$element),this.setEditorOverrideInput(e("form#post"))}},{key:"changeType",value:function(e){var t=this;this.loading.show(),(new o.a).postForm({bgppb_default_editor_post:e},!1),setTimeout(function(){return t.loading.hide()},3e3)}},{key:"setEditorOverrideInput",value:function(t){var n=e("<input/>");n.attr("type","hidden").attr("name","bgppb_default_editor_post").val(BoldgridEditor.editor_override).attr("value",BoldgridEditor.editor_override),t.append(n)}},{key:"_filterAvailableEditors",value:function(e){return e.filter(function(e){return-1!==BoldgridEditor.plugin_configs.valid_editors.indexOf(e.name)})}},{key:"_setupMenu",value:function(){var t=this;this.$element.find("[data-action]").on("click",function(n){var i=e(n.currentTarget).attr("data-action");t.changeType(i)})}},{key:"_renderMenu",value:function(){var e=new i.a({name:"bgppb-choose-editor",options:this.labels.filter(function(e){return"default"!==e.value}),selected:BoldgridEditor.globalSettings.current_editor});return this.$element.find(".menu-container").append(e.render()),e}},{key:"_setupClick",value:function(){var e=this;this.$element.find(".current-editor").on("click",function(t){t.preventDefault(),e.menu.menu.open||e.menu.show()})}},{key:"_getHtml",value:function(){return'\n\t\t\t<div id="bgppb-choose-editor" class="screen-meta-toggle">\n\t\t\t\t<span class="label">\n\t\t\t\t\t<span>Editor</span>\n\t\t\t\t</span>\n\t\t\t\t<span class="current-editor show-settings button">\n\t\t\t\t\t'+this.labels.find(function(e){return e.name===BoldgridEditor.globalSettings.current_editor}).label+'\n\t\t\t\t</span>\n\t\t\t\t<span class="menu-container"></span>\n\t\t\t</div>\n\t\t'}}]),t}()}).call(this,n("jquery"))},"./assets/js/forms/editor-select/index.js":function(e,t,n){"use strict";var i=n("./assets/js/forms/editor-select/control.js");n.d(t,"a",function(){return i.a})},"./assets/js/forms/editor-select/style.scss":function(){},"./assets/js/forms/utility.js":function(e,t,n){"use strict";(function(e,i){n.d(t,"a",function(){return r});var o=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return o(t,[{key:"postForm",value:function(t){var n=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1],o=e("<form method='POST' style='display:none;'></form>").appendTo(document.body);for(var r in n&&o.attr("target","_blank"),t)t.hasOwnProperty(r)&&i('<input type="hidden" />').attr({name:r,value:t[r]}).appendTo(o);o.submit(),o.remove()}}]),t}()}).call(this,n("jquery"),n("jquery"))},"./assets/js/gutenberg.js":function(e,t,n){"use strict";n.r(t),(new(n("./assets/js/view/gutenberg/page.js").a)).init()},"./assets/js/view/gutenberg/page.js":function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return l});var i=n("./assets/js/forms/editor-select/index.js"),o=n("./assets/js/view/loading/index.js"),r=n("./assets/js/view/gutenberg/style.scss"),s=(n.n(r),function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}()),a=wp.i18n.__,u=wp.element.createElement,c=wp.plugins.registerPlugin,l=function(){function t(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,t),this.editorSelect=new i.a,this.loading=new o.a}return s(t,[{key:"init",value:function(){var t=this,n=wp.data.select("core/edit-post").getActiveGeneralSidebarName();["bgppb-classic/bgppb-classic","bgppb/bgppb"].includes(n)&&wp.data.dispatch("core/edit-post").closeGeneralSidebar(),e(function(){return t._onload()})}},{key:"_onload",value:function(){this._bindSidebarOpen(),this.registerPlugin({pluginName:"bgppb",type:"bgppb",label:"Post and Page Builder",icon:u("img",{src:BoldgridEditor.plugin_url+"/assets/image/boldgrid-logo.svg",width:"24px"})}),this.registerPlugin({pluginName:"bgppb-classic",type:"classic",label:"Classic Editor",icon:"edit"}),this.editorSelect.setEditorOverrideInput(e("form.metabox-base-form"))}},{key:"_bindSidebarOpen",value:function(){var e=this;wp.data.subscribe(function(){var t=wp.data.select("core/edit-post").getActiveGeneralSidebarName();"bgppb-classic/bgppb-classic"===t?e.editorSelect.changeType("classic"):"bgppb/bgppb"===t&&e.editorSelect.changeType("bgppb")})}},{key:"registerPlugin",value:function(e){c(e.pluginName,{icon:e.icon||"",render:function(){return u(wp.editPost.PluginSidebarMoreMenuItem,{target:e.pluginName},a(e.label))}})}}]),t}()}).call(this,n("jquery"))},"./assets/js/view/gutenberg/style.scss":function(){},"./assets/js/view/loading/element.js":function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return a});var i=n("./assets/js/view/loading/style.scss"),o=(n.n(i),n("./assets/image/boldgrid-logo.svg")),r=n.n(o),s=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return s(t,[{key:"show",value:function(){this._getElement().show()}},{key:"hide",value:function(){this._getElement().hide()}},{key:"_getElement",value:function(){return this.$element||(this.$element=e(this._getHTML()),e("body").append(this.$element)),this.$element}},{key:"_getHTML",value:function(){return'\n\t\t\t<div class="bgppb-page-loading">\n\t\t\t\t<span class="bgppb-page-loading__logo">'+r.a+'</span>\n\t\t\t\t<span class="bgppb-page-loading__spinner"></span>\n\t\t\t</div>\n\t\t'}}]),t}()}).call(this,n("jquery"))},"./assets/js/view/loading/index.js":function(e,t,n){"use strict";var i=n("./assets/js/view/loading/element.js");n.d(t,"a",function(){return i.a})},"./assets/js/view/loading/style.scss":function(){},"./node_modules/@boldgrid/controls/src/controls/mat-menu/index.js":function(e,t,n){"use strict";var i=n("./node_modules/@material/menu/dist/mdc.menu.js"),o=n("./node_modules/@boldgrid/controls/src/controls/mat-menu/template.html"),r=n.n(o),s=(n("./node_modules/@boldgrid/controls/src/controls/mat-menu/style.scss"),function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}()),a=window.jQuery,u=function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.options=t||{},this.template=_.template(r.a)}return s(e,[{key:"render",value:function(){return this.$menu=a(this.template(this.options)),this.menu=new i.MDCMenu(this.$menu[0]),this.$menu}},{key:"show",value:function(){var e=this;this.menu.open=!0,setTimeout(function(){e.$menu.find(".mdc-menu-item--selected").focus()},250)}},{key:"hide",value:function(){this.menu.open=!1}}]),e}();n.d(t,"a",function(){return u})},"./node_modules/@boldgrid/controls/src/controls/mat-menu/style.scss":function(){},"./node_modules/@boldgrid/controls/src/controls/mat-menu/template.html":function(e){e.exports='<div class="mdc-menu mdc-menu-surface" tabindex=-1> <ul class=mdc-list role=menu aria-hidden=true aria-orientation=vertical> <% _.each( options, function ( setting ) { %> <li data-action="<%= setting.name %>" class="mdc-list-item <%= setting.name === selected ? \'mdc-menu-item--selected\' : \'\' %>" role=menuitem> <span class=mdc-list-item__text><%= setting.label %></span> </li> <% } ); %> </ul> </div> '},"./node_modules/@material/menu/dist/mdc.menu.js":function(e,t,n){(function(e){var n,i,o,r,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};r=function(){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=48)}([function(e,t){"use strict";var n=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),i=function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.adapter_=t}return n(e,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),n(e,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),e}();t.a=i},function(e,t,n){"use strict";var i=n(0),o=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:void 0;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.root_=t;for(var i=arguments.length,o=Array(2<i?i-2:0),r=2;r<i;r++)o[r-2]=arguments[r];this.initialize.apply(this,o),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return o(e,null,[{key:"attachTo",value:function(t){return new e(t,new i.a)}}]),o(e,[{key:"initialize",value:function(){}},{key:"getDefaultFoundation",value:function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")}},{key:"initialSyncWithDOM",value:function(){}},{key:"destroy",value:function(){this.foundation_.destroy()}},{key:"listen",value:function(e,t){this.root_.addEventListener(e,t)}},{key:"unlisten",value:function(e,t){this.root_.removeEventListener(e,t)}},{key:"emit",value:function(e,t){var n,i=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2];"function"==typeof CustomEvent?n=new CustomEvent(e,{detail:t,bubbles:i}):(n=document.createEvent("CustomEvent")).initCustomEvent(e,i,!1,t),this.root_.dispatchEvent(n)}}]),e}();t.a=r},,,,,,,,,,function(e,t,n){"use strict";function i(e,t){if(e.closest)return e.closest(t);for(var n=e;n;){if(o(n,t))return n;n=n.parentElement}return null}function o(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"closest",function(){return i}),n.d(t,"matches",function(){return o})},function(){"use strict";var e=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}e(t,[{key:"getListItemCount",value:function(){}},{key:"getFocusedElementIndex",value:function(){}},{key:"setAttributeForElementIndex",value:function(){}},{key:"removeAttributeForElementIndex",value:function(){}},{key:"addClassForElementIndex",value:function(){}},{key:"removeClassForElementIndex",value:function(){}},{key:"focusItemAtIndex",value:function(){}},{key:"setTabIndexForListItemChildren",value:function(){}},{key:"followHref",value:function(){}},{key:"toggleCheckbox",value:function(){}}])}()},function(e,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"a",function(){return i});var i={ROOT:"mdc-list",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated"},o={ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_SELECTED:"aria-selected",CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"]:not(:disabled), input[type="radio"]:not(:disabled)',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"."+i.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+i.LIST_ITEM_CLASS+" a",FOCUSABLE_CHILD_ELEMENTS:"."+i.LIST_ITEM_CLASS+" button:not(:disabled), ."+i.LIST_ITEM_CLASS+" a,\n ."+i.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+i.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled)',ENABLED_ITEMS_SELECTOR:".mdc-list-item:not(.mdc-list-item--disabled)"}},,function(e,t,n){"use strict";var i=n(0),o=(n(12),n(13)),r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=["input","button","textarea","select"],c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":s(t))&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r(t.defaultAdapter,e)));return n.wrapFocus_=!1,n.isVertical_=!0,n.isSingleSelectionList_=!1,n.selectedIndex_=-1,n.useActivatedClass_=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":s(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.a),a(t,null,[{key:"strings",get:function(){return o.b}},{key:"cssClasses",get:function(){return o.a}},{key:"defaultAdapter",get:function(){return{getListItemCount:function(){},getFocusedElementIndex:function(){},setAttributeForElementIndex:function(){},removeAttributeForElementIndex:function(){},addClassForElementIndex:function(){},removeClassForElementIndex:function(){},focusItemAtIndex:function(){},setTabIndexForListItemChildren:function(){},followHref:function(){},toggleCheckbox:function(){}}}}]),a(t,[{key:"setWrapFocus",value:function(e){this.wrapFocus_=e}},{key:"setVerticalOrientation",value:function(e){this.isVertical_=e}},{key:"setSingleSelection",value:function(e){this.isSingleSelectionList_=e}},{key:"setUseActivatedClass",value:function(e){this.useActivatedClass_=e}},{key:"setSelectedIndex",value:function(e){if(e!==this.selectedIndex_){var t=this.useActivatedClass_?o.a.LIST_ITEM_ACTIVATED_CLASS:o.a.LIST_ITEM_SELECTED_CLASS;0<=this.selectedIndex_&&(this.adapter_.removeAttributeForElementIndex(this.selectedIndex_,o.b.ARIA_SELECTED),this.adapter_.removeClassForElementIndex(this.selectedIndex_,t),this.adapter_.setAttributeForElementIndex(this.selectedIndex_,"tabindex",-1)),0<=e&&this.adapter_.getListItemCount()>e&&(this.selectedIndex_=e,this.adapter_.setAttributeForElementIndex(this.selectedIndex_,o.b.ARIA_SELECTED,!0),this.adapter_.addClassForElementIndex(this.selectedIndex_,t),this.adapter_.setAttributeForElementIndex(this.selectedIndex_,"tabindex",0),0!==this.selectedIndex_&&this.adapter_.setAttributeForElementIndex(0,"tabindex",-1))}}},{key:"handleFocusIn",value:function(e,t){0<=t&&this.adapter_.setTabIndexForListItemChildren(t,0)}},{key:"handleFocusOut",value:function(e,t){0<=t&&this.adapter_.setTabIndexForListItemChildren(t,-1)}},{key:"handleKeydown",value:function(e,t,n){var i="ArrowLeft"===e.key||37===e.keyCode,o="ArrowUp"===e.key||38===e.keyCode,r="ArrowRight"===e.key||39===e.keyCode,s="ArrowDown"===e.key||40===e.keyCode,a="Home"===e.key||36===e.keyCode,u="End"===e.key||35===e.keyCode,c="Enter"===e.key||13===e.keyCode,l="Space"===e.key||32===e.keyCode,d=this.adapter_.getFocusedElementIndex();if(!(-1===d&&(d=n,0>d)))if(this.isVertical_&&s||!this.isVertical_&&r)this.preventDefaultEvent_(e),this.focusNextElement(d);else if(this.isVertical_&&o||!this.isVertical_&&i)this.preventDefaultEvent_(e),this.focusPrevElement(d);else if(a)this.preventDefaultEvent_(e),this.focusFirstElement();else if(u)this.preventDefaultEvent_(e),this.focusLastElement();else if(c||l){t&&(this.isSingleSelectionList_&&(this.setSelectedIndex(d),this.preventDefaultEvent_(e)),this.adapter_.followHref(d)),this.adapter_.toggleCheckbox(n)&&this.preventDefaultEvent_(e)}}},{key:"handleClick",value:function(e,t){-1===e||(t&&this.adapter_.toggleCheckbox(e),this.isSingleSelectionList_&&this.setSelectedIndex(e))}},{key:"preventDefaultEvent_",value:function(e){var t=(""+e.target.tagName).toLowerCase();-1===u.indexOf(t)&&e.preventDefault()}},{key:"focusNextElement",value:function(e){var t=e+1;if(t>=this.adapter_.getListItemCount()){if(!this.wrapFocus_)return;t=0}this.adapter_.focusItemAtIndex(t)}},{key:"focusPrevElement",value:function(e){var t=e-1;if(0>t){if(!this.wrapFocus_)return;t=this.adapter_.getListItemCount()-1}this.adapter_.focusItemAtIndex(t)}},{key:"focusFirstElement",value:function(){0<this.adapter_.getListItemCount()&&this.adapter_.focusItemAtIndex(0)}},{key:"focusLastElement",value:function(){var e=this.adapter_.getListItemCount()-1;0<=e&&this.adapter_.focusItemAtIndex(e)}}]),t}();t.a=c},function(e,t,n){"use strict";function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"b",function(){return c}),n.d(t,"a",function(){});var o=n(0),r=(n(21),n(17)),a=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},u=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":s(t))&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a(t.defaultAdapter,e)));return n.isOpen_=!1,n.openAnimationEndTimerId_=0,n.closeAnimationEndTimerId_=0,n.animationRequestId_=0,n.dimensions_,n.anchorCorner_=r.a.TOP_START,n.anchorMargin_={top:0,right:0,bottom:0,left:0},n.measures_=null,n.quickOpen_=!1,n.hoistedElement_=!1,n.isFixedPosition_=!1,n.position_={x:0,y:0},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":s(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.a),u(t,null,[{key:"cssClasses",get:function(){return r.c}},{key:"strings",get:function(){return r.e}},{key:"numbers",get:function(){return r.d}},{key:"Corner",get:function(){return r.a}},{key:"defaultAdapter",get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},notifyClose:function(){},notifyOpen:function(){},isElementInContainer:function(){return!1},isRtl:function(){return!1},setTransformOrigin:function(){},isFocused:function(){return!1},saveFocus:function(){},restoreFocus:function(){},isFirstElementFocused:function(){},isLastElementFocused:function(){},focusFirstElement:function(){},focusLastElement:function(){},getInnerDimensions:function(){return{}},getAnchorDimensions:function(){return{}},getWindowDimensions:function(){return{}},getBodyDimensions:function(){return{}},getWindowScroll:function(){return{}},setPosition:function(){},setMaxHeight:function(){}}}}]),u(t,[{key:"init",value:function(){var e=t.cssClasses,n=e.ROOT,i=e.OPEN;if(!this.adapter_.hasClass(n))throw new Error(n+" class required in root element.");this.adapter_.hasClass(i)&&(this.isOpen_=!0)}},{key:"destroy",value:function(){clearTimeout(this.openAnimationEndTimerId_),clearTimeout(this.closeAnimationEndTimerId_),cancelAnimationFrame(this.animationRequestId_)}},{key:"setAnchorCorner",value:function(e){this.anchorCorner_=e}},{key:"setAnchorMargin",value:function(e){this.anchorMargin_.top="number"==typeof e.top?e.top:0,this.anchorMargin_.right="number"==typeof e.right?e.right:0,this.anchorMargin_.bottom="number"==typeof e.bottom?e.bottom:0,this.anchorMargin_.left="number"==typeof e.left?e.left:0}},{key:"setIsHoisted",value:function(e){this.hoistedElement_=e}},{key:"setFixedPosition",value:function(e){this.isFixedPosition_=e}},{key:"setAbsolutePosition",value:function(e,t){this.position_.x=this.typeCheckisFinite_(e)?e:0,this.position_.y=this.typeCheckisFinite_(t)?t:0}},{key:"setQuickOpen",value:function(e){this.quickOpen_=e}},{key:"handleBodyClick",value:function(e){var t=e.target;this.adapter_.isElementInContainer(t)||this.close()}},{key:"handleKeydown",value:function(e){var t=e.keyCode,n=e.key,i=e.shiftKey;"Escape"===n||27===t?this.close():("Tab"===n||9===t)&&(this.adapter_.isLastElementFocused()&&!i?(this.adapter_.focusFirstElement(),e.preventDefault()):this.adapter_.isFirstElementFocused()&&i&&(this.adapter_.focusLastElement(),e.preventDefault()))}},{key:"getAutoLayoutMeasurements_",value:function(){var e=this.adapter_.getAnchorDimensions(),t=this.adapter_.getWindowDimensions(),n=this.adapter_.getBodyDimensions(),i=this.adapter_.getWindowScroll();return e||(e={x:this.position_.x,y:this.position_.y,top:this.position_.y,bottom:this.position_.y,left:this.position_.x,right:this.position_.x,height:0,width:0}),{viewport:t,bodyDimensions:n,windowScroll:i,viewportDistance:{top:e.top,right:t.width-e.right,left:e.left,bottom:t.height-e.bottom},anchorHeight:e.height,anchorWidth:e.width,surfaceHeight:this.dimensions_.height,surfaceWidth:this.dimensions_.width}}},{key:"getOriginCorner_",value:function(){var e=r.a.TOP_LEFT,t=this.measures_,n=t.viewportDistance,i=t.anchorHeight,o=t.anchorWidth,s=t.surfaceHeight,a=t.surfaceWidth,u=!!(this.anchorCorner_&r.b.BOTTOM),c=u?n.top+i+this.anchorMargin_.bottom:n.top+this.anchorMargin_.top,l=s-(u?n.bottom-this.anchorMargin_.bottom:n.bottom+i-this.anchorMargin_.top);0<l&&s-c<l&&(e|=r.b.BOTTOM);var d=this.adapter_.isRtl(),f=!!(this.anchorCorner_&r.b.FLIP_RTL),h=!!(this.anchorCorner_&r.b.RIGHT),_=h&&!d||!h&&f&&d,p=a-(_?n.left+o+this.anchorMargin_.right:n.left+this.anchorMargin_.left),m=a-(_?n.right-this.anchorMargin_.right:n.right+o-this.anchorMargin_.left);return(0>p&&_&&d||h&&!_&&0>p||0<m&&p<m)&&(e|=r.b.RIGHT),e}},{key:"getHorizontalOriginOffset_",value:function(e){var t=this.measures_.anchorWidth,n=!!(e&r.b.RIGHT),i=!!(this.anchorCorner_&r.b.RIGHT);if(n){var o=i?t-this.anchorMargin_.left:this.anchorMargin_.right;return this.hoistedElement_||this.isFixedPosition_?o-(this.measures_.viewport.width-this.measures_.bodyDimensions.width):o}return i?t-this.anchorMargin_.right:this.anchorMargin_.left}},{key:"getVerticalOriginOffset_",value:function(e){var t=this.measures_.anchorHeight,n=!!(e&r.b.BOTTOM),i=!!(this.anchorCorner_&r.b.BOTTOM);return n?i?t-this.anchorMargin_.top:-this.anchorMargin_.bottom:i?t+this.anchorMargin_.bottom:this.anchorMargin_.top}},{key:"getMenuSurfaceMaxHeight_",value:function(e){var n=0,i=this.measures_.viewportDistance,o=!!(e&r.b.BOTTOM),s=t.numbers.MARGIN_TO_EDGE;return o?(n=i.top+this.anchorMargin_.top-s,!(this.anchorCorner_&r.b.BOTTOM)&&(n+=this.measures_.anchorHeight)):(n=i.bottom-this.anchorMargin_.bottom+this.measures_.anchorHeight-s,this.anchorCorner_&r.b.BOTTOM&&(n-=this.measures_.anchorHeight)),n}},{key:"autoPosition_",value:function(){var e;this.measures_=this.getAutoLayoutMeasurements_();var t=this.getOriginCorner_(),n=this.getMenuSurfaceMaxHeight_(t),o=t&r.b.BOTTOM?"bottom":"top",s=t&r.b.RIGHT?"right":"left",a=this.getHorizontalOriginOffset_(t),u=this.getVerticalOriginOffset_(t),c=(i(e={},s,a||"0"),i(e,o,u||"0"),e),l=this.measures_,d=l.anchorWidth,f=l.surfaceWidth;for(var h in d/f>r.d.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(s="center"),(this.hoistedElement_||this.isFixedPosition_)&&(c=this.adjustPositionForHoistedElement_(c)),c)c.hasOwnProperty(h)&&"0"!==c[h]&&(c[h]=parseInt(c[h],10)+"px");this.adapter_.setTransformOrigin(s+" "+o),this.adapter_.setPosition(c),this.adapter_.setMaxHeight(n?n+"px":""),this.measures_=null}},{key:"adjustPositionForHoistedElement_",value:function(e){var t=this.measures_,n=t.windowScroll,i=t.viewportDistance;for(var o in e)e.hasOwnProperty(o)&&(i.hasOwnProperty(o)&&(e[o]=parseInt(e[o],10)+i[o]),this.isFixedPosition_||("top"===o?e[o]=parseInt(e[o],10)+n.y:"bottom"===o?e[o]=parseInt(e[o],10)-n.y:"left"===o?e[o]=parseInt(e[o],10)+n.x:"right"===o&&(e[o]=parseInt(e[o],10)-n.x)));return e}},{key:"open",value:function(){var e=this;this.adapter_.saveFocus(),this.quickOpen_||this.adapter_.addClass(t.cssClasses.ANIMATING_OPEN),this.animationRequestId_=requestAnimationFrame(function(){e.adapter_.addClass(t.cssClasses.OPEN),e.dimensions_=e.adapter_.getInnerDimensions(),e.autoPosition_(),e.quickOpen_?e.adapter_.notifyOpen():e.openAnimationEndTimerId_=setTimeout(function(){e.openAnimationEndTimerId_=0,e.adapter_.removeClass(t.cssClasses.ANIMATING_OPEN),e.adapter_.notifyOpen()},r.d.TRANSITION_OPEN_DURATION)}),this.isOpen_=!0}},{key:"close",value:function(){var e=this;this.quickOpen_||this.adapter_.addClass(t.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){e.adapter_.removeClass(t.cssClasses.OPEN),e.quickOpen_?e.adapter_.notifyClose():e.closeAnimationEndTimerId_=setTimeout(function(){e.closeAnimationEndTimerId_=0,e.adapter_.removeClass(t.cssClasses.ANIMATING_CLOSED),e.adapter_.notifyClose()},r.d.TRANSITION_CLOSE_DURATION)}),this.isOpen_=!1,this.maybeRestoreFocus_()}},{key:"maybeRestoreFocus_",value:function(){(this.adapter_.isFocused()||this.adapter_.isElementInContainer(document.activeElement))&&this.adapter_.restoreFocus()}},{key:"isOpen",value:function(){return this.isOpen_}},{key:"typeCheckisFinite_",value:function(e){return"number"==typeof e&&isFinite(e)}}]),t}()},function(e,t,n){"use strict";n.d(t,"c",function(){return i}),n.d(t,"e",function(){return o}),n.d(t,"d",function(){return r}),n.d(t,"b",function(){return s}),n.d(t,"a",function(){return a});var i={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},o={CLOSED_EVENT:"MDCMenuSurface:closed",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:'button:not(:disabled), [href]:not([aria-disabled="true"]), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'},r={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67},s={BOTTOM:1,CENTER:2,RIGHT:4,FLIP_RTL:8},a={TOP_LEFT:0,TOP_RIGHT:s.RIGHT,BOTTOM_LEFT:s.BOTTOM,BOTTOM_RIGHT:s.BOTTOM|s.RIGHT,TOP_START:s.FLIP_RTL,TOP_END:s.FLIP_RTL|s.RIGHT,BOTTOM_START:s.BOTTOM|s.FLIP_RTL,BOTTOM_END:s.BOTTOM|s.RIGHT|s.FLIP_RTL}},,,,function(){"use strict";var e=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}e(t,[{key:"addClass",value:function(){}},{key:"removeClass",value:function(){}},{key:"hasClass",value:function(){}},{key:"hasAnchor",value:function(){}},{key:"notifyClose",value:function(){}},{key:"notifyOpen",value:function(){}},{key:"isElementInContainer",value:function(){}},{key:"isRtl",value:function(){}},{key:"setTransformOrigin",value:function(){}},{key:"isFocused",value:function(){}},{key:"saveFocus",value:function(){}},{key:"restoreFocus",value:function(){}},{key:"isFirstElementFocused",value:function(){}},{key:"isLastElementFocused",value:function(){}},{key:"focusFirstElement",value:function(){}},{key:"focusLastElement",value:function(){}},{key:"getInnerDimensions",value:function(){}},{key:"getAnchorDimensions",value:function(){}},{key:"getWindowDimensions",value:function(){}},{key:"getBodyDimensions",value:function(){}},{key:"getWindowScroll",value:function(){}},{key:"setPosition",value:function(){}},{key:"setMaxHeight",value:function(){}}])}()},,,,function(e,t,n){"use strict";function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":s(t))&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"MDCList",function(){return d});var o=n(1),r=n(15),a=(n(12),n(11)),u=n(13);n.d(t,"MDCListFoundation",function(){return r.a});var c=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},l=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),d=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=Array(n),r=0;r<n;r++)o[r]=arguments[r];var s=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o)));return s.handleKeydown_,s.handleClick_,s.focusInEventListener_,s.focusOutEventListener_,s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":s(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.a),l(t,[{key:"destroy",value:function(){this.root_.removeEventListener("keydown",this.handleKeydown_),this.root_.removeEventListener("click",this.handleClick_),this.root_.removeEventListener("focusin",this.focusInEventListener_),this.root_.removeEventListener("focusout",this.focusOutEventListener_)}},{key:"initialSyncWithDOM",value:function(){this.handleClick_=this.handleClickEvent_.bind(this),this.handleKeydown_=this.handleKeydownEvent_.bind(this),this.focusInEventListener_=this.handleFocusInEvent_.bind(this),this.focusOutEventListener_=this.handleFocusOutEvent_.bind(this),this.root_.addEventListener("keydown",this.handleKeydown_),this.root_.addEventListener("focusin",this.focusInEventListener_),this.root_.addEventListener("focusout",this.focusOutEventListener_),this.root_.addEventListener("click",this.handleClick_),this.layout(),this.initializeListType()}},{key:"layout",value:function(){var e=this.root_.getAttribute(u.b.ARIA_ORIENTATION);this.vertical=e!==u.b.ARIA_ORIENTATION_HORIZONTAL,[].slice.call(this.root_.querySelectorAll(".mdc-list-item:not([tabindex])")).forEach(function(e){e.setAttribute("tabindex",-1)}),[].slice.call(this.root_.querySelectorAll(u.b.FOCUSABLE_CHILD_ELEMENTS)).forEach(function(e){return e.setAttribute("tabindex",-1)})}},{key:"getListItemIndex_",value:function(e){for(var t=e.target,n=-1;!t.classList.contains(u.a.LIST_ITEM_CLASS)&&!t.classList.contains(u.a.ROOT);)t=t.parentElement;return t.classList.contains(u.a.LIST_ITEM_CLASS)&&(n=this.listElements.indexOf(t)),n}},{key:"handleFocusInEvent_",value:function(e){var t=this.getListItemIndex_(e);this.foundation_.handleFocusIn(e,t)}},{key:"handleFocusOutEvent_",value:function(e){var t=this.getListItemIndex_(e);this.foundation_.handleFocusOut(e,t)}},{key:"handleKeydownEvent_",value:function(e){var t=this.getListItemIndex_(e);0<=t&&this.foundation_.handleKeydown(e,e.target.classList.contains(u.a.LIST_ITEM_CLASS),t)}},{key:"handleClickEvent_",value:function(e){var t=this.getListItemIndex_(e),n=!Object(a.matches)(e.target,u.b.CHECKBOX_RADIO_SELECTOR);this.foundation_.handleClick(t,n)}},{key:"initializeListType",value:function(){var e=this.root_.querySelector("."+u.a.LIST_ITEM_ACTIVATED_CLASS+", ."+u.a.LIST_ITEM_SELECTED_CLASS);e&&(e.classList.contains(u.a.LIST_ITEM_ACTIVATED_CLASS)&&this.foundation_.setUseActivatedClass(!0),this.singleSelection=!0,this.selectedIndex=this.listElements.indexOf(e))}},{key:"getDefaultFoundation",value:function(){var e=this;return new r.a(c({getListItemCount:function(){return e.listElements.length},getFocusedElementIndex:function(){return e.listElements.indexOf(document.activeElement)},setAttributeForElementIndex:function(t,n,i){var o=e.listElements[t];o&&o.setAttribute(n,i)},removeAttributeForElementIndex:function(t,n){var i=e.listElements[t];i&&i.removeAttribute(n)},addClassForElementIndex:function(t,n){var i=e.listElements[t];i&&i.classList.add(n)},removeClassForElementIndex:function(t,n){var i=e.listElements[t];i&&i.classList.remove(n)},focusItemAtIndex:function(t){var n=e.listElements[t];n&&n.focus()},setTabIndexForListItemChildren:function(t,n){var i=e.listElements[t];[].slice.call(i.querySelectorAll(u.b.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX)).forEach(function(e){return e.setAttribute("tabindex",n)})},followHref:function(t){var n=e.listElements[t];n&&n.href&&n.click()},toggleCheckbox:function(t){var n=!1,i=e.listElements[t];return[].slice.call(i.querySelectorAll(u.b.CHECKBOX_RADIO_SELECTOR)).forEach(function(e){var t=document.createEvent("Event");t.initEvent("change",!0,!0),e.checked&&"radio"===e.type||(e.checked=!e.checked,e.dispatchEvent(t)),n=!0}),n}}))}},{key:"vertical",set:function(e){this.foundation_.setVerticalOrientation(e)}},{key:"listElements",get:function(){return[].slice.call(this.root_.querySelectorAll(u.b.ENABLED_ITEMS_SELECTOR))}},{key:"wrapFocus",set:function(e){this.foundation_.setWrapFocus(e)}},{key:"singleSelection",set:function(e){this.foundation_.setSingleSelection(e)}},{key:"selectedIndex",set:function(e){this.foundation_.setSelectedIndex(e)}}],[{key:"attachTo",value:function(e){return new t(e)}}]),t}()},,function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return o});var i={ROOT:"mdc-menu",MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group"},o={SELECTED_EVENT:"MDCMenu:selected",ARIA_SELECTED_ATTR:"aria-selected",LIST_SELECTOR:".mdc-list",CHECKBOX_SELECTOR:'input[type="checkbox"]'}},,,,,,,function(e,t,n){"use strict";function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":s(t))&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"MDCMenuSurface",function(){return d});var o=n(1),r=n(35),a=n(16),u=(n(21),n(17));n.d(t,"MDCMenuSurfaceFoundation",function(){return a.b}),n.d(t,"AnchorMargin",function(){return a.a}),n.d(t,"Corner",function(){return u.a}),n.d(t,"CornerBit",function(){return u.b}),n.d(t,"util",function(){return r});var c=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},l=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),d=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=Array(n),r=0;r<n;r++)o[r]=arguments[r];var s=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o)));return s.previousFocus_,s.anchorElement,s.firstFocusableElement_,s.lastFocusableElement_,s.handleKeydown_,s.handleBodyClick_,s.registerBodyClickListener_,s.deregisterBodyClickListener_,s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":s(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.a),l(t,[{key:"initialSyncWithDOM",value:function(){var e=this;this.root_.parentElement&&this.root_.parentElement.classList.contains(u.c.ANCHOR)&&(this.anchorElement=this.root_.parentElement),this.root_.classList.contains(u.c.FIXED)&&this.setFixedPosition(!0),this.handleKeydown_=function(t){return e.foundation_.handleKeydown(t)},this.handleBodyClick_=function(t){return e.foundation_.handleBodyClick(t)},this.registerBodyClickListener_=function(){return document.body.addEventListener("click",e.handleBodyClick_)},this.deregisterBodyClickListener_=function(){return document.body.removeEventListener("click",e.handleBodyClick_)},this.root_.addEventListener("keydown",this.handleKeydown_),this.root_.addEventListener(u.e.OPENED_EVENT,this.registerBodyClickListener_),this.root_.addEventListener(u.e.CLOSED_EVENT,this.deregisterBodyClickListener_)}},{key:"destroy",value:function(){this.root_.removeEventListener("keydown",this.handleKeydown_),this.root_.removeEventListener(u.e.OPENED_EVENT,this.registerBodyClickListener_),this.root_.removeEventListener(u.e.CLOSED_EVENT,this.deregisterBodyClickListener_),function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var s=o.get;return void 0===s?void 0:s.call(i)}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"hoistMenuToBody",value:function(){document.body.appendChild(this.root_.parentElement.removeChild(this.root_)),this.setIsHoisted(!0)}},{key:"setIsHoisted",value:function(e){this.foundation_.setIsHoisted(e)}},{key:"setMenuSurfaceAnchorElement",value:function(e){this.anchorElement=e}},{key:"setFixedPosition",value:function(e){e?this.root_.classList.add(u.c.FIXED):this.root_.classList.remove(u.c.FIXED),this.foundation_.setFixedPosition(e)}},{key:"setAbsolutePosition",value:function(e,t){this.foundation_.setAbsolutePosition(e,t),this.setIsHoisted(!0)}},{key:"setAnchorCorner",value:function(e){this.foundation_.setAnchorCorner(e)}},{key:"setAnchorMargin",value:function(e){this.foundation_.setAnchorMargin(e)}},{key:"getDefaultFoundation",value:function(){var e=this;return new a.b(c({addClass:function(t){return e.root_.classList.add(t)},removeClass:function(t){return e.root_.classList.remove(t)},hasClass:function(t){return e.root_.classList.contains(t)},hasAnchor:function(){return!!e.anchorElement},notifyClose:function(){return e.emit(a.b.strings.CLOSED_EVENT,{})},notifyOpen:function(){return e.emit(a.b.strings.OPENED_EVENT,{})},isElementInContainer:function(t){return e.root_===t||e.root_.contains(t)},isRtl:function(){return"rtl"===getComputedStyle(e.root_).getPropertyValue("direction")},setTransformOrigin:function(t){e.root_.style[r.getTransformPropertyName(window)+"-origin"]=t}},this.getFocusAdapterMethods_(),this.getDimensionAdapterMethods_()))}},{key:"getFocusAdapterMethods_",value:function(){var e=this;return{isFocused:function(){return document.activeElement===e.root_},saveFocus:function(){e.previousFocus_=document.activeElement},restoreFocus:function(){e.root_.contains(document.activeElement)&&e.previousFocus_&&e.previousFocus_.focus&&e.previousFocus_.focus()},isFirstElementFocused:function(){return e.firstFocusableElement_&&e.firstFocusableElement_===document.activeElement},isLastElementFocused:function(){return e.lastFocusableElement_&&e.lastFocusableElement_===document.activeElement},focusFirstElement:function(){return e.firstFocusableElement_&&e.firstFocusableElement_.focus&&e.firstFocusableElement_.focus()},focusLastElement:function(){return e.lastFocusableElement_&&e.lastFocusableElement_.focus&&e.lastFocusableElement_.focus()}}}},{key:"getDimensionAdapterMethods_",value:function(){var e=this;return{getInnerDimensions:function(){return{width:e.root_.offsetWidth,height:e.root_.offsetHeight}},getAnchorDimensions:function(){return e.anchorElement&&e.anchorElement.getBoundingClientRect()},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(t){e.root_.style.left="left"in t?t.left:null,e.root_.style.right="right"in t?t.right:null,e.root_.style.top="top"in t?t.top:null,e.root_.style.bottom="bottom"in t?t.bottom:null},setMaxHeight:function(t){e.root_.style.maxHeight=t}}}},{key:"open",get:function(){return this.foundation_.isOpen()},set:function(e){if(e){var t=this.root_.querySelectorAll(u.e.FOCUSABLE_ELEMENTS);this.firstFocusableElement_=0<t.length?t[0]:null,this.lastFocusableElement_=0<t.length?t[t.length-1]:null,this.foundation_.open()}else this.foundation_.close()}},{key:"quickOpen",set:function(e){this.foundation_.setQuickOpen(e)}}],[{key:"attachTo",value:function(e){return new t(e)}}]),t}()},function(e,t,n){"use strict";function i(e){var t=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1];if(void 0===o||t){var n="transform"in e.document.createElement("div").style?"transform":"webkitTransform";o=n}return o}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"getTransformPropertyName",function(){return i});var o=void 0},,,,,,,,,,,,,function(e,t,n){"use strict";function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":s(t))&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"MDCMenu",function(){return f});var o=n(1),r=n(49),a=n(27),u=n(34),c=n(16),l=n(25);n.d(t,"MDCMenuFoundation",function(){return r.a}),n.d(t,"AnchorMargin",function(){return c.a}),n.d(t,"Corner",function(){return u.Corner});var d=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=Array(n),r=0;r<n;r++)o[r]=arguments[r];var s=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o)));return s.menuSurface_,s.list_,s.handleKeydown_,s.handleClick_,s.afterOpenedCallback_,s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":s(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.a),d(t,[{key:"initialize",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:function(e){return new u.MDCMenuSurface(e)},t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(e){return new l.MDCList(e)};this.menuSurface_=e(this.root_);var n=this.root_.querySelector(a.b.LIST_SELECTOR);n&&(this.list_=t(n),this.list_.wrapFocus=!0)}},{key:"initialSyncWithDOM",value:function(){var e=this;this.afterOpenedCallback_=function(){return e.handleAfterOpened_()},this.handleKeydown_=function(t){return e.foundation_.handleKeydown(t)},this.handleClick_=function(t){return e.foundation_.handleClick(t)},this.menuSurface_.listen(c.b.strings.OPENED_EVENT,this.afterOpenedCallback_),this.listen("keydown",this.handleKeydown_),this.listen("click",this.handleClick_)}},{key:"destroy",value:function(){this.list_&&this.list_.destroy(),this.menuSurface_.destroy(),this.menuSurface_.unlisten(c.b.strings.OPENED_EVENT,this.afterOpenedCallback_),this.unlisten("keydown",this.handleKeydown_),this.unlisten("click",this.handleClick_),function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var s=o.get;return void 0===s?void 0:s.call(i)}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"setAnchorCorner",value:function(e){this.menuSurface_.setAnchorCorner(e)}},{key:"setAnchorMargin",value:function(e){this.menuSurface_.setAnchorMargin(e)}},{key:"getOptionByIndex",value:function(e){return e<this.items.length?this.items[e]:null}},{key:"setFixedPosition",value:function(e){this.menuSurface_.setFixedPosition(e)}},{key:"hoistMenuToBody",value:function(){this.menuSurface_.hoistMenuToBody()}},{key:"setIsHoisted",value:function(e){this.menuSurface_.setIsHoisted(e)}},{key:"setAbsolutePosition",value:function(e,t){this.menuSurface_.setAbsolutePosition(e,t)}},{key:"setAnchorElement",value:function(e){this.menuSurface_.anchorElement=e}},{key:"handleAfterOpened_",value:function(){var e=this.items;0<e.length&&e[0].focus()}},{key:"getDefaultFoundation",value:function(){var e=this;return new r.a({addClassToElementAtIndex:function(t,n){e.items[t].classList.add(n)},removeClassFromElementAtIndex:function(t,n){e.items[t].classList.remove(n)},addAttributeToElementAtIndex:function(t,n,i){e.items[t].setAttribute(n,i)},removeAttributeFromElementAtIndex:function(t,n){e.items[t].removeAttribute(n)},elementContainsClass:function(e,t){return e.classList.contains(t)},closeSurface:function(){return e.open=!1},getElementIndex:function(t){return e.items.indexOf(t)},getParentElement:function(e){return e.parentElement},getSelectedElementIndex:function(t){return e.items.indexOf(t.querySelector("."+a.a.MENU_SELECTED_LIST_ITEM))},notifySelected:function(t){return e.emit(a.b.SELECTED_EVENT,{index:t.index,item:e.items[t.index]})}})}},{key:"open",get:function(){return this.menuSurface_.open},set:function(e){this.menuSurface_.open=e}},{key:"items",get:function(){return this.list_.listElements}},{key:"quickOpen",set:function(e){this.menuSurface_.quickOpen=e}}],[{key:"attachTo",value:function(e){return new t(e)}}]),t}()},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var i=n(0),o=(n(50),n(27)),r=n(16),a=n(15),u=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},c=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=["input","button","textarea","select","a"],d=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":s(t))&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,u(t.defaultAdapter,e)));return n.closeAnimationEndTimerId_=0,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":s(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.a),c(t,null,[{key:"cssClasses",get:function(){return o.a}},{key:"strings",get:function(){return o.b}},{key:"defaultAdapter",get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},elementContainsClass:function(){},closeSurface:function(){},getElementIndex:function(){},getParentElement:function(){},getSelectedElementIndex:function(){},notifySelected:function(){}}}}]),c(t,[{key:"destroy",value:function(){this.closeAnimationEndTimerId_&&clearTimeout(this.closeAnimationEndTimerId_),this.adapter_.closeSurface()}},{key:"handleKeydown",value:function(e){var t=e.key,n=e.keyCode;"Space"===t||32===n||"Enter"===t||13===n?this.handleAction_(e):("Tab"===t||9===n)&&this.adapter_.closeSurface()}},{key:"handleClick",value:function(e){this.handleAction_(e)}},{key:"handleAction_",value:function(e){var t=this.getListItem_(e.target);t&&(this.handleSelection(t),this.preventDefaultEvent_(e))}},{key:"handleSelection",value:function(e){var t=this,n=this.adapter_.getElementIndex(e);0>n||(this.adapter_.notifySelected({index:n}),this.adapter_.closeSurface(),this.closeAnimationEndTimerId_=setTimeout(function(){var i=t.getSelectionGroup_(e);null!==i&&t.handleSelectionGroup_(i,n)},r.b.numbers.TRANSITION_CLOSE_DURATION))}},{key:"handleSelectionGroup_",value:function(e,t){var n=this.adapter_.getSelectedElementIndex(e);0<=n&&(this.adapter_.removeAttributeFromElementAtIndex(n,o.b.ARIA_SELECTED_ATTR),this.adapter_.removeClassFromElementAtIndex(n,o.a.MENU_SELECTED_LIST_ITEM)),this.adapter_.addClassToElementAtIndex(t,o.a.MENU_SELECTED_LIST_ITEM),this.adapter_.addAttributeToElementAtIndex(t,o.b.ARIA_SELECTED_ATTR,"true")}},{key:"getSelectionGroup_",value:function(e){for(var t=this.adapter_.getParentElement(e),n=this.adapter_.elementContainsClass(t,o.a.MENU_SELECTION_GROUP);!n&&!this.adapter_.elementContainsClass(t,a.a.cssClasses.ROOT);)t=this.adapter_.getParentElement(t),n=this.adapter_.elementContainsClass(t,o.a.MENU_SELECTION_GROUP);return n?t:null}},{key:"getListItem_",value:function(e){for(var t=this.adapter_.elementContainsClass(e,a.a.cssClasses.LIST_ITEM_CLASS);!t;){if(!(e=this.adapter_.getParentElement(e)))return null;t=this.adapter_.elementContainsClass(e,a.a.cssClasses.LIST_ITEM_CLASS)}return e}},{key:"preventDefaultEvent_",value:function(e){var t=(""+e.target.tagName).toLowerCase();-1===l.indexOf(t)&&e.preventDefault()}}]),t}()},function(){"use strict";var e=function(){function e(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}e(t,[{key:"addClassToElementAtIndex",value:function(){}},{key:"removeClassFromElementAtIndex",value:function(){}},{key:"addAttributeToElementAtIndex",value:function(){}},{key:"removeAttributeFromElementAtIndex",value:function(){}},{key:"elementContainsClass",value:function(){}},{key:"closeSurface",value:function(){}},{key:"getElementIndex",value:function(){}},{key:"getParentElement",value:function(){}},{key:"getSelectedElementIndex",value:function(){}},{key:"notifySelected",value:function(){}}])}()}])},"object"===s(t)&&"object"===s(e)?e.exports=r():(i=[],void 0===(o="function"==typeof(n=r)?n.apply(t,i):n)||(e.exports=o))}).call(this,n("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/webpack/buildin/module.js":function(e){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],!e.children&&(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},jquery:function(e){e.exports=jQuery}});
assets/js/view/gutenberg/page.js CHANGED
@@ -13,6 +13,11 @@ export class Page {
13
  }
14
 
15
  init() {
 
 
 
 
 
16
  $( () => this._onload() );
17
  }
18
 
@@ -31,7 +36,8 @@ export class Page {
31
  icon: el(
32
  'img',
33
  {
34
- src: BoldgridEditor.plugin_url + '/assets/image/boldgrid-logo.svg'
 
35
  }
36
  )
37
  } );
13
  }
14
 
15
  init() {
16
+ const currentSidebar = wp.data.select( 'core/edit-post' ).getActiveGeneralSidebarName();
17
+ if ( [ 'bgppb-classic/bgppb-classic', 'bgppb/bgppb' ].includes( currentSidebar ) ) {
18
+ wp.data.dispatch( 'core/edit-post' ).closeGeneralSidebar();
19
+ }
20
+
21
  $( () => this._onload() );
22
  }
23
 
36
  icon: el(
37
  'img',
38
  {
39
+ src: BoldgridEditor.plugin_url + '/assets/image/boldgrid-logo.svg',
40
+ width: '24px'
41
  }
42
  )
43
  } );
post-and-page-builder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Post and Page Builder
4
  * Plugin URI: https://www.boldgrid.com/boldgrid-editor/?utm_source=ppb-wp-repo&utm_medium=plugin-uri&utm_campaign=ppb
5
  * Description: Customized drag and drop editing for posts and pages. The Post and Page Builder adds functionality to the existing TinyMCE Editor to give you easier control over your content.
6
- * Version: 1.13.3
7
  * Author: BoldGrid <support@boldgrid.com>
8
  * Author URI: https://www.boldgrid.com/?utm_source=ppb-wp-repo&utm_medium=author-uri&utm_campaign=ppb
9
  * Text Domain: boldgrid-editor
3
  * Plugin Name: Post and Page Builder
4
  * Plugin URI: https://www.boldgrid.com/boldgrid-editor/?utm_source=ppb-wp-repo&utm_medium=plugin-uri&utm_campaign=ppb
5
  * Description: Customized drag and drop editing for posts and pages. The Post and Page Builder adds functionality to the existing TinyMCE Editor to give you easier control over your content.
6
+ * Version: 1.13.4
7
  * Author: BoldGrid <support@boldgrid.com>
8
  * Author URI: https://www.boldgrid.com/?utm_source=ppb-wp-repo&utm_medium=author-uri&utm_campaign=ppb
9
  * Text Domain: boldgrid-editor
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: boldgrid, page builder, drag and drop, tinymce, editor, landing page
4
  Requires at least: 4.7
5
  Tested up to: 5.5
6
  Requires PHP: 5.4
7
- Stable tag: 1.13.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -134,6 +134,12 @@ WordPress Editor.
134
 
135
  == Changelog ==
136
 
 
 
 
 
 
 
137
  = 1.13.3 =
138
 
139
  Release Date: August 10th, 2020
4
  Requires at least: 4.7
5
  Tested up to: 5.5
6
  Requires PHP: 5.4
7
+ Stable tag: 1.13.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
134
 
135
  == Changelog ==
136
 
137
+ = 1.13.4 =
138
+
139
+ Release Date: August 28th, 2020
140
+
141
+ * Fix: Issue causing editor selection to switch back to Post and Page Builder after loading WordPress Editor.
142
+
143
  = 1.13.3 =
144
 
145
  Release Date: August 10th, 2020
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit8bc42846b5ad6e725ba1dbc0d185a65e::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit368fa23dbdadbc8210b47e3ff9e43bf2::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit8bc42846b5ad6e725ba1dbc0d185a65e
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit8bc42846b5ad6e725ba1dbc0d185a65e
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit8bc42846b5ad6e725ba1dbc0d185a65e', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit8bc42846b5ad6e725ba1dbc0d185a65e', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInit8bc42846b5ad6e725ba1dbc0d185a65e::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit368fa23dbdadbc8210b47e3ff9e43bf2
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit368fa23dbdadbc8210b47e3ff9e43bf2', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit368fa23dbdadbc8210b47e3ff9e43bf2', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInit368fa23dbdadbc8210b47e3ff9e43bf2::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit8bc42846b5ad6e725ba1dbc0d185a65e
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'B' =>
@@ -23,8 +23,8 @@ class ComposerStaticInit8bc42846b5ad6e725ba1dbc0d185a65e
23
  public static function getInitializer(ClassLoader $loader)
24
  {
25
  return \Closure::bind(function () use ($loader) {
26
- $loader->prefixLengthsPsr4 = ComposerStaticInit8bc42846b5ad6e725ba1dbc0d185a65e::$prefixLengthsPsr4;
27
- $loader->prefixDirsPsr4 = ComposerStaticInit8bc42846b5ad6e725ba1dbc0d185a65e::$prefixDirsPsr4;
28
 
29
  }, null, ClassLoader::class);
30
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit368fa23dbdadbc8210b47e3ff9e43bf2
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'B' =>
23
  public static function getInitializer(ClassLoader $loader)
24
  {
25
  return \Closure::bind(function () use ($loader) {
26
+ $loader->prefixLengthsPsr4 = ComposerStaticInit368fa23dbdadbc8210b47e3ff9e43bf2::$prefixLengthsPsr4;
27
+ $loader->prefixDirsPsr4 = ComposerStaticInit368fa23dbdadbc8210b47e3ff9e43bf2::$prefixDirsPsr4;
28
 
29
  }, null, ClassLoader::class);
30
  }