@stonecrop/desktop 0.2.37 โ 0.2.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/desktop.js +851 -855
- package/dist/desktop.js.map +1 -1
- package/dist/desktop.umd.cjs +19 -19
- package/dist/desktop.umd.cjs.map +1 -1
- package/package.json +5 -5
package/dist/desktop.umd.cjs
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
(function(z,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],a):(z=typeof globalThis<"u"?globalThis:z||self,a(z["@stonecrop/desktop"]={},z.Vue))})(this,function(z,a){"use strict";const Fo={class:"action-menu-icon"},Ho=["onclick"],zo={key:1},qo=["onClick"],Go={class:"dropdown-container"},Jo={class:"dropdown"},Ko=["onclick"],Yo=["href"],Qo={class:"dropdown-item"},Xo=a.defineComponent({__name:"ActionSet",props:{elements:{}},setup(e){const t=a.ref(e.elements),n=a.ref(!1),o=a.ref(null),r=a.ref(!1),s=a.ref(!1);a.onMounted(()=>{i()});const i=()=>{for(const l of t.value)l.elementType==="dropdown"&&(l.show=!1)},c=()=>{r.value=!0,o.value=setTimeout(()=>{r.value&&(n.value=!0)},500)},
|
|
1
|
+
(function(z,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],a):(z=typeof globalThis<"u"?globalThis:z||self,a(z["@stonecrop/desktop"]={},z.Vue))})(this,function(z,a){"use strict";const Fo={class:"action-menu-icon"},Ho=["onclick"],zo={key:1},qo=["onClick"],Go={class:"dropdown-container"},Jo={class:"dropdown"},Ko=["onclick"],Yo=["href"],Qo={class:"dropdown-item"},Xo=a.defineComponent({__name:"ActionSet",props:{elements:{}},setup(e){const t=a.ref(e.elements),n=a.ref(!1),o=a.ref(null),r=a.ref(!1),s=a.ref(!1);a.onMounted(()=>{i()});const i=()=>{for(const l of t.value)l.elementType==="dropdown"&&(l.show=!1)},c=()=>{r.value=!0,o.value=setTimeout(()=>{r.value&&(n.value=!0)},500)},u=()=>{r.value=!1,s.value=!1,clearTimeout(o.value),n.value=!1},d=l=>{const p=!t.value[l].show;i(),t.value[l].show=p};return(l,p)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([{"open-set":n.value,"hovered-and-closed":s.value},"action-set collapse"]),onMouseover:c,onMouseleave:u},[a.createElementVNode("div",Fo,[a.createElementVNode("div",{id:"chevron",onClick:p[0]||(p[0]=f=>s.value=!s.value)},p[1]||(p[1]=[a.createElementVNode("svg",{class:"leftBar",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","xml:space":"preserve",width:"50",height:"50"},[a.createElementVNode("polygon",{points:"54.2,33.4 29.2,58.8 25,54.6 50,29.2 "})],-1),a.createElementVNode("svg",{class:"rightBar",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","xml:space":"preserve",width:"50",height:"50"},[a.createElementVNode("polygon",{points:"70.8,58.8 45.8,33.4 50,29.2 75,54.6 "})],-1)]))]),p[2]||(p[2]=a.createElementVNode("div",{style:{"margin-right":"30px"}},null,-1)),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.value,(f,h)=>(a.openBlock(),a.createElementBlock("div",{class:"action-element",key:f.label},[f.elementType=="button"?(a.openBlock(),a.createElementBlock("button",{key:0,onclick:f.action,class:"button-default"},a.toDisplayString(f.label),9,Ho)):a.createCommentVNode("",!0),f.elementType=="dropdown"?(a.openBlock(),a.createElementBlock("div",zo,[a.createElementVNode("button",{class:"button-default",onClick:g=>d(h)},a.toDisplayString(f.label),9,qo),a.withDirectives(a.createElementVNode("div",Go,[a.createElementVNode("div",Jo,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(f.actions,g=>(a.openBlock(),a.createElementBlock("div",{key:g.label},[g.action!=null?(a.openBlock(),a.createElementBlock("button",{key:0,onclick:g.action,class:"dropdown-item"},a.toDisplayString(g.label),9,Ko)):g.link!=null?(a.openBlock(),a.createElementBlock("a",{key:1,href:g.link},[a.createElementVNode("button",Qo,a.toDisplayString(g.label),1)],8,Yo)):a.createCommentVNode("",!0)]))),128))])],512),[[a.vShow,f.show]])])):a.createCommentVNode("",!0)]))),128))],34))}}),nt=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},qt=nt(Xo,[["__scopeId","data-v-4fb5c934"]]),Zo={};function er(e,t){return a.openBlock(),a.createElementBlock("dialog")}const Gt=nt(Zo,[["render",er]]),tr=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const nr={class:"aform"},or=a.defineComponent({__name:"AForm",props:{modelValue:{},data:{},readonly:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,o=a.ref(e.data||{}),r=i=>{let c={};for(const[u,d]of Object.entries(i))["component","fieldtype"].includes(u)||(c[u]=d),u==="rows"&&d&&d.length===0&&(c.rows=o.value[i.fieldname]);return c},s=a.computed({get:()=>e.modelValue.map((i,c)=>a.computed({get(){return i.value},set:u=>{e.modelValue[c].value=u,n("update:modelValue",e.modelValue)}})),set:()=>{}});return(i,c)=>(a.openBlock(),a.createElementBlock("form",nr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.modelValue,(u,d)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(u.component),a.mergeProps({key:d,schema:u,modelValue:s.value[d].value,"onUpdate:modelValue":l=>s.value[d].value=l,data:o.value[u.fieldname],readonly:i.readonly,ref_for:!0},r(u)),null,16,["schema","modelValue","onUpdate:modelValue","data","readonly"]))),128))]))}}),rr=tr(or,[["__scopeId","data-v-15ed36be"]]);typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;var ar=Object.defineProperty,sr=(e,t,n)=>t in e?ar(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,q=(e,t,n)=>sr(e,typeof t!="symbol"?t+"":t,n);function ot(e){this.message=e||""}ot.prototype=Object.create(Error.prototype,{constructor:{value:ot},name:{value:"NotImplemented"},stack:{get:function(){return new Error().stack}}});const Jt=class et{constructor(t,n,o,r,s){if(q(this,"name","Stonecrop"),q(this,"registry"),q(this,"schema"),q(this,"workflow"),q(this,"actions"),q(this,"store"),et._root)return et._root;et._root=this,this.registry=t,this.store=n,this.schema=o,this.workflow=r,this.actions=s}setup(t){this.getMeta(t),this.getWorkflow(t),this.getActions(t)}getMeta(t){return this.registry.getMeta?this.registry.getMeta(t.doctype):new ot(t.doctype)}getWorkflow(t){const n=this.registry.registry[t.slug];this.workflow=n.workflow}getActions(t){const n=this.registry.registry[t.slug];this.actions=n.actions}async getRecords(t,n){this.store.$patch({records:[]});const o=await(await fetch(`/${t.slug}`,n)).json();this.store.$patch({records:o})}async getRecord(t,n){this.store.$patch({record:{}});const o=await(await fetch(`/${t.slug}/${n}`)).json();this.store.$patch({record:o})}runAction(t,n,o){const r=this.registry.registry[t.slug].actions.get(n),{initialState:s}=this.workflow;this.workflow.transition(s,{type:n}),r.length>0&&r.forEach(i=>{new Function(i)(o)})}};q(Jt,"_root");let ir=Jt;var Kt=!1;function Be(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function rt(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function cr(){return Yt().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Yt(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const lr=typeof Proxy=="function",ur="devtools-plugin:setup",dr="plugin:settings:set";let _e,at;function pr(){var e;return _e!==void 0||(typeof window<"u"&&window.performance?(_e=!0,at=window.performance):typeof globalThis<"u"&&!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance?(_e=!0,at=globalThis.perf_hooks.performance):_e=!1),_e}function fr(){return pr()?at.now():Date.now()}class hr{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const o={};if(t.settings)for(const i in t.settings){const c=t.settings[i];o[i]=c.defaultValue}const r=`__vue-devtools-plugin-settings__${t.id}`;let s=Object.assign({},o);try{const i=localStorage.getItem(r),c=JSON.parse(i);Object.assign(s,c)}catch{}this.fallbacks={getSettings(){return s},setSettings(i){try{localStorage.setItem(r,JSON.stringify(i))}catch{}s=i},now(){return fr()}},n&&n.on(dr,(i,c)=>{i===this.plugin.id&&this.fallbacks.setSettings(c)}),this.proxiedOn=new Proxy({},{get:(i,c)=>this.target?this.target.on[c]:(...u)=>{this.onQueue.push({method:c,args:u})}}),this.proxiedTarget=new Proxy({},{get:(i,c)=>this.target?this.target[c]:c==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(c)?(...u)=>(this.targetQueue.push({method:c,args:u,resolve:()=>{}}),this.fallbacks[c](...u)):(...u)=>new Promise(d=>{this.targetQueue.push({method:c,args:u,resolve:d})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function st(e,t){const n=e,o=Yt(),r=cr(),s=lr&&n.enableEarlyProxy;if(r&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))r.emit(ur,e,t);else{const i=s?new hr(n,r):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}/*!
|
|
2
2
|
* pinia v2.2.2
|
|
3
3
|
* (c) 2024 Eduardo San Martin Morote
|
|
4
4
|
* @license MIT
|
|
5
|
-
*/let ke;const $e=e=>ke=e,Qt=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function ue(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Q;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Q||(Q={}));const de=typeof window<"u",Xt=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function mr(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function it(e,t,n){const o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){tn(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function Zt(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Le(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}const Me=typeof navigator=="object"?navigator:{userAgent:""},en=/Macintosh/.test(Me.userAgent)&&/AppleWebKit/.test(Me.userAgent)&&!/Safari/.test(Me.userAgent),tn=de?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!en?gr:"msSaveOrOpenBlob"in Me?yr:wr:()=>{};function gr(e,t="download",n){const o=document.createElement("a");o.download=t,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin!==location.origin?Zt(o.href)?it(e,t,n):(o.target="_blank",Le(o)):Le(o)):(o.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(o.href)},4e4),setTimeout(function(){Le(o)},0))}function yr(e,t="download",n){if(typeof e=="string")if(Zt(e))it(e,t,n);else{const o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){Le(o)})}else navigator.msSaveOrOpenBlob(mr(e,n),t)}function wr(e,t,n,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return it(e,t,n);const r=e.type==="application/octet-stream",s=/constructor/i.test(String(Xt.HTMLElement))||"safari"in Xt,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||r&&s||en)&&typeof FileReader<"u"){const c=new FileReader;c.onloadend=function(){let
|
|
5
|
+
*/let ke;const $e=e=>ke=e,Qt=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function ue(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Q;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Q||(Q={}));const de=typeof window<"u",Xt=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function mr(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function it(e,t,n){const o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){tn(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function Zt(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Le(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}const Me=typeof navigator=="object"?navigator:{userAgent:""},en=/Macintosh/.test(Me.userAgent)&&/AppleWebKit/.test(Me.userAgent)&&!/Safari/.test(Me.userAgent),tn=de?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!en?gr:"msSaveOrOpenBlob"in Me?yr:wr:()=>{};function gr(e,t="download",n){const o=document.createElement("a");o.download=t,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin!==location.origin?Zt(o.href)?it(e,t,n):(o.target="_blank",Le(o)):Le(o)):(o.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(o.href)},4e4),setTimeout(function(){Le(o)},0))}function yr(e,t="download",n){if(typeof e=="string")if(Zt(e))it(e,t,n);else{const o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){Le(o)})}else navigator.msSaveOrOpenBlob(mr(e,n),t)}function wr(e,t,n,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return it(e,t,n);const r=e.type==="application/octet-stream",s=/constructor/i.test(String(Xt.HTMLElement))||"safari"in Xt,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||r&&s||en)&&typeof FileReader<"u"){const c=new FileReader;c.onloadend=function(){let u=c.result;if(typeof u!="string")throw o=null,new Error("Wrong reader.result type");u=i?u:u.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=u:location.assign(u),o=null},c.readAsDataURL(e)}else{const c=URL.createObjectURL(e);o?o.location.assign(c):location.href=c,o=null,setTimeout(function(){URL.revokeObjectURL(c)},4e4)}}function A(e,t){const n="๐ "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function ct(e){return"_a"in e&&"install"in e}function nn(){if(!("clipboard"in navigator))return A("Your browser doesn't support the Clipboard API","error"),!0}function on(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(A('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function br(e){if(!nn())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),A("Global state copied to clipboard.")}catch(t){if(on(t))return;A("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function vr(e){if(!nn())try{rn(e,JSON.parse(await navigator.clipboard.readText())),A("Global state pasted from clipboard.")}catch(t){if(on(t))return;A("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function Er(e){try{tn(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){A("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let ee;function _r(){ee||(ee=document.createElement("input"),ee.type="file",ee.accept=".json");function e(){return new Promise((t,n)=>{ee.onchange=async()=>{const o=ee.files;if(!o)return t(null);const r=o.item(0);return t(r?{text:await r.text(),file:r}:null)},ee.oncancel=()=>t(null),ee.onerror=n,ee.click()})}return e}async function kr(e){try{const t=await _r()();if(!t)return;const{text:n,file:o}=t;rn(e,JSON.parse(n)),A(`Global state imported from "${o.name}".`)}catch(t){A("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function rn(e,t){for(const n in t){const o=e.state.value[n];o?Object.assign(o,t[n]):e.state.value[n]=t[n]}}function J(e){return{_custom:{display:e}}}const an="๐ Pinia (root)",Ue="_root";function $r(e){return ct(e)?{id:Ue,label:an}:{id:e.$id,label:e.$id}}function Sr(e){if(ct(e)){const n=Array.from(e._s.keys()),o=e._s;return{state:n.map(r=>({editable:!0,key:r,value:e.state.value[r]})),getters:n.filter(r=>o.get(r)._getters).map(r=>{const s=o.get(r);return{editable:!1,key:r,value:s._getters.reduce((i,c)=>(i[c]=s[c],i),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function Nr(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:J(e.type),key:J(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function Or(e){switch(e){case Q.direct:return"mutation";case Q.patchFunction:return"$patch";case Q.patchObject:return"$patch";default:return"unknown"}}let me=!0;const We=[],pe="pinia:mutations",L="pinia",{assign:xr}=Object,Fe=e=>"๐ "+e;function Cr(e,t){st({id:"dev.esm.pinia",label:"Pinia ๐",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:We,app:e},n=>{typeof n.now!="function"&&A("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:pe,label:"Pinia ๐",color:15064968}),n.addInspector({id:L,label:"Pinia ๐",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{br(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await vr(t),n.sendInspectorTree(L),n.sendInspectorState(L)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{Er(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await kr(t),n.sendInspectorTree(L),n.sendInspectorState(L)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:o=>{const r=t._s.get(o);r?typeof r.$reset!="function"?A(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`,"warn"):(r.$reset(),A(`Store "${o}" reset.`)):A(`Cannot reset "${o}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent((o,r)=>{const s=o.componentInstance&&o.componentInstance.proxy;if(s&&s._pStores){const i=o.componentInstance.proxy._pStores;Object.values(i).forEach(c=>{o.instanceData.state.push({type:Fe(c.$id),key:"state",editable:!0,value:c._isOptionsAPI?{_custom:{value:a.toRaw(c.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>c.$reset()}]}}:Object.keys(c.$state).reduce((u,d)=>(u[d]=c.$state[d],u),{})}),c._getters&&c._getters.length&&o.instanceData.state.push({type:Fe(c.$id),key:"getters",editable:!1,value:c._getters.reduce((u,d)=>{try{u[d]=c[d]}catch(l){u[d]=l}return u},{})})})}}),n.on.getInspectorTree(o=>{if(o.app===e&&o.inspectorId===L){let r=[t];r=r.concat(Array.from(t._s.values())),o.rootNodes=(o.filter?r.filter(s=>"$id"in s?s.$id.toLowerCase().includes(o.filter.toLowerCase()):an.toLowerCase().includes(o.filter.toLowerCase())):r).map($r)}}),globalThis.$pinia=t,n.on.getInspectorState(o=>{if(o.app===e&&o.inspectorId===L){const r=o.nodeId===Ue?t:t._s.get(o.nodeId);if(!r)return;r&&(o.nodeId!==Ue&&(globalThis.$store=a.toRaw(r)),o.state=Sr(r))}}),n.on.editInspectorState((o,r)=>{if(o.app===e&&o.inspectorId===L){const s=o.nodeId===Ue?t:t._s.get(o.nodeId);if(!s)return A(`store "${o.nodeId}" not found`,"error");const{path:i}=o;ct(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),me=!1,o.set(s,i,o.state.value),me=!0}}),n.on.editComponentState(o=>{if(o.type.startsWith("๐")){const r=o.type.replace(/^๐\s*/,""),s=t._s.get(r);if(!s)return A(`store "${r}" not found`,"error");const{path:i}=o;if(i[0]!=="state")return A(`Invalid path for store "${r}":
|
|
6
6
|
${i}
|
|
7
|
-
Only state can be modified.`);i[0]="$state",me=!1,o.set(s,i,o.state.value),me=!0}})})}function Ir(e,t){We.includes(Fe(t.$id))||We.push(Fe(t.$id)),st({id:"dev.esm.pinia",label:"Pinia ๐",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:We,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const o=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:i,onError:c,name:
|
|
7
|
+
Only state can be modified.`);i[0]="$state",me=!1,o.set(s,i,o.state.value),me=!0}})})}function Ir(e,t){We.includes(Fe(t.$id))||We.push(Fe(t.$id)),st({id:"dev.esm.pinia",label:"Pinia ๐",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:We,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const o=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:i,onError:c,name:u,args:d})=>{const l=sn++;n.addTimelineEvent({layerId:pe,event:{time:o(),title:"๐ซ "+u,subtitle:"start",data:{store:J(t.$id),action:J(u),args:d},groupId:l}}),i(p=>{se=void 0,n.addTimelineEvent({layerId:pe,event:{time:o(),title:"๐ฌ "+u,subtitle:"end",data:{store:J(t.$id),action:J(u),args:d,result:p},groupId:l}})}),c(p=>{se=void 0,n.addTimelineEvent({layerId:pe,event:{time:o(),logType:"error",title:"๐ฅ "+u,subtitle:"end",data:{store:J(t.$id),action:J(u),args:d,error:p},groupId:l}})})},!0),t._customProperties.forEach(i=>{a.watch(()=>a.unref(t[i]),(c,u)=>{n.notifyComponentUpdate(),n.sendInspectorState(L),me&&n.addTimelineEvent({layerId:pe,event:{time:o(),title:"Change",subtitle:i,data:{newValue:c,oldValue:u},groupId:se}})},{deep:!0})}),t.$subscribe(({events:i,type:c},u)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(L),!me)return;const d={time:o(),title:Or(c),data:xr({store:J(t.$id)},Nr(i)),groupId:se};c===Q.patchFunction?d.subtitle="โคต๏ธ":c===Q.patchObject?d.subtitle="๐งฉ":i&&!Array.isArray(i)&&(d.subtitle=i.type),i&&(d.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:pe,event:d})},{detached:!0,flush:"sync"});const r=t._hotUpdate;t._hotUpdate=a.markRaw(i=>{r(i),n.addTimelineEvent({layerId:pe,event:{time:o(),title:"๐ฅ "+t.$id,subtitle:"HMR update",data:{store:J(t.$id),info:J("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(L),n.sendInspectorState(L)});const{$dispose:s}=t;t.$dispose=()=>{s(),n.notifyComponentUpdate(),n.sendInspectorTree(L),n.sendInspectorState(L),n.getSettings().logStoreChanges&&A(`Disposed "${t.$id}" store ๐`)},n.notifyComponentUpdate(),n.sendInspectorTree(L),n.sendInspectorState(L),n.getSettings().logStoreChanges&&A(`"${t.$id}" store installed ๐`)})}let sn=0,se;function cn(e,t,n){const o=t.reduce((r,s)=>(r[s]=a.toRaw(e)[s],r),{});for(const r in o)e[r]=function(){const s=sn,i=n?new Proxy(e,{get(...u){return se=s,Reflect.get(...u)},set(...u){return se=s,Reflect.set(...u)}}):e;se=s;const c=o[r].apply(i,arguments);return se=void 0,c}}function Pr({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){cn(t,Object.keys(n.actions),t._isOptionsAPI);const o=t._hotUpdate;a.toRaw(t)._hotUpdate=function(r){o.apply(this,arguments),cn(t,Object.keys(r._hmrPayload.actions),!!t._isOptionsAPI)}}Ir(e,t)}}function Dr(){const e=a.effectScope(!0),t=e.run(()=>a.ref({}));let n=[],o=[];const r=a.markRaw({install(s){$e(r),r._a=s,s.provide(Qt,r),s.config.globalProperties.$pinia=r,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&de&&Cr(s,r),o.forEach(i=>n.push(i)),o=[]},use(s){return!this._a&&!Kt?o.push(s):n.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof Proxy<"u"&&r.use(Pr),r}function ln(e,t){for(const n in t){const o=t[n];if(!(n in e))continue;const r=e[n];ue(r)&&ue(o)&&!a.isRef(o)&&!a.isReactive(o)?e[n]=ln(r,o):e[n]=o}return e}const un=()=>{};function dn(e,t,n,o=un){e.push(t);const r=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),o())};return!n&&a.getCurrentScope()&&a.onScopeDispose(r),r}function ge(e,...t){e.slice().forEach(n=>{n(...t)})}const Vr=e=>e(),pn=Symbol(),lt=Symbol();function ut(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,o)=>e.set(o,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],r=e[n];ue(r)&&ue(o)&&e.hasOwnProperty(n)&&!a.isRef(o)&&!a.isReactive(o)?e[n]=ut(r,o):e[n]=o}return e}const Rr=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function Tr(e){return!ue(e)||!e.hasOwnProperty(Rr)}const{assign:G}=Object;function fn(e){return!!(a.isRef(e)&&e.effect)}function hn(e,t,n,o){const{state:r,actions:s,getters:i}=t,c=n.state.value[e];let u;function d(){!c&&(process.env.NODE_ENV==="production"||!o)&&(n.state.value[e]=r?r():{});const l=process.env.NODE_ENV!=="production"&&o?a.toRefs(a.ref(r?r():{}).value):a.toRefs(n.state.value[e]);return G(l,s,Object.keys(i||{}).reduce((p,f)=>(process.env.NODE_ENV!=="production"&&f in l&&console.warn(`[๐]: A getter cannot have the same name as another state property. Rename one of them. Found with "${f}" in store "${e}".`),p[f]=a.markRaw(a.computed(()=>{$e(n);const h=n._s.get(e);return i[f].call(h,h)})),p),{}))}return u=dt(e,d,t,n,o,!0),u}function dt(e,t,n={},o,r,s){let i;const c=G({actions:{}},n);if(process.env.NODE_ENV!=="production"&&!o._e.active)throw new Error("Pinia destroyed");const u={deep:!0};process.env.NODE_ENV!=="production"&&!Kt&&(u.onTrigger=E=>{d?h=E:d==!1&&!$._hotUpdating&&(Array.isArray(h)?h.push(E):console.error("๐ debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let d,l,p=[],f=[],h;const g=o.state.value[e];!s&&!g&&(process.env.NODE_ENV==="production"||!r)&&(o.state.value[e]={});const v=a.ref({});let N;function _(E){let b;d=l=!1,process.env.NODE_ENV!=="production"&&(h=[]),typeof E=="function"?(E(o.state.value[e]),b={type:Q.patchFunction,storeId:e,events:h}):(ut(o.state.value[e],E),b={type:Q.patchObject,payload:E,storeId:e,events:h});const V=N=Symbol();a.nextTick().then(()=>{N===V&&(d=!0)}),l=!0,ge(p,b,o.state.value[e])}const S=s?function(){const{state:E}=n,b=E?E():{};this.$patch(V=>{G(V,b)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`๐: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:un;function I(){i.stop(),p=[],f=[],o._s.delete(e)}const j=(E,b="")=>{if(pn in E)return E[lt]=b,E;const V=function(){$e(o);const H=Array.from(arguments),Y=[],Ae=[];function je(M){Y.push(M)}function Xe(M){Ae.push(M)}ge(f,{args:H,name:V[lt],store:$,after:je,onError:Xe});let Z;try{Z=E.apply(this&&this.$id===e?this:$,H)}catch(M){throw ge(Ae,M),M}return Z instanceof Promise?Z.then(M=>(ge(Y,M),M)).catch(M=>(ge(Ae,M),Promise.reject(M))):(ge(Y,Z),Z)};return V[pn]=!0,V[lt]=b,V},U=a.markRaw({actions:{},getters:{},state:[],hotState:v}),K={_p:o,$id:e,$onAction:dn.bind(null,f),$patch:_,$reset:S,$subscribe(E,b={}){const V=dn(p,E,b.detached,()=>H()),H=i.run(()=>a.watch(()=>o.state.value[e],Y=>{(b.flush==="sync"?l:d)&&E({storeId:e,type:Q.direct,events:h},Y)},G({},u,b)));return V},$dispose:I},$=a.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&de?G({_hmrPayload:U,_customProperties:a.markRaw(new Set)},K):K);o._s.set(e,$);const X=(o._a&&o._a.runWithContext||Vr)(()=>o._e.run(()=>(i=a.effectScope()).run(()=>t({action:j}))));for(const E in X){const b=X[E];if(a.isRef(b)&&!fn(b)||a.isReactive(b))process.env.NODE_ENV!=="production"&&r?Be(v.value,E,a.toRef(X,E)):s||(g&&Tr(b)&&(a.isRef(b)?b.value=g[E]:ut(b,g[E])),o.state.value[e][E]=b),process.env.NODE_ENV!=="production"&&U.state.push(E);else if(typeof b=="function"){const V=process.env.NODE_ENV!=="production"&&r?b:j(b,E);X[E]=V,process.env.NODE_ENV!=="production"&&(U.actions[E]=b),c.actions[E]=b}else process.env.NODE_ENV!=="production"&&fn(b)&&(U.getters[E]=s?n.getters[E]:b,de&&(X._getters||(X._getters=a.markRaw([]))).push(E))}if(G($,X),G(a.toRaw($),X),Object.defineProperty($,"$state",{get:()=>process.env.NODE_ENV!=="production"&&r?v.value:o.state.value[e],set:E=>{if(process.env.NODE_ENV!=="production"&&r)throw new Error("cannot set hotState");_(b=>{G(b,E)})}}),process.env.NODE_ENV!=="production"&&($._hotUpdate=a.markRaw(E=>{$._hotUpdating=!0,E._hmrPayload.state.forEach(b=>{if(b in $.$state){const V=E.$state[b],H=$.$state[b];typeof V=="object"&&ue(V)&&ue(H)?ln(V,H):E.$state[b]=H}Be($,b,a.toRef(E.$state,b))}),Object.keys($.$state).forEach(b=>{b in E.$state||rt($,b)}),d=!1,l=!1,o.state.value[e]=a.toRef(E._hmrPayload,"hotState"),l=!0,a.nextTick().then(()=>{d=!0});for(const b in E._hmrPayload.actions){const V=E[b];Be($,b,j(V,b))}for(const b in E._hmrPayload.getters){const V=E._hmrPayload.getters[b],H=s?a.computed(()=>($e(o),V.call($,$))):V;Be($,b,H)}Object.keys($._hmrPayload.getters).forEach(b=>{b in E._hmrPayload.getters||rt($,b)}),Object.keys($._hmrPayload.actions).forEach(b=>{b in E._hmrPayload.actions||rt($,b)}),$._hmrPayload=E._hmrPayload,$._getters=E._getters,$._hotUpdating=!1})),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&de){const E={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(b=>{Object.defineProperty($,b,G({value:$[b]},E))})}return o._p.forEach(E=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&de){const b=i.run(()=>E({store:$,app:o._a,pinia:o,options:c}));Object.keys(b||{}).forEach(V=>$._customProperties.add(V)),G($,b)}else G($,i.run(()=>E({store:$,app:o._a,pinia:o,options:c})))}),process.env.NODE_ENV!=="production"&&$.$state&&typeof $.$state=="object"&&typeof $.$state.constructor=="function"&&!$.$state.constructor.toString().includes("[native code]")&&console.warn(`[๐]: The "state" must be a plain object. It cannot be
|
|
8
8
|
state: () => new MyClass()
|
|
9
|
-
Found in store "${
|
|
9
|
+
Found in store "${$.$id}".`),g&&s&&n.hydrate&&n.hydrate($.$state,g),d=!0,l=!0,$}function Ar(e,t,n){let o,r;const s=typeof t=="function";o=e,r=s?n:t;function i(c,u){const d=a.hasInjectionContext();if(c=(process.env.NODE_ENV==="test"&&ke&&ke._testing?null:c)||(d?a.inject(Qt,null):null),c&&$e(c),process.env.NODE_ENV!=="production"&&!ke)throw new Error(`[๐]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
10
10
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
11
|
-
This will fail in production.`);c=ke,c._s.has(o)||(s?dt(o,t,r,c):hn(o,r,c),process.env.NODE_ENV!=="production"&&(i._pinia=c));const l=c._s.get(o);if(process.env.NODE_ENV!=="production"&&
|
|
11
|
+
This will fail in production.`);c=ke,c._s.has(o)||(s?dt(o,t,r,c):hn(o,r,c),process.env.NODE_ENV!=="production"&&(i._pinia=c));const l=c._s.get(o);if(process.env.NODE_ENV!=="production"&&u){const p="__hot:"+o,f=s?dt(p,t,r,c,!0):hn(p,G({},r),c,!0);u._hotUpdate(f),delete c.state.value[p],c._s.delete(p)}if(process.env.NODE_ENV!=="production"&&de){const p=a.getCurrentInstance();if(p&&p.proxy&&!u){const f=p.proxy,h="_pStores"in f?f._pStores:f._pStores={};h[o]=l}}return l}return i.$id=o,i}const jr=Ar("data",()=>{const e=a.ref([]),t=a.ref({});return{records:e,record:t}});function mn(e){e||(e=a.inject("$registry"));const t=jr(),n=a.ref(new ir(e,t)),o=a.ref(!1);return a.onBeforeMount(async()=>{var r,s;const i=e.router.currentRoute.value,c=(r=i.params.records)==null?void 0:r.toString().toLowerCase(),u=(s=i.params.record)==null?void 0:s.toString().toLowerCase();if(!c&&!u)return;const d=await e.getMeta(c);e.addDoctype(d),n.value.setup(d),c&&(u?await n.value.getRecord(d,u):await n.value.getRecords(d)),n.value.runAction(d,"LOAD",u?[u]:void 0),o.value=!0}),{stonecrop:n,isReady:o}}q(class tt{constructor(t,n){if(q(this,"name"),q(this,"router"),q(this,"registry"),q(this,"getMeta"),tt._root)return tt._root;tt._root=this,this.name="Registry",this.router=t,this.registry={},this.getMeta=n}addDoctype(t){t.doctype in Object.keys(this.registry)||(this.registry[t.slug]=t),this.router.hasRoute(t.doctype)||this.router.addRoute({path:`/${t.slug}`,name:t.slug,component:t.component})}},"_root");/*!
|
|
12
12
|
* vue-router v4.4.5
|
|
13
13
|
* (c) 2024 Eduardo San Martin Morote
|
|
14
14
|
* @license MIT
|
|
15
|
-
*/const te=typeof document<"u";function gn(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Br(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&gn(e.default)}const P=Object.assign;function pt(e,t){const n={};for(const o in t){const r=t[o];n[o]=F(r)?r.map(e):e(r)}return n}const Se=()=>{},F=Array.isArray;function
|
|
15
|
+
*/const te=typeof document<"u";function gn(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Br(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&gn(e.default)}const P=Object.assign;function pt(e,t){const n={};for(const o in t){const r=t[o];n[o]=F(r)?r.map(e):e(r)}return n}const Se=()=>{},F=Array.isArray;function O(e){const t=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+e].concat(t))}const yn=/#/g,Lr=/&/g,Mr=/\//g,Ur=/=/g,Wr=/\?/g,wn=/\+/g,Fr=/%5B/g,Hr=/%5D/g,bn=/%5E/g,zr=/%60/g,vn=/%7B/g,qr=/%7C/g,En=/%7D/g,Gr=/%20/g;function ft(e){return encodeURI(""+e).replace(qr,"|").replace(Fr,"[").replace(Hr,"]")}function Jr(e){return ft(e).replace(vn,"{").replace(En,"}").replace(bn,"^")}function ht(e){return ft(e).replace(wn,"%2B").replace(Gr,"+").replace(yn,"%23").replace(Lr,"%26").replace(zr,"`").replace(vn,"{").replace(En,"}").replace(bn,"^")}function Kr(e){return ht(e).replace(Ur,"%3D")}function Yr(e){return ft(e).replace(yn,"%23").replace(Wr,"%3F")}function Qr(e){return e==null?"":Yr(e).replace(Mr,"%2F")}function ye(e){try{return decodeURIComponent(""+e)}catch{process.env.NODE_ENV!=="production"&&O(`Error decoding "${e}". Using original value`)}return""+e}const Xr=/\/$/,Zr=e=>e.replace(Xr,"");function mt(e,t,n="/"){let o,r={},s="",i="";const c=t.indexOf("#");let u=t.indexOf("?");return c<u&&c>=0&&(u=-1),u>-1&&(o=t.slice(0,u),s=t.slice(u+1,c>-1?c:t.length),r=e(s)),c>-1&&(o=o||t.slice(0,c),i=t.slice(c,t.length)),o=na(o??t,n),{fullPath:o+(s&&"?")+s+i,path:o,query:r,hash:ye(i)}}function ea(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function _n(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function kn(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&ie(t.matched[o],n.matched[r])&&$n(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function ie(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function $n(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!ta(e[n],t[n]))return!1;return!0}function ta(e,t){return F(e)?Sn(e,t):F(t)?Sn(t,e):e===t}function Sn(e,t){return F(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function na(e,t){if(e.startsWith("/"))return e;if(process.env.NODE_ENV!=="production"&&!t.startsWith("/"))return O(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`),e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let s=n.length-1,i,c;for(i=0;i<o.length;i++)if(c=o[i],c!==".")if(c==="..")s>1&&s--;else break;return n.slice(0,s).join("/")+"/"+o.slice(i).join("/")}const ce={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Ne;(function(e){e.pop="pop",e.push="push"})(Ne||(Ne={}));var Oe;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Oe||(Oe={}));function oa(e){if(!e)if(te){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Zr(e)}const ra=/^[^#]+#/;function aa(e,t){return e.replace(ra,"#")+t}function sa(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const He=()=>({left:window.scrollX,top:window.scrollY});function ia(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#");if(process.env.NODE_ENV!=="production"&&typeof e.el=="string"&&(!o||!document.getElementById(e.el.slice(1))))try{const s=document.querySelector(e.el);if(o&&s){O(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);return}}catch{O(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);return}const r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r){process.env.NODE_ENV!=="production"&&O(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);return}t=sa(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Nn(e,t){return(history.state?history.state.position-t:-1)+e}const gt=new Map;function ca(e,t){gt.set(e,t)}function la(e){const t=gt.get(e);return gt.delete(e),t}let ua=()=>location.protocol+"//"+location.host;function On(e,t){const{pathname:n,search:o,hash:r}=t,s=e.indexOf("#");if(s>-1){let i=r.includes(e.slice(s))?e.slice(s).length:1,c=r.slice(i);return c[0]!=="/"&&(c="/"+c),_n(c,"")}return _n(n,e)+o+r}function da(e,t,n,o){let r=[],s=[],i=null;const c=({state:f})=>{const h=On(e,location),g=n.value,v=t.value;let N=0;if(f){if(n.value=h,t.value=f,i&&i===g){i=null;return}N=v?f.position-v.position:0}else o(h);r.forEach(_=>{_(n.value,g,{delta:N,type:Ne.pop,direction:N?N>0?Oe.forward:Oe.back:Oe.unknown})})};function u(){i=n.value}function d(f){r.push(f);const h=()=>{const g=r.indexOf(f);g>-1&&r.splice(g,1)};return s.push(h),h}function l(){const{history:f}=window;f.state&&f.replaceState(P({},f.state,{scroll:He()}),"")}function p(){for(const f of s)f();s=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",l)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",l,{passive:!0}),{pauseListeners:u,listen:d,destroy:p}}function xn(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?He():null}}function pa(e){const{history:t,location:n}=window,o={value:On(e,n)},r={value:t.state};r.value||s(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(u,d,l){const p=e.indexOf("#"),f=p>-1?(n.host&&document.querySelector("base")?e:e.slice(p))+u:ua()+e+u;try{t[l?"replaceState":"pushState"](d,"",f),r.value=d}catch(h){process.env.NODE_ENV!=="production"?O("Error with push/replace State",h):console.error(h),n[l?"replace":"assign"](f)}}function i(u,d){const l=P({},t.state,xn(r.value.back,u,r.value.forward,!0),d,{position:r.value.position});s(u,l,!0),o.value=u}function c(u,d){const l=P({},r.value,t.state,{forward:u,scroll:He()});process.env.NODE_ENV!=="production"&&!t.state&&O(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:
|
|
16
16
|
|
|
17
17
|
history.replaceState(history.state, '', url)
|
|
18
18
|
|
|
19
|
-
You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`),s(l.current,l,!0);const
|
|
19
|
+
You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`),s(l.current,l,!0);const p=P({},xn(o.value,u,null),{position:l.position+1},d);s(u,p,!1),o.value=u}return{location:o,state:r,push:c,replace:i}}function fa(e){e=oa(e);const t=pa(e),n=da(e,t.state,t.location,t.replace);function o(s,i=!0){i||n.pauseListeners(),history.go(s)}const r=P({location:"",base:e,go:o,createHref:aa.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function ze(e){return typeof e=="string"||e&&typeof e=="object"}function Cn(e){return typeof e=="string"||typeof e=="symbol"}const yt=Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var In;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(In||(In={}));const ha={1({location:e,currentLocation:t}){return`No match for
|
|
20
20
|
${JSON.stringify(e)}${t?`
|
|
21
21
|
while being at
|
|
22
|
-
`+JSON.stringify(t):""}`},2({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${ga(t)}" via a navigation guard.`},4({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},8({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},16({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function we(e,t){return process.env.NODE_ENV!=="production"?P(new Error(ha[e](t)),{type:e,[yt]:!0},t):P(new Error,{type:e,[yt]:!0},t)}function ne(e,t){return e instanceof Error&&yt in e&&(t==null||!!(e.type&t))}const ma=["params","query","hash"];function ga(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of ma)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}const Pn="[^/]+?",ya={sensitive:!1,strict:!1,start:!0,end:!0},wa=/[.+*?^${}()[\]/\\]/g;function ba(e,t){const n=P({},ya,t),o=[];let r=n.start?"^":"";const s=[];for(const
|
|
23
|
-
See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);if(S=$a(j,f
|
|
22
|
+
`+JSON.stringify(t):""}`},2({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${ga(t)}" via a navigation guard.`},4({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},8({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},16({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function we(e,t){return process.env.NODE_ENV!=="production"?P(new Error(ha[e](t)),{type:e,[yt]:!0},t):P(new Error,{type:e,[yt]:!0},t)}function ne(e,t){return e instanceof Error&&yt in e&&(t==null||!!(e.type&t))}const ma=["params","query","hash"];function ga(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of ma)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}const Pn="[^/]+?",ya={sensitive:!1,strict:!1,start:!0,end:!0},wa=/[.+*?^${}()[\]/\\]/g;function ba(e,t){const n=P({},ya,t),o=[];let r=n.start?"^":"";const s=[];for(const d of e){const l=d.length?[]:[90];n.strict&&!d.length&&(r+="/");for(let p=0;p<d.length;p++){const f=d[p];let h=40+(n.sensitive?.25:0);if(f.type===0)p||(r+="/"),r+=f.value.replace(wa,"\\$&"),h+=40;else if(f.type===1){const{value:g,repeatable:v,optional:N,regexp:_}=f;s.push({name:g,repeatable:v,optional:N});const S=_||Pn;if(S!==Pn){h+=10;try{new RegExp(`(${S})`)}catch(j){throw new Error(`Invalid custom RegExp for param "${g}" (${S}): `+j.message)}}let I=v?`((?:${S})(?:/(?:${S}))*)`:`(${S})`;p||(I=N&&d.length<2?`(?:/${I})`:"/"+I),N&&(I+="?"),r+=I,h+=20,N&&(h+=-8),v&&(h+=-20),S===".*"&&(h+=-50)}l.push(h)}o.push(l)}if(n.strict&&n.end){const d=o.length-1;o[d][o[d].length-1]+=.7000000000000001}n.strict||(r+="/?"),n.end?r+="$":n.strict&&(r+="(?:/|$)");const i=new RegExp(r,n.sensitive?"":"i");function c(d){const l=d.match(i),p={};if(!l)return null;for(let f=1;f<l.length;f++){const h=l[f]||"",g=s[f-1];p[g.name]=h&&g.repeatable?h.split("/"):h}return p}function u(d){let l="",p=!1;for(const f of e){(!p||!l.endsWith("/"))&&(l+="/"),p=!1;for(const h of f)if(h.type===0)l+=h.value;else if(h.type===1){const{value:g,repeatable:v,optional:N}=h,_=g in d?d[g]:"";if(F(_)&&!v)throw new Error(`Provided param "${g}" is an array but it is not repeatable (* or + modifiers)`);const S=F(_)?_.join("/"):_;if(!S)if(N)f.length<2&&(l.endsWith("/")?l=l.slice(0,-1):p=!0);else throw new Error(`Missing required param "${g}"`);l+=S}}return l||"/"}return{re:i,score:o,keys:s,parse:c,stringify:u}}function va(e,t){let n=0;for(;n<e.length&&n<t.length;){const o=t[n]-e[n];if(o)return o;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function Dn(e,t){let n=0;const o=e.score,r=t.score;for(;n<o.length&&n<r.length;){const s=va(o[n],r[n]);if(s)return s;n++}if(Math.abs(r.length-o.length)===1){if(Vn(o))return 1;if(Vn(r))return-1}return r.length-o.length}function Vn(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Ea={type:0,value:""},_a=/[a-zA-Z0-9_]/;function ka(e){if(!e)return[[]];if(e==="/")return[[Ea]];if(!e.startsWith("/"))throw new Error(process.env.NODE_ENV!=="production"?`Route paths should start with a "/": "${e}" should be "/${e}".`:`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${d}": ${h}`)}let n=0,o=n;const r=[];let s;function i(){s&&r.push(s),s=[]}let c=0,u,d="",l="";function p(){d&&(n===0?s.push({type:0,value:d}):n===1||n===2||n===3?(s.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:d,regexp:l,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),d="")}function f(){d+=u}for(;c<e.length;){if(u=e[c++],u==="\\"&&n!==2){o=n,n=4;continue}switch(n){case 0:u==="/"?(d&&p(),i()):u===":"?(p(),n=1):f();break;case 4:f(),n=o;break;case 1:u==="("?n=2:_a.test(u)?f():(p(),n=0,u!=="*"&&u!=="?"&&u!=="+"&&c--);break;case 2:u===")"?l[l.length-1]=="\\"?l=l.slice(0,-1)+u:n=3:l+=u;break;case 3:p(),n=0,u!=="*"&&u!=="?"&&u!=="+"&&c--,l="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${d}"`),p(),i(),r}function $a(e,t,n){const o=ba(ka(e.path),n);if(process.env.NODE_ENV!=="production"){const s=new Set;for(const i of o.keys)s.has(i.name)&&O(`Found duplicated params with name "${i.name}" for path "${e.path}". Only the last one will be available on "$route.params".`),s.add(i.name)}const r=P(o,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Sa(e,t){const n=[],o=new Map;t=jn({strict:!1,end:!0,sensitive:!1},t);function r(p){return o.get(p)}function s(p,f,h){const g=!h,v=Tn(p);process.env.NODE_ENV!=="production"&&Ca(v,f),v.aliasOf=h&&h.record;const N=jn(t,p),_=[v];if("alias"in p){const j=typeof p.alias=="string"?[p.alias]:p.alias;for(const U of j)_.push(Tn(P({},v,{components:h?h.record.components:v.components,path:U,aliasOf:h?h.record:v})))}let S,I;for(const j of _){const{path:U}=j;if(f&&U[0]!=="/"){const K=f.record.path,$=K[K.length-1]==="/"?"":"/";j.path=f.record.path+(U&&$+U)}if(process.env.NODE_ENV!=="production"&&j.path==="*")throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
|
|
23
|
+
See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);if(S=$a(j,f,N),process.env.NODE_ENV!=="production"&&f&&U[0]==="/"&&Ia(S,f),h?(h.alias.push(S),process.env.NODE_ENV!=="production"&&xa(h,S)):(I=I||S,I!==S&&I.alias.push(S),g&&p.name&&!An(S)&&i(p.name)),Bn(S)&&u(S),v.children){const K=v.children;for(let $=0;$<K.length;$++)s(K[$],S,h&&h.children[$])}h=h||S}return I?()=>{i(I)}:Se}function i(p){if(Cn(p)){const f=o.get(p);f&&(o.delete(p),n.splice(n.indexOf(f),1),f.children.forEach(i),f.alias.forEach(i))}else{const f=n.indexOf(p);f>-1&&(n.splice(f,1),p.record.name&&o.delete(p.record.name),p.children.forEach(i),p.alias.forEach(i))}}function c(){return n}function u(p){const f=Pa(p,n);n.splice(f,0,p),p.record.name&&!An(p)&&o.set(p.record.name,p)}function d(p,f){let h,g={},v,N;if("name"in p&&p.name){if(h=o.get(p.name),!h)throw we(1,{location:p});if(process.env.NODE_ENV!=="production"){const I=Object.keys(p.params||{}).filter(j=>!h.keys.find(U=>U.name===j));I.length&&O(`Discarded invalid param(s) "${I.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`)}N=h.record.name,g=P(Rn(f.params,h.keys.filter(I=>!I.optional).concat(h.parent?h.parent.keys.filter(I=>I.optional):[]).map(I=>I.name)),p.params&&Rn(p.params,h.keys.map(I=>I.name))),v=h.stringify(g)}else if(p.path!=null)v=p.path,process.env.NODE_ENV!=="production"&&!v.startsWith("/")&&O(`The Matcher cannot resolve relative paths but received "${v}". Unless you directly called \`matcher.resolve("${v}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`),h=n.find(I=>I.re.test(v)),h&&(g=h.parse(v),N=h.record.name);else{if(h=f.name?o.get(f.name):n.find(I=>I.re.test(f.path)),!h)throw we(1,{location:p,currentLocation:f});N=h.record.name,g=P({},f.params,p.params),v=h.stringify(g)}const _=[];let S=h;for(;S;)_.unshift(S.record),S=S.parent;return{name:N,path:v,params:g,matched:_,meta:Oa(_)}}e.forEach(p=>s(p));function l(){n.length=0,o.clear()}return{addRoute:s,resolve:d,removeRoute:i,clearRoutes:l,getRoutes:c,getRecordMatcher:r}}function Rn(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function Tn(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Na(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Na(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function An(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Oa(e){return e.reduce((t,n)=>P(t,n.meta),{})}function jn(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function wt(e,t){return e.name===t.name&&e.optional===t.optional&&e.repeatable===t.repeatable}function xa(e,t){for(const n of e.keys)if(!n.optional&&!t.keys.find(wt.bind(null,n)))return O(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);for(const n of t.keys)if(!n.optional&&!e.keys.find(wt.bind(null,n)))return O(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`)}function Ca(e,t){t&&t.record.name&&!e.name&&!e.path&&O(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`)}function Ia(e,t){for(const n of t.keys)if(!e.keys.find(wt.bind(null,n)))return O(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`)}function Pa(e,t){let n=0,o=t.length;for(;n!==o;){const s=n+o>>1;Dn(e,t[s])<0?o=s:n=s+1}const r=Da(e);return r&&(o=t.lastIndexOf(r,o-1),process.env.NODE_ENV!=="production"&&o<0&&O(`Finding ancestor route "${r.record.path}" failed for "${e.record.path}"`)),o}function Da(e){let t=e;for(;t=t.parent;)if(Bn(t)&&Dn(e,t)===0)return t}function Bn({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Va(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;o<n.length;++o){const r=n[o].replace(wn," "),s=r.indexOf("="),i=ye(s<0?r:r.slice(0,s)),c=s<0?null:ye(r.slice(s+1));if(i in t){let u=t[i];F(u)||(u=t[i]=[u]),u.push(c)}else t[i]=c}return t}function Ln(e){let t="";for(let n in e){const o=e[n];if(n=Kr(n),o==null){o!==void 0&&(t+=(t.length?"&":"")+n);continue}(F(o)?o.map(r=>r&&ht(r)):[o&&ht(o)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function Ra(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=F(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const Ta=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":""),Mn=Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),bt=Symbol(process.env.NODE_ENV!=="production"?"router":""),Un=Symbol(process.env.NODE_ENV!=="production"?"route location":""),vt=Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function xe(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function le(e,t,n,o,r,s=i=>i()){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((c,u)=>{const d=f=>{f===!1?u(we(4,{from:n,to:t})):f instanceof Error?u(f):ze(f)?u(we(2,{from:t,to:f})):(i&&o.enterCallbacks[r]===i&&typeof f=="function"&&i.push(f),c())},l=s(()=>e.call(o&&o.instances[r],t,n,process.env.NODE_ENV!=="production"?Aa(d,t,n):d));let p=Promise.resolve(l);if(e.length<3&&(p=p.then(d)),process.env.NODE_ENV!=="production"&&e.length>2){const f=`The "next" callback was never called inside of ${e.name?'"'+e.name+'"':""}:
|
|
24
24
|
${e.toString()}
|
|
25
|
-
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;if(typeof l=="object"&&"then"in l)
|
|
25
|
+
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;if(typeof l=="object"&&"then"in l)p=p.then(h=>d._called?h:(O(f),Promise.reject(new Error("Invalid navigation guard"))));else if(l!==void 0&&!d._called){O(f),u(new Error("Invalid navigation guard"));return}}p.catch(f=>u(f))})}function Aa(e,t,n){let o=0;return function(){o++===1&&O(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`),e._called=!0,o===1&&e.apply(null,arguments)}}function Et(e,t,n,o,r=s=>s()){const s=[];for(const i of e){process.env.NODE_ENV!=="production"&&!i.components&&!i.children.length&&O(`Record with path "${i.path}" is either missing a "component(s)" or "children" property.`);for(const c in i.components){let u=i.components[c];if(process.env.NODE_ENV!=="production"){if(!u||typeof u!="object"&&typeof u!="function")throw O(`Component "${c}" in record with path "${i.path}" is not a valid component. Received "${String(u)}".`),new Error("Invalid route component");if("then"in u){O(`Component "${c}" in record with path "${i.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);const d=u;u=()=>d}else u.__asyncLoader&&!u.__warnedDefineAsync&&(u.__warnedDefineAsync=!0,O(`Component "${c}" in record with path "${i.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`))}if(!(t!=="beforeRouteEnter"&&!i.instances[c]))if(gn(u)){const d=(u.__vccOpts||u)[t];d&&s.push(le(d,n,o,i,c,r))}else{let d=u();process.env.NODE_ENV!=="production"&&!("catch"in d)&&(O(`Component "${c}" in record with path "${i.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`),d=Promise.resolve(d)),s.push(()=>d.then(l=>{if(!l)throw new Error(`Couldn't resolve component "${c}" at "${i.path}"`);const p=Br(l)?l.default:l;i.mods[c]=l,i.components[c]=p;const f=(p.__vccOpts||p)[t];return f&&le(f,n,o,i,c,r)()}))}}}return s}function Wn(e){const t=a.inject(bt),n=a.inject(Un);let o=!1,r=null;const s=a.computed(()=>{const l=a.unref(e.to);return process.env.NODE_ENV!=="production"&&(!o||l!==r)&&(ze(l)||(o?O(`Invalid value for prop "to" in useLink()
|
|
26
26
|
- to:`,l,`
|
|
27
27
|
- previous to:`,r,`
|
|
28
|
-
- props:`,e):
|
|
28
|
+
- props:`,e):O(`Invalid value for prop "to" in useLink()
|
|
29
29
|
- to:`,l,`
|
|
30
|
-
- props:`,e)),r=l,o=!0),t.resolve(l)}),i=a.computed(()=>{const{matched:l}=s.value,{length:
|
|
30
|
+
- props:`,e)),r=l,o=!0),t.resolve(l)}),i=a.computed(()=>{const{matched:l}=s.value,{length:p}=l,f=l[p-1],h=n.matched;if(!f||!h.length)return-1;const g=h.findIndex(ie.bind(null,f));if(g>-1)return g;const v=Fn(l[p-2]);return p>1&&Fn(f)===v&&h[h.length-1].path!==v?h.findIndex(ie.bind(null,l[p-2])):g}),c=a.computed(()=>i.value>-1&&Ma(n.params,s.value.params)),u=a.computed(()=>i.value>-1&&i.value===n.matched.length-1&&$n(n.params,s.value.params));function d(l={}){return La(l)?t[a.unref(e.replace)?"replace":"push"](a.unref(e.to)).catch(Se):Promise.resolve()}if(process.env.NODE_ENV!=="production"&&te){const l=a.getCurrentInstance();if(l){const p={route:s.value,isActive:c.value,isExactActive:u.value,error:null};l.__vrl_devtools=l.__vrl_devtools||[],l.__vrl_devtools.push(p),a.watchEffect(()=>{p.route=s.value,p.isActive=c.value,p.isExactActive=u.value,p.error=ze(a.unref(e.to))?null:'Invalid "to" value'},{flush:"post"})}}return{route:s,href:a.computed(()=>s.value.href),isActive:c,isExactActive:u,navigate:d}}const ja=a.defineComponent({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Wn,setup(e,{slots:t}){const n=a.reactive(Wn(e)),{options:o}=a.inject(bt),r=a.computed(()=>({[Hn(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[Hn(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&t.default(n);return e.custom?s:a.h("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},s)}}}),Ba=ja;function La(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Ma(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!F(r)||r.length!==o.length||o.some((s,i)=>s!==r[i]))return!1}return!0}function Fn(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Hn=(e,t,n)=>e??t??n,Ua=a.defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){process.env.NODE_ENV!=="production"&&Fa();const o=a.inject(vt),r=a.computed(()=>e.route||o.value),s=a.inject(Mn,0),i=a.computed(()=>{let d=a.unref(s);const{matched:l}=r.value;let p;for(;(p=l[d])&&!p.components;)d++;return d}),c=a.computed(()=>r.value.matched[i.value]);a.provide(Mn,a.computed(()=>i.value+1)),a.provide(Ta,c),a.provide(vt,r);const u=a.ref();return a.watch(()=>[u.value,c.value,e.name],([d,l,p],[f,h,g])=>{l&&(l.instances[p]=d,h&&h!==l&&d&&d===f&&(l.leaveGuards.size||(l.leaveGuards=h.leaveGuards),l.updateGuards.size||(l.updateGuards=h.updateGuards))),d&&l&&(!h||!ie(l,h)||!f)&&(l.enterCallbacks[p]||[]).forEach(v=>v(d))},{flush:"post"}),()=>{const d=r.value,l=e.name,p=c.value,f=p&&p.components[l];if(!f)return zn(n.default,{Component:f,route:d});const h=p.props[l],g=h?h===!0?d.params:typeof h=="function"?h(d):h:null,v=a.h(f,P({},g,t,{onVnodeUnmounted:N=>{N.component.isUnmounted&&(p.instances[l]=null)},ref:u}));if(process.env.NODE_ENV!=="production"&&te&&v.ref){const N={depth:i.value,name:p.name,path:p.path,meta:p.meta};(F(v.ref)?v.ref.map(_=>_.i):[v.ref.i]).forEach(_=>{_.__vrv_devtools=N})}return zn(n.default,{Component:v,route:d})||v}}});function zn(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Wa=Ua;function Fa(){const e=a.getCurrentInstance(),t=e.parent&&e.parent.type.name,n=e.parent&&e.parent.subTree&&e.parent.subTree.type;if(t&&(t==="KeepAlive"||t.includes("Transition"))&&typeof n=="object"&&n.name==="RouterView"){const o=t==="KeepAlive"?"keep-alive":"transition";O(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.
|
|
31
31
|
Use slot props instead:
|
|
32
32
|
|
|
33
33
|
<router-view v-slot="{ Component }">
|
|
34
34
|
<${o}>
|
|
35
35
|
<component :is="Component" />
|
|
36
36
|
</${o}>
|
|
37
|
-
</router-view>`)}}function Ce(e,t){const n=P({},e,{matched:e.matched.map(o=>es(o,["instances","children","aliasOf"]))});return{_custom:{type:null,readOnly:!0,display:e.fullPath,tooltip:t,value:n}}}function qe(e){return{_custom:{display:e}}}let Ha=0;function za(e,t,n){if(t.__hasDevtools)return;t.__hasDevtools=!0;const o=Ha++;st({id:"org.vuejs.router"+(o?"."+o:""),label:"Vue Router",packageName:"vue-router",homepage:"https://router.vuejs.org",logo:"https://router.vuejs.org/logo.png",componentStateTypes:["Routing"],app:e},r=>{typeof r.now!="function"&&console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),r.on.inspectComponent((l,
|
|
38
|
-
- Location:`,
|
|
39
|
-
${JSON.stringify(
|
|
40
|
-
when navigating to "${
|
|
41
|
-
Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):k(P({replace:C},S(W.to),{state:typeof W.to=="object"?P({},D,W.to.state):D,force:T}),w||R)}else W=H(R,_,!0,C,D);return V(R,_,W),W})}function X(g,w){const y=I(g,w);return y?Promise.reject(y):Promise.resolve()}function E(g){const w=Ze.values().next().value;return w&&typeof w.runWithContext=="function"?w.runWithContext(g):g()}function v(g,w){let y;const[_,D,T]=ns(g,w);y=Et(_.reverse(),"beforeRouteLeave",g,w);for(const O of _)O.leaveGuards.forEach(R=>{y.push(le(R,g,w))});const C=X.bind(null,g,w);return y.push(C),Ee(y).then(()=>{y=[];for(const O of s.list())y.push(le(O,g,w));return y.push(C),Ee(y)}).then(()=>{y=Et(D,"beforeRouteUpdate",g,w);for(const O of D)O.updateGuards.forEach(R=>{y.push(le(R,g,w))});return y.push(C),Ee(y)}).then(()=>{y=[];for(const O of T)if(O.beforeEnter)if(F(O.beforeEnter))for(const R of O.beforeEnter)y.push(le(R,g,w));else y.push(le(O.beforeEnter,g,w));return y.push(C),Ee(y)}).then(()=>(g.matched.forEach(O=>O.enterCallbacks={}),y=Et(T,"beforeRouteEnter",g,w,E),y.push(C),Ee(y))).then(()=>{y=[];for(const O of i.list())y.push(le(O,g,w));return y.push(C),Ee(y)}).catch(O=>ne(O,8)?O:Promise.reject(O))}function V(g,w,y){c.list().forEach(_=>E(()=>_(g,w,y)))}function H(g,w,y,_,D){const T=I(g,w);if(T)return T;const C=w===ce,O=te?history.state:{};y&&(_||C?r.replace(g.fullPath,P({scroll:C&&O&&O.scroll},D)):r.push(g.fullPath,D)),p.value=g,Wo(g,w,y,C),Ft()}let Y;function Ae(){Y||(Y=r.listen((g,w,y)=>{const _=x(g),D=K(_);if(D){k(P(D,{replace:!0}),_).catch(Se);return}u=_;const T=p.value;te&&ca(Nn(T.fullPath,y.delta),He()),v(_,T).catch(C=>ne(C,12)?C:ne(C,2)?(k(C.to,_).then(O=>{ne(O,20)&&!y.delta&&y.type===Ne.pop&&r.go(-1,!1)}).catch(Se),Promise.reject()):(y.delta&&r.go(-y.delta,!1),M(C,_,T))).then(C=>{C=C||H(_,T,!1),C&&(y.delta&&!ne(C,8)?r.go(-y.delta,!1):y.type===Ne.pop&&ne(C,20)&&r.go(-1,!1)),V(_,T,C)}).catch(Se)}))}let je=xe(),Xe=xe(),Z;function M(g,w,y){Ft(g);const _=Xe.list();return _.length?_.forEach(D=>D(g,w,y)):(process.env.NODE_ENV!=="production"&&N("uncaught error during route navigation:"),console.error(g)),Promise.reject(g)}function ic(){return Z&&p.value!==ce?Promise.resolve():new Promise((g,w)=>{je.add([g,w])})}function Ft(g){return Z||(Z=!g,Ae(),je.list().forEach(([w,y])=>g?y(g):w()),je.reset()),g}function Wo(g,w,y,_){const{scrollBehavior:D}=e;if(!te||!D)return Promise.resolve();const T=!y&&la(Nn(g.fullPath,0))||(_||!y)&&history.state&&history.state.scroll||null;return a.nextTick().then(()=>D(g,w,T)).then(C=>C&&ia(C)).catch(C=>M(C,g,w))}const Ht=g=>r.go(g);let zt;const Ze=new Set,cc={currentRoute:p,listening:!0,addRoute:h,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:$,getRoutes:b,resolve:x,options:e,push:j,replace:U,go:Ht,back:()=>Ht(-1),forward:()=>Ht(1),beforeEach:s.add,beforeResolve:i.add,afterEach:c.add,onError:Xe.add,isReady:ic,install(g){const w=this;g.component("RouterLink",Ba),g.component("RouterView",Wa),g.config.globalProperties.$router=w,Object.defineProperty(g.config.globalProperties,"$route",{enumerable:!0,get:()=>a.unref(p)}),te&&!zt&&p.value===ce&&(zt=!0,j(r.location).catch(D=>{process.env.NODE_ENV!=="production"&&N("Unexpected error when starting the router:",D)}));const y={};for(const D in ce)Object.defineProperty(y,D,{get:()=>p.value[D],enumerable:!0});g.provide(bt,w),g.provide(Un,a.shallowReactive(y)),g.provide(vt,p);const _=g.unmount;Ze.add(g),g.unmount=function(){Ze.delete(g),Ze.size<1&&(u=ce,Y&&Y(),Y=null,p.value=ce,zt=!1,Z=!1),_()},process.env.NODE_ENV!=="production"&&te&&za(g,w,t)}};function Ee(g){return g.reduce((w,y)=>w.then(()=>E(y)),Promise.resolve())}return cc}function ns(e,t){const n=[],o=[],r=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;i<s;i++){const c=t.matched[i];c&&(e.matched.find(u=>ie(u,c))?o.push(c):n.push(c));const p=e.matched[i];p&&(t.matched.find(u=>ie(u,p))||r.push(p))}return[n,o,r]}ts({history:fa(),routes:[]});function os(e){return e&&typeof e.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var be=Promise.resolve();function Zn(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function rs(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function kt(){return Math.random().toString(36).substring(2)}var eo=0,$t=0;function Ge(){var e=new Date().getTime();return e===eo?($t++,e*1e3+$t):(eo=e,$t=0,e*1e3)}var as=Ge,ss="native";function is(e){var t={messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function cs(e){e.bc.close(),e.subFns=[]}function ls(e,t){try{return e.bc.postMessage(t,!1),be}catch(n){return Promise.reject(n)}}function us(e,t){e.messagesCallback=t}function ds(){if(typeof window>"u")return!1;if(typeof BroadcastChannel=="function"){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}else return!1}function ps(){return 150}var fs={create:is,close:cs,onMessage:us,postMessage:ls,canBeUsed:ds,type:ss,averageResponseTime:ps,microSeconds:as},to=function(){function e(t){this.ttl=t,this.map=new Map,this._to=!1}return e.prototype.has=function(t){return this.map.has(t)},e.prototype.add=function(t){var n=this;this.map.set(t,no()),this._to||(this._to=!0,setTimeout(function(){n._to=!1,hs(n)},0))},e.prototype.clear=function(){this.map.clear()},e}();function hs(e){for(var t=no()-e.ttl,n=e.map[Symbol.iterator]();;){var o=n.next().value;if(!o)return;var r=o[0],s=o[1];if(s<t)e.map.delete(r);else return}}function no(){return new Date().getTime()}function St(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return typeof t.webWorkerSupport>"u"&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=1e3*45),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&typeof e.idb.onclose=="function"&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=1e3*60),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=1e3*60*2),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),typeof t.node.useFastPath>"u"&&(t.node.useFastPath=!0),t}var ms=Ge,gs="pubkey.broadcast-channel-0-",oe="messages",Je={durability:"relaxed"},ys="idb";function oo(){if(typeof indexedDB<"u")return indexedDB;if(typeof window<"u"){if(typeof window.mozIndexedDB<"u")return window.mozIndexedDB;if(typeof window.webkitIndexedDB<"u")return window.webkitIndexedDB;if(typeof window.msIndexedDB<"u")return window.msIndexedDB}return!1}function Nt(e){e.commit&&e.commit()}function ws(e){var t=oo(),n=gs+e,o=t.open(n);return o.onupgradeneeded=function(r){var s=r.target.result;s.createObjectStore(oe,{keyPath:"id",autoIncrement:!0})},new Promise(function(r,s){o.onerror=function(i){return s(i)},o.onsuccess=function(){r(o.result)}})}function bs(e,t,n){var o=new Date().getTime(),r={uuid:t,time:o,data:n},s=e.transaction([oe],"readwrite",Je);return new Promise(function(i,c){s.oncomplete=function(){return i()},s.onerror=function(u){return c(u)};var p=s.objectStore(oe);p.add(r),Nt(s)})}function vs(e,t){var n=e.transaction(oe,"readonly",Je),o=n.objectStore(oe),r=[],s=IDBKeyRange.bound(t+1,1/0);if(o.getAll){var i=o.getAll(s);return new Promise(function(p,u){i.onerror=function(l){return u(l)},i.onsuccess=function(l){p(l.target.result)}})}function c(){try{return s=IDBKeyRange.bound(t+1,1/0),o.openCursor(s)}catch{return o.openCursor()}}return new Promise(function(p,u){var l=c();l.onerror=function(d){return u(d)},l.onsuccess=function(d){var f=d.target.result;f?f.value.id<t+1?f.continue(t+1):(r.push(f.value),f.continue()):(Nt(n),p(r))}})}function Es(e,t){if(e.closed)return Promise.resolve([]);var n=e.db.transaction(oe,"readwrite",Je),o=n.objectStore(oe);return Promise.all(t.map(function(r){var s=o.delete(r);return new Promise(function(i){s.onsuccess=function(){return i()}})}))}function _s(e,t){var n=new Date().getTime()-t,o=e.transaction(oe,"readonly",Je),r=o.objectStore(oe),s=[];return new Promise(function(i){r.openCursor().onsuccess=function(c){var p=c.target.result;if(p){var u=p.value;u.time<n?(s.push(u),p.continue()):(Nt(o),i(s))}else i(s)}})}function ks(e){return _s(e.db,e.options.idb.ttl).then(function(t){return Es(e,t.map(function(n){return n.id}))})}function $s(e,t){return t=St(t),ws(e).then(function(n){var o={closed:!1,lastCursorId:0,channelName:e,options:t,uuid:kt(),eMIs:new to(t.idb.ttl*2),writeBlockPromise:be,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){o.closed=!0,t.idb.onclose&&t.idb.onclose()},ro(o),o})}function ro(e){e.closed||ao(e).then(function(){return Zn(e.options.idb.fallbackInterval)}).then(function(){return ro(e)})}function Ss(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time<t.messagesCallbackTime)}function ao(e){return e.closed||!e.messagesCallback?be:vs(e.db,e.lastCursorId).then(function(t){var n=t.filter(function(o){return!!o}).map(function(o){return o.id>e.lastCursorId&&(e.lastCursorId=o.id),o}).filter(function(o){return Ss(o,e)}).sort(function(o,r){return o.time-r.time});return n.forEach(function(o){e.messagesCallback&&(e.eMIs.add(o.id),e.messagesCallback(o.data))}),be})}function Ns(e){e.closed=!0,e.db.close()}function Os(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return bs(e.db,e.uuid,t)}).then(function(){rs(0,10)===0&&ks(e)}),e.writeBlockPromise}function xs(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,ao(e)}function Cs(){return!!oo()}function Is(e){return e.idb.fallbackInterval*2}var Ps={create:$s,close:Ns,onMessage:xs,postMessage:Os,canBeUsed:Cs,type:ys,averageResponseTime:Is,microSeconds:ms},Ds=Ge,Vs="pubkey.broadcastChannel-",Rs="localstorage";function so(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function io(e){return Vs+e}function Ts(e,t){return new Promise(function(n){Zn().then(function(){var o=io(e.channelName),r={token:kt(),time:new Date().getTime(),data:t,uuid:e.uuid},s=JSON.stringify(r);so().setItem(o,s);var i=document.createEvent("Event");i.initEvent("storage",!0,!0),i.key=o,i.newValue=s,window.dispatchEvent(i),n()})})}function As(e,t){var n=io(e),o=function(r){r.key===n&&t(JSON.parse(r.newValue))};return window.addEventListener("storage",o),o}function js(e){window.removeEventListener("storage",e)}function Bs(e,t){if(t=St(t),!co())throw new Error("BroadcastChannel: localstorage cannot be used");var n=kt(),o=new to(t.localstorage.removeTimeout),r={channelName:e,uuid:n,eMIs:o};return r.listener=As(e,function(s){r.messagesCallback&&s.uuid!==n&&(!s.token||o.has(s.token)||s.data.time&&s.data.time<r.messagesCallbackTime||(o.add(s.token),r.messagesCallback(s.data)))}),r}function Ls(e){js(e.listener)}function Ms(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t}function co(){var e=so();if(!e)return!1;try{var t="__broadcastchannel_check";e.setItem(t,"works"),e.removeItem(t)}catch{return!1}return!0}function Us(){var e=120,t=navigator.userAgent.toLowerCase();return t.includes("safari")&&!t.includes("chrome")?e*2:e}var Ws={create:Bs,close:Ls,onMessage:Ms,postMessage:Ts,canBeUsed:co,type:Rs,averageResponseTime:Us,microSeconds:Ds},Fs=Ge,Hs="simulate",Ot=new Set;function zs(e){var t={name:e,messagesCallback:null};return Ot.add(t),t}function qs(e){Ot.delete(e)}function Gs(e,t){return new Promise(function(n){return setTimeout(function(){var o=Array.from(Ot);o.filter(function(r){return r.name===e.name}).filter(function(r){return r!==e}).filter(function(r){return!!r.messagesCallback}).forEach(function(r){return r.messagesCallback(t)}),n()},5)})}function Js(e,t){e.messagesCallback=t}function Ks(){return!0}function Ys(){return 5}var Qs={create:zs,close:qs,onMessage:Js,postMessage:Gs,canBeUsed:Ks,type:Hs,averageResponseTime:Ys,microSeconds:Fs},lo=[fs,Ps,Ws];function Xs(e){var t=[].concat(e.methods,lo).filter(Boolean);if(e.type){if(e.type==="simulate")return Qs;var n=t.find(function(r){return r.type===e.type});if(n)return n;throw new Error("method-type "+e.type+" not found")}e.webWorkerSupport||(t=t.filter(function(r){return r.type!=="idb"}));var o=t.find(function(r){return r.canBeUsed()});if(o)return o;throw new Error("No usable method found in "+JSON.stringify(lo.map(function(r){return r.type})))}var uo=new Set,Zs=0,xt=function(e,t){this.id=Zs++,uo.add(this),this.name=e,this.options=St(t),this.method=Xs(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,ei(this)};xt._pubkey=!0,xt.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return po(this,"message",e)},postInternal:function(e){return po(this,"internal",e)},set onmessage(e){var t=this.method.microSeconds(),n={time:t,fn:e};mo(this,"message",this._onML),e&&typeof e=="function"?(this._onML=n,ho(this,"message",n)):this._onML=null},addEventListener:function(e,t){var n=this.method.microSeconds(),o={time:n,fn:t};ho(this,e,o)},removeEventListener:function(e,t){var n=this._addEL[e].find(function(o){return o.fn===t});mo(this,e,n)},close:function(){var e=this;if(!this.closed){uo.delete(this),this.closed=!0;var t=this._prepP?this._prepP:be;return this._onML=null,this._addEL.message=[],t.then(function(){return Promise.all(Array.from(e._uMP))}).then(function(){return Promise.all(e._befC.map(function(n){return n()}))}).then(function(){return e.method.close(e._state)})}},get type(){return this.method.type},get isClosed(){return this.closed}};function po(e,t,n){var o=e.method.microSeconds(),r={time:o,type:t,data:n},s=e._prepP?e._prepP:be;return s.then(function(){var i=e.method.postMessage(e._state,r);return e._uMP.add(i),i.catch().then(function(){return e._uMP.delete(i)}),i})}function ei(e){var t=e.method.create(e.name,e.options);os(t)?(e._prepP=t,t.then(function(n){e._state=n})):e._state=t}function fo(e){return e._addEL.message.length>0||e._addEL.internal.length>0}function ho(e,t,n){e._addEL[t].push(n),ti(e)}function mo(e,t,n){e._addEL[t]=e._addEL[t].filter(function(o){return o!==n}),ni(e)}function ti(e){if(!e._iL&&fo(e)){var t=function(o){e._addEL[o.type].forEach(function(r){var s=1e5,i=r.time-s;o.time>=i&&r.fn(o.data)})},n=e.method.microSeconds();e._prepP?e._prepP.then(function(){e._iL=!0,e.method.onMessage(e._state,t,n)}):(e._iL=!0,e.method.onMessage(e._state,t,n))}}function ni(e){if(e._iL&&!fo(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}let Ct=class extends Error{constructor(t,n){super(t),this.name="DevalueError",this.path=n.join("")}};function go(e){return Object(e)!==e}const oi=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ri(e){const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===oi}function ai(e){return Object.prototype.toString.call(e).slice(8,-1)}function si(e){switch(e){case'"':return'\\"';case"<":return"\\u003C";case"\\":return"\\\\";case`
|
|
42
|
-
`:return"\\n";case"\r":return"\\r";case" ":return"\\t";case"\b":return"\\b";case"\f":return"\\f";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return e<" "?`\\u${e.charCodeAt(0).toString(16).padStart(4,"0")}`:""}}function ve(e){let t="",n=0;const o=e.length;for(let r=0;r<o;r+=1){const s=e[r],i=si(s);i&&(t+=e.slice(n,r)+i,n=r+1)}return`"${n===0?e:t+e.slice(n)}"`}const It=-1,yo=-2,wo=-3,bo=-4,vo=-5,Pt=-6;function Eo(e,t){return ii(JSON.parse(e))}function ii(e,t){if(typeof e=="number")return r(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,o=Array(n.length);function r(s,i=!1){if(s===It)return;if(s===wo)return NaN;if(s===bo)return 1/0;if(s===vo)return-1/0;if(s===Pt)return-0;if(i)throw new Error("Invalid input");if(s in o)return o[s];const c=n[s];if(!c||typeof c!="object")o[s]=c;else if(Array.isArray(c))if(typeof c[0]=="string"){const p=c[0];switch(p){case"Date":o[s]=new Date(c[1]);break;case"Set":const u=new Set;o[s]=u;for(let f=1;f<c.length;f+=1)u.add(r(c[f]));break;case"Map":const l=new Map;o[s]=l;for(let f=1;f<c.length;f+=2)l.set(r(c[f]),r(c[f+1]));break;case"RegExp":o[s]=new RegExp(c[1],c[2]);break;case"Object":o[s]=Object(c[1]);break;case"BigInt":o[s]=BigInt(c[1]);break;case"null":const d=Object.create(null);o[s]=d;for(let f=1;f<c.length;f+=2)d[c[f]]=r(c[f+1]);break;default:throw new Error(`Unknown type ${p}`)}}else{const p=new Array(c.length);o[s]=p;for(let u=0;u<c.length;u+=1){const l=c[u];l!==yo&&(p[u]=r(l))}}else{const p={};o[s]=p;for(const u in c){const l=c[u];p[u]=r(l)}}return o[s]}return r(0)}function _o(e,t){const n=[],o=new Map,r=[];for(const u in t)r.push({key:u,fn:t[u]});const s=[];let i=0;function c(u){if(typeof u=="function")throw new Ct("Cannot stringify a function",s);if(o.has(u))return o.get(u);if(u===void 0)return It;if(Number.isNaN(u))return wo;if(u===1/0)return bo;if(u===-1/0)return vo;if(u===0&&1/u<0)return Pt;const l=i++;o.set(u,l);for(const{key:f,fn:h}of r){const m=h(u);if(m)return n[l]=`["${f}",${c(m)}]`,l}let d="";if(go(u))d=Dt(u);else switch(ai(u)){case"Number":case"String":case"Boolean":d=`["Object",${Dt(u)}]`;break;case"BigInt":d=`["BigInt",${u}]`;break;case"Date":d=`["Date","${isNaN(u.getDate())?"":u.toISOString()}"]`;break;case"RegExp":const{source:f,flags:h}=u;d=h?`["RegExp",${ve(f)},"${h}"]`:`["RegExp",${ve(f)}]`;break;case"Array":d="[";for(let m=0;m<u.length;m+=1)m>0&&(d+=","),m in u?(s.push(`[${m}]`),d+=c(u[m]),s.pop()):d+=yo;d+="]";break;case"Set":d='["Set"';for(const m of u)d+=`,${c(m)}`;d+="]";break;case"Map":d='["Map"';for(const[m,b]of u)s.push(`.get(${go(m)?Dt(m):"..."})`),d+=`,${c(m)},${c(b)}`,s.pop();d+="]";break;default:if(!ri(u))throw new Ct("Cannot stringify arbitrary non-POJOs",s);if(Object.getOwnPropertySymbols(u).length>0)throw new Ct("Cannot stringify POJOs with symbolic keys",s);if(Object.getPrototypeOf(u)===null){d='["null"';for(const m in u)s.push(`.${m}`),d+=`,${ve(m)},${c(u[m])}`,s.pop();d+="]"}else{d="{";let m=!1;for(const b in u)m&&(d+=","),m=!0,s.push(`.${b}`),d+=`${ve(b)}:${c(u[b])}`,s.pop();d+="}"}}return n[l]=d,l}const p=c(e);return p<0?`${p}`:`[${n.join(",")}]`}function Dt(e){const t=typeof e;return t==="string"?ve(e):e instanceof String?ve(e.toString()):e===void 0?It.toString():e===0&&1/e<0?Pt.toString():t==="bigint"?`["BigInt","${e}"]`:String(e)}function ci(e,t,{initialize:n,type:o}){let r=`${t.$id}-${e.toString()}`,s=new xt(r,{type:o}),i=!1,c=0;a.watch(()=>t[e],l=>{i||(c=Date.now(),s.postMessage({timestamp:c,state:Eo(_o(l))})),i=!1},{deep:!0}),s.onmessage=l=>{if(l===void 0){s.postMessage({timestamp:c,state:Eo(_o(t[e]))});return}l.timestamp<=c||(i=!0,c=l.timestamp,t[e]=l.state)};let p=()=>s.postMessage(void 0),u=()=>s.close();return n&&p(),{sync:p,unshare:u}}var li=(e,t)=>Object.keys(t).includes(e),ui=({initialize:e=!0,enable:t=!0,type:n})=>({store:o,options:r})=>{var s,i;let c=((s=r==null?void 0:r.share)==null?void 0:s.enable)??t,p=((i=r==null?void 0:r.share)==null?void 0:i.omit)??[];!c||Object.keys(o.$state).forEach(u=>{var l;p.includes(u)||!li(u,o.$state)||ci(u,o,{initialize:((l=r==null?void 0:r.share)==null?void 0:l.initialize)??e,type:n})})};Dr().use(ui({enable:!0,initialize:!0}));const ko=a.defineComponent({__name:"Doctype",setup(e){const{stonecrop:t,isReady:n}=mn(),o=a.ref([]);return a.watch(n,()=>{if(n.value){let r=t.value.schema.schema.toArray();r.forEach((s,i)=>{const p=t.value.store.record[s.fieldname];r[i].value=p}),o.value=r}}),(r,s)=>a.unref(n)?(a.openBlock(),a.createBlock(a.unref(rr),{key:0,class:"aform-main",modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=i=>o.value=i)},null,8,["modelValue"])):a.createCommentVNode("",!0)}});var di=Object.defineProperty,pi=(e,t,n)=>t in e?di(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fe=(e,t,n)=>pi(e,typeof t!="symbol"?t+"":t,n);function $o(e){return a.getCurrentScope()?(a.onScopeDispose(e),!0):!1}function Vt(e){return typeof e=="function"?e():a.unref(e)}const fi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const hi=e=>e!=null,mi=Object.prototype.toString,gi=e=>mi.call(e)==="[object Object]",yi=()=>{},Ie=fi?window:void 0;function Pe(e){var t;const n=Vt(e);return(t=n==null?void 0:n.$el)!=null?t:n}function De(...e){let t,n,o,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,r]=e,t=Ie):[t,n,o,r]=e,!t)return yi;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const s=[],i=()=>{s.forEach(l=>l()),s.length=0},c=(l,d,f,h)=>(l.addEventListener(d,f,h),()=>l.removeEventListener(d,f,h)),p=a.watch(()=>[Pe(t),Vt(r)],([l,d])=>{if(i(),!l)return;const f=gi(d)?{...d}:d;s.push(...n.flatMap(h=>o.map(m=>c(l,h,m,f))))},{immediate:!0,flush:"post"}),u=()=>{p(),i()};return $o(u),u}function wi(){const e=a.ref(!1),t=a.getCurrentInstance();return t&&a.onMounted(()=>{e.value=!0},t),e}function bi(e){const t=wi();return a.computed(()=>(t.value,!!e()))}function vi(e,t,n={}){const{window:o=Ie,...r}=n;let s;const i=bi(()=>o&&"MutationObserver"in o),c=()=>{s&&(s.disconnect(),s=void 0)},p=a.computed(()=>{const f=Vt(e),h=(Array.isArray(f)?f:[f]).map(Pe).filter(hi);return new Set(h)}),u=a.watch(()=>p.value,f=>{c(),i.value&&f.size&&(s=new MutationObserver(t),f.forEach(h=>s.observe(h,r)))},{immediate:!0,flush:"post"}),l=()=>s==null?void 0:s.takeRecords(),d=()=>{u(),c()};return $o(d),{isSupported:i,stop:d,takeRecords:l}}function Ei(e={}){var t;const{window:n=Ie,deep:o=!0,triggerOnRemoval:r=!1}=e,s=(t=e.document)!=null?t:n==null?void 0:n.document,i=()=>{var u;let l=s==null?void 0:s.activeElement;if(o)for(;l!=null&&l.shadowRoot;)l=(u=l==null?void 0:l.shadowRoot)==null?void 0:u.activeElement;return l},c=a.ref(),p=()=>{c.value=i()};return n&&(De(n,"blur",u=>{u.relatedTarget===null&&p()},!0),De(n,"focus",p,!0)),r&&vi(s,u=>{u.filter(l=>l.removedNodes.length).map(l=>Array.from(l.removedNodes)).flat().forEach(l=>{l===c.value&&p()})},{childList:!0,subtree:!0}),p(),c}const _i="focusin",ki="focusout";function $i(e,t={}){const{window:n=Ie}=t,o=a.computed(()=>Pe(e)),r=a.ref(!1),s=a.computed(()=>r.value),i=Ei(t);return!n||!i.value?{focused:s}:(De(o,_i,()=>r.value=!0),De(o,ki,()=>r.value=!1),{focused:s})}function Si(e,{window:t=Ie,scrollTarget:n}={}){const o=a.ref(!1),r=()=>{if(!t)return;const s=t.document,i=Pe(e);if(!i)o.value=!1;else{const c=i.getBoundingClientRect();o.value=c.top<=(t.innerHeight||s.documentElement.clientHeight)&&c.left<=(t.innerWidth||s.documentElement.clientWidth)&&c.bottom>=0&&c.right>=0}};return a.watch(()=>Pe(e),()=>r(),{immediate:!0,flush:"post"}),t&&De(n||t,"scroll",r,{capture:!1,passive:!0}),o}const re=e=>{let t=Si(e).value;return t=t&&e.offsetHeight>0,t},ae=e=>e.tabIndex>=0,So=e=>{const t=e.target;return Rt(t)},Rt=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;if(o){const r=Array.from(o.children)[e.cellIndex];r&&(n=r)}}else if(e instanceof HTMLTableRowElement){const o=e.previousElementSibling;o&&(n=o)}return n&&(!ae(n)||!re(n))?Rt(n):n},Ni=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const r=(t=n.parentElement)==null?void 0:t.parentElement;if(r){const s=r.firstElementChild.children[n.cellIndex];s&&(o=s)}}else if(n instanceof HTMLTableRowElement){const r=n.parentElement;if(r){const s=r.firstElementChild;s&&(o=s)}}return o&&(!ae(o)||!re(o))?Tt(o):o},No=e=>{const t=e.target;return Tt(t)},Tt=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;if(o){const r=Array.from(o.children)[e.cellIndex];r&&(n=r)}}else if(e instanceof HTMLTableRowElement){const o=e.nextElementSibling;o&&(n=o)}return n&&(!ae(n)||!re(n))?Tt(n):n},Oi=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const r=(t=n.parentElement)==null?void 0:t.parentElement;if(r){const s=r.lastElementChild.children[n.cellIndex];s&&(o=s)}}else if(n instanceof HTMLTableRowElement){const r=n.parentElement;if(r){const s=r.lastElementChild;s&&(o=s)}}return o&&(!ae(o)||!re(o))?Rt(o):o},Oo=e=>{const t=e.target;return At(t)},At=e=>{var t;let n;if(e.previousElementSibling)n=e.previousElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;n=o==null?void 0:o.lastElementChild}return n&&(!ae(n)||!re(n))?At(n):n},xo=e=>{const t=e.target;return jt(t)},jt=e=>{var t;let n;if(e.nextElementSibling)n=e.nextElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;n=o==null?void 0:o.firstElementChild}return n&&(!ae(n)||!re(n))?jt(n):n},Co=e=>{const t=e.target.parentElement.firstElementChild;return t&&(!ae(t)||!re(t))?jt(t):t},Io=e=>{const t=e.target.parentElement.lastElementChild;return t&&(!ae(t)||!re(t))?At(t):t},Ke=["alt","control","shift","meta"],xi={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Bt={"keydown.up":e=>{const t=So(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.down":e=>{const t=No(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.left":e=>{const t=Oo(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.right":e=>{const t=xo(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.control.up":e=>{const t=Ni(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.down":e=>{const t=Oi(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.left":e=>{const t=Co(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.right":e=>{const t=Io(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.end":e=>{const t=Io(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=No(e);t&&t.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=So(e);t&&t.focus()}},"keydown.home":e=>{const t=Co(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.tab":e=>{const t=xo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.shift.tab":e=>{const t=Oo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())}};function Po(e){const t=i=>{let c=null;return i.parent&&(typeof i.parent=="string"?c=document.querySelector(i.parent):i.parent instanceof HTMLElement?c=i.parent:c=i.parent.value),c},n=i=>{const c=t(i);let p=[];if(typeof i.selectors=="string")p=c?Array.from(c.querySelectorAll(i.selectors)):Array.from(document.querySelectorAll(i.selectors));else if(Array.isArray(i.selectors))for(const u of i.selectors)u instanceof HTMLElement?p.push(u):p.push(u.$el);else if(i.selectors instanceof HTMLElement)p.push(i.selectors);else if(Array.isArray(i.selectors.value))for(const u of i.selectors.value)u instanceof HTMLElement?p.push(u):p.push(u.$el);else p.push(i.selectors.value);return p},o=i=>{const c=t(i);let p=[];return i.selectors?p=n(i):c&&(p=Array.from(c.children).filter(u=>ae(u)&&re(u))),p},r=i=>c=>{const p=xi[c.key]||c.key.toLowerCase();if(Ke.includes(p))return;const u=i.handlers||Bt;for(const l of Object.keys(u)){const[d,...f]=l.split(".");if(d==="keydown"&&f.includes(p)){const h=u[l],m=f.filter($=>Ke.includes($)),b=Ke.some($=>{const x=$.charAt(0).toUpperCase()+$.slice(1);return c.getModifierState(x)});if(m.length>0){if(b){for(const $ of Ke)if(f.includes($)){const x=$.charAt(0).toUpperCase()+$.slice(1);c.getModifierState(x)&&h(c)}}}else b||h(c)}}},s=[];a.onMounted(()=>{for(const i of e){const c=t(i),p=o(i),u=r(i),l=c?[c]:p;for(const d of l){const{focused:f}=$i(a.ref(d)),h=a.watch(f,m=>{m?d.addEventListener("keydown",u):d.removeEventListener("keydown",u)});s.push(h)}}}),a.onBeforeUnmount(()=>{for(const i of s)i()})}const Ci=["data-colindex","data-rowindex","data-editable","contenteditable","tabindex"],Ii={key:1},Pi=a.defineComponent({__name:"ACell",props:{colIndex:{},rowIndex:{},tableid:{},addNavigation:{type:[Boolean,Object],default:!0},tabIndex:{default:0}},setup(e){var t;const n=a.inject(e.tableid),o=a.useTemplateRef("cell"),r=a.ref(""),s=a.ref(!1),i=a.computed(()=>{const m=n.cellData(e.colIndex,e.rowIndex);if(n.columns[e.colIndex].format){const b=n.table,$=n.rows[e.rowIndex],x=n.columns[e.colIndex],S=x.format;return typeof S=="function"?S(m,{table:b,row:$,column:x}):typeof S=="string"?Function(`"use strict";return (${S})`)()(m,{table:b,row:$,column:x}):m}else return m}),c=()=>{if(n.columns[e.colIndex].mask,n.columns[e.colIndex].modalComponent){const m=o.value.getBoundingClientRect();n.modal.visible=!0,n.modal.colIndex=e.colIndex,n.modal.rowIndex=e.rowIndex,n.modal.parent=o.value,n.modal.top=m.top+m.height,n.modal.left=m.left,n.modal.width=u.value,n.modal.component=n.columns[e.colIndex].modalComponent,n.modal.componentProps=n.columns[e.colIndex].modalComponentProps}};if(e.addNavigation){let m={...Bt,"keydown.f2":c,"keydown.alt.up":c,"keydown.alt.down":c,"keydown.alt.left":c,"keydown.alt.right":c};typeof e.addNavigation=="object"&&(m={...m,...e.addNavigation}),Po([{selectors:o,handlers:m}])}const p=a.computed(()=>n.columns[e.colIndex].align||"center"),u=a.computed(()=>n.columns[e.colIndex].width||"40ch"),l=()=>{o.value&&(r.value=o.value.textContent)},d=()=>{o.value&&o.value.textContent!==r.value&&(r.value=o.value.textContent,o.value.dispatchEvent(new Event("change")),s.value=!0,n.columns[e.colIndex].format||n.setCellData(e.rowIndex,e.colIndex,r.value))},f=(m,b)=>b&&m===0&&b>0?`${b}ch`:"inherit",h={textAlign:p.value,width:u.value,backgroundColor:s.value?"var(--cell-modified-color)":"inherit",fontWeight:s.value?"bold":"inherit",paddingLeft:f(e.colIndex,(t=n.display[e.rowIndex])==null?void 0:t.indent)};return(m,b)=>(a.openBlock(),a.createElementBlock("td",{ref:"cell","data-colindex":m.colIndex,"data-rowindex":m.rowIndex,"data-editable":a.unref(n).columns[m.colIndex].edit,contenteditable:a.unref(n).columns[m.colIndex].edit,tabindex:m.tabIndex,spellcheck:!1,style:h,onFocus:l,onPaste:d,onBlur:d,onInput:d,onClick:c,onMousedown:c,class:"atable__cell"},[a.unref(n).columns[m.colIndex].cellComponent?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(n).columns[m.colIndex].cellComponent),a.mergeProps({key:0,value:i.value},a.unref(n).columns[m.colIndex].cellComponentProps),null,16,["value"])):(a.openBlock(),a.createElementBlock("span",Ii,a.toDisplayString(i.value),1))],40,Ci))}}),Di=["tabindex"],Vi={key:0,tabIndex:-1,class:"list-index"},Ri=a.defineComponent({__name:"ARow",props:{row:{},rowIndex:{},tableid:{},tabIndex:{default:()=>-1},addNavigation:{type:[Boolean,Object],default:!1}},setup(e){const t=a.inject(e.tableid),n=a.useTemplateRef("rowEl"),o=a.computed(()=>t.config.view!=="tree"||t.display[e.rowIndex].isRoot||t.display[e.rowIndex].open),r=a.computed(()=>t.config.view!=="tree"?"":t.display[e.rowIndex].isRoot||t.display[e.rowIndex].isParent?t.display[e.rowIndex].childrenOpen?"-":"+":""),s=i=>{t.toggleRowExpand(i)};if(e.addNavigation){let i=Bt;typeof e.addNavigation=="object"&&(i={...i,...e.addNavigation}),Po([{selectors:n,handlers:i}])}return(i,c)=>a.withDirectives((a.openBlock(),a.createElementBlock("tr",{ref:"rowEl",tabindex:i.tabIndex,class:"table-row"},[a.renderSlot(i.$slots,"index",{},()=>[a.unref(t).config.view==="list"?(a.openBlock(),a.createElementBlock("td",Vi,a.toDisplayString(i.rowIndex+1),1)):a.unref(t).config.view==="tree"?(a.openBlock(),a.createElementBlock("td",{key:1,tabIndex:-1,class:"tree-index",onClick:c[0]||(c[0]=p=>s(i.rowIndex))},a.toDisplayString(r.value),1)):a.createCommentVNode("",!0)]),a.renderSlot(i.$slots,"default")],8,Di)),[[a.vShow,o.value]])}});function Do(e){return a.getCurrentScope()?(a.onScopeDispose(e),!0):!1}function Ve(e){return typeof e=="function"?e():a.unref(e)}const Vo=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ti=Object.prototype.toString,Ai=e=>Ti.call(e)==="[object Object]",Re=()=>{},Lt=ji();function ji(){var e,t;return Vo&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}const Ro={mounted:"mounted",updated:"updated",unmounted:"unmounted"};function Bi(...e){if(e.length!==1)return a.toRef(...e);const t=e[0];return typeof t=="function"?a.readonly(a.customRef(()=>({get:t,set:Re}))):a.ref(t)}function Te(e){var t;const n=Ve(e);return(t=n==null?void 0:n.$el)!=null?t:n}const To=Vo?window:void 0;function Ye(...e){let t,n,o,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,r]=e,t=To):[t,n,o,r]=e,!t)return Re;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const s=[],i=()=>{s.forEach(l=>l()),s.length=0},c=(l,d,f,h)=>(l.addEventListener(d,f,h),()=>l.removeEventListener(d,f,h)),p=a.watch(()=>[Te(t),Ve(r)],([l,d])=>{if(i(),!l)return;const f=Ai(d)?{...d}:d;s.push(...n.flatMap(h=>o.map(m=>c(l,h,m,f))))},{immediate:!0,flush:"post"}),u=()=>{p(),i()};return Do(u),u}let Ao=!1;function jo(e,t,n={}){const{window:o=To,ignore:r=[],capture:s=!0,detectIframe:i=!1}=n;if(!o)return Re;Lt&&!Ao&&(Ao=!0,Array.from(o.document.body.children).forEach(l=>l.addEventListener("click",Re)),o.document.documentElement.addEventListener("click",Re));let c=!0;const p=l=>r.some(d=>{if(typeof d=="string")return Array.from(o.document.querySelectorAll(d)).some(f=>f===l.target||l.composedPath().includes(f));{const f=Te(d);return f&&(l.target===f||l.composedPath().includes(f))}}),u=[Ye(o,"click",l=>{const d=Te(e);if(!(!d||d===l.target||l.composedPath().includes(d))){if(l.detail===0&&(c=!p(l)),!c){c=!0;return}t(l)}},{passive:!0,capture:s}),Ye(o,"pointerdown",l=>{const d=Te(e);c=!p(l)&&!!(d&&!l.composedPath().includes(d))},{passive:!0}),i&&Ye(o,"blur",l=>{setTimeout(()=>{var d;const f=Te(e);((d=o.document.activeElement)==null?void 0:d.tagName)==="IFRAME"&&!(f!=null&&f.contains(o.document.activeElement))&&t(l)},0)})].filter(Boolean);return()=>u.forEach(l=>l())}const Li={[Ro.mounted](e,t){const n=!t.modifiers.bubble;if(typeof t.value=="function")e.__onClickOutside_stop=jo(e,t.value,{capture:n});else{const[o,r]=t.value;e.__onClickOutside_stop=jo(e,o,Object.assign({capture:n},r))}},[Ro.unmounted](e){e.__onClickOutside_stop()}};function Mt(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function Bo(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const n=e.parentNode;return!n||n.tagName==="BODY"?!1:Bo(n)}}function Mi(e){const t=e||window.event,n=t.target;return Bo(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const Ut=new WeakMap;function Ui(e,t=!1){const n=a.ref(t);let o=null,r="";a.watch(Bi(e),c=>{const p=Mt(Ve(c));if(p){const u=p;if(Ut.get(u)||Ut.set(u,u.style.overflow),u.style.overflow!=="hidden"&&(r=u.style.overflow),u.style.overflow==="hidden")return n.value=!0;if(n.value)return u.style.overflow="hidden"}},{immediate:!0});const s=()=>{const c=Mt(Ve(e));!c||n.value||(Lt&&(o=Ye(c,"touchmove",p=>{Mi(p)},{passive:!1})),c.style.overflow="hidden",n.value=!0)},i=()=>{const c=Mt(Ve(e));!c||!n.value||(Lt&&(o==null||o()),c.style.overflow=r,Ut.delete(c),n.value=!1)};return Do(i),a.computed({get(){return n.value},set(c){c?s():i()}})}function Wi(){let e=!1;const t=a.ref(!1);return(n,o)=>{if(t.value=o.value,e)return;e=!0;const r=Ui(n,o.value);a.watch(t,s=>r.value=s)}}Wi();for(var B=[],Wt=0;Wt<256;++Wt)B.push((Wt+256).toString(16).slice(1));function Fi(e,t=0){return(B[e[t+0]]+B[e[t+1]]+B[e[t+2]]+B[e[t+3]]+"-"+B[e[t+4]]+B[e[t+5]]+"-"+B[e[t+6]]+B[e[t+7]]+"-"+B[e[t+8]]+B[e[t+9]]+"-"+B[e[t+10]]+B[e[t+11]]+B[e[t+12]]+B[e[t+13]]+B[e[t+14]]+B[e[t+15]]).toLowerCase()}var Qe,Hi=new Uint8Array(16);function zi(){if(!Qe&&(Qe=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qe(Hi)}var qi=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Lo={randomUUID:qi};function Gi(e,t,n){if(Lo.randomUUID&&!t&&!e)return Lo.randomUUID();e=e||{};var o=e.random||(e.rng||zi)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,Fi(o)}class Ji{constructor(t,n,o,r,s,i){fe(this,"id"),fe(this,"rows"),fe(this,"columns"),fe(this,"config"),fe(this,"table"),fe(this,"display"),fe(this,"modal"),this.id=t||Gi(),this.rows=o,this.columns=a.reactive(n),this.config=a.reactive(r),this.table=s||a.reactive(this.createTableObject()),this.display=this.createDisplayObject(i),this.modal=a.reactive({visible:!1})}createTableObject(){const t={};for(const[n,o]of this.columns.entries())for(const[r,s]of this.rows.entries())t[`${n}:${r}`]=s[o.name];return t}createDisplayObject(t){const n=[Object.assign({},{modified:!1})];if(t&&"0:0"in t)return t;const o=new Set;for(let r=this.rows.length-1;r>=0;r--){const s=this.rows[r];s.parent&&o.add(s.parent),n[r]={childrenOpen:!1,expanded:!1,indent:s.indent||null,isParent:o.has(r),isRoot:s.parent===null||s.parent===void 0,modified:!1,open:s.parent===null||s.parent===void 0,parent:s.parent}}return a.reactive(n)}get zeroColumn(){return["list","tree","list-expansion"].includes(this.config.view)}get numberedRowWidth(){return a.computed(()=>String(Math.ceil(this.rows.length/100)+1)+"ch")}cellData(t,n){return this.table[`${t}:${n}`]}setCellData(t,n,o){this.table[`${n}:${t}`]!==o&&(this.display[t].modified=!0),this.table[`${n}:${t}`]=o;const r=this.columns[n];return this.rows[t][r.name]=o,this.table[`${n}:${t}`]}toggleRowExpand(t){if(this.config.view==="tree"){this.display[t].childrenOpen=!this.display[t].childrenOpen;for(let n=this.rows.length-1;n>=0;n--)this.display[n].parent===t&&(this.display[n].open=!this.display[n].open,this.display[n].childrenOpen&&this.toggleRowExpand(n))}else this.config.view==="list-expansion"&&(this.display[t].expanded=!this.display[t].expanded)}}const Ki={key:0,id:"resizable"},Yi={class:"atable-header-row",tabindex:"-1"},Qi={key:0,id:"header-index"},Xi=a.defineComponent({__name:"ATableHeader",props:{columns:{},tableid:{}},setup(e){const t=a.inject(e.tableid),n=o=>({minWidth:o.width||"40ch",textAlign:o.align||"center",width:t.config.fullWidth?"auto":null});return(o,r)=>o.columns.length?(a.openBlock(),a.createElementBlock("thead",Ki,[a.createElementVNode("tr",Yi,[a.unref(t).zeroColumn?(a.openBlock(),a.createElementBlock("th",Qi)):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.columns,(s,i)=>(a.openBlock(),a.createElementBlock("th",{key:s.name,tabindex:"-1",style:a.normalizeStyle(n(s))},[a.renderSlot(o.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(s.label||String.fromCharCode(i+97).toUpperCase()),1)])],4))),128))])])):a.createCommentVNode("",!0)}}),Zi=a.defineComponent({__name:"ATableModal",props:{colIndex:{},rowIndex:{},tableid:{}},setup(e){const t=n=>{n.stopPropagation()};return(n,o)=>(a.openBlock(),a.createElementBlock("div",{class:"amodal",tabindex:"-1",onClick:t,onInput:t},[a.renderSlot(n.$slots,"default")],32))}}),ec=a.defineComponent({__name:"ATable",props:{id:{},modelValue:{},columns:{},rows:{default:()=>[]},config:{default:()=>new Object},tableid:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,o=e.modelValue?e.modelValue:e.rows,r=new Ji(e.id,e.columns,o,e.config);a.provide(r.id,r),a.watch(()=>r.rows,i=>{n("update:modelValue",i)},{deep:!0});const s=i=>{var c;i.target instanceof Node&&(c=r.modal.parent)!=null&&c.contains(i.target)||r.modal.visible&&(r.modal.visible=!1)};return window.addEventListener("keydown",i=>{if(i.key==="Escape"&&r.modal.visible){r.modal.visible=!1;const c=r.modal.parent;c&&a.nextTick().then(()=>{c.focus()})}}),(i,c)=>a.withDirectives((a.openBlock(),a.createElementBlock("table",{class:"atable",style:a.normalizeStyle({width:a.unref(r).config.fullWidth?"100%":"auto"})},[a.renderSlot(i.$slots,"header",{data:a.unref(r)},()=>[a.createVNode(Xi,{columns:a.unref(r).columns,tableid:a.unref(r).id},null,8,["columns","tableid"])]),a.createElementVNode("tbody",null,[a.renderSlot(i.$slots,"body",{data:a.unref(r)},()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(r).rows,(p,u)=>(a.openBlock(),a.createBlock(Ri,{key:p.id,row:p,rowIndex:u,tableid:a.unref(r).id},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(r).columns,(l,d)=>(a.openBlock(),a.createBlock(Pi,{key:l.name,tableid:a.unref(r).id,col:l,spellcheck:"false",rowIndex:u,colIndex:d+(a.unref(r).zeroColumn?0:-1),component:l.cellComponent,style:a.normalizeStyle({textAlign:(l==null?void 0:l.align)||"center",minWidth:(l==null?void 0:l.width)||"40ch",width:a.unref(r).config.fullWidth?"auto":null})},null,8,["tableid","col","rowIndex","colIndex","component","style"]))),128))]),_:2},1032,["row","rowIndex","tableid"]))),128))])]),a.renderSlot(i.$slots,"footer",{data:a.unref(r)}),a.renderSlot(i.$slots,"modal",{data:a.unref(r)},()=>[a.withDirectives(a.createVNode(Zi,{colIndex:a.unref(r).modal.colIndex,rowIndex:a.unref(r).modal.rowIndex,tableid:a.unref(r).id,style:a.normalizeStyle({left:a.unref(r).modal.left+"px",top:a.unref(r).modal.top+"px",maxWidth:a.unref(r).modal.width+"px"})},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(r).modal.component),a.mergeProps({key:`${a.unref(r).modal.rowIndex}:${a.unref(r).modal.colIndex}`,colIndex:a.unref(r).modal.colIndex,rowIndex:a.unref(r).modal.rowIndex,tableid:a.unref(r).id},a.unref(r).modal.componentProps),null,16,["colIndex","rowIndex","tableid"]))]),_:1},8,["colIndex","rowIndex","tableid","style"]),[[a.vShow,a.unref(r).modal.visible]])])],4)),[[a.unref(Li),s]])}}),Mo=a.defineComponent({__name:"Records",setup(e){const{stonecrop:t,isReady:n}=mn(),o={view:"list"};return(r,s)=>a.unref(n)?(a.openBlock(),a.createBlock(a.unref(ec),{key:0,columns:a.unref(t).schema.schema.toArray(),rows:a.unref(t).store.records,config:o},null,8,["columns","rows"])):a.createCommentVNode("",!0)}}),tc={class:"tabs"},nc={tabindex:"0"},oc={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 424.098 424.098",style:{"enable-background":"new 0 0 424.098 424.098"},"xml:space":"preserve"},rc={tabindex:"0"},ac={style:{width:"11pt"}},Uo=nt(a.defineComponent({__name:"SheetNav",props:{breadcrumbs:{default:()=>[]}},setup(e){const t=a.ref(!0),n=a.ref(!1),o=a.ref(""),r=a.useTemplateRef("searchinput"),s=a.computed(()=>t.value?"unrotated":"rotated"),i=()=>{t.value=!t.value},c=async()=>{n.value=!n.value,await a.nextTick(()=>{r.value.focus()})},p=d=>{d.preventDefault(),d.stopPropagation()},u=async d=>{d.preventDefault(),d.stopPropagation(),await c()},l=()=>{};return(d,f)=>{const h=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("footer",null,[a.createElementVNode("ul",tc,[a.createElementVNode("li",{class:"hidebreadcrumbs",onClick:i,onKeydown:a.withKeys(i,["enter"])},[a.createElementVNode("a",nc,[a.createElementVNode("div",{class:a.normalizeClass(s.value)},"ร",2)])],32),a.createElementVNode("li",{class:"hometab",onClick:l,onKeydown:a.withKeys(l,["enter"]),style:a.normalizeStyle({display:t.value?"block":"none"})},[a.createVNode(h,{to:"/home",tabindex:"0"},{default:a.withCtx(()=>[(a.openBlock(),a.createElementBlock("svg",oc,f[5]||(f[5]=[a.createElementVNode("g",null,[a.createElementVNode("path",{style:{fill:"#010002"},d:`M351.191,401.923H72.901c-4.487,0-8.129-3.633-8.129-8.129V242.262l-56.664-0.114
|
|
37
|
+
</router-view>`)}}function Ce(e,t){const n=P({},e,{matched:e.matched.map(o=>es(o,["instances","children","aliasOf"]))});return{_custom:{type:null,readOnly:!0,display:e.fullPath,tooltip:t,value:n}}}function qe(e){return{_custom:{display:e}}}let Ha=0;function za(e,t,n){if(t.__hasDevtools)return;t.__hasDevtools=!0;const o=Ha++;st({id:"org.vuejs.router"+(o?"."+o:""),label:"Vue Router",packageName:"vue-router",homepage:"https://router.vuejs.org",logo:"https://router.vuejs.org/logo.png",componentStateTypes:["Routing"],app:e},r=>{typeof r.now!="function"&&console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),r.on.inspectComponent((l,p)=>{l.instanceData&&l.instanceData.state.push({type:"Routing",key:"$route",editable:!1,value:Ce(t.currentRoute.value,"Current Route")})}),r.on.visitComponentTree(({treeNode:l,componentInstance:p})=>{if(p.__vrv_devtools){const f=p.__vrv_devtools;l.tags.push({label:(f.name?`${f.name.toString()}: `:"")+f.path,textColor:0,tooltip:"This component is rendered by <router-view>",backgroundColor:qn})}F(p.__vrl_devtools)&&(p.__devtoolsApi=r,p.__vrl_devtools.forEach(f=>{let h=f.route.path,g=Kn,v="",N=0;f.error?(h=f.error,g=Ya,N=Qa):f.isExactActive?(g=Jn,v="This is exactly active"):f.isActive&&(g=Gn,v="This link is active"),l.tags.push({label:h,textColor:N,tooltip:v,backgroundColor:g})}))}),a.watch(t.currentRoute,()=>{u(),r.notifyComponentUpdate(),r.sendInspectorTree(c),r.sendInspectorState(c)});const s="router:navigations:"+o;r.addTimelineLayer({id:s,label:`Router${o?" "+o:""} Navigations`,color:4237508}),t.onError((l,p)=>{r.addTimelineEvent({layerId:s,event:{title:"Error during Navigation",subtitle:p.fullPath,logType:"error",time:r.now(),data:{error:l},groupId:p.meta.__navigationId}})});let i=0;t.beforeEach((l,p)=>{const f={guard:qe("beforeEach"),from:Ce(p,"Current Location during this navigation"),to:Ce(l,"Target location")};Object.defineProperty(l.meta,"__navigationId",{value:i++}),r.addTimelineEvent({layerId:s,event:{time:r.now(),title:"Start of navigation",subtitle:l.fullPath,data:f,groupId:l.meta.__navigationId}})}),t.afterEach((l,p,f)=>{const h={guard:qe("afterEach")};f?(h.failure={_custom:{type:Error,readOnly:!0,display:f?f.message:"",tooltip:"Navigation Failure",value:f}},h.status=qe("โ")):h.status=qe("โ
"),h.from=Ce(p,"Current Location during this navigation"),h.to=Ce(l,"Target location"),r.addTimelineEvent({layerId:s,event:{title:"End of navigation",subtitle:l.fullPath,time:r.now(),data:h,logType:f?"warning":"default",groupId:l.meta.__navigationId}})});const c="router-inspector:"+o;r.addInspector({id:c,label:"Routes"+(o?" "+o:""),icon:"book",treeFilterPlaceholder:"Search routes"});function u(){if(!d)return;const l=d;let p=n.getRoutes().filter(f=>!f.parent||!f.parent.record.components);p.forEach(Xn),l.filter&&(p=p.filter(f=>_t(f,l.filter.toLowerCase()))),p.forEach(f=>Qn(f,t.currentRoute.value)),l.rootNodes=p.map(Yn)}let d;r.on.getInspectorTree(l=>{d=l,l.app===e&&l.inspectorId===c&&u()}),r.on.getInspectorState(l=>{if(l.app===e&&l.inspectorId===c){const p=n.getRoutes().find(f=>f.record.__vd_id===l.nodeId);p&&(l.state={options:Ga(p)})}}),r.sendInspectorTree(c),r.sendInspectorState(c)})}function qa(e){return e.optional?e.repeatable?"*":"?":e.repeatable?"+":""}function Ga(e){const{record:t}=e,n=[{editable:!1,key:"path",value:t.path}];return t.name!=null&&n.push({editable:!1,key:"name",value:t.name}),n.push({editable:!1,key:"regexp",value:e.re}),e.keys.length&&n.push({editable:!1,key:"keys",value:{_custom:{type:null,readOnly:!0,display:e.keys.map(o=>`${o.name}${qa(o)}`).join(" "),tooltip:"Param keys",value:e.keys}}}),t.redirect!=null&&n.push({editable:!1,key:"redirect",value:t.redirect}),e.alias.length&&n.push({editable:!1,key:"aliases",value:e.alias.map(o=>o.record.path)}),Object.keys(e.record.meta).length&&n.push({editable:!1,key:"meta",value:e.record.meta}),n.push({key:"score",editable:!1,value:{_custom:{type:null,readOnly:!0,display:e.score.map(o=>o.join(", ")).join(" | "),tooltip:"Score used to sort routes",value:e.score}}}),n}const qn=15485081,Gn=2450411,Jn=8702998,Ja=2282478,Kn=16486972,Ka=6710886,Ya=16704226,Qa=12131356;function Yn(e){const t=[],{record:n}=e;n.name!=null&&t.push({label:String(n.name),textColor:0,backgroundColor:Ja}),n.aliasOf&&t.push({label:"alias",textColor:0,backgroundColor:Kn}),e.__vd_match&&t.push({label:"matches",textColor:0,backgroundColor:qn}),e.__vd_exactActive&&t.push({label:"exact",textColor:0,backgroundColor:Jn}),e.__vd_active&&t.push({label:"active",textColor:0,backgroundColor:Gn}),n.redirect&&t.push({label:typeof n.redirect=="string"?`redirect: ${n.redirect}`:"redirects",textColor:16777215,backgroundColor:Ka});let o=n.__vd_id;return o==null&&(o=String(Xa++),n.__vd_id=o),{id:o,label:n.path,tags:t,children:e.children.map(Yn)}}let Xa=0;const Za=/^\/(.*)\/([a-z]*)$/;function Qn(e,t){const n=t.matched.length&&ie(t.matched[t.matched.length-1],e.record);e.__vd_exactActive=e.__vd_active=n,n||(e.__vd_active=t.matched.some(o=>ie(o,e.record))),e.children.forEach(o=>Qn(o,t))}function Xn(e){e.__vd_match=!1,e.children.forEach(Xn)}function _t(e,t){const n=String(e.re).match(Za);if(e.__vd_match=!1,!n||n.length<3)return!1;if(new RegExp(n[1].replace(/\$$/,""),n[2]).test(t))return e.children.forEach(s=>_t(s,t)),e.record.path!=="/"||t==="/"?(e.__vd_match=e.re.test(t),!0):!1;const o=e.record.path.toLowerCase(),r=ye(o);return!t.startsWith("/")&&(r.includes(t)||o.includes(t))||r.startsWith(t)||o.startsWith(t)||e.record.name&&String(e.record.name).includes(t)?!0:e.children.some(s=>_t(s,t))}function es(e,t){const n={};for(const o in e)t.includes(o)||(n[o]=e[o]);return n}function ts(e){const t=Sa(e.routes,e),n=e.parseQuery||Va,o=e.stringifyQuery||Ln,r=e.history;if(process.env.NODE_ENV!=="production"&&!r)throw new Error('Provide the "history" option when calling "createRouter()": https://router.vuejs.org/api/interfaces/RouterOptions.html#history');const s=xe(),i=xe(),c=xe(),u=a.shallowRef(ce);let d=ce;te&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const l=pt.bind(null,m=>""+m),p=pt.bind(null,Qr),f=pt.bind(null,ye);function h(m,w){let y,k;return Cn(m)?(y=t.getRecordMatcher(m),process.env.NODE_ENV!=="production"&&!y&&O(`Parent route "${String(m)}" not found when adding child route`,w),k=w):k=m,t.addRoute(k,y)}function g(m){const w=t.getRecordMatcher(m);w?t.removeRoute(w):process.env.NODE_ENV!=="production"&&O(`Cannot remove non-existent route "${String(m)}"`)}function v(){return t.getRoutes().map(m=>m.record)}function N(m){return!!t.getRecordMatcher(m)}function _(m,w){if(w=P({},w||u.value),typeof m=="string"){const x=mt(n,m,w.path),R=t.resolve({path:x.path},w),he=r.createHref(x.fullPath);return process.env.NODE_ENV!=="production"&&(he.startsWith("//")?O(`Location "${m}" resolved to "${he}". A resolved location cannot start with multiple slashes.`):R.matched.length||O(`No match found for location with path "${m}"`)),P(x,R,{params:f(R.params),hash:ye(x.hash),redirectedFrom:void 0,href:he})}if(process.env.NODE_ENV!=="production"&&!ze(m))return O(`router.resolve() was passed an invalid location. This will fail in production.
|
|
38
|
+
- Location:`,m),_({});let y;if(m.path!=null)process.env.NODE_ENV!=="production"&&"params"in m&&!("name"in m)&&Object.keys(m.params).length&&O(`Path "${m.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),y=P({},m,{path:mt(n,m.path,w.path).path});else{const x=P({},m.params);for(const R in x)x[R]==null&&delete x[R];y=P({},m,{params:p(x)}),w.params=p(w.params)}const k=t.resolve(y,w),D=m.hash||"";process.env.NODE_ENV!=="production"&&D&&!D.startsWith("#")&&O(`A \`hash\` should always start with the character "#". Replace "${D}" with "#${D}".`),k.params=l(f(k.params));const T=ea(o,P({},m,{hash:Jr(D),path:k.path})),C=r.createHref(T);return process.env.NODE_ENV!=="production"&&(C.startsWith("//")?O(`Location "${m}" resolved to "${C}". A resolved location cannot start with multiple slashes.`):k.matched.length||O(`No match found for location with path "${m.path!=null?m.path:m}"`)),P({fullPath:T,hash:D,query:o===Ln?Ra(m.query):m.query||{}},k,{redirectedFrom:void 0,href:C})}function S(m){return typeof m=="string"?mt(n,m,u.value.path):P({},m)}function I(m,w){if(d!==m)return we(8,{from:w,to:m})}function j(m){return $(m)}function U(m){return j(P(S(m),{replace:!0}))}function K(m){const w=m.matched[m.matched.length-1];if(w&&w.redirect){const{redirect:y}=w;let k=typeof y=="function"?y(m):y;if(typeof k=="string"&&(k=k.includes("?")||k.includes("#")?k=S(k):{path:k},k.params={}),process.env.NODE_ENV!=="production"&&k.path==null&&!("name"in k))throw O(`Invalid redirect found:
|
|
39
|
+
${JSON.stringify(k,null,2)}
|
|
40
|
+
when navigating to "${m.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect");return P({query:m.query,hash:m.hash,params:k.path!=null?{}:m.params},k)}}function $(m,w){const y=d=_(m),k=u.value,D=m.state,T=m.force,C=m.replace===!0,x=K(y);if(x)return $(P(S(x),{state:typeof x=="object"?P({},D,x.state):D,force:T,replace:C}),w||y);const R=y;R.redirectedFrom=w;let he;return!T&&kn(o,k,y)&&(he=we(16,{to:R,from:k}),Wo(k,k,!0,!1)),(he?Promise.resolve(he):b(R,k)).catch(W=>ne(W)?ne(W,2)?W:Ft(W):M(W,R,k)).then(W=>{if(W){if(ne(W,2))return process.env.NODE_ENV!=="production"&&kn(o,_(W.to),R)&&w&&(w._count=w._count?w._count+1:1)>30?(O(`Detected a possibly infinite redirection in a navigation guard when going from "${k.fullPath}" to "${R.fullPath}". Aborting to avoid a Stack Overflow.
|
|
41
|
+
Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):$(P({replace:C},S(W.to),{state:typeof W.to=="object"?P({},D,W.to.state):D,force:T}),w||R)}else W=H(R,k,!0,C,D);return V(R,k,W),W})}function X(m,w){const y=I(m,w);return y?Promise.reject(y):Promise.resolve()}function E(m){const w=Ze.values().next().value;return w&&typeof w.runWithContext=="function"?w.runWithContext(m):m()}function b(m,w){let y;const[k,D,T]=ns(m,w);y=Et(k.reverse(),"beforeRouteLeave",m,w);for(const x of k)x.leaveGuards.forEach(R=>{y.push(le(R,m,w))});const C=X.bind(null,m,w);return y.push(C),Ee(y).then(()=>{y=[];for(const x of s.list())y.push(le(x,m,w));return y.push(C),Ee(y)}).then(()=>{y=Et(D,"beforeRouteUpdate",m,w);for(const x of D)x.updateGuards.forEach(R=>{y.push(le(R,m,w))});return y.push(C),Ee(y)}).then(()=>{y=[];for(const x of T)if(x.beforeEnter)if(F(x.beforeEnter))for(const R of x.beforeEnter)y.push(le(R,m,w));else y.push(le(x.beforeEnter,m,w));return y.push(C),Ee(y)}).then(()=>(m.matched.forEach(x=>x.enterCallbacks={}),y=Et(T,"beforeRouteEnter",m,w,E),y.push(C),Ee(y))).then(()=>{y=[];for(const x of i.list())y.push(le(x,m,w));return y.push(C),Ee(y)}).catch(x=>ne(x,8)?x:Promise.reject(x))}function V(m,w,y){c.list().forEach(k=>E(()=>k(m,w,y)))}function H(m,w,y,k,D){const T=I(m,w);if(T)return T;const C=w===ce,x=te?history.state:{};y&&(k||C?r.replace(m.fullPath,P({scroll:C&&x&&x.scroll},D)):r.push(m.fullPath,D)),u.value=m,Wo(m,w,y,C),Ft()}let Y;function Ae(){Y||(Y=r.listen((m,w,y)=>{const k=_(m),D=K(k);if(D){$(P(D,{replace:!0}),k).catch(Se);return}d=k;const T=u.value;te&&ca(Nn(T.fullPath,y.delta),He()),b(k,T).catch(C=>ne(C,12)?C:ne(C,2)?($(C.to,k).then(x=>{ne(x,20)&&!y.delta&&y.type===Ne.pop&&r.go(-1,!1)}).catch(Se),Promise.reject()):(y.delta&&r.go(-y.delta,!1),M(C,k,T))).then(C=>{C=C||H(k,T,!1),C&&(y.delta&&!ne(C,8)?r.go(-y.delta,!1):y.type===Ne.pop&&ne(C,20)&&r.go(-1,!1)),V(k,T,C)}).catch(Se)}))}let je=xe(),Xe=xe(),Z;function M(m,w,y){Ft(m);const k=Xe.list();return k.length?k.forEach(D=>D(m,w,y)):(process.env.NODE_ENV!=="production"&&O("uncaught error during route navigation:"),console.error(m)),Promise.reject(m)}function ic(){return Z&&u.value!==ce?Promise.resolve():new Promise((m,w)=>{je.add([m,w])})}function Ft(m){return Z||(Z=!m,Ae(),je.list().forEach(([w,y])=>m?y(m):w()),je.reset()),m}function Wo(m,w,y,k){const{scrollBehavior:D}=e;if(!te||!D)return Promise.resolve();const T=!y&&la(Nn(m.fullPath,0))||(k||!y)&&history.state&&history.state.scroll||null;return a.nextTick().then(()=>D(m,w,T)).then(C=>C&&ia(C)).catch(C=>M(C,m,w))}const Ht=m=>r.go(m);let zt;const Ze=new Set,cc={currentRoute:u,listening:!0,addRoute:h,removeRoute:g,clearRoutes:t.clearRoutes,hasRoute:N,getRoutes:v,resolve:_,options:e,push:j,replace:U,go:Ht,back:()=>Ht(-1),forward:()=>Ht(1),beforeEach:s.add,beforeResolve:i.add,afterEach:c.add,onError:Xe.add,isReady:ic,install(m){const w=this;m.component("RouterLink",Ba),m.component("RouterView",Wa),m.config.globalProperties.$router=w,Object.defineProperty(m.config.globalProperties,"$route",{enumerable:!0,get:()=>a.unref(u)}),te&&!zt&&u.value===ce&&(zt=!0,j(r.location).catch(D=>{process.env.NODE_ENV!=="production"&&O("Unexpected error when starting the router:",D)}));const y={};for(const D in ce)Object.defineProperty(y,D,{get:()=>u.value[D],enumerable:!0});m.provide(bt,w),m.provide(Un,a.shallowReactive(y)),m.provide(vt,u);const k=m.unmount;Ze.add(m),m.unmount=function(){Ze.delete(m),Ze.size<1&&(d=ce,Y&&Y(),Y=null,u.value=ce,zt=!1,Z=!1),k()},process.env.NODE_ENV!=="production"&&te&&za(m,w,t)}};function Ee(m){return m.reduce((w,y)=>w.then(()=>E(y)),Promise.resolve())}return cc}function ns(e,t){const n=[],o=[],r=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;i<s;i++){const c=t.matched[i];c&&(e.matched.find(d=>ie(d,c))?o.push(c):n.push(c));const u=e.matched[i];u&&(t.matched.find(d=>ie(d,u))||r.push(u))}return[n,o,r]}ts({history:fa(),routes:[]});function os(e){return e&&typeof e.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var be=Promise.resolve();function Zn(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function rs(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function kt(){return Math.random().toString(36).substring(2)}var eo=0,$t=0;function Ge(){var e=new Date().getTime();return e===eo?($t++,e*1e3+$t):(eo=e,$t=0,e*1e3)}var as=Ge,ss="native";function is(e){var t={messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function cs(e){e.bc.close(),e.subFns=[]}function ls(e,t){try{return e.bc.postMessage(t,!1),be}catch(n){return Promise.reject(n)}}function us(e,t){e.messagesCallback=t}function ds(){if(typeof window>"u")return!1;if(typeof BroadcastChannel=="function"){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}else return!1}function ps(){return 150}var fs={create:is,close:cs,onMessage:us,postMessage:ls,canBeUsed:ds,type:ss,averageResponseTime:ps,microSeconds:as},to=function(){function e(t){this.ttl=t,this.map=new Map,this._to=!1}return e.prototype.has=function(t){return this.map.has(t)},e.prototype.add=function(t){var n=this;this.map.set(t,no()),this._to||(this._to=!0,setTimeout(function(){n._to=!1,hs(n)},0))},e.prototype.clear=function(){this.map.clear()},e}();function hs(e){for(var t=no()-e.ttl,n=e.map[Symbol.iterator]();;){var o=n.next().value;if(!o)return;var r=o[0],s=o[1];if(s<t)e.map.delete(r);else return}}function no(){return new Date().getTime()}function St(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return typeof t.webWorkerSupport>"u"&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=1e3*45),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&typeof e.idb.onclose=="function"&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=1e3*60),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=1e3*60*2),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),typeof t.node.useFastPath>"u"&&(t.node.useFastPath=!0),t}var ms=Ge,gs="pubkey.broadcast-channel-0-",oe="messages",Je={durability:"relaxed"},ys="idb";function oo(){if(typeof indexedDB<"u")return indexedDB;if(typeof window<"u"){if(typeof window.mozIndexedDB<"u")return window.mozIndexedDB;if(typeof window.webkitIndexedDB<"u")return window.webkitIndexedDB;if(typeof window.msIndexedDB<"u")return window.msIndexedDB}return!1}function Nt(e){e.commit&&e.commit()}function ws(e){var t=oo(),n=gs+e,o=t.open(n);return o.onupgradeneeded=function(r){var s=r.target.result;s.createObjectStore(oe,{keyPath:"id",autoIncrement:!0})},new Promise(function(r,s){o.onerror=function(i){return s(i)},o.onsuccess=function(){r(o.result)}})}function bs(e,t,n){var o=new Date().getTime(),r={uuid:t,time:o,data:n},s=e.transaction([oe],"readwrite",Je);return new Promise(function(i,c){s.oncomplete=function(){return i()},s.onerror=function(d){return c(d)};var u=s.objectStore(oe);u.add(r),Nt(s)})}function vs(e,t){var n=e.transaction(oe,"readonly",Je),o=n.objectStore(oe),r=[],s=IDBKeyRange.bound(t+1,1/0);if(o.getAll){var i=o.getAll(s);return new Promise(function(u,d){i.onerror=function(l){return d(l)},i.onsuccess=function(l){u(l.target.result)}})}function c(){try{return s=IDBKeyRange.bound(t+1,1/0),o.openCursor(s)}catch{return o.openCursor()}}return new Promise(function(u,d){var l=c();l.onerror=function(p){return d(p)},l.onsuccess=function(p){var f=p.target.result;f?f.value.id<t+1?f.continue(t+1):(r.push(f.value),f.continue()):(Nt(n),u(r))}})}function Es(e,t){if(e.closed)return Promise.resolve([]);var n=e.db.transaction(oe,"readwrite",Je),o=n.objectStore(oe);return Promise.all(t.map(function(r){var s=o.delete(r);return new Promise(function(i){s.onsuccess=function(){return i()}})}))}function _s(e,t){var n=new Date().getTime()-t,o=e.transaction(oe,"readonly",Je),r=o.objectStore(oe),s=[];return new Promise(function(i){r.openCursor().onsuccess=function(c){var u=c.target.result;if(u){var d=u.value;d.time<n?(s.push(d),u.continue()):(Nt(o),i(s))}else i(s)}})}function ks(e){return _s(e.db,e.options.idb.ttl).then(function(t){return Es(e,t.map(function(n){return n.id}))})}function $s(e,t){return t=St(t),ws(e).then(function(n){var o={closed:!1,lastCursorId:0,channelName:e,options:t,uuid:kt(),eMIs:new to(t.idb.ttl*2),writeBlockPromise:be,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){o.closed=!0,t.idb.onclose&&t.idb.onclose()},ro(o),o})}function ro(e){e.closed||ao(e).then(function(){return Zn(e.options.idb.fallbackInterval)}).then(function(){return ro(e)})}function Ss(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time<t.messagesCallbackTime)}function ao(e){return e.closed||!e.messagesCallback?be:vs(e.db,e.lastCursorId).then(function(t){var n=t.filter(function(o){return!!o}).map(function(o){return o.id>e.lastCursorId&&(e.lastCursorId=o.id),o}).filter(function(o){return Ss(o,e)}).sort(function(o,r){return o.time-r.time});return n.forEach(function(o){e.messagesCallback&&(e.eMIs.add(o.id),e.messagesCallback(o.data))}),be})}function Ns(e){e.closed=!0,e.db.close()}function Os(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return bs(e.db,e.uuid,t)}).then(function(){rs(0,10)===0&&ks(e)}),e.writeBlockPromise}function xs(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,ao(e)}function Cs(){return!!oo()}function Is(e){return e.idb.fallbackInterval*2}var Ps={create:$s,close:Ns,onMessage:xs,postMessage:Os,canBeUsed:Cs,type:ys,averageResponseTime:Is,microSeconds:ms},Ds=Ge,Vs="pubkey.broadcastChannel-",Rs="localstorage";function so(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function io(e){return Vs+e}function Ts(e,t){return new Promise(function(n){Zn().then(function(){var o=io(e.channelName),r={token:kt(),time:new Date().getTime(),data:t,uuid:e.uuid},s=JSON.stringify(r);so().setItem(o,s);var i=document.createEvent("Event");i.initEvent("storage",!0,!0),i.key=o,i.newValue=s,window.dispatchEvent(i),n()})})}function As(e,t){var n=io(e),o=function(r){r.key===n&&t(JSON.parse(r.newValue))};return window.addEventListener("storage",o),o}function js(e){window.removeEventListener("storage",e)}function Bs(e,t){if(t=St(t),!co())throw new Error("BroadcastChannel: localstorage cannot be used");var n=kt(),o=new to(t.localstorage.removeTimeout),r={channelName:e,uuid:n,eMIs:o};return r.listener=As(e,function(s){r.messagesCallback&&s.uuid!==n&&(!s.token||o.has(s.token)||s.data.time&&s.data.time<r.messagesCallbackTime||(o.add(s.token),r.messagesCallback(s.data)))}),r}function Ls(e){js(e.listener)}function Ms(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t}function co(){var e=so();if(!e)return!1;try{var t="__broadcastchannel_check";e.setItem(t,"works"),e.removeItem(t)}catch{return!1}return!0}function Us(){var e=120,t=navigator.userAgent.toLowerCase();return t.includes("safari")&&!t.includes("chrome")?e*2:e}var Ws={create:Bs,close:Ls,onMessage:Ms,postMessage:Ts,canBeUsed:co,type:Rs,averageResponseTime:Us,microSeconds:Ds},Fs=Ge,Hs="simulate",Ot=new Set;function zs(e){var t={name:e,messagesCallback:null};return Ot.add(t),t}function qs(e){Ot.delete(e)}function Gs(e,t){return new Promise(function(n){return setTimeout(function(){var o=Array.from(Ot);o.filter(function(r){return r.name===e.name}).filter(function(r){return r!==e}).filter(function(r){return!!r.messagesCallback}).forEach(function(r){return r.messagesCallback(t)}),n()},5)})}function Js(e,t){e.messagesCallback=t}function Ks(){return!0}function Ys(){return 5}var Qs={create:zs,close:qs,onMessage:Js,postMessage:Gs,canBeUsed:Ks,type:Hs,averageResponseTime:Ys,microSeconds:Fs},lo=[fs,Ps,Ws];function Xs(e){var t=[].concat(e.methods,lo).filter(Boolean);if(e.type){if(e.type==="simulate")return Qs;var n=t.find(function(r){return r.type===e.type});if(n)return n;throw new Error("method-type "+e.type+" not found")}e.webWorkerSupport||(t=t.filter(function(r){return r.type!=="idb"}));var o=t.find(function(r){return r.canBeUsed()});if(o)return o;throw new Error("No usable method found in "+JSON.stringify(lo.map(function(r){return r.type})))}var uo=new Set,Zs=0,xt=function(e,t){this.id=Zs++,uo.add(this),this.name=e,this.options=St(t),this.method=Xs(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,ei(this)};xt._pubkey=!0,xt.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return po(this,"message",e)},postInternal:function(e){return po(this,"internal",e)},set onmessage(e){var t=this.method.microSeconds(),n={time:t,fn:e};mo(this,"message",this._onML),e&&typeof e=="function"?(this._onML=n,ho(this,"message",n)):this._onML=null},addEventListener:function(e,t){var n=this.method.microSeconds(),o={time:n,fn:t};ho(this,e,o)},removeEventListener:function(e,t){var n=this._addEL[e].find(function(o){return o.fn===t});mo(this,e,n)},close:function(){var e=this;if(!this.closed){uo.delete(this),this.closed=!0;var t=this._prepP?this._prepP:be;return this._onML=null,this._addEL.message=[],t.then(function(){return Promise.all(Array.from(e._uMP))}).then(function(){return Promise.all(e._befC.map(function(n){return n()}))}).then(function(){return e.method.close(e._state)})}},get type(){return this.method.type},get isClosed(){return this.closed}};function po(e,t,n){var o=e.method.microSeconds(),r={time:o,type:t,data:n},s=e._prepP?e._prepP:be;return s.then(function(){var i=e.method.postMessage(e._state,r);return e._uMP.add(i),i.catch().then(function(){return e._uMP.delete(i)}),i})}function ei(e){var t=e.method.create(e.name,e.options);os(t)?(e._prepP=t,t.then(function(n){e._state=n})):e._state=t}function fo(e){return e._addEL.message.length>0||e._addEL.internal.length>0}function ho(e,t,n){e._addEL[t].push(n),ti(e)}function mo(e,t,n){e._addEL[t]=e._addEL[t].filter(function(o){return o!==n}),ni(e)}function ti(e){if(!e._iL&&fo(e)){var t=function(o){e._addEL[o.type].forEach(function(r){var s=1e5,i=r.time-s;o.time>=i&&r.fn(o.data)})},n=e.method.microSeconds();e._prepP?e._prepP.then(function(){e._iL=!0,e.method.onMessage(e._state,t,n)}):(e._iL=!0,e.method.onMessage(e._state,t,n))}}function ni(e){if(e._iL&&!fo(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}let Ct=class extends Error{constructor(t,n){super(t),this.name="DevalueError",this.path=n.join("")}};function go(e){return Object(e)!==e}const oi=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ri(e){const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===oi}function ai(e){return Object.prototype.toString.call(e).slice(8,-1)}function si(e){switch(e){case'"':return'\\"';case"<":return"\\u003C";case"\\":return"\\\\";case`
|
|
42
|
+
`:return"\\n";case"\r":return"\\r";case" ":return"\\t";case"\b":return"\\b";case"\f":return"\\f";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return e<" "?`\\u${e.charCodeAt(0).toString(16).padStart(4,"0")}`:""}}function ve(e){let t="",n=0;const o=e.length;for(let r=0;r<o;r+=1){const s=e[r],i=si(s);i&&(t+=e.slice(n,r)+i,n=r+1)}return`"${n===0?e:t+e.slice(n)}"`}const It=-1,yo=-2,wo=-3,bo=-4,vo=-5,Pt=-6;function Eo(e,t){return ii(JSON.parse(e))}function ii(e,t){if(typeof e=="number")return r(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,o=Array(n.length);function r(s,i=!1){if(s===It)return;if(s===wo)return NaN;if(s===bo)return 1/0;if(s===vo)return-1/0;if(s===Pt)return-0;if(i)throw new Error("Invalid input");if(s in o)return o[s];const c=n[s];if(!c||typeof c!="object")o[s]=c;else if(Array.isArray(c))if(typeof c[0]=="string"){const u=c[0];switch(u){case"Date":o[s]=new Date(c[1]);break;case"Set":const d=new Set;o[s]=d;for(let f=1;f<c.length;f+=1)d.add(r(c[f]));break;case"Map":const l=new Map;o[s]=l;for(let f=1;f<c.length;f+=2)l.set(r(c[f]),r(c[f+1]));break;case"RegExp":o[s]=new RegExp(c[1],c[2]);break;case"Object":o[s]=Object(c[1]);break;case"BigInt":o[s]=BigInt(c[1]);break;case"null":const p=Object.create(null);o[s]=p;for(let f=1;f<c.length;f+=2)p[c[f]]=r(c[f+1]);break;default:throw new Error(`Unknown type ${u}`)}}else{const u=new Array(c.length);o[s]=u;for(let d=0;d<c.length;d+=1){const l=c[d];l!==yo&&(u[d]=r(l))}}else{const u={};o[s]=u;for(const d in c){const l=c[d];u[d]=r(l)}}return o[s]}return r(0)}function _o(e,t){const n=[],o=new Map,r=[];for(const d in t)r.push({key:d,fn:t[d]});const s=[];let i=0;function c(d){if(typeof d=="function")throw new Ct("Cannot stringify a function",s);if(o.has(d))return o.get(d);if(d===void 0)return It;if(Number.isNaN(d))return wo;if(d===1/0)return bo;if(d===-1/0)return vo;if(d===0&&1/d<0)return Pt;const l=i++;o.set(d,l);for(const{key:f,fn:h}of r){const g=h(d);if(g)return n[l]=`["${f}",${c(g)}]`,l}let p="";if(go(d))p=Dt(d);else switch(ai(d)){case"Number":case"String":case"Boolean":p=`["Object",${Dt(d)}]`;break;case"BigInt":p=`["BigInt",${d}]`;break;case"Date":p=`["Date","${isNaN(d.getDate())?"":d.toISOString()}"]`;break;case"RegExp":const{source:f,flags:h}=d;p=h?`["RegExp",${ve(f)},"${h}"]`:`["RegExp",${ve(f)}]`;break;case"Array":p="[";for(let g=0;g<d.length;g+=1)g>0&&(p+=","),g in d?(s.push(`[${g}]`),p+=c(d[g]),s.pop()):p+=yo;p+="]";break;case"Set":p='["Set"';for(const g of d)p+=`,${c(g)}`;p+="]";break;case"Map":p='["Map"';for(const[g,v]of d)s.push(`.get(${go(g)?Dt(g):"..."})`),p+=`,${c(g)},${c(v)}`,s.pop();p+="]";break;default:if(!ri(d))throw new Ct("Cannot stringify arbitrary non-POJOs",s);if(Object.getOwnPropertySymbols(d).length>0)throw new Ct("Cannot stringify POJOs with symbolic keys",s);if(Object.getPrototypeOf(d)===null){p='["null"';for(const g in d)s.push(`.${g}`),p+=`,${ve(g)},${c(d[g])}`,s.pop();p+="]"}else{p="{";let g=!1;for(const v in d)g&&(p+=","),g=!0,s.push(`.${v}`),p+=`${ve(v)}:${c(d[v])}`,s.pop();p+="}"}}return n[l]=p,l}const u=c(e);return u<0?`${u}`:`[${n.join(",")}]`}function Dt(e){const t=typeof e;return t==="string"?ve(e):e instanceof String?ve(e.toString()):e===void 0?It.toString():e===0&&1/e<0?Pt.toString():t==="bigint"?`["BigInt","${e}"]`:String(e)}function ci(e,t,{initialize:n,type:o}){let r=`${t.$id}-${e.toString()}`,s=new xt(r,{type:o}),i=!1,c=0;a.watch(()=>t[e],l=>{i||(c=Date.now(),s.postMessage({timestamp:c,state:Eo(_o(l))})),i=!1},{deep:!0}),s.onmessage=l=>{if(l===void 0){s.postMessage({timestamp:c,state:Eo(_o(t[e]))});return}l.timestamp<=c||(i=!0,c=l.timestamp,t[e]=l.state)};let u=()=>s.postMessage(void 0),d=()=>s.close();return n&&u(),{sync:u,unshare:d}}var li=(e,t)=>Object.keys(t).includes(e),ui=({initialize:e=!0,enable:t=!0,type:n})=>({store:o,options:r})=>{var s,i;let c=((s=r==null?void 0:r.share)==null?void 0:s.enable)??t,u=((i=r==null?void 0:r.share)==null?void 0:i.omit)??[];!c||Object.keys(o.$state).forEach(d=>{var l;u.includes(d)||!li(d,o.$state)||ci(d,o,{initialize:((l=r==null?void 0:r.share)==null?void 0:l.initialize)??e,type:n})})};Dr().use(ui({enable:!0,initialize:!0}));const ko=a.defineComponent({__name:"Doctype",setup(e){const{stonecrop:t,isReady:n}=mn(),o=a.ref([]);return a.watch(n,()=>{if(n.value){let r=t.value.schema.schema.toArray();r.forEach((s,i)=>{const u=t.value.store.record[s.fieldname];r[i].value=u}),o.value=r}}),(r,s)=>a.unref(n)?(a.openBlock(),a.createBlock(a.unref(rr),{key:0,class:"aform-main",modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=i=>o.value=i)},null,8,["modelValue"])):a.createCommentVNode("",!0)}});var di=Object.defineProperty,pi=(e,t,n)=>t in e?di(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fe=(e,t,n)=>pi(e,typeof t!="symbol"?t+"":t,n);function $o(e){return a.getCurrentScope()?(a.onScopeDispose(e),!0):!1}function Vt(e){return typeof e=="function"?e():a.unref(e)}const fi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const hi=e=>e!=null,mi=Object.prototype.toString,gi=e=>mi.call(e)==="[object Object]",yi=()=>{},Ie=fi?window:void 0;function Pe(e){var t;const n=Vt(e);return(t=n==null?void 0:n.$el)!=null?t:n}function De(...e){let t,n,o,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,r]=e,t=Ie):[t,n,o,r]=e,!t)return yi;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const s=[],i=()=>{s.forEach(l=>l()),s.length=0},c=(l,p,f,h)=>(l.addEventListener(p,f,h),()=>l.removeEventListener(p,f,h)),u=a.watch(()=>[Pe(t),Vt(r)],([l,p])=>{if(i(),!l)return;const f=gi(p)?{...p}:p;s.push(...n.flatMap(h=>o.map(g=>c(l,h,g,f))))},{immediate:!0,flush:"post"}),d=()=>{u(),i()};return $o(d),d}function wi(){const e=a.ref(!1),t=a.getCurrentInstance();return t&&a.onMounted(()=>{e.value=!0},t),e}function bi(e){const t=wi();return a.computed(()=>(t.value,!!e()))}function vi(e,t,n={}){const{window:o=Ie,...r}=n;let s;const i=bi(()=>o&&"MutationObserver"in o),c=()=>{s&&(s.disconnect(),s=void 0)},u=a.computed(()=>{const f=Vt(e),h=(Array.isArray(f)?f:[f]).map(Pe).filter(hi);return new Set(h)}),d=a.watch(()=>u.value,f=>{c(),i.value&&f.size&&(s=new MutationObserver(t),f.forEach(h=>s.observe(h,r)))},{immediate:!0,flush:"post"}),l=()=>s==null?void 0:s.takeRecords(),p=()=>{d(),c()};return $o(p),{isSupported:i,stop:p,takeRecords:l}}function Ei(e={}){var t;const{window:n=Ie,deep:o=!0,triggerOnRemoval:r=!1}=e,s=(t=e.document)!=null?t:n==null?void 0:n.document,i=()=>{var d;let l=s==null?void 0:s.activeElement;if(o)for(;l!=null&&l.shadowRoot;)l=(d=l==null?void 0:l.shadowRoot)==null?void 0:d.activeElement;return l},c=a.ref(),u=()=>{c.value=i()};return n&&(De(n,"blur",d=>{d.relatedTarget===null&&u()},!0),De(n,"focus",u,!0)),r&&vi(s,d=>{d.filter(l=>l.removedNodes.length).map(l=>Array.from(l.removedNodes)).flat().forEach(l=>{l===c.value&&u()})},{childList:!0,subtree:!0}),u(),c}const _i="focusin",ki="focusout";function $i(e,t={}){const{window:n=Ie}=t,o=a.computed(()=>Pe(e)),r=a.ref(!1),s=a.computed(()=>r.value),i=Ei(t);return!n||!i.value?{focused:s}:(De(o,_i,()=>r.value=!0),De(o,ki,()=>r.value=!1),{focused:s})}function Si(e,{window:t=Ie,scrollTarget:n}={}){const o=a.ref(!1),r=()=>{if(!t)return;const s=t.document,i=Pe(e);if(!i)o.value=!1;else{const c=i.getBoundingClientRect();o.value=c.top<=(t.innerHeight||s.documentElement.clientHeight)&&c.left<=(t.innerWidth||s.documentElement.clientWidth)&&c.bottom>=0&&c.right>=0}};return a.watch(()=>Pe(e),()=>r(),{immediate:!0,flush:"post"}),t&&De(n||t,"scroll",r,{capture:!1,passive:!0}),o}const re=e=>{let t=Si(e).value;return t=t&&e.offsetHeight>0,t},ae=e=>e.tabIndex>=0,So=e=>{const t=e.target;return Rt(t)},Rt=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;if(o){const r=Array.from(o.children)[e.cellIndex];r&&(n=r)}}else if(e instanceof HTMLTableRowElement){const o=e.previousElementSibling;o&&(n=o)}return n&&(!ae(n)||!re(n))?Rt(n):n},Ni=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const r=(t=n.parentElement)==null?void 0:t.parentElement;if(r){const s=r.firstElementChild.children[n.cellIndex];s&&(o=s)}}else if(n instanceof HTMLTableRowElement){const r=n.parentElement;if(r){const s=r.firstElementChild;s&&(o=s)}}return o&&(!ae(o)||!re(o))?Tt(o):o},No=e=>{const t=e.target;return Tt(t)},Tt=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;if(o){const r=Array.from(o.children)[e.cellIndex];r&&(n=r)}}else if(e instanceof HTMLTableRowElement){const o=e.nextElementSibling;o&&(n=o)}return n&&(!ae(n)||!re(n))?Tt(n):n},Oi=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const r=(t=n.parentElement)==null?void 0:t.parentElement;if(r){const s=r.lastElementChild.children[n.cellIndex];s&&(o=s)}}else if(n instanceof HTMLTableRowElement){const r=n.parentElement;if(r){const s=r.lastElementChild;s&&(o=s)}}return o&&(!ae(o)||!re(o))?Rt(o):o},Oo=e=>{const t=e.target;return At(t)},At=e=>{var t;let n;if(e.previousElementSibling)n=e.previousElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;n=o==null?void 0:o.lastElementChild}return n&&(!ae(n)||!re(n))?At(n):n},xo=e=>{const t=e.target;return jt(t)},jt=e=>{var t;let n;if(e.nextElementSibling)n=e.nextElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;n=o==null?void 0:o.firstElementChild}return n&&(!ae(n)||!re(n))?jt(n):n},Co=e=>{const t=e.target.parentElement.firstElementChild;return t&&(!ae(t)||!re(t))?jt(t):t},Io=e=>{const t=e.target.parentElement.lastElementChild;return t&&(!ae(t)||!re(t))?At(t):t},Ke=["alt","control","shift","meta"],xi={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Bt={"keydown.up":e=>{const t=So(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.down":e=>{const t=No(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.left":e=>{const t=Oo(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.right":e=>{const t=xo(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.control.up":e=>{const t=Ni(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.down":e=>{const t=Oi(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.left":e=>{const t=Co(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.right":e=>{const t=Io(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.end":e=>{const t=Io(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=No(e);t&&t.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=So(e);t&&t.focus()}},"keydown.home":e=>{const t=Co(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.tab":e=>{const t=xo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.shift.tab":e=>{const t=Oo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())}};function Po(e){const t=i=>{let c=null;return i.parent&&(typeof i.parent=="string"?c=document.querySelector(i.parent):i.parent instanceof HTMLElement?c=i.parent:c=i.parent.value),c},n=i=>{const c=t(i);let u=[];if(typeof i.selectors=="string")u=c?Array.from(c.querySelectorAll(i.selectors)):Array.from(document.querySelectorAll(i.selectors));else if(Array.isArray(i.selectors))for(const d of i.selectors)d instanceof HTMLElement?u.push(d):u.push(d.$el);else if(i.selectors instanceof HTMLElement)u.push(i.selectors);else if(Array.isArray(i.selectors.value))for(const d of i.selectors.value)d instanceof HTMLElement?u.push(d):u.push(d.$el);else u.push(i.selectors.value);return u},o=i=>{const c=t(i);let u=[];return i.selectors?u=n(i):c&&(u=Array.from(c.children).filter(d=>ae(d)&&re(d))),u},r=i=>c=>{const u=xi[c.key]||c.key.toLowerCase();if(Ke.includes(u))return;const d=i.handlers||Bt;for(const l of Object.keys(d)){const[p,...f]=l.split(".");if(p==="keydown"&&f.includes(u)){const h=d[l],g=f.filter(N=>Ke.includes(N)),v=Ke.some(N=>{const _=N.charAt(0).toUpperCase()+N.slice(1);return c.getModifierState(_)});if(g.length>0){if(v){for(const N of Ke)if(f.includes(N)){const _=N.charAt(0).toUpperCase()+N.slice(1);c.getModifierState(_)&&h(c)}}}else v||h(c)}}},s=[];a.onMounted(()=>{for(const i of e){const c=t(i),u=o(i),d=r(i),l=c?[c]:u;for(const p of l){const{focused:f}=$i(a.ref(p)),h=a.watch(f,g=>{g?p.addEventListener("keydown",d):p.removeEventListener("keydown",d)});s.push(h)}}}),a.onBeforeUnmount(()=>{for(const i of s)i()})}const Ci=["data-colindex","data-rowindex","data-editable","contenteditable","tabindex"],Ii={key:1},Pi=a.defineComponent({__name:"ACell",props:{colIndex:{},rowIndex:{},tableid:{},addNavigation:{type:[Boolean,Object],default:!0},tabIndex:{default:0}},setup(e){var t;const n=a.inject(e.tableid),o=a.useTemplateRef("cell"),r=a.ref(""),s=a.ref(!1),i=n.table,c=n.columns[e.colIndex],u=n.rows[e.rowIndex],d=a.computed(()=>{const _=n.cellData(e.colIndex,e.rowIndex),S=c.format;return S?typeof S=="function"?S(_,{table:i,row:u,column:c}):typeof S=="string"?Function(`"use strict";return (${S})`)()(_,{table:i,row:u,column:c}):_:_}),l=()=>{if(c.mask,c.modalComponent){const _=o.value.getBoundingClientRect();n.modal.visible=!0,n.modal.colIndex=e.colIndex,n.modal.rowIndex=e.rowIndex,n.modal.parent=o.value,n.modal.top=_.top+_.height,n.modal.left=_.left,n.modal.width=f.value,typeof c.modalComponent=="function"?n.modal.component=c.modalComponent({table:i,row:u,column:c}):n.modal.component=c.modalComponent,n.modal.componentProps=c.modalComponentExtraProps}};if(e.addNavigation){let _={...Bt,"keydown.f2":l,"keydown.alt.up":l,"keydown.alt.down":l,"keydown.alt.left":l,"keydown.alt.right":l};typeof e.addNavigation=="object"&&(_={..._,...e.addNavigation}),Po([{selectors:o,handlers:_}])}const p=a.computed(()=>c.align||"center"),f=a.computed(()=>c.width||"40ch"),h=()=>{o.value&&(r.value=o.value.textContent)},g=()=>{o.value&&o.value.textContent!==r.value&&(r.value=o.value.textContent,o.value.dispatchEvent(new Event("change")),s.value=!0,c.format||n.setCellData(e.rowIndex,e.colIndex,r.value))},v=(_,S)=>S&&_===0&&S>0?`${S}ch`:"inherit",N={textAlign:p.value,width:f.value,backgroundColor:s.value?"var(--cell-modified-color)":"inherit",fontWeight:s.value?"bold":"inherit",paddingLeft:v(e.colIndex,(t=n.display[e.rowIndex])==null?void 0:t.indent)};return(_,S)=>(a.openBlock(),a.createElementBlock("td",{ref:"cell","data-colindex":_.colIndex,"data-rowindex":_.rowIndex,"data-editable":a.unref(n).columns[_.colIndex].edit,contenteditable:a.unref(n).columns[_.colIndex].edit,tabindex:_.tabIndex,spellcheck:!1,style:N,onFocus:h,onPaste:g,onBlur:g,onInput:g,onClick:l,onMousedown:l,class:"atable__cell"},[a.unref(n).columns[_.colIndex].cellComponent?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(n).columns[_.colIndex].cellComponent),a.mergeProps({key:0,value:d.value},a.unref(n).columns[_.colIndex].cellComponentProps),null,16,["value"])):(a.openBlock(),a.createElementBlock("span",Ii,a.toDisplayString(d.value),1))],40,Ci))}}),Di=["tabindex"],Vi={key:0,tabIndex:-1,class:"list-index"},Ri=a.defineComponent({__name:"ARow",props:{row:{},rowIndex:{},tableid:{},tabIndex:{default:()=>-1},addNavigation:{type:[Boolean,Object],default:!1}},setup(e){const t=a.inject(e.tableid),n=a.useTemplateRef("rowEl"),o=a.computed(()=>t.config.view!=="tree"||t.display[e.rowIndex].isRoot||t.display[e.rowIndex].open),r=a.computed(()=>t.config.view!=="tree"?"":t.display[e.rowIndex].isRoot||t.display[e.rowIndex].isParent?t.display[e.rowIndex].childrenOpen?"-":"+":""),s=i=>{t.toggleRowExpand(i)};if(e.addNavigation){let i=Bt;typeof e.addNavigation=="object"&&(i={...i,...e.addNavigation}),Po([{selectors:n,handlers:i}])}return(i,c)=>a.withDirectives((a.openBlock(),a.createElementBlock("tr",{ref:"rowEl",tabindex:i.tabIndex,class:"table-row"},[a.renderSlot(i.$slots,"index",{},()=>[a.unref(t).config.view==="list"?(a.openBlock(),a.createElementBlock("td",Vi,a.toDisplayString(i.rowIndex+1),1)):a.unref(t).config.view==="tree"?(a.openBlock(),a.createElementBlock("td",{key:1,tabIndex:-1,class:"tree-index",onClick:c[0]||(c[0]=u=>s(i.rowIndex))},a.toDisplayString(r.value),1)):a.createCommentVNode("",!0)]),a.renderSlot(i.$slots,"default")],8,Di)),[[a.vShow,o.value]])}});function Do(e){return a.getCurrentScope()?(a.onScopeDispose(e),!0):!1}function Ve(e){return typeof e=="function"?e():a.unref(e)}const Vo=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ti=Object.prototype.toString,Ai=e=>Ti.call(e)==="[object Object]",Re=()=>{},Lt=ji();function ji(){var e,t;return Vo&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}const Ro={mounted:"mounted",updated:"updated",unmounted:"unmounted"};function Bi(...e){if(e.length!==1)return a.toRef(...e);const t=e[0];return typeof t=="function"?a.readonly(a.customRef(()=>({get:t,set:Re}))):a.ref(t)}function Te(e){var t;const n=Ve(e);return(t=n==null?void 0:n.$el)!=null?t:n}const To=Vo?window:void 0;function Ye(...e){let t,n,o,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,r]=e,t=To):[t,n,o,r]=e,!t)return Re;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const s=[],i=()=>{s.forEach(l=>l()),s.length=0},c=(l,p,f,h)=>(l.addEventListener(p,f,h),()=>l.removeEventListener(p,f,h)),u=a.watch(()=>[Te(t),Ve(r)],([l,p])=>{if(i(),!l)return;const f=Ai(p)?{...p}:p;s.push(...n.flatMap(h=>o.map(g=>c(l,h,g,f))))},{immediate:!0,flush:"post"}),d=()=>{u(),i()};return Do(d),d}let Ao=!1;function jo(e,t,n={}){const{window:o=To,ignore:r=[],capture:s=!0,detectIframe:i=!1}=n;if(!o)return Re;Lt&&!Ao&&(Ao=!0,Array.from(o.document.body.children).forEach(l=>l.addEventListener("click",Re)),o.document.documentElement.addEventListener("click",Re));let c=!0;const u=l=>r.some(p=>{if(typeof p=="string")return Array.from(o.document.querySelectorAll(p)).some(f=>f===l.target||l.composedPath().includes(f));{const f=Te(p);return f&&(l.target===f||l.composedPath().includes(f))}}),d=[Ye(o,"click",l=>{const p=Te(e);if(!(!p||p===l.target||l.composedPath().includes(p))){if(l.detail===0&&(c=!u(l)),!c){c=!0;return}t(l)}},{passive:!0,capture:s}),Ye(o,"pointerdown",l=>{const p=Te(e);c=!u(l)&&!!(p&&!l.composedPath().includes(p))},{passive:!0}),i&&Ye(o,"blur",l=>{setTimeout(()=>{var p;const f=Te(e);((p=o.document.activeElement)==null?void 0:p.tagName)==="IFRAME"&&!(f!=null&&f.contains(o.document.activeElement))&&t(l)},0)})].filter(Boolean);return()=>d.forEach(l=>l())}const Li={[Ro.mounted](e,t){const n=!t.modifiers.bubble;if(typeof t.value=="function")e.__onClickOutside_stop=jo(e,t.value,{capture:n});else{const[o,r]=t.value;e.__onClickOutside_stop=jo(e,o,Object.assign({capture:n},r))}},[Ro.unmounted](e){e.__onClickOutside_stop()}};function Mt(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function Bo(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const n=e.parentNode;return!n||n.tagName==="BODY"?!1:Bo(n)}}function Mi(e){const t=e||window.event,n=t.target;return Bo(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const Ut=new WeakMap;function Ui(e,t=!1){const n=a.ref(t);let o=null,r="";a.watch(Bi(e),c=>{const u=Mt(Ve(c));if(u){const d=u;if(Ut.get(d)||Ut.set(d,d.style.overflow),d.style.overflow!=="hidden"&&(r=d.style.overflow),d.style.overflow==="hidden")return n.value=!0;if(n.value)return d.style.overflow="hidden"}},{immediate:!0});const s=()=>{const c=Mt(Ve(e));!c||n.value||(Lt&&(o=Ye(c,"touchmove",u=>{Mi(u)},{passive:!1})),c.style.overflow="hidden",n.value=!0)},i=()=>{const c=Mt(Ve(e));!c||!n.value||(Lt&&(o==null||o()),c.style.overflow=r,Ut.delete(c),n.value=!1)};return Do(i),a.computed({get(){return n.value},set(c){c?s():i()}})}function Wi(){let e=!1;const t=a.ref(!1);return(n,o)=>{if(t.value=o.value,e)return;e=!0;const r=Ui(n,o.value);a.watch(t,s=>r.value=s)}}Wi();for(var B=[],Wt=0;Wt<256;++Wt)B.push((Wt+256).toString(16).slice(1));function Fi(e,t=0){return(B[e[t+0]]+B[e[t+1]]+B[e[t+2]]+B[e[t+3]]+"-"+B[e[t+4]]+B[e[t+5]]+"-"+B[e[t+6]]+B[e[t+7]]+"-"+B[e[t+8]]+B[e[t+9]]+"-"+B[e[t+10]]+B[e[t+11]]+B[e[t+12]]+B[e[t+13]]+B[e[t+14]]+B[e[t+15]]).toLowerCase()}var Qe,Hi=new Uint8Array(16);function zi(){if(!Qe&&(Qe=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qe(Hi)}var qi=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Lo={randomUUID:qi};function Gi(e,t,n){if(Lo.randomUUID&&!t&&!e)return Lo.randomUUID();e=e||{};var o=e.random||(e.rng||zi)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,Fi(o)}class Ji{constructor(t,n,o,r,s,i){fe(this,"id"),fe(this,"rows"),fe(this,"columns"),fe(this,"config"),fe(this,"table"),fe(this,"display"),fe(this,"modal"),this.id=t||Gi(),this.rows=o,this.columns=a.reactive(n),this.config=a.reactive(r),this.table=s||a.reactive(this.createTableObject()),this.display=this.createDisplayObject(i),this.modal=a.reactive({visible:!1})}createTableObject(){const t={};for(const[n,o]of this.columns.entries())for(const[r,s]of this.rows.entries())t[`${n}:${r}`]=s[o.name];return t}createDisplayObject(t){const n=[Object.assign({},{modified:!1})];if(t&&"0:0"in t)return t;const o=new Set;for(let r=this.rows.length-1;r>=0;r--){const s=this.rows[r];s.parent&&o.add(s.parent),n[r]={childrenOpen:!1,expanded:!1,indent:s.indent||null,isParent:o.has(r),isRoot:s.parent===null||s.parent===void 0,modified:!1,open:s.parent===null||s.parent===void 0,parent:s.parent}}return a.reactive(n)}get zeroColumn(){return["list","tree","list-expansion"].includes(this.config.view)}get numberedRowWidth(){return a.computed(()=>String(Math.ceil(this.rows.length/100)+1)+"ch")}cellData(t,n){return this.table[`${t}:${n}`]}setCellData(t,n,o){this.table[`${n}:${t}`]!==o&&(this.display[t].modified=!0),this.table[`${n}:${t}`]=o;const r=this.columns[n];return this.rows[t][r.name]=o,this.table[`${n}:${t}`]}toggleRowExpand(t){if(this.config.view==="tree"){this.display[t].childrenOpen=!this.display[t].childrenOpen;for(let n=this.rows.length-1;n>=0;n--)this.display[n].parent===t&&(this.display[n].open=!this.display[n].open,this.display[n].childrenOpen&&this.toggleRowExpand(n))}else this.config.view==="list-expansion"&&(this.display[t].expanded=!this.display[t].expanded)}}const Ki={key:0,id:"resizable"},Yi={class:"atable-header-row",tabindex:"-1"},Qi={key:0,id:"header-index"},Xi=a.defineComponent({__name:"ATableHeader",props:{columns:{},tableid:{}},setup(e){const t=a.inject(e.tableid),n=o=>({minWidth:o.width||"40ch",textAlign:o.align||"center",width:t.config.fullWidth?"auto":null});return(o,r)=>o.columns.length?(a.openBlock(),a.createElementBlock("thead",Ki,[a.createElementVNode("tr",Yi,[a.unref(t).zeroColumn?(a.openBlock(),a.createElementBlock("th",Qi)):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.columns,(s,i)=>(a.openBlock(),a.createElementBlock("th",{key:s.name,tabindex:"-1",style:a.normalizeStyle(n(s))},[a.renderSlot(o.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(s.label||String.fromCharCode(i+97).toUpperCase()),1)])],4))),128))])])):a.createCommentVNode("",!0)}}),Zi=a.defineComponent({__name:"ATableModal",props:{colIndex:{},rowIndex:{},tableid:{}},setup(e){const t=n=>{n.stopPropagation()};return(n,o)=>(a.openBlock(),a.createElementBlock("div",{class:"amodal",tabindex:"-1",onClick:t,onInput:t},[a.renderSlot(n.$slots,"default")],32))}}),ec=a.defineComponent({__name:"ATable",props:{id:{},modelValue:{},columns:{},rows:{default:()=>[]},config:{default:()=>new Object},tableid:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,o=e.modelValue?e.modelValue:e.rows,r=new Ji(e.id,e.columns,o,e.config);a.provide(r.id,r),a.watch(()=>r.rows,i=>{n("update:modelValue",i)},{deep:!0});const s=i=>{var c;i.target instanceof Node&&(c=r.modal.parent)!=null&&c.contains(i.target)||r.modal.visible&&(r.modal.visible=!1)};return window.addEventListener("keydown",i=>{if(i.key==="Escape"&&r.modal.visible){r.modal.visible=!1;const c=r.modal.parent;c&&a.nextTick().then(()=>{c.focus()})}}),(i,c)=>a.withDirectives((a.openBlock(),a.createElementBlock("table",{class:"atable",style:a.normalizeStyle({width:a.unref(r).config.fullWidth?"100%":"auto"})},[a.renderSlot(i.$slots,"header",{data:a.unref(r)},()=>[a.createVNode(Xi,{columns:a.unref(r).columns,tableid:a.unref(r).id},null,8,["columns","tableid"])]),a.createElementVNode("tbody",null,[a.renderSlot(i.$slots,"body",{data:a.unref(r)},()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(r).rows,(u,d)=>(a.openBlock(),a.createBlock(Ri,{key:u.id,row:u,rowIndex:d,tableid:a.unref(r).id},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(r).columns,(l,p)=>(a.openBlock(),a.createBlock(Pi,{key:l.name,tableid:a.unref(r).id,col:l,spellcheck:"false",rowIndex:d,colIndex:p+(a.unref(r).zeroColumn?0:-1),component:l.cellComponent,style:a.normalizeStyle({textAlign:(l==null?void 0:l.align)||"center",minWidth:(l==null?void 0:l.width)||"40ch",width:a.unref(r).config.fullWidth?"auto":null})},null,8,["tableid","col","rowIndex","colIndex","component","style"]))),128))]),_:2},1032,["row","rowIndex","tableid"]))),128))])]),a.renderSlot(i.$slots,"footer",{data:a.unref(r)}),a.renderSlot(i.$slots,"modal",{data:a.unref(r)},()=>[a.withDirectives(a.createVNode(Zi,{colIndex:a.unref(r).modal.colIndex,rowIndex:a.unref(r).modal.rowIndex,tableid:a.unref(r).id,style:a.normalizeStyle({left:a.unref(r).modal.left+"px",top:a.unref(r).modal.top+"px",maxWidth:a.unref(r).modal.width+"px"})},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(r).modal.component),a.mergeProps({key:`${a.unref(r).modal.rowIndex}:${a.unref(r).modal.colIndex}`,colIndex:a.unref(r).modal.colIndex,rowIndex:a.unref(r).modal.rowIndex,tableid:a.unref(r).id},a.unref(r).modal.componentProps),null,16,["colIndex","rowIndex","tableid"]))]),_:1},8,["colIndex","rowIndex","tableid","style"]),[[a.vShow,a.unref(r).modal.visible]])])],4)),[[a.unref(Li),s]])}}),Mo=a.defineComponent({__name:"Records",setup(e){const{stonecrop:t,isReady:n}=mn(),o={view:"list"};return(r,s)=>a.unref(n)?(a.openBlock(),a.createBlock(a.unref(ec),{key:0,columns:a.unref(t).schema.schema.toArray(),rows:a.unref(t).store.records,config:o},null,8,["columns","rows"])):a.createCommentVNode("",!0)}}),tc={class:"tabs"},nc={tabindex:"0"},oc={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 424.098 424.098",style:{"enable-background":"new 0 0 424.098 424.098"},"xml:space":"preserve"},rc={tabindex:"0"},ac={style:{width:"11pt"}},Uo=nt(a.defineComponent({__name:"SheetNav",props:{breadcrumbs:{default:()=>[]}},setup(e){const t=a.ref(!0),n=a.ref(!1),o=a.ref(""),r=a.useTemplateRef("searchinput"),s=a.computed(()=>t.value?"unrotated":"rotated"),i=()=>{t.value=!t.value},c=async()=>{n.value=!n.value,await a.nextTick(()=>{r.value.focus()})},u=p=>{p.preventDefault(),p.stopPropagation()},d=async p=>{p.preventDefault(),p.stopPropagation(),await c()},l=()=>{};return(p,f)=>{const h=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("footer",null,[a.createElementVNode("ul",tc,[a.createElementVNode("li",{class:"hidebreadcrumbs",onClick:i,onKeydown:a.withKeys(i,["enter"])},[a.createElementVNode("a",nc,[a.createElementVNode("div",{class:a.normalizeClass(s.value)},"ร",2)])],32),a.createElementVNode("li",{class:"hometab",onClick:l,onKeydown:a.withKeys(l,["enter"]),style:a.normalizeStyle({display:t.value?"block":"none"})},[a.createVNode(h,{to:"/home",tabindex:"0"},{default:a.withCtx(()=>[(a.openBlock(),a.createElementBlock("svg",oc,f[5]||(f[5]=[a.createElementVNode("g",null,[a.createElementVNode("path",{style:{fill:"#010002"},d:`M351.191,401.923H72.901c-4.487,0-8.129-3.633-8.129-8.129V242.262l-56.664-0.114
|
|
43
43
|
c-3.284-0.008-6.243-1.992-7.495-5.023c-1.252-3.04-0.553-6.527,1.764-8.852L206.104,24.546c1.853-1.845,4.503-2.666,7.047-2.276
|
|
44
44
|
c2.414,0.39,4.511,1.845,5.731,3.942l47.43,47.43V58.499c0-4.487,3.633-8.129,8.129-8.129h47.755c4.495,0,8.129,3.642,8.129,8.129
|
|
45
45
|
v79.156l91.39,91.398c2.325,2.325,3.024,5.828,1.764,8.868c-1.26,3.032-4.227,5.007-7.511,5.007c-0.008,0-0.008,0-0.016,0
|
|
@@ -47,5 +47,5 @@ ${JSON.stringify(_,null,2)}
|
|
|
47
47
|
c0-2.162,0.854-4.235,2.39-5.755c1.528-1.52,3.585-2.374,5.739-2.374c0.008,0,0.008,0,0.016,0l45.105,0.089l-79.855-79.863
|
|
48
48
|
c-1.528-1.528-2.382-3.593-2.382-5.747V66.628h-31.498v26.645c0,3.284-1.975,6.251-5.015,7.511
|
|
49
49
|
c-3.032,1.268-6.527,0.569-8.86-1.764l-57.038-57.038l-183.95,183.95l45.203,0.089c4.487,0.008,8.112,3.642,8.112,8.129
|
|
50
|
-
C81.03,234.149,81.03,385.666,81.03,385.666z`})],-1)])))]),_:1})],36),a.createElementVNode("li",{class:"searchtab",onClick:c,onKeydown:a.withKeys(c,["enter"]),style:a.normalizeStyle({display:t.value?"block":"none"})},[a.createElementVNode("a",rc,[a.createElementVNode("span",{style:a.normalizeStyle({display:n.value?"none":"block"})},[(a.openBlock(),a.createElementBlock("svg",ac,f[6]||(f[6]=[a.createElementVNode("g",{transform:"matrix(-0.08088215,0,0,0.08088215,9.8016177,3.1263021e-6)"},[a.createElementVNode("path",{d:"M 93.148438,80.832031 C 109.5,57.742188 104.03125,25.769531 80.941406,9.421875 57.851562,-6.925781 25.878906,-1.460938 9.53125,21.632812 -6.816406,44.722656 -1.351562,76.691406 21.742188,93.039062 38.222656,104.70703 60.011719,105.60547 77.394531,95.339844 l 37.769529,37.542966 c 4.07813,4.29297 10.86328,4.46485 15.15625,0.38672 4.29297,-4.07422 4.46485,-10.85937 0.39063,-15.15234 -0.12891,-0.13672 -0.25391,-0.26172 -0.39063,-0.39063 z m -41.839844,3.5 C 33.0625,84.335938 18.269531,69.554688 18.257812,51.308594 18.253906,33.0625 33.035156,18.269531 51.285156,18.261719 c 18.222656,-0.0078 33.007813,14.75 33.042969,32.972656 0.03125,18.25 -14.742187,33.066406 -32.996094,33.097656 -0.0078,0 -0.01172,0 -0.02344,0 z m 0,0",style:{fill:"#000000","fill-opacity":"1","fill-rule":"nonzero",stroke:"none"},id:"path2"})],-1)])))],4),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":f[0]||(f[0]=
|
|
50
|
+
C81.03,234.149,81.03,385.666,81.03,385.666z`})],-1)])))]),_:1})],36),a.createElementVNode("li",{class:"searchtab",onClick:c,onKeydown:a.withKeys(c,["enter"]),style:a.normalizeStyle({display:t.value?"block":"none"})},[a.createElementVNode("a",rc,[a.createElementVNode("span",{style:a.normalizeStyle({display:n.value?"none":"block"})},[(a.openBlock(),a.createElementBlock("svg",ac,f[6]||(f[6]=[a.createElementVNode("g",{transform:"matrix(-0.08088215,0,0,0.08088215,9.8016177,3.1263021e-6)"},[a.createElementVNode("path",{d:"M 93.148438,80.832031 C 109.5,57.742188 104.03125,25.769531 80.941406,9.421875 57.851562,-6.925781 25.878906,-1.460938 9.53125,21.632812 -6.816406,44.722656 -1.351562,76.691406 21.742188,93.039062 38.222656,104.70703 60.011719,105.60547 77.394531,95.339844 l 37.769529,37.542966 c 4.07813,4.29297 10.86328,4.46485 15.15625,0.38672 4.29297,-4.07422 4.46485,-10.85937 0.39063,-15.15234 -0.12891,-0.13672 -0.25391,-0.26172 -0.39063,-0.39063 z m -41.839844,3.5 C 33.0625,84.335938 18.269531,69.554688 18.257812,51.308594 18.253906,33.0625 33.035156,18.269531 51.285156,18.261719 c 18.222656,-0.0078 33.007813,14.75 33.042969,32.972656 0.03125,18.25 -14.742187,33.066406 -32.996094,33.097656 -0.0078,0 -0.01172,0 -0.02344,0 z m 0,0",style:{fill:"#000000","fill-opacity":"1","fill-rule":"nonzero",stroke:"none"},id:"path2"})],-1)])))],4),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":f[0]||(f[0]=g=>o.value=g),ref:"searchinput",style:a.normalizeStyle({display:n.value?"block":"none"}),onClick:f[1]||(f[1]=g=>u(g)),onInput:f[2]||(f[2]=g=>u(g)),onBlur:f[3]||(f[3]=g=>d(g)),onKeydown:f[4]||(f[4]=a.withKeys(g=>d(g),["enter"])),type:"text"},null,36),[[a.vModelText,o.value]])])],36),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.breadcrumbs,g=>(a.openBlock(),a.createElementBlock("li",{key:g.title,style:a.normalizeStyle({display:t.value?"block":"none"})},[a.createVNode(h,{tabindex:"0",to:g.to},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(g.title),1)]),_:2},1032,["to"])],4))),128))])])}}}),[["__scopeId","data-v-a650f215"]]),sc={install:e=>{e.component("ActionSet",qt),e.component("CommandPalette",Gt),e.component("Doctype",ko),e.component("Records",Mo),e.component("SheetNav",Uo)}};z.ActionSet=qt,z.CommandPalette=Gt,z.Doctype=ko,z.Records=Mo,z.SheetNav=Uo,z.StonecropDesktop=sc,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})});
|
|
51
51
|
//# sourceMappingURL=desktop.umd.cjs.map
|