diff --git a/dist/js/tool.js b/dist/js/tool.js index ff97bdb..64e7d9b 100644 --- a/dist/js/tool.js +++ b/dist/js/tool.js @@ -1,2 +1,2 @@ /*! For license information please see tool.js.LICENSE.txt */ -(()=>{var e,t={1074:(e,t,r)=>{"use strict";const n=Vue;var o=r(3906),i=r.n(o),a={nested:{type:Boolean,default:!1},preventInitialLoading:{type:Boolean,default:!1},showHelpText:{type:Boolean,default:!1},shownViaNewRelationModal:{type:Boolean,default:!1},resourceId:{type:[Number,String]},resourceName:{type:String},relatedResourceId:{type:[Number,String]},relatedResourceName:{type:String},field:{type:Object,required:!0},viaResource:{type:String,required:!1},viaResourceId:{type:[String,Number],required:!1},viaRelationship:{type:String,required:!1},relationshipType:{type:String,default:""},shouldOverrideMeta:{type:Boolean,default:!1},disablePagination:{type:Boolean,default:!1},clickAction:{type:String,default:"view",validator:function(e){return["edit","select","ignore","detail"].includes(e)}},mode:{type:String,default:"form",validator:function(e){return["form","modal","action-modal","action-fullscreen"].includes(e)}}};function s(e){return i()(a,e)}function c(){return"undefined"!=typeof navigator&&"undefined"!=typeof window?window:void 0!==r.g?r.g:{}}const u="function"==typeof Proxy,l="devtools-plugin:setup";let f,p;function d(){return void 0!==f||("undefined"!=typeof window&&window.performance?(f=!0,p=window.performance):void 0!==r.g&&(null===(e=r.g.perf_hooks)||void 0===e?void 0:e.performance)?(f=!0,p=r.g.perf_hooks.performance):f=!1),f?p.now():Date.now();var e}class h{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const r={};if(e.settings)for(const t in e.settings){const n=e.settings[t];r[t]=n.defaultValue}const n=`__vue-devtools-plugin-settings__${e.id}`;let o=Object.assign({},r);try{const e=localStorage.getItem(n),t=JSON.parse(e);Object.assign(o,t)}catch(e){}this.fallbacks={getSettings:()=>o,setSettings(e){try{localStorage.setItem(n,JSON.stringify(e))}catch(e){}o=e},now:()=>d()},t&&t.on("plugin:settings:set",((e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)})),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,t)=>this.target?this.target[t]:"on"===t?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?(...e)=>(this.targetQueue.push({method:t,args:e,resolve:()=>{}}),this.fallbacks[t](...e)):(...e)=>new Promise((r=>{this.targetQueue.push({method:t,args:e,resolve:r})}))})}async setRealTarget(e){this.target=e;for(const e of this.onQueue)this.target.on[e.method](...e.args);for(const e of this.targetQueue)e.resolve(await this.target[e.method](...e.args))}}function y(e,t){const r=e,n=c(),o=c().__VUE_DEVTOOLS_GLOBAL_HOOK__,i=u&&r.enableEarlyProxy;if(!o||!n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__&&i){const e=i?new h(r,o):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:r,setupFn:t,proxy:e}),e&&t(e.proxiedTarget)}else o.emit(l,e,t)}var v="store";function g(e,t){Object.keys(e).forEach((function(r){return t(e[r],r)}))}function m(e){return null!==e&&"object"==typeof e}function b(e,t,r){return t.indexOf(e)<0&&(r&&r.prepend?t.unshift(e):t.push(e)),function(){var r=t.indexOf(e);r>-1&&t.splice(r,1)}}function w(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var r=e.state;O(e,r,[],e._modules.root,!0),x(e,r,t)}function x(e,t,r){var o=e._state,i=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var a=e._wrappedGetters,s={},c={},u=(0,n.effectScope)(!0);u.run((function(){g(a,(function(t,r){s[r]=function(e,t){return function(){return e(t)}}(t,e),c[r]=(0,n.computed)((function(){return s[r]()})),Object.defineProperty(e.getters,r,{get:function(){return c[r].value},enumerable:!0})}))})),e._state=(0,n.reactive)({data:t}),e._scope=u,e.strict&&function(e){(0,n.watch)((function(){return e._state.data}),(function(){0}),{deep:!0,flush:"sync"})}(e),o&&r&&e._withCommit((function(){o.data=null})),i&&i.stop()}function O(e,t,r,n,o){var i=!r.length,a=e._modules.getNamespace(r);if(n.namespaced&&(e._modulesNamespaceMap[a],e._modulesNamespaceMap[a]=n),!i&&!o){var s=j(t,r.slice(0,-1)),c=r[r.length-1];e._withCommit((function(){s[c]=n.state}))}var u=n.context=function(e,t,r){var n=""===t,o={dispatch:n?e.dispatch:function(r,n,o){var i=_(r,n,o),a=i.payload,s=i.options,c=i.type;return s&&s.root||(c=t+c),e.dispatch(c,a)},commit:n?e.commit:function(r,n,o){var i=_(r,n,o),a=i.payload,s=i.options,c=i.type;s&&s.root||(c=t+c),e.commit(c,a,s)}};return Object.defineProperties(o,{getters:{get:n?function(){return e.getters}:function(){return S(e,t)}},state:{get:function(){return j(e.state,r)}}}),o}(e,a,r);n.forEachMutation((function(t,r){!function(e,t,r,n){var o=e._mutations[t]||(e._mutations[t]=[]);o.push((function(t){r.call(e,n.state,t)}))}(e,a+r,t,u)})),n.forEachAction((function(t,r){var n=t.root?r:a+r,o=t.handler||t;!function(e,t,r,n){var o=e._actions[t]||(e._actions[t]=[]);o.push((function(t){var o,i=r.call(e,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:e.getters,rootState:e.state},t);return(o=i)&&"function"==typeof o.then||(i=Promise.resolve(i)),e._devtoolHook?i.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):i}))}(e,n,o,u)})),n.forEachGetter((function(t,r){!function(e,t,r,n){if(e._wrappedGetters[t])return void 0;e._wrappedGetters[t]=function(e){return r(n.state,n.getters,e.state,e.getters)}}(e,a+r,t,u)})),n.forEachChild((function(n,i){O(e,t,r.concat(i),n,o)}))}function S(e,t){if(!e._makeLocalGettersCache[t]){var r={},n=t.length;Object.keys(e.getters).forEach((function(o){if(o.slice(0,n)===t){var i=o.slice(n);Object.defineProperty(r,i,{get:function(){return e.getters[o]},enumerable:!0})}})),e._makeLocalGettersCache[t]=r}return e._makeLocalGettersCache[t]}function j(e,t){return t.reduce((function(e,t){return e[t]}),e)}function _(e,t,r){return m(e)&&e.type&&(r=t,t=e,e=e.type),{type:e,payload:t,options:r}}var E="vuex:mutations",P="vuex:actions",A="vuex",k=0;function R(e,t){y({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:["vuex bindings"]},(function(r){r.addTimelineLayer({id:E,label:"Vuex Mutations",color:N}),r.addTimelineLayer({id:P,label:"Vuex Actions",color:N}),r.addInspector({id:A,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),r.on.getInspectorTree((function(r){if(r.app===e&&r.inspectorId===A)if(r.filter){var n=[];I(n,t._modules.root,r.filter,""),r.rootNodes=n}else r.rootNodes=[L(t._modules.root,"")]})),r.on.getInspectorState((function(r){if(r.app===e&&r.inspectorId===A){var n=r.nodeId;S(t,n),r.state=function(e,t,r){t="root"===r?t:t[r];var n=Object.keys(t),o={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(n.length){var i=function(e){var t={};return Object.keys(e).forEach((function(r){var n=r.split("/");if(n.length>1){var o=t,i=n.pop();n.forEach((function(e){o[e]||(o[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),o=o[e]._custom.value})),o[i]=M((function(){return e[r]}))}else t[r]=M((function(){return e[r]}))})),t}(t);o.getters=Object.keys(i).map((function(e){return{key:e.endsWith("/")?C(e):e,editable:!1,value:M((function(){return i[e]}))}}))}return o}((o=t._modules,(a=(i=n).split("/").filter((function(e){return e}))).reduce((function(e,t,r){var n=e[t];if(!n)throw new Error('Missing module "'+t+'" for path "'+i+'".');return r===a.length-1?n:n._children}),"root"===i?o:o.root._children)),"root"===n?t.getters:t._makeLocalGettersCache,n)}var o,i,a})),r.on.editInspectorState((function(r){if(r.app===e&&r.inspectorId===A){var n=r.nodeId,o=r.path;"root"!==n&&(o=n.split("/").filter(Boolean).concat(o)),t._withCommit((function(){r.set(t._state.data,o,r.state.value)}))}})),t.subscribe((function(e,t){var n={};e.payload&&(n.payload=e.payload),n.state=t,r.notifyComponentUpdate(),r.sendInspectorTree(A),r.sendInspectorState(A),r.addTimelineEvent({layerId:E,event:{time:Date.now(),title:e.type,data:n}})})),t.subscribeAction({before:function(e,t){var n={};e.payload&&(n.payload=e.payload),e._id=k++,e._time=Date.now(),n.state=t,r.addTimelineEvent({layerId:P,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:n}})},after:function(e,t){var n={},o=Date.now()-e._time;n.duration={_custom:{type:"duration",display:o+"ms",tooltip:"Action duration",value:o}},e.payload&&(n.payload=e.payload),n.state=t,r.addTimelineEvent({layerId:P,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:n}})}})}))}var N=8702998,T={label:"namespaced",textColor:16777215,backgroundColor:6710886};function C(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function L(e,t){return{id:t||"root",label:C(t),tags:e.namespaced?[T]:[],children:Object.keys(e._children).map((function(r){return L(e._children[r],t+r+"/")}))}}function I(e,t,r,n){n.includes(r)&&e.push({id:n||"root",label:n.endsWith("/")?n.slice(0,n.length-1):n||"Root",tags:t.namespaced?[T]:[]}),Object.keys(t._children).forEach((function(o){I(e,t._children[o],r,n+o+"/")}))}function M(e){try{return e()}catch(e){return e}}var F=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var r=e.state;this.state=("function"==typeof r?r():r)||{}},$={namespaced:{configurable:!0}};$.namespaced.get=function(){return!!this._rawModule.namespaced},F.prototype.addChild=function(e,t){this._children[e]=t},F.prototype.removeChild=function(e){delete this._children[e]},F.prototype.getChild=function(e){return this._children[e]},F.prototype.hasChild=function(e){return e in this._children},F.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},F.prototype.forEachChild=function(e){g(this._children,e)},F.prototype.forEachGetter=function(e){this._rawModule.getters&&g(this._rawModule.getters,e)},F.prototype.forEachAction=function(e){this._rawModule.actions&&g(this._rawModule.actions,e)},F.prototype.forEachMutation=function(e){this._rawModule.mutations&&g(this._rawModule.mutations,e)},Object.defineProperties(F.prototype,$);var D=function(e){this.register([],e,!1)};function B(e,t,r){if(t.update(r),r.modules)for(var n in r.modules){if(!t.getChild(n))return void 0;B(e.concat(n),t.getChild(n),r.modules[n])}}D.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},D.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,r){return e+((t=t.getChild(r)).namespaced?r+"/":"")}),"")},D.prototype.update=function(e){B([],this.root,e)},D.prototype.register=function(e,t,r){var n=this;void 0===r&&(r=!0);var o=new F(t,r);0===e.length?this.root=o:this.get(e.slice(0,-1)).addChild(e[e.length-1],o);t.modules&&g(t.modules,(function(t,o){n.register(e.concat(o),t,r)}))},D.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),r=e[e.length-1],n=t.getChild(r);n&&n.runtime&&t.removeChild(r)},D.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),r=e[e.length-1];return!!t&&t.hasChild(r)};var U=function(e){var t=this;void 0===e&&(e={});var r=e.plugins;void 0===r&&(r=[]);var n=e.strict;void 0===n&&(n=!1);var o=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new D(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=o;var i=this,a=this.dispatch,s=this.commit;this.dispatch=function(e,t){return a.call(i,e,t)},this.commit=function(e,t,r){return s.call(i,e,t,r)},this.strict=n;var c=this._modules.root.state;O(this,c,[],this._modules.root),x(this,c),r.forEach((function(e){return e(t)}))},V={state:{configurable:!0}};U.prototype.install=function(e,t){e.provide(t||v,this),e.config.globalProperties.$store=this,void 0!==this._devtools&&this._devtools&&R(e,this)},V.state.get=function(){return this._state.data},V.state.set=function(e){0},U.prototype.commit=function(e,t,r){var n=this,o=_(e,t,r),i=o.type,a=o.payload,s=(o.options,{type:i,payload:a}),c=this._mutations[i];c&&(this._withCommit((function(){c.forEach((function(e){e(a)}))})),this._subscribers.slice().forEach((function(e){return e(s,n.state)})))},U.prototype.dispatch=function(e,t){var r=this,n=_(e,t),o=n.type,i=n.payload,a={type:o,payload:i},s=this._actions[o];if(s){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(a,r.state)}))}catch(e){0}var c=s.length>1?Promise.all(s.map((function(e){return e(i)}))):s[0](i);return new Promise((function(e,t){c.then((function(t){try{r._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(a,r.state)}))}catch(e){0}e(t)}),(function(e){try{r._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(a,r.state,e)}))}catch(e){0}t(e)}))}))}},U.prototype.subscribe=function(e,t){return b(e,this._subscribers,t)},U.prototype.subscribeAction=function(e,t){return b("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},U.prototype.watch=function(e,t,r){var o=this;return(0,n.watch)((function(){return e(o.state,o.getters)}),t,Object.assign({},r))},U.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},U.prototype.registerModule=function(e,t,r){void 0===r&&(r={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),O(this,this.state,e,this._modules.get(e),r.preserveState),x(this,this.state)},U.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){delete j(t.state,e.slice(0,-1))[e[e.length-1]]})),w(this)},U.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},U.prototype.hotUpdate=function(e){this._modules.update(e),w(this,!0)},U.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(U.prototype,V);H((function(e,t){var r={};return W(t).forEach((function(t){var n=t.key,o=t.val;r[n]=function(){var t=this.$store.state,r=this.$store.getters;if(e){var n=J(this.$store,"mapState",e);if(!n)return;t=n.context.state,r=n.context.getters}return"function"==typeof o?o.call(this,t,r):t[o]},r[n].vuex=!0})),r}));var z=H((function(e,t){var r={};return W(t).forEach((function(t){var n=t.key,o=t.val;r[n]=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];var n=this.$store.commit;if(e){var i=J(this.$store,"mapMutations",e);if(!i)return;n=i.context.commit}return"function"==typeof o?o.apply(this,[n].concat(t)):n.apply(this.$store,[o].concat(t))}})),r})),G=H((function(e,t){var r={};return W(t).forEach((function(t){var n=t.key,o=t.val;o=e+o,r[n]=function(){if(!e||J(this.$store,"mapGetters",e))return this.$store.getters[o]},r[n].vuex=!0})),r})),q=H((function(e,t){var r={};return W(t).forEach((function(t){var n=t.key,o=t.val;r[n]=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];var n=this.$store.dispatch;if(e){var i=J(this.$store,"mapActions",e);if(!i)return;n=i.context.dispatch}return"function"==typeof o?o.apply(this,[n].concat(t)):n.apply(this.$store,[o].concat(t))}})),r}));function W(e){return function(e){return Array.isArray(e)||m(e)}(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function H(e){return function(t,r){return"string"!=typeof t?(r=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,r)}}function J(e,t,r){return e._modulesNamespaceMap[r]}var Q=r(6649),K=r(5543),X=r.n(K);function Y(e){return Boolean(!X()(e)&&""!==e)}function Z(e){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(e)}function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function te(e){for(var t=1;t1?window.history.back():!this.navigateBackUsingHistory&&Y(e)?Nova.visit(e,{replace:!0}):Nova.visit("/")}}),te({},G(["canLeaveForm","canLeaveFormToPreviousPage"]));function ne(e){return ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ne(e)}function oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ie(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Se(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}q(["syncQueryString","updateQueryString"]),G(["queryStringParams"]);var je=r(9964),_e=r.n(je);var Ee=r(7267),Pe=r.n(Ee);function Ae(e,t){var r=Nova.config("translations")[e]?Nova.config("translations")[e]:e;return Pe()(t,(function(e,t){if(t=new String(t),null!==e){e=new String(e);for(var n=[":"+t,":"+t.toUpperCase(),":"+t.charAt(0).toUpperCase()+t.slice(1)],o=[e,e.toUpperCase(),e.charAt(0).toUpperCase()+e.slice(1)],i=n.length-1;i>=0;i--)r=r.replace(n[i],o[i])}else console.error("Translation '".concat(r,"' for key '").concat(t,"' contains a null replacement."))})),r}s(["resourceName"]),s(["resourceName","viaRelationship"]),le()((function(e){return e()}),500);Boolean;r(3418);var ke=r(1423),Re=r.n(ke);r(9200),r(2442);function Ne(e){return Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ne(e)}function Te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ce(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Ue(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}var Ve={__:function(e,t){return Ae(e,t)}}.__;function ze(e,t,r){var o=(0,n.reactive)({working:!1,errors:new we.D1,actionModalVisible:!1,responseModalVisible:!1,selectedActionKey:"",endpoint:e.endpoint||"/nova-api/".concat(e.resourceName,"/action"),actionResponseData:null}),i=(0,n.computed)((function(){return e.selectedResources})),a=(0,n.computed)((function(){if(o.selectedActionKey)return _e()(s.value,(function(e){return e.uriKey===o.selectedActionKey}))})),s=(0,n.computed)((function(){var t;return e.actions.concat((null===(t=e.pivotActions)||void 0===t?void 0:t.actions)||[])})),c=(0,n.computed)((function(){return r.getters["".concat(e.resourceName,"/currentEncodedFilters")]})),u=(0,n.computed)((function(){return e.viaRelationship?e.viaRelationship+"_search":e.resourceName+"_search"})),l=(0,n.computed)((function(){return r.getters.queryStringParams[u.value]||""})),f=(0,n.computed)((function(){return e.viaRelationship?e.viaRelationship+"_trashed":e.resourceName+"_trashed"})),p=(0,n.computed)((function(){return r.getters.queryStringParams[f.value]||""})),d=(0,n.computed)((function(){return ce()(e.actions,(function(e){return i.value.length>0&&!e.standalone}))})),h=(0,n.computed)((function(){return e.pivotActions?ce()(e.pivotActions.actions,(function(e){return 0!==i.value.length||e.standalone})):[]})),y=(0,n.computed)((function(){return h.value.length>0})),v=(0,n.computed)((function(){return y.value&&Boolean(_e()(e.pivotActions.actions,(function(e){return e===a.value})))})),g=(0,n.computed)((function(){return{action:o.selectedActionKey,pivotAction:v.value,search:l.value,filters:c.value,trashed:p.value,viaResource:e.viaResource,viaResourceId:e.viaResourceId,viaRelationship:e.viaRelationship}})),m=(0,n.computed)((function(){return Me()(new FormData,(function(e){e.append("resources",i.value),Re()(a.value.fields,(function(t){t.fill(e)}))}))}));function b(){a.value.withoutConfirmation?_():w()}function w(){o.actionModalVisible=!0}function x(){o.actionModalVisible=!1}function O(){o.responseModalVisible=!0}function S(e){t("actionExecuted"),Nova.$emit("action-executed"),"function"==typeof e&&e()}function j(e){if(e.danger)return Nova.error(e.danger);Nova.success(e.message||Ve("The action was executed successfully."))}function _(e){var t;o.working=!0,Nova.$progress.start();var r=null!==(t=a.value.responseType)&&void 0!==t?t:"json";Nova.request({method:"post",url:o.endpoint,params:g.value,data:m.value,responseType:r}).then(function(){var t,r=(t=Be().mark((function t(r){return Be().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:x(),E(r.data,r.headers,e);case 2:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(e){Ue(i,n,o,a,s,"next",e)}function s(e){Ue(i,n,o,a,s,"throw",e)}a(void 0)}))});return function(e){return r.apply(this,arguments)}}()).catch((function(e){e.response&&422===e.response.status&&("blob"===r?e.response.data.text().then((function(e){o.errors=new we.D1(JSON.parse(e).errors)})):o.errors=new we.D1(e.response.data.errors),Nova.error(Ve("There was a problem executing the action.")))})).finally((function(){o.working=!1,Nova.$progress.done()}))}function E(e,t,r){var n=t["content-disposition"];if(!(e instanceof Blob&&X()(n)&&"application/json"===e.type))return e instanceof Blob?S((function(){var t="unknown",r=window.URL.createObjectURL(new Blob([e])),o=document.createElement("a");if(o.href=r,n){var i=n.split(";")[1].match(/filename=(.+)/);2===i.length&&(t=$e()(i[1],'"'))}o.setAttribute("download",t),document.body.appendChild(o),o.click(),o.remove(),window.URL.revokeObjectURL(r)})):e.modal?(o.actionResponseData=e,j(e),O()):e.download?S((function(){j(e);var t=document.createElement("a");t.href=e.download,t.download=e.name,document.body.appendChild(t),t.click(),document.body.removeChild(t)})):e.deleted?S((function(){return j(e)})):(e.redirect&&(window.location=e.redirect),e.visit?(j(e),Nova.visit({url:Nova.url(e.visit.path,e.visit.options),remote:!1})):e.openInNewTab?S((function(){return window.open(e.openInNewTab,"_blank")})):void S((function(){return j(e)})));e.text().then((function(e){E(JSON.parse(e),t)}))}return{errors:(0,n.computed)((function(){return o.errors})),working:(0,n.computed)((function(){return o.working})),actionModalVisible:(0,n.computed)((function(){return o.actionModalVisible})),responseModalVisible:(0,n.computed)((function(){return o.responseModalVisible})),selectedActionKey:(0,n.computed)((function(){return o.selectedActionKey})),determineActionStrategy:b,setSelectedActionKey:function(e){o.selectedActionKey=e},openConfirmationModal:w,closeConfirmationModal:x,openResponseModal:O,closeResponseModal:function(){o.responseModalVisible=!1},handleActionClick:function(e){o.selectedActionKey=e,b()},selectedAction:a,allActions:s,availableActions:d,availablePivotActions:h,executeAction:_,actionResponseData:(0,n.computed)((function(){return o.actionResponseData}))}}var Ge=["innerHTML"];const qe={emits:["click"],props:["actions","standalone"]};const We=(0,r(3744).Z)(qe,[["render",function(e,t,r,o,i,a){var s=(0,n.resolveComponent)("Icon"),c=(0,n.resolveComponent)("Dropdown"),u=(0,n.resolveDirective)("tooltip");return r.actions.length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:0,class:(0,n.normalizeClass)([{rounded:r.standalone,"rounded-lg bg-gray-100 dark:bg-gray-700":!r.standalone},"flex ml-1 dark:focus:ring-gray-600 justify-evenly"])},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(r.actions,(function(t){return(0,n.openBlock)(),(0,n.createElementBlock)("div",null,[(0,n.withDirectives)(((0,n.openBlock)(),(0,n.createBlock)(c,{"handle-internal-clicks":!1,class:(0,n.normalizeClass)([{"rounded hover:bg-gray-200 dark:hover:bg-gray-800":r.standalone,"rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700":!r.standalone,"hover:text-red-500":t.destructive,"hover:text-primary-500":!t.destructive},"flex h-9"]),"trigger-override-function":function(){return e.$emit("click",t.uriKey)}},{default:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)({"px-3 h-9 flex justify-center items-center":r.standalone,"px-2":!r.standalone})},["string"!=typeof t.icon?((0,n.openBlock)(),(0,n.createBlock)(s,{key:0,type:"cube-transparent"})):t.icon.trim().startsWith("e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{},3744:(e,t)=>{"use strict";t.Z=(e,t)=>{const r=e.__vccOpts||e;for(const[e,n]of t)r[e]=n;return r}},6649:(e,t,r)=>{function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var o=n(r(3950)),i=r(8009),a=n(r(6533));function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&"back_forward"===window.performance.getEntriesByType("navigation")[0].type},r.handleBackForwardVisit=function(e){var t=this;window.history.state.version=e.version,this.setPage(window.history.state,{preserveScroll:!0,preserveState:!0}).then((function(){t.restoreScrollPositions(),b(e)}))},r.locationVisit=function(e,t){try{window.sessionStorage.setItem("inertiaLocationVisit",JSON.stringify({preserveScroll:t})),window.location.href=e.href,v(window.location).href===v(e).href&&window.location.reload()}catch(e){return!1}},r.isLocationVisit=function(){try{return null!==window.sessionStorage.getItem("inertiaLocationVisit")}catch(e){return!1}},r.handleLocationVisit=function(e){var t,r,n,o,i=this,a=JSON.parse(window.sessionStorage.getItem("inertiaLocationVisit")||"");window.sessionStorage.removeItem("inertiaLocationVisit"),e.url+=window.location.hash,e.rememberedState=null!=(t=null==(r=window.history.state)?void 0:r.rememberedState)?t:{},e.scrollRegions=null!=(n=null==(o=window.history.state)?void 0:o.scrollRegions)?n:[],this.setPage(e,{preserveScroll:a.preserveScroll,preserveState:!0}).then((function(){a.preserveScroll&&i.restoreScrollPositions(),b(e)}))},r.isLocationVisitResponse=function(e){return e&&409===e.status&&e.headers["x-inertia-location"]},r.isInertiaResponse=function(e){return null==e?void 0:e.headers["x-inertia"]},r.createVisitId=function(){return this.visitId={},this.visitId},r.cancelVisit=function(e,t){var r=t.cancelled,n=void 0!==r&&r,o=t.interrupted,i=void 0!==o&&o;!e||e.completed||e.cancelled||e.interrupted||(e.cancelToken.cancel(),e.onCancel(),e.completed=!1,e.cancelled=n,e.interrupted=i,m(e),e.onFinish(e))},r.finishVisit=function(e){e.cancelled||e.interrupted||(e.completed=!0,e.cancelled=!1,e.interrupted=!1,m(e),e.onFinish(e))},r.resolvePreserveOption=function(e,t){return"function"==typeof e?e(t):"errors"===e?Object.keys(t.props.errors||{}).length>0:e},r.visit=function(e,r){var n=this,i=void 0===r?{}:r,a=i.method,c=void 0===a?t.n$.GET:a,l=i.data,p=void 0===l?{}:l,d=i.replace,m=void 0!==d&&d,b=i.preserveScroll,w=void 0!==b&&b,x=i.preserveState,O=void 0!==x&&x,S=i.only,j=void 0===S?[]:S,_=i.headers,E=void 0===_?{}:_,P=i.errorBag,A=void 0===P?"":P,k=i.forceFormData,R=void 0!==k&&k,N=i.onCancelToken,T=void 0===N?function(){}:N,C=i.onBefore,L=void 0===C?function(){}:C,I=i.onStart,M=void 0===I?function(){}:I,F=i.onProgress,$=void 0===F?function(){}:F,D=i.onFinish,B=void 0===D?function(){}:D,U=i.onCancel,V=void 0===U?function(){}:U,z=i.onSuccess,G=void 0===z?function(){}:z,q=i.onError,W=void 0===q?function(){}:q,H=i.queryStringArrayFormat,J=void 0===H?"brackets":H,Q="string"==typeof e?h(e):e;if(!function e(t){return t instanceof File||t instanceof Blob||t instanceof FileList&&t.length>0||t instanceof FormData&&Array.from(t.values()).some((function(t){return e(t)}))||"object"==typeof t&&null!==t&&Object.values(t).some((function(t){return e(t)}))}(p)&&!R||p instanceof FormData||(p=f(p)),!(p instanceof FormData)){var K=y(c,Q,p,J),X=K[1];Q=h(K[0]),p=X}var Y={url:Q,method:c,data:p,replace:m,preserveScroll:w,preserveState:O,only:j,headers:E,errorBag:A,forceFormData:R,queryStringArrayFormat:J,cancelled:!1,completed:!1,interrupted:!1};if(!1!==L(Y)&&function(e){return g("before",{cancelable:!0,detail:{visit:e}})}(Y)){this.activeVisit&&this.cancelVisit(this.activeVisit,{interrupted:!0}),this.saveScrollPositions();var Z=this.createVisitId();this.activeVisit=s({},Y,{onCancelToken:T,onBefore:L,onStart:M,onProgress:$,onFinish:B,onCancel:V,onSuccess:G,onError:W,queryStringArrayFormat:J,cancelToken:o.CancelToken.source()}),T({cancel:function(){n.activeVisit&&n.cancelVisit(n.activeVisit,{cancelled:!0})}}),function(e){g("start",{detail:{visit:e}})}(Y),M(Y),o({method:c,url:v(Q).href,data:c===t.n$.GET?{}:p,params:c===t.n$.GET?p:{},cancelToken:this.activeVisit.cancelToken.token,headers:s({},E,{Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0},j.length?{"X-Inertia-Partial-Component":this.page.component,"X-Inertia-Partial-Data":j.join(",")}:{},A&&A.length?{"X-Inertia-Error-Bag":A}:{},this.page.version?{"X-Inertia-Version":this.page.version}:{}),onUploadProgress:function(e){p instanceof FormData&&(e.percentage=Math.round(e.loaded/e.total*100),function(e){g("progress",{detail:{progress:e}})}(e),$(e))}}).then((function(e){var t;if(!n.isInertiaResponse(e))return Promise.reject({response:e});var r=e.data;j.length&&r.component===n.page.component&&(r.props=s({},n.page.props,r.props)),w=n.resolvePreserveOption(w,r),(O=n.resolvePreserveOption(O,r))&&null!=(t=window.history.state)&&t.rememberedState&&r.component===n.page.component&&(r.rememberedState=window.history.state.rememberedState);var o=Q,i=h(r.url);return o.hash&&!i.hash&&v(o).href===i.href&&(i.hash=o.hash,r.url=i.href),n.setPage(r,{visitId:Z,replace:m,preserveScroll:w,preserveState:O})})).then((function(){var e=n.page.props.errors||{};if(Object.keys(e).length>0){var t=A?e[A]?e[A]:{}:e;return function(e){g("error",{detail:{errors:e}})}(t),W(t)}return g("success",{detail:{page:n.page}}),G(n.page)})).catch((function(e){if(n.isInertiaResponse(e.response))return n.setPage(e.response.data,{visitId:Z});if(n.isLocationVisitResponse(e.response)){var t=h(e.response.headers["x-inertia-location"]),r=Q;r.hash&&!t.hash&&v(r).href===t.href&&(t.hash=r.hash),n.locationVisit(t,!0===w)}else{if(!e.response)return Promise.reject(e);g("invalid",{cancelable:!0,detail:{response:e.response}})&&u.show(e.response.data)}})).then((function(){n.activeVisit&&n.finishVisit(n.activeVisit)})).catch((function(e){if(!o.isCancel(e)){var t=g("exception",{cancelable:!0,detail:{exception:e}});if(n.activeVisit&&n.finishVisit(n.activeVisit),t)return Promise.reject(e)}}))}},r.setPage=function(e,t){var r=this,n=void 0===t?{}:t,o=n.visitId,i=void 0===o?this.createVisitId():o,a=n.replace,s=void 0!==a&&a,c=n.preserveScroll,u=void 0!==c&&c,l=n.preserveState,f=void 0!==l&&l;return Promise.resolve(this.resolveComponent(e.component)).then((function(t){i===r.visitId&&(e.scrollRegions=e.scrollRegions||[],e.rememberedState=e.rememberedState||{},(s=s||h(e.url).href===window.location.href)?r.replaceState(e):r.pushState(e),r.swapComponent({component:t,page:e,preserveState:f}).then((function(){u||r.resetScrollPositions(),s||b(e)})))}))},r.pushState=function(e){this.page=e,window.history.pushState(e,"",e.url)},r.replaceState=function(e){this.page=e,window.history.replaceState(e,"",e.url)},r.handlePopstateEvent=function(e){var t=this;if(null!==e.state){var r=e.state,n=this.createVisitId();Promise.resolve(this.resolveComponent(r.component)).then((function(e){n===t.visitId&&(t.page=r,t.swapComponent({component:e,page:r,preserveState:!1}).then((function(){t.restoreScrollPositions(),b(r)})))}))}else{var o=h(this.page.url);o.hash=window.location.hash,this.replaceState(s({},this.page,{url:o.href})),this.resetScrollPositions()}},r.get=function(e,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),this.visit(e,s({},n,{method:t.n$.GET,data:r}))},r.reload=function(e){return void 0===e&&(e={}),this.visit(window.location.href,s({},e,{preserveScroll:!0,preserveState:!0}))},r.replace=function(e,t){var r;return void 0===t&&(t={}),console.warn("Inertia.replace() has been deprecated and will be removed in a future release. Please use Inertia."+(null!=(r=t.method)?r:"get")+"() instead."),this.visit(e,s({preserveState:!0},t,{replace:!0}))},r.post=function(e,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),this.visit(e,s({preserveState:!0},n,{method:t.n$.POST,data:r}))},r.put=function(e,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),this.visit(e,s({preserveState:!0},n,{method:t.n$.PUT,data:r}))},r.patch=function(e,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),this.visit(e,s({preserveState:!0},n,{method:t.n$.PATCH,data:r}))},r.delete=function(e,r){return void 0===r&&(r={}),this.visit(e,s({preserveState:!0},r,{method:t.n$.DELETE}))},r.remember=function(e,t){var r,n;void 0===t&&(t="default"),w||this.replaceState(s({},this.page,{rememberedState:s({},null==(r=this.page)?void 0:r.rememberedState,(n={},n[t]=e,n))}))},r.restore=function(e){var t,r;if(void 0===e&&(e="default"),!w)return null==(t=window.history.state)||null==(r=t.rememberedState)?void 0:r[e]},r.on=function(e,t){var r=function(e){var r=t(e);e.cancelable&&!e.defaultPrevented&&!1===r&&e.preventDefault()};return document.addEventListener("inertia:"+e,r),function(){return document.removeEventListener("inertia:"+e,r)}},e}(),O={buildDOMElement:function(e){var t=document.createElement("template");t.innerHTML=e;var r=t.content.firstChild;if(!e.startsWith(" + +