diff --git a/dist/js/menu-builder.js b/dist/js/menu-builder.js index f2549cf4..46695a11 100644 --- a/dist/js/menu-builder.js +++ b/dist/js/menu-builder.js @@ -1,2 +1,2 @@ /*! For license information please see menu-builder.js.LICENSE.txt */ -(()=>{var t,e={757:(t,e,n)=>{t.exports=n(666)},585:(t,e,n)=>{"use strict";var r=n(10),i=n.n(r);function o(t,e,n,r,i,o,u,a){var s,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),u?(s=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(u)},c._ssrRegister=s):i&&(s=a?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),s)if(c.functional){c._injectStyles=s;var l=c.render;c.render=function(t,e){return s.call(e),l(t,e)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,s):[s]}return{exports:t,options:c}}const u=o({data:function(){return{resourceName:Nova.config.menuBuilderUriKey}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("resource-index",{attrs:{resourceName:t.resourceName}})}),[],!1,null,null,null).exports;var a=n(513);const s=o({props:["wrapperClass"]},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("svg",{class:t.wrapperClass,attrs:{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"6",viewBox:"0 0 10 6"}},[n("path",{staticClass:"fill-current",attrs:{fill:"var(--90)",d:"M8.292893.292893c.390525-.390524 1.023689-.390524 1.414214 0 .390524.390525.390524 1.023689 0 1.414214l-4 4c-.390525.390524-1.023689.390524-1.414214 0l-4-4c-.390524-.390525-.390524-1.023689 0-1.414214.390525-.390524 1.023689-.390524 1.414214 0L5 3.585786 8.292893.292893z"}})])}),[],!1,null,null,null).exports;const c=o({props:["wrapperClass"]},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("svg",{staticClass:"fill-current",class:t.wrapperClass,attrs:{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20"}},[n("path",{attrs:{d:"M6 4V2a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2h5a1 1 0 0 1 0 2h-1v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6H1a1 1 0 1 1 0-2h5zM4 6v12h12V6H4zm8-2V2H8v2h4zM8 8a1 1 0 0 1 1 1v6a1 1 0 0 1-2 0V9a1 1 0 0 1 1-1zm4 0a1 1 0 0 1 1 1v6a1 1 0 0 1-2 0V9a1 1 0 0 1 1-1z"}})])}),[],!1,null,null,null).exports;const l=o({props:["wrapperClass"]},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("svg",{staticClass:"fill-current",class:t.wrapperClass,attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:"24",width:"24"}},[n("path",{attrs:{d:"M17 7h2.25c.97 0 1.75.78 1.75 1.75v10.5c0 .97-.78 1.75-1.75 1.75H8.75C7.78 21 7 20.22 7 19.25V17H4.75C3.78 17 3 16.22 3 15.25V4.75C3 3.78 3.78 3 4.75 3h10.5c.97 0 1.75.78 1.75 1.75V7zm-2 0V5H5v10h2V8.75C7 7.78 7.78 7 8.75 7H15zM9 9v10h10V9H9z"}})])}),[],!1,null,null,null).exports;const f=o({props:["wrapperClass"]},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("svg",{staticClass:"fill-current",class:t.wrapperClass,attrs:{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20"}},[n("path",{attrs:{d:"M4.3 10.3l10-10a1 1 0 0 1 1.4 0l4 4a1 1 0 0 1 0 1.4l-10 10a1 1 0 0 1-.7.3H5a1 1 0 0 1-1-1v-4a1 1 0 0 1 .3-.7zM6 14h2.59l9-9L15 2.41l-9 9V14zm10-2a1 1 0 0 1 2 0v6a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4c0-1.1.9-2 2-2h6a1 1 0 1 1 0 2H2v14h14v-6z"}})])}),[],!1,null,null,null).exports;const p=o({props:{value:{type:Array,required:!0},maxDepth:{type:Number,required:!1,default:10}},components:{VueNestable:a.VueNestable,VueNestableHandle:a.VueNestableHandle,ArrowIcon:s,DeleteIcon:c,DuplicateIcon:l,EditIcon:f},data:function(){return{duplicateItem:null}},methods:{hasChildren:function(t){return Array.isArray(t.children)&&t.children.length},toggleMenuChildrenCascade:function(t){t.classProp.find((function(t){return"hide-cascade"===t}))?t.classProp.splice(t.classProp.indexOf("hide-cascade"),1):t.classProp.push("hide-cascade"),this.$emit("saveMenuLocalState",t)},isCascadeOpen:function(t){return!t.classProp.find((function(t){return"hide-cascade"===t}))}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("vue-nestable",{staticClass:"px-3 menu-builder",attrs:{value:t.value,"max-depth":t.maxDepth,classProp:"classProp"},on:{input:function(e){return t.$emit("input",e)},change:function(e){return t.$emit("onMenuChange")}},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.item;return n("vue-nestable-handle",{staticClass:"handle flex flex-wrap bg-gray-100 shadow-sm border rounded-md outline-none",class:{"border-40":!r.enabled,"border-60":r.enabled},attrs:{item:r}},[n("div",{class:"item-data w-2/3 flex "+(t.hasChildren(r)?"":"pl-3")},[t.hasChildren(r)?n("button",{staticClass:"appearance-none cursor-pointer fill-current hover:text-primary flex px-4 items-center focus:outline-none",on:{click:function(e){return e.preventDefault(),t.toggleMenuChildrenCascade(r)}}},[n("arrow-icon",{attrs:{wrapperClass:t.isCascadeOpen(r)?"btn-cascade-open":""}})],1):t._e(),t._v(" "),n("div",{class:"text-90 "+(r.enabled?"":"opacity-25")},[t._v(t._s(r.name))]),t._v(" "),n("div",{class:"font-lighter text-80 ml-4 text-sm "+(r.enabled?"":"opacity-25")},[t._v("\n "+t._s(r.displayValue)+"\n ")])]),t._v(" "),n("div",{staticClass:"buttons w-1/3 flex justify-end content-center"},[n("tooltip",[n("button",{staticClass:"appearance-none cursor-pointer text-70 hover:text-primary mr-3",attrs:{title:t.__("novaMenuBuilder.edit")},on:{click:function(e){return e.preventDefault(),t.$emit("editMenu",r)}}},[n("edit-icon")],1),t._v(" "),n("tooltip-content",{attrs:{slot:"content"},slot:"content"},[t._v("\n "+t._s(t.__("novaMenuBuilder.edit"))+"\n ")])],1),t._v(" "),n("tooltip",[n("button",{staticClass:"appearance-none cursor-pointer text-70 hover:text-primary mr-3",attrs:{title:t.__("novaMenuBuilder.duplicate")},on:{click:function(e){return e.preventDefault(),t.$emit("duplicateMenuItem",r)}}},[n("duplicate-icon")],1),t._v(" "),n("tooltip-content",{attrs:{slot:"content"},slot:"content"},[t._v("\n "+t._s(t.__("novaMenuBuilder.duplicate"))+"\n ")])],1),t._v(" "),n("button",{staticClass:"appearance-none cursor-pointer text-70 hover:text-primary mr-1",attrs:{title:t.__("novaMenuBuilder.delete")},on:{click:function(e){return e.preventDefault(),t.$emit("removeMenu",r)}}},[n("delete-icon")],1)],1)])}}])})}),[],!1,null,null,null).exports;var h=n(757),d=n.n(h);function v(t,e,n,r,i,o,u){try{var a=t[o](u),s=a.value}catch(t){return void n(t)}a.done?e(s):Promise.resolve(s).then(r,i)}function m(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function u(t){v(o,r,i,u,a,"next",t)}function a(t){v(o,r,i,u,a,"throw",t)}u(void 0)}))}}const g=function(t,e){return m(d().mark((function n(){return d().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Nova.request().get("/nova-vendor/nova-menu/menu/".concat(t),{params:{locale:e}}));case 1:case"end":return n.stop()}}),n)})))()},y=function(t,e){return m(d().mark((function n(){return d().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Nova.request().post("/nova-vendor/nova-menu/menu/".concat(t),{menuItems:e}));case 1:case"end":return n.stop()}}),n)})))()},_=function(t){return m(d().mark((function e(){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Nova.request().post("/nova-vendor/nova-menu/items",t));case 1:case"end":return e.stop()}}),e)})))()},b=function(t){return m(d().mark((function e(){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Nova.request().get("/nova-vendor/nova-menu/items/".concat(t)));case 1:case"end":return e.stop()}}),e)})))()},w=function(t,e){return m(d().mark((function n(){return d().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Nova.request().post("/nova-vendor/nova-menu/items/".concat(t),e));case 1:case"end":return n.stop()}}),n)})))()},x=function(t){return m(d().mark((function e(){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Nova.request().delete("/nova-vendor/nova-menu/items/".concat(t)));case 1:case"end":return e.stop()}}),e)})))()},O=function(t){return m(d().mark((function e(){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Nova.request().post("/nova-vendor/nova-menu/items/".concat(t,"/duplicate")));case 1:case"end":return e.stop()}}),e)})))()},S=function(t,e){return m(d().mark((function n(){return d().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Nova.request().get("/nova-vendor/nova-menu/menu-item-types/".concat(t),{params:{locale:e}}));case 1:case"end":return n.stop()}}),n)})))()};var j=n(317);const E=o({props:["locales","activeLocale"]},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"menu-builder-header"}},[Object.keys(t.locales).length>1?n("div",{staticClass:"locale-selection px-6 mr-6 bg-white rounded-md"},t._l(Object.keys(t.locales),(function(e){return n("div",{key:e,staticClass:"mx-2 cursor-pointer font-bold border-b-2 px-2 h-full flex items-center box-border",class:{"text-primary border-primary":t.activeLocale===e,"text-80 border-white":t.activeLocale!==e},on:{click:function(n){return n.preventDefault(),t.$emit("changeLocale",e)}}},[n("span",[t._v(" "+t._s(t.locales[e])+" ("+t._s(e)+") ")])])})),0):t._e(),t._v(" "),n("button",{staticClass:"btn btn-default btn-icon bg-primary text-white flex-no-shrink",attrs:{id:"add-new-menu-item-btn",title:t.__("novaMenuBuilder.addMenuItem")},on:{click:function(e){return e.preventDefault(),t.$emit("addMenuItem")}}},[t._v("\n "+t._s(t.__("novaMenuBuilder.addMenuItem"))+"\n ")])])}),[],!1,null,null,null).exports;const k=o({props:{name:{type:String,default:"modal",required:!1},width:{type:Number,default:600,required:!1},align:{type:String,default:"",required:!1},show:{type:Boolean,default:!1,required:!0}},data:function(){return{}},computed:{style:function(){return"width: "+this.width+"px;"}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"fade"}},[t.show?n("modal",[n("div",{staticClass:"bg-white rounded-lg shadow-lg",style:t.style},[n("div",{staticClass:"p-8"},[t._t("container")],2),t._v(" "),n("div",{staticClass:"bg-30 px-6 py-3 flex overflow-hidden rounded-b-lg"},[n("div",{staticClass:"w-full",class:t.align},[t._t("buttons")],2)])])]):t._e()],1)}),[],!1,null,"5ee8bb1e",null).exports;var P=n(907);function C(t){return function(t){if(Array.isArray(t))return M(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return M(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&(e.newItem[t.attribute]=r))}else e.newItem[t.attribute]=r[0]})),this.$emit(t)},getError:function(t){return this.errors&&this.errors[t]&&this.errors[t][0]||void 0}}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("modal",{staticClass:"add-new-menu-item-modal",attrs:{align:"flex justify-end",show:t.showModal}},[n("div",{attrs:{slot:"container"},slot:"container"},[n("div",{staticClass:"flex flex-wrap justify-between mb-6"},[n("h2",{staticClass:"text-90 font-normal text-xl"},[t._v("\n "+t._s(t.__(t.update?"novaMenuBuilder.updateModalTitle":"novaMenuBuilder.createModalTitle"))+"\n ")]),t._v(" "),n("toggle-button",{attrs:{color:t.switchColor,labels:t.toggleLabels,sync:!0,width:78},model:{value:t.newItem.enabled,callback:function(e){t.$set(t.newItem,"enabled",e)},expression:"newItem.enabled"}})],1),t._v(" "),n("form",{attrs:{autocomplete:"off"},on:{submit:function(e){return e.preventDefault(),t.$emit(t.update?"updateItem":"confirmItemCreate")}}},[n("div",{staticClass:"flex"},[n("div",{staticClass:"w-1/5 py-4"},[n("label",{staticClass:"inline-block text-80 pt-2 leading-tight"},[t._v(t._s(t.__("novaMenuBuilder.menuItemName")))])]),t._v(" "),n("div",{staticClass:"py-4 w-4/5"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.newItem.name,expression:"newItem.name"}],staticClass:"w-full form-control form-input form-input-bordered",class:{"border-danger":t.getError("name")},attrs:{placeholder:t.__("novaMenuBuilder.menuItemName"),id:"name",type:"text"},domProps:{value:t.newItem.name},on:{input:function(e){e.target.composing||t.$set(t.newItem,"name",e.target.value)}}}),t._v(" "),t.getError("name")?n("help-text",{staticClass:"error-text mt-2 text-danger"},[t._v("\n "+t._s(t.getError("name"))+"\n ")]):t._e()],1)]),t._v(" "),n("div",{staticClass:"flex border-t border-40"},[n("div",{staticClass:"w-1/5 py-4"},[n("label",{staticClass:"inline-block text-80 pt-2 leading-tight"},[t._v(t._s(t.__("novaMenuBuilder.menuItemType")))])]),t._v(" "),n("div",{staticClass:"py-4 w-4/5"},[n("select",{staticClass:"w-full form-control form-select",class:{"border-danger":t.getError("class")},domProps:{value:t.linkType.class},on:{input:function(e){return t.$emit("onLinkTypeUpdate",e.target.value)}}},[n("option",{attrs:{disabled:"disabled",selected:"selected",value:""}},[t._v("\n "+t._s(t.__("novaMenuBuilder.chooseMenuItemType"))+"\n ")]),t._v(" "),t._l(t.menuItemTypes,(function(e,r){return n("option",{key:r,domProps:{value:e.class}},[t._v("\n "+t._s(t.__(e.name))+"\n ")])}))],2),t._v(" "),t.getError("class")?n("help-text",{staticClass:"error-text mt-2 text-danger"},[t._v("\n "+t._s(t.__("novaMenuBuilder.menuTypeRequired"))+"\n ")]):t._e()],1)]),t._v(" "),"static-url"===t.linkType.type?[n("div",{staticClass:"flex border-t border-40"},[n("div",{staticClass:"w-1/5 py-4"},[n("label",{staticClass:"inline-block text-80 pt-2 leading-tight"},[t._v("\n "+t._s(t.__("novaMenuBuilder.menuItemUrlFieldName"))+"\n ")])]),t._v(" "),n("div",{staticClass:"py-4 w-4/5"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.newItem.value,expression:"newItem.value"}],staticClass:"w-full form-control form-input form-input-bordered",class:{"border-danger":t.getError("value")},attrs:{id:"url",type:"text",placeholder:t.__("novaMenuBuilder.menuItemUrlFieldName")},domProps:{value:t.newItem.value},on:{input:function(e){e.target.composing||t.$set(t.newItem,"value",e.target.value)}}}),t._v(" "),t.getError("value")?n("help-text",{staticClass:"error-text mt-2 text-danger"},[t._v("\n "+t._s(t.getError("value"))+"\n ")]):t._e()],1)])]:t._e(),t._v(" "),"select"===t.linkType.type?[n("div",{staticClass:"flex border-t border-40"},[n("div",{staticClass:"w-1/5 py-4"},[n("label",{staticClass:"inline-block text-80 pt-2 leading-tight"},[t._v(t._s(t.__("novaMenuBuilder.menuItemValue")))])]),t._v(" "),n("div",{staticClass:"py-4 w-4/5"},[n("multiselect",{attrs:{options:t.options,placeholder:t.__("novaMenuBuilder.chooseOption"),value:t.options.find((function(e){return e.id===t.newItem.value})),label:"label","track-by":"id",selectLabel:"",selectGroupLabel:"",selectedLabel:"",deselectLabel:"",deselectGroupLabel:""},on:{input:function(e){return t.$emit("onLinkModelUpdate",e.id)}}}),t._v(" "),t.getError("value")?n("help-text",{staticClass:"error-text mt-2 text-danger"},[t._v("\n "+t._s(t.getError("value"))+"\n ")]):t._e()],1)])]:t._e(),t._v(" "),t.fields&&t.fields.length?n("div",t._l(t.fields,(function(e,r){return n("form-"+e.component,{key:r,tag:"component",staticClass:"menu-item-component border-t border-40 remove-bottom-border",attrs:{field:e,"resource-id":t.resourceId,"resource-name":t.resourceName}})})),1):t._e(),t._v(" "),t.linkType.type&&"text"!==t.linkType.type?n("div",{staticClass:"flex border-t border-40"},[n("div",{staticClass:"w-1/5 py-4"},[n("label",{staticClass:"inline-block text-80 pt-2 leading-tight"},[t._v(t._s(t.__("Open in")))])]),t._v(" "),n("div",{staticClass:"py-4 w-4/5"},[n("select",{directives:[{name:"model",rawName:"v-model",value:t.newItem.target,expression:"newItem.target"}],staticClass:"w-full form-control form-select",on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.newItem,"target",e.target.multiple?n:n[0])}}},[n("option",{attrs:{value:"_self"}},[t._v(t._s(t.__("novaMenuBuilder.menuItemTargetSameWindow")))]),t._v(" "),n("option",{attrs:{value:"_blank"}},[t._v(t._s(t.__("novaMenuBuilder.menuItemTargetNewWindow")))])])])]):t._e()],2)]),t._v(" "),n("div",{attrs:{slot:"buttons"},slot:"buttons"},[n("div",{staticClass:"ml-auto"},[n("button",{staticClass:"btn text-80 font-normal h-9 px-3 mr-3 btn-link",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.$emit("closeModal")}}},[t._v("\n "+t._s(t.__("novaMenuBuilder.closeModalTitle"))+"\n ")]),t._v(" "),n("progress-button",{attrs:{disabled:t.isMenuItemUpdating,processing:t.isMenuItemUpdating},nativeOn:{click:function(e){return e.preventDefault(),t.storeWithData(t.update?"updateItem":"confirmItemCreate")}}},[t._v("\n "+t._s(t.__(t.update?"novaMenuBuilder.updatebuttonTitle":"novaMenuBuilder.createButtonTitle"))+"\n ")])],1)])])}),[],!1,null,null,null).exports;const T=o({props:["showModal","itemToDelete"],components:{Modal:k}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("modal",{attrs:{show:t.showModal,align:"flex justify-end",width:400}},[n("div",{attrs:{slot:"container"},slot:"container"},[n("h2",{staticClass:"mb-6 text-90 font-normal text-xl"},[t._v(t._s(t.__("novaMenuBuilder.delConfirmModalTitle")))]),t._v(" "),t.itemToDelete&&t.itemToDelete.children.length>0?n("p",{staticClass:"text-80 leading-normal mb-4"},[t._v("\n "+t._s(t.__("novaMenuBuilder.delConfirmModalDescChildren"))+"\n ")]):t._e(),t._v(" "),n("p",{staticClass:"text-80 leading-normal"},[t._v(t._s(t.__("novaMenuBuilder.delConfirmModalDesc")))])]),t._v(" "),n("div",{attrs:{slot:"buttons"},slot:"buttons"},[n("div",{staticClass:"ml-auto"},[n("button",{staticClass:"btn text-80 font-normal h-9 px-3 mr-3 btn-link",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.$emit("closeModal")}}},[t._v("\n "+t._s(t.__("novaMenuBuilder.delConfirmModalCancel"))+"\n ")]),t._v(" "),n("button",{staticClass:"btn btn-default btn-danger",attrs:{id:"confirm-overwrite-button"},on:{click:function(e){return e.preventDefault(),t.$emit("confirmItemDelete")}}},[t._v("\n "+t._s(t.__("novaMenuBuilder.delConfirmModalConfirm"))+"\n ")])])])])}),[],!1,null,null,null).exports;var L=o({props:["wrapperClass"]},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("svg",{staticClass:"fill-current",class:t.wrapperClass,attrs:{height:"51",width:"65",xmlns:"http://www.w3.org/2000/svg"}},[n("path",{attrs:{d:"M835 735h2c.552285 0 1 .447715 1 1s-.447715 1-1 1h-2v2c0 .552285-.447715 1-1 1s-1-.447715-1-1v-2h-2c-.552285 0-1-.447715-1-1s.447715-1 1-1h2v-2c0-.552285.447715-1 1-1s1 .447715 1 1v2zm-5.364125-8H817v8h7.049375c.350333-3.528515 2.534789-6.517471 5.5865-8zm-5.5865 10H785c-3.313708 0-6-2.686292-6-6v-30c0-3.313708 2.686292-6 6-6h44c3.313708 0 6 2.686292 6 6v25.049375c5.053323.501725 9 4.765277 9 9.950625 0 5.522847-4.477153 10-10 10-5.185348 0-9.4489-3.946677-9.950625-9zM799 725h16v-8h-16v8zm0 2v8h16v-8h-16zm34-2v-8h-16v8h16zm-52 0h16v-8h-16v8zm0 2v4c0 2.209139 1.790861 4 4 4h12v-8h-16zm18-12h16v-8h-16v8zm34 0v-8h-16v8h16zm-52 0h16v-8h-16v8zm52-10v-4c0-2.209139-1.790861-4-4-4h-44c-2.209139 0-4 1.790861-4 4v4h52zm1 39c4.418278 0 8-3.581722 8-8s-3.581722-8-8-8-8 3.581722-8 8 3.581722 8 8 8z",transform:"translate(-779 -695)",fill:"#A8B9C5","fill-rule":"nonzero"}})])}),[],!1,null,null,null);const A=o({components:{CreateIcon:L.exports}},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"flex justify-center items-center px-6 py-8"},[n("div",{staticClass:"text-center"},[n("create-icon"),t._v(" "),n("h3",{staticClass:"text-base text-80 font-normal mb-6"},[t._v(t._s(t.__("novaMenuBuilder.noMenuItemsPlaceholder")))]),t._v(" "),n("div",[n("button",{staticClass:"btn btn-sm btn-outline",on:{click:function(e){return e.preventDefault(),t.$emit("onAddClick")}}},[t._v("\n "+t._s(t.__("novaMenuBuilder.addMenuItem"))+"\n ")])])],1)])}),[],!1,null,null,null).exports;function R(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function $(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:null;return t.map((function(t){var r=!!Array.isArray(n)&&n.find((function(e){return+e.id==+t.id}));return $($({},t),{},{classProp:[r&&!r.cascade?"hide-cascade":""],children:Array.isArray(t.children)?e.setMenuItemProperties(t.children,r&&r.children):t.children})}))}}};function B(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function F(t){for(var e=1;e=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){s.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){s.headers[t]=r.merge(o)})),t.exports=s}).call(e,n(70))},function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(109),o=(r=i)&&r.__esModule?r:{default:r};e.default=function(t,e,n){return e in t?(0,o.default)(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(9),i=n(1).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=!0},function(t,e,n){"use strict";var r=n(14);function i(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new i(t)}},function(t,e,n){var r=n(11).f,i=n(17),o=n(2)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(54)("keys"),i=n(59);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(48),i=n(21);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(18).Symbol;t.exports=r},function(t,e){var n=Array.isArray;t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mapProps=void 0;var r,i=n(194),o=(r=i)&&r.__esModule?r:{default:r},u={showHelpText:{type:Boolean,default:!1},shownViaNewRelationModal:{type:Boolean,default:!1},resourceId:{type:[Number,String]},resourceName:{type:String},field:{type:Object,required:!0},viaResource:{type:String,required:!1},viaResourceId:{type:[String,Number],required:!1},viaRelationship:{type:String,required:!1},shouldOverrideMeta:{type:Boolean,default:!1}};e.mapProps=function(t){return o.default.pick(u,t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["1/2","1/3","2/3","1/4","3/4","1/5","2/5","3/5","4/5","1/6","5/6"]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(150);Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o(r).default}}),Object.defineProperty(e,"Form",{enumerable:!0,get:function(){return o(r).default}});var i=n(60);function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"Errors",{enumerable:!0,get:function(){return o(i).default}})},function(t,e,n){"use strict";(function(e){var r=n(0),i=n(97),o=n(100),u=n(106),a=n(104),s=n(39),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(99);t.exports=function(t){return new Promise((function(l,f){var p=t.data,h=t.headers;r.isFormData(p)&&delete h["Content-Type"];var d=new XMLHttpRequest,v="onreadystatechange",m=!1;if("test"===e.env.NODE_ENV||"undefined"==typeof window||!window.XDomainRequest||"withCredentials"in d||a(t.url)||(d=new window.XDomainRequest,v="onload",m=!0,d.onprogress=function(){},d.ontimeout=function(){}),t.auth){var g=t.auth.username||"",y=t.auth.password||"";h.Authorization="Basic "+c(g+":"+y)}if(d.open(t.method.toUpperCase(),o(t.url,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,d[v]=function(){if(d&&(4===d.readyState||m)&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var e="getAllResponseHeaders"in d?u(d.getAllResponseHeaders()):null,n={data:t.responseType&&"text"!==t.responseType?d.response:d.responseText,status:1223===d.status?204:d.status,statusText:1223===d.status?"No Content":d.statusText,headers:e,config:t,request:d};i(l,f,n),d=null}},d.onerror=function(){f(s("Network Error",t,null,d)),d=null},d.ontimeout=function(){f(s("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var _=n(102),b=(t.withCredentials||a(t.url))&&t.xsrfCookieName?_.read(t.xsrfCookieName):void 0;b&&(h[t.xsrfHeaderName]=b)}if("setRequestHeader"in d&&r.forEach(h,(function(t,e){void 0===p&&"content-type"===e.toLowerCase()?delete h[e]:d.setRequestHeader(e,t)})),t.withCredentials&&(d.withCredentials=!0),t.responseType)try{d.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){d&&(d.abort(),f(t),d=null)})),void 0===p&&(p=null),d.send(p)}))}}).call(e,n(70))},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";var r=n(96);t.exports=function(t,e,n,i,o){var u=new Error(t);return r(u,e,n,i,o)}},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;rn;)e.push(arguments[n++]);return g[++m]=function(){a("function"==typeof t?t:Function(t),e)},r(m),m},h=function(t){delete g[t]},"process"==n(15)(f)?r=function(t){f.nextTick(u(_,t,1))}:v&&v.now?r=function(t){v.now(u(_,t,1))}:d?(o=(i=new d).port2,i.port1.onmessage=b,r=u(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",b,!1)):r=y in c("script")?function(t){s.appendChild(c("script")).onreadystatechange=function(){s.removeChild(this),_.call(t)}}:function(t){setTimeout(u(_,t,1),0)}),t.exports={set:p,clear:h}},function(t,e,n){var r=n(28),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(21);t.exports=function(t){return Object(r(t))}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),this.record(e)}return r(t,[{key:"all",value:function(){return this.errors}},{key:"has",value:function(t){var e=this.errors.hasOwnProperty(t);return e||(e=Object.keys(this.errors).filter((function(e){return e.startsWith(t+".")||e.startsWith(t+"[")})).length>0),e}},{key:"first",value:function(t){return this.get(t)[0]}},{key:"get",value:function(t){return this.errors[t]||[]}},{key:"any",value:function(){return Object.keys(this.errors).length>0}},{key:"record",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.errors=t}},{key:"clear",value:function(t){if(t){var e=Object.assign({},this.errors);Object.keys(e).filter((function(e){return e===t||e.startsWith(t+".")||e.startsWith(t+"[")})).forEach((function(t){return delete e[t]})),this.errors=e}else this.errors={}}}]),t}();e.default=o},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(e,n(71))},function(t,e){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return n.test(t)}},function(t,e){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){var r=n(12),i=n(13);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(t){r=u}}();var s,c=[],l=!1,f=-1;function p(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&h())}function h(){if(!l){var t=a(p);l=!0;for(var e=c.length;e;){for(s=c,c=[];++f1)for(var n=1;n1&&void 0!==arguments[1]?arguments[1]:null;return this.viaManyToMany?this.detachResources(t):Nova.request({url:"/nova-api/"+this.resourceName,method:"delete",params:(0,o.default)({},this.queryString,{resources:u(t)})}).then(n||function(){e.deleteModalOpen=!1,e.getResources()}).then((function(){Nova.$emit("resources-deleted")}))},deleteSelectedResources:function(){this.deleteResources(this.selectedResources)},deleteAllMatchingResources:function(){var t=this;return this.viaManyToMany?this.detachAllMatchingResources():Nova.request({url:this.deleteAllMatchingResourcesEndpoint,method:"delete",params:(0,o.default)({},this.queryString,{resources:"all"})}).then((function(){t.deleteModalOpen=!1,t.getResources()})).then((function(){Nova.$emit("resources-deleted")}))},detachResources:function(t){var e=this;return Nova.request({url:"/nova-api/"+this.resourceName+"/detach",method:"delete",params:(0,o.default)({},this.queryString,{resources:u(t)},{pivots:a(t)})}).then((function(){e.deleteModalOpen=!1,e.getResources()})).then((function(){Nova.$emit("resources-detached")}))},detachAllMatchingResources:function(){var t=this;return Nova.request({url:"/nova-api/"+this.resourceName+"/detach",method:"delete",params:(0,o.default)({},this.queryString,{resources:"all"})}).then((function(){t.deleteModalOpen=!1,t.getResources()})).then((function(){Nova.$emit("resources-detached")}))},forceDeleteResources:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Nova.request({url:"/nova-api/"+this.resourceName+"/force",method:"delete",params:(0,o.default)({},this.queryString,{resources:u(t)})}).then(n||function(){e.deleteModalOpen=!1,e.getResources()}).then((function(){Nova.$emit("resources-deleted")}))},forceDeleteSelectedResources:function(){this.forceDeleteResources(this.selectedResources)},forceDeleteAllMatchingResources:function(){var t=this;return Nova.request({url:this.forceDeleteSelectedResourcesEndpoint,method:"delete",params:(0,o.default)({},this.queryString,{resources:"all"})}).then((function(){t.deleteModalOpen=!1,t.getResources()})).then((function(){Nova.$emit("resources-deleted")}))},restoreResources:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Nova.request({url:"/nova-api/"+this.resourceName+"/restore",method:"put",params:(0,o.default)({},this.queryString,{resources:u(t)})}).then(n||function(){e.restoreModalOpen=!1,e.getResources()}).then((function(){Nova.$emit("resources-restored")}))},restoreSelectedResources:function(){this.restoreResources(this.selectedResources)},restoreAllMatchingResources:function(){var t=this;return Nova.request({url:this.restoreAllMatchingResourcesEndpoint,method:"put",params:(0,o.default)({},this.queryString,{resources:"all"})}).then((function(){t.restoreModalOpen=!1,t.getResources()})).then((function(){Nova.$emit("resources-restored")}))}},computed:{deleteAllMatchingResourcesEndpoint:function(){return this.lens?"/nova-api/"+this.resourceName+"/lens/"+this.lens:"/nova-api/"+this.resourceName},forceDeleteSelectedResourcesEndpoint:function(){return this.lens?"/nova-api/"+this.resourceName+"/lens/"+this.lens+"/force":"/nova-api/"+this.resourceName+"/force"},restoreAllMatchingResourcesEndpoint:function(){return this.lens?"/nova-api/"+this.resourceName+"/lens/"+this.lens+"/restore":"/nova-api/"+this.resourceName+"/restore"},queryString:function(){return{search:this.currentSearch,filters:this.encodedFilters,trashed:this.currentTrashed,viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship}}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i,o,u=c(n(44)),a=c(n(20)),s=c(n(43));function c(t){return t&&t.__esModule?t:{default:t}}e.default={methods:{clearSelectedFilters:(o=(0,s.default)(u.default.mark((function t(e){var n;return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=5;break}return t.next=3,this.$store.dispatch(this.resourceName+"/resetFilterState",{resourceName:this.resourceName,lens:e});case 3:t.next=7;break;case 5:return t.next=7,this.$store.dispatch(this.resourceName+"/resetFilterState",{resourceName:this.resourceName});case 7:this.updateQueryString((n={},(0,a.default)(n,this.pageParameter,1),(0,a.default)(n,this.filterParameter,""),n));case 8:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)}),filterChanged:function(){var t;this.updateQueryString((t={},(0,a.default)(t,this.pageParameter,1),(0,a.default)(t,this.filterParameter,this.$store.getters[this.resourceName+"/currentEncodedFilters"]),t))},initializeFilters:(i=(0,s.default)(u.default.mark((function t(e){return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.$store.commit(this.resourceName+"/clearFilters"),t.next=3,this.$store.dispatch(this.resourceName+"/fetchFilters",{resourceName:this.resourceName,viaResource:this.viaResource,viaResourceId:this.viaResourceId,viaRelationship:this.viaRelationship,lens:e});case 3:return t.next=5,this.initializeState(e);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)}),initializeState:(r=(0,s.default)(u.default.mark((function t(e){return u.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.initialEncodedFilters){t.next=5;break}return t.next=3,this.$store.dispatch(this.resourceName+"/initializeCurrentFilterValuesFromQueryString",this.initialEncodedFilters);case 3:t.next=7;break;case 5:return t.next=7,this.$store.dispatch(this.resourceName+"/resetFilterState",{resourceName:this.resourceName,lens:e});case 7:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},computed:{filterParameter:function(){return this.resourceName+"_filter"}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(33);e.default={props:(0,r.mapProps)(["shownViaNewRelationModal","field","viaResource","viaResourceId","viaRelationship","resourceName","showHelpText"]),data:function(){return{value:""}},mounted:function(){var t=this;this.setInitialValue(),this.field.fill=this.fill,Nova.$on(this.field.attribute+"-value",(function(e){t.value=e}))},destroyed:function(){Nova.$off(this.field.attribute+"-value")},methods:{setInitialValue:function(){this.value=void 0!==this.field.value&&null!==this.field.value?this.field.value:""},fill:function(t){t.append(this.field.attribute,String(this.value))},handleChange:function(t){this.value=t.target.value,this.field&&Nova.$emit(this.field.attribute+"-change",this.value)}},computed:{isReadonly:function(){return this.field.readonly||_.get(this.field,"extraAttributes.readonly")}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(35);e.default={props:{errors:{default:function(){return new r.Errors}}},data:function(){return{errorClass:"border-danger"}},computed:{errorClasses:function(){return this.hasError?[this.errorClass]:[]},fieldAttribute:function(){return this.field.attribute},validationKey:function(){return this.field.validationKey},hasError:function(){return this.errors.has(this.validationKey)},firstError:function(){if(this.hasError)return this.errors.first(this.validationKey)}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=a(n(44)),o=a(n(43)),u=a(n(34));function a(t){return t&&t.__esModule?t:{default:t}}e.default={props:{loadCards:{type:Boolean,default:!0}},data:function(){return{cards:[]}},created:function(){this.fetchCards()},watch:{cardsEndpoint:function(){this.fetchCards()}},methods:{fetchCards:(r=(0,o.default)(i.default.mark((function t(){var e,n;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.loadCards){t.next=6;break}return t.next=3,Nova.request().get(this.cardsEndpoint,{params:this.extraCardParams});case 3:e=t.sent,n=e.data,this.cards=n;case 6:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},computed:{shouldShowCards:function(){return this.cards.length>0},smallCards:function(){return _.filter(this.cards,(function(t){return-1!==u.default.indexOf(t.width)}))},largeCards:function(){return _.filter(this.cards,(function(t){return"full"==t.width}))},extraCardParams:function(){return null}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={methods:{toAppTimezone:function(t){return t?moment.tz(t,this.userTimezone).clone().tz(Nova.config.timezone).format("YYYY-MM-DD HH:mm:ss"):t},fromAppTimezone:function(t){return t?moment.tz(t,Nova.config.timezone).clone().tz(this.userTimezone).format("YYYY-MM-DD HH:mm:ss"):t},localizeDateTimeField:function(t){if(!t.value)return t.value;var e=moment.tz(t.value,Nova.config.timezone).clone().tz(this.userTimezone);return t.format?e.format(t.format):this.usesTwelveHourTime?e.format("YYYY-MM-DD h:mm:ss A"):e.format("YYYY-MM-DD HH:mm:ss")},localizeDateField:function(t){if(!t.value)return t.value;var e=moment.tz(t.value,Nova.config.timezone).clone().tz(this.userTimezone);return t.format?e.format(t.format):e.format("YYYY-MM-DD")}},computed:{userTimezone:function(){return Nova.config.userTimezone?Nova.config.userTimezone:moment.tz.guess()},usesTwelveHourTime:function(){return _.endsWith((new Date).toLocaleString(),"AM")||_.endsWith((new Date).toLocaleString(),"PM")}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(188),o=(r=i)&&r.__esModule?r:{default:r};e.default={methods:{updateQueryString:function(t){this.$router.push({query:(0,o.default)(t,this.$route.query)}).catch((function(t){if("NavigationDuplicated"!=t.name)throw t}))}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={computed:{resourceInformation:function(){var t=this;return _.find(Nova.config.resources,(function(e){return e.uriKey==t.resourceName}))},viaResourceInformation:function(){var t=this;if(this.viaResource)return _.find(Nova.config.resources,(function(e){return e.uriKey==t.viaResource}))},authorizedToCreate:function(){return this.resourceInformation.authorizedToCreate}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(20),o=(r=i)&&r.__esModule?r:{default:r};e.default={methods:{selectPreviousPage:function(){this.updateQueryString((0,o.default)({},this.pageParameter,this.currentPage-1))},selectNextPage:function(){this.updateQueryString((0,o.default)({},this.pageParameter,this.currentPage+1))}},computed:{currentPage:function(){return parseInt(this.$route.query[this.pageParameter]||1)}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(20),o=(r=i)&&r.__esModule?r:{default:r};e.default={data:function(){return{perPage:25}},methods:{initializePerPageFromQueryString:function(){this.perPage=this.currentPerPage},perPageChanged:function(){this.updateQueryString((0,o.default)({},this.perPageParameter,this.perPage))}},computed:{currentPerPage:function(){return this.$route.query[this.perPageParameter]||25}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(187),o=(r=i)&&r.__esModule?r:{default:r};e.default={data:function(){return{search:"",selectedResource:"",availableResources:[]}},methods:{selectResource:function(t){this.selectedResource=t,this.field&&Nova.$emit(this.field.attribute+"-change",this.selectedResource.value)},handleSearchCleared:function(){this.availableResources=[]},clearSelection:function(){this.selectedResource="",this.availableResources=[],this.field&&Nova.$emit(this.field.attribute+"-change",null)},performSearch:function(t){var e=this;this.search=t;var n=t.trim();""!=n&&this.debouncer((function(){e.getAvailableResources(n)}),500)},debouncer:(0,o.default)((function(t){return t()}),500)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={beforeRouteLeave:function(t,e,n){this.canLeave||window.confirm(this.__("Do you really want to leave? You have unsaved changes."))?n():n(!1)},data:function(){return{canLeave:!0}},methods:{updateFormStatus:function(){this.canLeave=!1}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={data:function(){return{withTrashed:!1}},methods:{toggleWithTrashed:function(){this.withTrashed=!this.withTrashed},enableWithTrashed:function(){this.withTrashed=!0},disableWithTrashed:function(){this.withTrashed=!1}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return(0,o.default)(t)};var r,i=n(199),o=(r=i)&&r.__esModule?r:{default:r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(42),o=(r=i)&&r.__esModule?r:{default:r};e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return o.default.all([t,new o.default((function(t){setTimeout((function(){return t()}),e)}))]).then((function(t){return t[0]}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return(0,u.default)(e)&&null==e.match(/^(.*)[A-Za-zÀ-ÖØ-öø-ÿ]$/)?e:t>1||0==t?i.Inflector.pluralize(e):i.Inflector.singularize(e)};var r,i=n(41),o=n(191),u=(r=o)&&r.__esModule?r:{default:r}},function(t,e,n){"use strict";var r={uncountableWords:["equipment","information","rice","money","species","series","fish","sheep","moose","deer","news"],pluralRules:[[new RegExp("(m)an$","gi"),"$1en"],[new RegExp("(pe)rson$","gi"),"$1ople"],[new RegExp("(child)$","gi"),"$1ren"],[new RegExp("^(ox)$","gi"),"$1en"],[new RegExp("(ax|test)is$","gi"),"$1es"],[new RegExp("(octop|vir)us$","gi"),"$1i"],[new RegExp("(alias|status)$","gi"),"$1es"],[new RegExp("(bu)s$","gi"),"$1ses"],[new RegExp("(buffal|tomat|potat)o$","gi"),"$1oes"],[new RegExp("([ti])um$","gi"),"$1a"],[new RegExp("sis$","gi"),"ses"],[new RegExp("(?:([^f])fe|([lr])f)$","gi"),"$1$2ves"],[new RegExp("(hive)$","gi"),"$1s"],[new RegExp("([^aeiouy]|qu)y$","gi"),"$1ies"],[new RegExp("(x|ch|ss|sh)$","gi"),"$1es"],[new RegExp("(matr|vert|ind)ix|ex$","gi"),"$1ices"],[new RegExp("([m|l])ouse$","gi"),"$1ice"],[new RegExp("(quiz)$","gi"),"$1zes"],[new RegExp("s$","gi"),"s"],[new RegExp("$","gi"),"s"]],singularRules:[[new RegExp("(m)en$","gi"),"$1an"],[new RegExp("(pe)ople$","gi"),"$1rson"],[new RegExp("(child)ren$","gi"),"$1"],[new RegExp("([ti])a$","gi"),"$1um"],[new RegExp("((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$","gi"),"$1$2sis"],[new RegExp("(hive)s$","gi"),"$1"],[new RegExp("(tive)s$","gi"),"$1"],[new RegExp("(curve)s$","gi"),"$1"],[new RegExp("([lr])ves$","gi"),"$1f"],[new RegExp("([^fo])ves$","gi"),"$1fe"],[new RegExp("([^aeiouy]|qu)ies$","gi"),"$1y"],[new RegExp("(s)eries$","gi"),"$1eries"],[new RegExp("(m)ovies$","gi"),"$1ovie"],[new RegExp("(x|ch|ss|sh)es$","gi"),"$1"],[new RegExp("([m|l])ice$","gi"),"$1ouse"],[new RegExp("(bus)es$","gi"),"$1"],[new RegExp("(o)es$","gi"),"$1"],[new RegExp("(shoe)s$","gi"),"$1"],[new RegExp("(cris|ax|test)es$","gi"),"$1is"],[new RegExp("(octop|vir)i$","gi"),"$1us"],[new RegExp("(alias|status)es$","gi"),"$1"],[new RegExp("^(ox)en","gi"),"$1"],[new RegExp("(vert|ind)ices$","gi"),"$1ex"],[new RegExp("(matr)ices$","gi"),"$1ix"],[new RegExp("(quiz)zes$","gi"),"$1"],[new RegExp("s$","gi"),""]],nonTitlecasedWords:["and","or","nor","a","an","the","so","but","to","of","at","by","from","into","on","onto","off","out","in","over","with","for"],idSuffix:new RegExp("(_ids|_id)$","g"),underbar:new RegExp("_","g"),spaceOrUnderbar:new RegExp("[ _]","g"),uppercase:new RegExp("([A-Z])","g"),underbarPrefix:new RegExp("^_"),applyRules:function(t,e,n,r){if(r)t=r;else if(!(n.indexOf(t.toLowerCase())>-1))for(var i=0;i>8-u%1*8)){if((n=i.charCodeAt(u+=3/4))>255)throw new r;e=e<<8|n}return o}},function(t,e,n){"use strict";var r=n(0);function i(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var u=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),u.push(i(e)+"="+i(t))})))})),o=u.join("&")}return o&&(t+=(-1===t.indexOf("?")?"?":"&")+o),t}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(0);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,u){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(o)&&a.push("domain="+o),!0===u&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";var r=n(0);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},function(t,e,n){"use strict";var r=n(0),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,u={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(u[e]&&i.indexOf(e)>=0)return;u[e]="set-cookie"===e?(u[e]?u[e]:[]).concat([n]):u[e]?u[e]+", "+n:n}})),u):u}},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){t.exports={default:n(111),__esModule:!0}},function(t,e,n){t.exports={default:n(112),__esModule:!0}},function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(108),o=(r=i)&&r.__esModule?r:{default:r};e.default=o.default||function(t){for(var e=1;el;)if((a=s[l++])!=a)return!0}else for(;c>l;l++)if((t||l in s)&&s[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(16),i=n(121),o=n(120),u=n(4),a=n(57),s=n(140),c={},l={};(e=t.exports=function(t,e,n,f,p){var h,d,v,m,g=p?function(){return t}:s(t),y=r(n,f,e?2:1),_=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(o(g)){for(h=a(t.length);h>_;_++)if((m=e?y(u(d=t[_])[0],d[1]):y(t[_]))===c||m===l)return m}else for(v=g.call(t);!(d=v.next()).done;)if((m=i(v,y,d.value,e))===c||m===l)return m}).BREAK=c,e.RETURN=l},function(t,e,n){t.exports=!n(5)&&!n(23)((function(){return 7!=Object.defineProperty(n(22)("div"),"a",{get:function(){return 7}}).a}))},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(10),i=n(2)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){var r=n(4);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){"use strict";var r=n(127),i=n(53),o=n(26),u={};n(7)(u,n(2)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(u,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(2)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],u=o[r]();u.next=function(){return{done:n=!0}},o[r]=function(){return u},t(o)}catch(t){}return n}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(1),i=n(56).set,o=r.MutationObserver||r.WebKitMutationObserver,u=r.process,a=r.Promise,s="process"==n(15)(u);t.exports=function(){var t,e,n,c=function(){var r,i;for(s&&(r=u.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(s)n=function(){u.nextTick(c)};else if(!o||r.navigator&&r.navigator.standalone)if(a&&a.resolve){var l=a.resolve(void 0);n=function(){l.then(c)}}else n=function(){i.call(r,c)};else{var f=!0,p=document.createTextNode("");new o(c).observe(p,{characterData:!0}),n=function(){p.data=f=!f}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e,n){"use strict";var r=n(50),i=n(129),o=n(132),u=n(58),a=n(48),s=Object.assign;t.exports=!s||n(23)((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=s({},t)[n]||Object.keys(s({},e)).join("")!=r}))?function(t,e){for(var n=u(t),s=arguments.length,c=1,l=i.f,f=o.f;s>c;)for(var p,h=a(arguments[c++]),d=l?r(h).concat(l(h)):r(h),v=d.length,m=0;v>m;)f.call(h,p=d[m++])&&(n[p]=h[p]);return n}:s},function(t,e,n){var r=n(4),i=n(128),o=n(46),u=n(27)("IE_PROTO"),a=function(){},s=function(){var t,e=n(22)("iframe"),r=o.length;for(e.style.display="none",n(47).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("