From 31b7dd9e4c208d91b2b34319b1f2fded4d2df250 Mon Sep 17 00:00:00 2001 From: Tarvo Reinpalu Date: Thu, 7 Oct 2021 19:11:35 +0300 Subject: [PATCH] Update dist files --- dist/js/menu-builder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/js/menu-builder.js b/dist/js/menu-builder.js index 1d1039dd..3d41800d 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)},669:(t,e,n)=>{t.exports=n(609)},448:(t,e,n)=>{"use strict";var r=n(867),o=n(26),i=n(372),u=n(327),a=n(97),s=n(109),c=n(985),l=n(61),f=n(655),p=n(263);t.exports=function(t){return new Promise((function(e,n){var h,d=t.data,v=t.headers,m=t.responseType;function y(){t.cancelToken&&t.cancelToken.unsubscribe(h),t.signal&&t.signal.removeEventListener("abort",h)}r.isFormData(d)&&delete v["Content-Type"];var g=new XMLHttpRequest;if(t.auth){var b=t.auth.username||"",_=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";v.Authorization="Basic "+btoa(b+":"+_)}var w=a(t.baseURL,t.url);function x(){if(g){var r="getAllResponseHeaders"in g?s(g.getAllResponseHeaders()):null,i={data:m&&"text"!==m&&"json"!==m?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:t,request:g};o((function(t){e(t),y()}),(function(t){n(t),y()}),i),g=null}}if(g.open(t.method.toUpperCase(),u(w,t.params,t.paramsSerializer),!0),g.timeout=t.timeout,"onloadend"in g?g.onloadend=x:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(x)},g.onabort=function(){g&&(n(l("Request aborted",t,"ECONNABORTED",g)),g=null)},g.onerror=function(){n(l("Network Error",t,null,g)),g=null},g.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded",r=t.transitional||f.transitional;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(l(e,t,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",g)),g=null},r.isStandardBrowserEnv()){var O=(t.withCredentials||c(w))&&t.xsrfCookieName?i.read(t.xsrfCookieName):void 0;O&&(v[t.xsrfHeaderName]=O)}"setRequestHeader"in g&&r.forEach(v,(function(t,e){void 0===d&&"content-type"===e.toLowerCase()?delete v[e]:g.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(g.withCredentials=!!t.withCredentials),m&&"json"!==m&&(g.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&g.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&g.upload&&g.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(h=function(t){g&&(n(!t||t&&t.type?new p("canceled"):t),g.abort(),g=null)},t.cancelToken&&t.cancelToken.subscribe(h),t.signal&&(t.signal.aborted?h():t.signal.addEventListener("abort",h))),d||(d=null),g.send(d)}))}},609:(t,e,n)=>{"use strict";var r=n(867),o=n(849),i=n(321),u=n(185);var a=function t(e){var n=new i(e),a=o(i.prototype.request,n);return r.extend(a,i.prototype,n),r.extend(a,n),a.create=function(n){return t(u(e,n))},a}(n(655));a.Axios=i,a.Cancel=n(263),a.CancelToken=n(972),a.isCancel=n(502),a.VERSION=n(288).version,a.all=function(t){return Promise.all(t)},a.spread=n(713),a.isAxiosError=n(268),t.exports=a,t.exports.default=a},263:t=>{"use strict";function e(t){this.message=t}e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,t.exports=e},972:(t,e,n)=>{"use strict";var r=n(263);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;this.promise.then((function(t){if(n._listeners){var e,r=n._listeners.length;for(e=0;e{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,n)=>{"use strict";var r=n(867),o=n(327),i=n(782),u=n(572),a=n(185),s=n(875),c=s.validators;function l(t){this.defaults=t,this.interceptors={request:new i,response:new i}}l.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=t.transitional;void 0!==e&&s.assertOptions(e,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(r=r&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(t){i.push(t.fulfilled,t.rejected)})),!r){var l=[u,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(i),o=Promise.resolve(t);l.length;)o=o.then(l.shift(),l.shift());return o}for(var f=t;n.length;){var p=n.shift(),h=n.shift();try{f=p(f)}catch(t){h(t);break}}try{o=u(f)}catch(t){return Promise.reject(t)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},l.prototype.getUri=function(t){return t=a(this.defaults,t),o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){l.prototype[t]=function(e,n){return this.request(a(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){l.prototype[t]=function(e,n,r){return this.request(a(r||{},{method:t,url:e,data:n}))}})),t.exports=l},782:(t,e,n)=>{"use strict";var r=n(867);function o(){this.handlers=[]}o.prototype.use=function(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=o},97:(t,e,n)=>{"use strict";var r=n(793),o=n(303);t.exports=function(t,e){return t&&!r(e)?o(t,e):e}},61:(t,e,n)=>{"use strict";var r=n(481);t.exports=function(t,e,n,o,i){var u=new Error(t);return r(u,e,n,o,i)}},572:(t,e,n)=>{"use strict";var r=n(867),o=n(527),i=n(502),u=n(655),a=n(263);function s(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new a("canceled")}t.exports=function(t){return s(t),t.headers=t.headers||{},t.data=o.call(t,t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||u.adapter)(t).then((function(e){return s(t),e.data=o.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return i(e)||(s(t),e&&e.response&&(e.response.data=o.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},481:t=>{"use strict";t.exports=function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t}},185:(t,e,n)=>{"use strict";var r=n(867);t.exports=function(t,e){e=e||{};var n={};function o(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function i(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:o(void 0,t[n]):o(t[n],e[n])}function u(t){if(!r.isUndefined(e[t]))return o(void 0,e[t])}function a(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:o(void 0,t[n]):o(void 0,e[n])}function s(n){return n in e?o(t[n],e[n]):n in t?o(void 0,t[n]):void 0}var c={url:u,method:u,data:u,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s};return r.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=c[t]||i,o=e(t);r.isUndefined(o)&&e!==s||(n[t]=o)})),n}},26:(t,e,n)=>{"use strict";var r=n(61);t.exports=function(t,e,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},527:(t,e,n)=>{"use strict";var r=n(867),o=n(655);t.exports=function(t,e,n){var i=this||o;return r.forEach(n,(function(n){t=n.call(i,t,e)})),t}},655:(t,e,n)=>{"use strict";var r=n(155),o=n(867),i=n(16),u=n(481),a={"Content-Type":"application/x-www-form-urlencoded"};function s(t,e){!o.isUndefined(t)&&o.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var c,l={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==r&&"[object process]"===Object.prototype.toString.call(r))&&(c=n(448)),c),transformRequest:[function(t,e){return i(e,"Accept"),i(e,"Content-Type"),o.isFormData(t)||o.isArrayBuffer(t)||o.isBuffer(t)||o.isStream(t)||o.isFile(t)||o.isBlob(t)?t:o.isArrayBufferView(t)?t.buffer:o.isURLSearchParams(t)?(s(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):o.isObject(t)||e&&"application/json"===e["Content-Type"]?(s(e,"application/json"),function(t,e,n){if(o.isString(t))try{return(e||JSON.parse)(t),o.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||l.transitional,n=e&&e.silentJSONParsing,r=e&&e.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||r&&o.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(i){if("SyntaxError"===t.name)throw u(t,this,"E_JSON_PARSE");throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(t){l.headers[t]={}})),o.forEach(["post","put","patch"],(function(t){l.headers[t]=o.merge(a)})),t.exports=l},288:t=>{t.exports={version:"0.22.0"}},849:t=>{"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=n(867);function o(t){return encodeURIComponent(t).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 i;if(n)i=n(e);else if(r.isURLSearchParams(e))i=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(o(e)+"="+o(t))})))})),i=u.join("&")}if(i){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}},303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},372:(t,e,n)=>{"use strict";var r=n(867);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,o,i,u){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(i)&&a.push("domain="+i),!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(){}}},793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},268:t=>{"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},985:(t,e,n)=>{"use strict";var r=n(867);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(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=o(window.location.href),function(e){var n=r.isString(e)?o(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},16:(t,e,n)=>{"use strict";var r=n(867);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},109:(t,e,n)=>{"use strict";var r=n(867),o=["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,i,u={};return t?(r.forEach(t.split("\n"),(function(t){if(i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e){if(u[e]&&o.indexOf(e)>=0)return;u[e]="set-cookie"===e?(u[e]?u[e]:[]).concat([n]):u[e]?u[e]+", "+n:n}})),u):u}},713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},875:(t,e,n)=>{"use strict";var r=n(288).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){o[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));var i={};o.transitional=function(t,e,n){function o(t,e){return"[Axios v"+r+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,r,u){if(!1===t)throw new Error(o(r," has been removed"+(e?" in "+e:"")));return e&&!i[r]&&(i[r]=!0,console.warn(o(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,u)}},t.exports={assertOptions:function(t,e,n){if("object"!=typeof t)throw new TypeError("options must be an object");for(var r=Object.keys(t),o=r.length;o-- >0;){var i=r[o],u=e[i];if(u){var a=t[i],s=void 0===a||u(a,i,t);if(!0!==s)throw new TypeError("option "+i+" must be "+s)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:o}},867:(t,e,n)=>{"use strict";var r=n(849),o=Object.prototype.toString;function i(t){return"[object Array]"===o.call(t)}function u(t){return void 0===t}function a(t){return null!==t&&"object"==typeof t}function s(t){if("[object Object]"!==o.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===o.call(t)}function l(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),i(t))for(var n=0,r=t.length;n{"use strict";var r=n(10),o=n.n(r);function i(t,e,n,r,o,i,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),i&&(c._scopeId="data-v-"+i),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__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(u)},c._ssrRegister=s):o&&(s=a?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),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=i({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=i({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=i({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=i({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=i({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=i({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,o,i,u){try{var a=t[i](u),s=a.value}catch(t){return void n(t)}a.done?e(s):Promise.resolve(s).then(r,o)}function m(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){v(i,r,o,u,a,"next",t)}function a(t){v(i,r,o,u,a,"throw",t)}u(void 0)}))}}const 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().get("/nova-vendor/nova-menu/menu/".concat(t),{params:{locale:e}}));case 1:case"end":return n.stop()}}),n)})))()},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().post("/nova-vendor/nova-menu/menu/".concat(t),{menuItems:e}));case 1:case"end":return n.stop()}}),n)})))()},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().post("/nova-vendor/nova-menu/items",t));case 1:case"end":return e.stop()}}),e)})))()},_=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 E=n(317);const j=i({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=i({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),C=n.n(P),M=n(62);function T(t){return function(t){if(Array.isArray(t))return I(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 I(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 I(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 I(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&e.$set(e.newItem,t.attribute,r))}else e.$set(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:t.linkType.class+"_"+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,errors:t.errors,"show-errors":!0}})})),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 R=i({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=i({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 N=i({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 $(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 D(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 D(D({},t),{},{classProp:[r&&!r.cascade?"hide-cascade":""],children:Array.isArray(t.children)?e.setMenuItemProperties(t.children,r&&r.children):t.children})}))}}};function z(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 U(t){for(var e=1;e{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};r(this,t),this.record(e)}return n(t,[{key:"all",value:function(){return this.errors}},{key:"has",value:function(t){var e=this.errors.hasOwnProperty(t);e||(e=Object.keys(this.errors).filter((function(e){return e.startsWith(t+".")||e.startsWith(t+"[")})).length>0);return e}},{key:"first",value:function(t){return this.get(t)[0]}},{key:"get",value:function(t){return this.errors[t]||[]}},{key:"any",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(0===e.length)return Object.keys(this.errors).length>0;var n={};return e.forEach((function(e){return n[e]=t.get(e)})),n}},{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},365:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(this,t),this.processing=!1,this.successful=!1,this.withData(e).withOptions(n).withErrors({})}return i(t,[{key:"withData",value:function(t){for(var e in(0,s.isArray)(t)&&(t=t.reduce((function(t,e){return t[e]="",t}),{})),this.setInitialValues(t),this.errors=new a.default,this.processing=!1,this.successful=!1,t)(0,s.guardAgainstReservedFieldName)(e),this[e]=t[e];return this}},{key:"withErrors",value:function(t){return this.errors=new a.default(t),this}},{key:"withOptions",value:function(t){this.__options={resetOnSuccess:!0},t.hasOwnProperty("resetOnSuccess")&&(this.__options.resetOnSuccess=t.resetOnSuccess),t.hasOwnProperty("onSuccess")&&(this.onSuccess=t.onSuccess),t.hasOwnProperty("onFail")&&(this.onFail=t.onFail);var e="undefined"!=typeof window&&window.axios;if(this.__http=t.http||e||n(669),!this.__http)throw new Error("No http library provided. Either pass an http option, or install axios.");return this}},{key:"data",value:function(){var t={};for(var e in this.initial)t[e]=this[e];return t}},{key:"only",value:function(t){var e=this;return t.reduce((function(t,n){return t[n]=e[n],t}),{})}},{key:"reset",value:function(){(0,s.merge)(this,this.initial),this.errors.clear()}},{key:"setInitialValues",value:function(t){this.initial={},(0,s.merge)(this.initial,t)}},{key:"populate",value:function(t){var e=this;return Object.keys(t).forEach((function(n){(0,s.guardAgainstReservedFieldName)(n),e.hasOwnProperty(n)&&(0,s.merge)(e,function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},n,t[n]))})),this}},{key:"clear",value:function(){for(var t in this.initial)this[t]="";this.errors.clear()}},{key:"post",value:function(t){return this.submit("post",t)}},{key:"put",value:function(t){return this.submit("put",t)}},{key:"patch",value:function(t){return this.submit("patch",t)}},{key:"delete",value:function(t){return this.submit("delete",t)}},{key:"submit",value:function(t,e){var n=this;return this.__validateRequestType(t),this.errors.clear(),this.processing=!0,this.successful=!1,new Promise((function(r,o){n.__http[t](e,n.hasFiles()?(0,s.objectToFormData)(n.data()):n.data()).then((function(t){n.processing=!1,n.onSuccess(t.data),r(t.data)})).catch((function(t){n.processing=!1,n.onFail(t),o(t)}))}))}},{key:"hasFiles",value:function(){for(var t in this.initial)if(this.hasFilesDeep(this[t]))return!0;return!1}},{key:"hasFilesDeep",value:function(t){if(null===t)return!1;if("object"===(void 0===t?"undefined":o(t)))for(var e in t)if(t.hasOwnProperty(e)&&this.hasFilesDeep(t[e]))return!0;if(Array.isArray(t))for(var n in t)if(t.hasOwnProperty(n))return this.hasFilesDeep(t[n]);return(0,s.isFile)(t)}},{key:"onSuccess",value:function(t){this.successful=!0,this.__options.resetOnSuccess&&this.reset()}},{key:"onFail",value:function(t){this.successful=!1,t.response&&t.response.data.errors&&this.errors.record(t.response.data.errors)}},{key:"hasError",value:function(t){return this.errors.has(t)}},{key:"getError",value:function(t){return this.errors.first(t)}},{key:"getErrors",value:function(t){return this.errors.get(t)}},{key:"__validateRequestType",value:function(t){var e=["get","delete","head","post","put","patch"];if(-1===e.indexOf(t))throw new Error("`"+t+"` is not a valid request type, must be one of: `"+e.join("`, `")+"`.")}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(new t).withData(e)}}]),t}();e.default=l},62:(t,e,n)=>{"use strict";var r=n(365);var o=n(528);function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"D1",{enumerable:!0,get:function(){return i(o).default}})},924:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.guardAgainstReservedFieldName=function(t){if(-1!==n.indexOf(t))throw new Error("Field name "+t+" isn't allowed to be used in a Form or Errors instance.")};var n=e.reservedFieldNames=["__http","__options","__validateRequestType","clear","data","delete","errors","getError","getErrors","hasError","initial","onFail","only","onSuccess","patch","populate","post","processing","successful","put","reset","submit","withData","withErrors","withOptions"]},823:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new FormData,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(null===t||"undefined"===t||0===t.length)return e.append(n,t);for(var r in t)t.hasOwnProperty(r)&&i(e,o(n,r),t[r]);return e}function o(t,e){return t?t+"["+e+"]":e}function i(t,e,o){return o instanceof Date?t.append(e,o.toISOString()):o instanceof File?t.append(e,o,o.name):"boolean"==typeof o?t.append(e,o?"1":"0"):null===o?t.append(e,""):"object"!==(void 0===o?"undefined":n(o))?t.append(e,o):void r(o,t,e)}e.objectToFormData=r},19:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(933);Object.keys(r).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}})}));var o=n(823);Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})}));var i=n(924);Object.keys(i).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}})}))},933:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function r(t){return t instanceof File||t instanceof FileList}function o(t){if(null===t)return null;if(r(t))return t;if(Array.isArray(t)){var e=[];for(var i in t)t.hasOwnProperty(i)&&(e[i]=o(t[i]));return e}if("object"===(void 0===t?"undefined":n(t))){var u={};for(var a in t)t.hasOwnProperty(a)&&(u[a]=o(t[a]));return u}return t}e.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},e.isFile=r,e.merge=function(t,e){for(var n in e)t[n]=o(e[n])},e.cloneDeep=o},317:function(t){var e;e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=41)}([function(t,e,n){"use strict";var r=n(40),o=n(152),i=Object.prototype.toString;function u(t){return"[object Array]"===i.call(t)}function a(t){return null!==t&&"object"==typeof t}function s(t){return"[object Function]"===i.call(t)}function c(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),u(t))for(var n=0,r=t.length;n=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(i)})),t.exports=s}).call(e,n(70))},function(t,e,n){"use strict";e.__esModule=!0;var r,o=n(109),i=(r=o)&&r.__esModule?r:{default:r};e.default=function(t,e,n){return e in t?(0,i.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),o=n(1).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.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 o(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 o(t)}},function(t,e,n){var r=n(11).f,o=n(17),i=n(2)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(54)("keys"),o=n(59);t.exports=function(t){return r[t]||(r[t]=o(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),o=n(21);t.exports=function(t){return r(o(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,o=n(194),i=(r=o)&&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 i.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 i(r).default}}),Object.defineProperty(e,"Form",{enumerable:!0,get:function(){return i(r).default}});var o=n(60);function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"Errors",{enumerable:!0,get:function(){return i(o).default}})},function(t,e,n){"use strict";(function(e){var r=n(0),o=n(97),i=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 y=t.auth.username||"",g=t.auth.password||"";h.Authorization="Basic "+c(y+":"+g)}if(d.open(t.method.toUpperCase(),i(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};o(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 b=n(102),_=(t.withCredentials||a(t.url))&&t.xsrfCookieName?b.read(t.xsrfCookieName):void 0;_&&(h[t.xsrfHeaderName]=_)}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,o,i){var u=new Error(t);return r(u,e,n,o,i)}},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 y[++m]=function(){a("function"==typeof t?t:Function(t),e)},r(m),m},h=function(t){delete y[t]},"process"==n(15)(f)?r=function(t){f.nextTick(u(b,t,1))}:v&&v.now?r=function(t){v.now(u(b,t,1))}:d?(i=(o=new d).port2,o.port1.onmessage=_,r=u(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",_,!1)):r=g in c("script")?function(t){s.appendChild(c("script")).onreadystatechange=function(){s.removeChild(this),b.call(t)}}:function(t){setTimeout(u(b,t,1),0)}),t.exports={set:p,clear:h}},function(t,e,n){var r=n(28),o=Math.min;t.exports=function(t){return t>0?o(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]:{};o(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=i},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),o=n(13);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},function(t,e){var n,r,o=t.exports={};function i(){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===i||!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:i}catch(t){n=i}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,i.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,i.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,i.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,i.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,i.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,i.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,i.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,i.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,o,i,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:(i=(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 i.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:(o=(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 o.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,o=a(n(44)),i=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,i.default)(o.default.mark((function t(){var e,n;return o.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,o=n(188),i=(r=o)&&r.__esModule?r:{default:r};e.default={methods:{updateQueryString:function(t){this.$router.push({query:(0,i.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,o=n(20),i=(r=o)&&r.__esModule?r:{default:r};e.default={methods:{selectPreviousPage:function(){this.updateQueryString((0,i.default)({},this.pageParameter,this.currentPage-1))},selectNextPage:function(){this.updateQueryString((0,i.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,o=n(20),i=(r=o)&&r.__esModule?r:{default:r};e.default={data:function(){return{perPage:25}},methods:{initializePerPageFromQueryString:function(){this.perPage=this.currentPerPage},perPageChanged:function(){this.updateQueryString((0,i.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,o=n(187),i=(r=o)&&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,i.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,i.default)(t)};var r,o=n(199),i=(r=o)&&r.__esModule?r:{default:r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(42),i=(r=o)&&r.__esModule?r:{default:r};e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return i.default.all([t,new i.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?o.Inflector.pluralize(e):o.Inflector.singularize(e)};var r,o=n(41),i=n(191),u=(r=i)&&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 o=0;o>8-u%1*8)){if((n=o.charCodeAt(u+=3/4))>255)throw new r;e=e<<8|n}return i}},function(t,e,n){"use strict";var r=n(0);function o(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 i;if(n)i=n(e);else if(r.isURLSearchParams(e))i=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(o(e)+"="+o(t))})))})),i=u.join("&")}return i&&(t+=(-1===t.indexOf("?")?"?":"&")+i),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,o,i,u){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(i)&&a.push("domain="+i),!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 o(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=o(window.location.href),function(e){var n=r.isString(e)?o(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),o=["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,i,u={};return t?(r.forEach(t.split("\n"),(function(t){if(i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e){if(u[e]&&o.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,o=n(108),i=(r=o)&&r.__esModule?r:{default:r};e.default=i.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),o=n(121),i=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,y=p?function(){return t}:s(t),g=r(n,f,e?2:1),b=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(i(y)){for(h=a(t.length);h>b;b++)if((m=e?g(u(d=t[b])[0],d[1]):g(t[b]))===c||m===l)return m}else for(v=y.call(t);!(d=v.next()).done;)if((m=o(v,g,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),o=n(2)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,e,n){var r=n(4);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){"use strict";var r=n(127),o=n(53),i=n(26),u={};n(7)(u,n(2)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(u,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(2)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],u=i[r]();u.next=function(){return{done:n=!0}},i[r]=function(){return u},t(i)}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),o=n(56).set,i=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,o;for(s&&(r=u.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(s)n=function(){u.nextTick(c)};else if(!i||r.navigator&&r.navigator.standalone)if(a&&a.resolve){var l=a.resolve(void 0);n=function(){l.then(c)}}else n=function(){o.call(r,c)};else{var f=!0,p=document.createTextNode("");new i(c).observe(p,{characterData:!0}),n=function(){p.data=f=!f}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},function(t,e,n){"use strict";var r=n(50),o=n(129),i=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=o.f,f=i.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),o=n(128),i=n(46),u=n(27)("IE_PROTO"),a=function(){},s=function(){var t,e=n(22)("iframe"),r=i.length;for(e.style.display="none",n(47).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("