Files
caszl_server/public/admin/assets/pinia.e85e8286.js

13 lines
17 KiB
JavaScript
Raw Normal View History

2023-10-29 18:37:44 +08:00
import{i as Ce,s as N,d as Y}from"./vue-demi.bfae2336.js";import{ak as he,r as K,aj as O,t as B,i as pe,C as Le,aw as ge,w as me,a0 as Re,k as F,ax as ee,F as z,n as ae,e as ye,u as xe,G as Ue,a4 as ie}from"./@vue.cab01781.js";/*!
* pinia v2.0.18
* (c) 2022 Eduardo San Martin Morote
* @license MIT
*/let q;const V=e=>q=e,_e=Symbol("pinia");function C(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var E;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(E||(E={}));const j=typeof window<"u",ce=(()=>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 Fe(e,{autoBom:o=!1}={}){return o&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}function te(e,o,n){const t=new XMLHttpRequest;t.open("GET",e),t.responseType="blob",t.onload=function(){we(t.response,o,n)},t.onerror=function(){console.error("could not download file")},t.send()}function be(e){const o=new XMLHttpRequest;o.open("HEAD",e,!1);try{o.send()}catch{}return o.status>=200&&o.status<=299}function M(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}const H=typeof navigator=="object"?navigator:{userAgent:""},ve=(()=>/Macintosh/.test(H.userAgent)&&/AppleWebKit/.test(H.userAgent)&&!/Safari/.test(H.userAgent))(),we=j?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!ve?Ve:"msSaveOrOpenBlob"in H?De:Ne:()=>{};function Ve(e,o="download",n){const t=document.createElement("a");t.download=o,t.rel="noopener",typeof e=="string"?(t.href=e,t.origin!==location.origin?be(t.href)?te(e,o,n):(t.target="_blank",M(t)):M(t)):(t.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(t.href)},4e4),setTimeout(function(){M(t)},0))}function De(e,o="download",n){if(typeof e=="string")if(be(e))te(e,o,n);else{const t=document.createElement("a");t.href=e,t.target="_blank",setTimeout(function(){M(t)})}else navigator.msSaveOrOpenBlob(Fe(e,n),o)}function Ne(e,o,n,t){if(t=t||open("","_blank"),t&&(t.document.title=t.document.body.innerText="downloading..."),typeof e=="string")return te(e,o,n);const s=e.type==="application/octet-stream",a=/constructor/i.test(String(ce.HTMLElement))||"safari"in ce,r=/CriOS\/[\d]+/.test(navigator.userAgent);if((r||s&&a||ve)&&typeof FileReader<"u"){const i=new FileReader;i.onloadend=function(){let u=i.result;if(typeof u!="string")throw t=null,new Error("Wrong reader.result type");u=r?u:u.replace(/^data:[^;]*;/,"data:attachment/file;"),t?t.location.href=u:location.assign(u),t=null},i.readAsDataURL(e)}else{const i=URL.createObjectURL(e);t?t.location.assign(i):location.href=i,t=null,setTimeout(function(){URL.revokeObjectURL(i)},4e4)}}function m(e,o){const n="\u{1F34D} "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,o):o==="error"?console.error(n):o==="warn"?console.warn(n):console.log(n)}function ne(e){return"_a"in e&&"install"in e}function Se(){if(!("clipboard"in navigator))return m("Your browser doesn't support the Clipboard API","error"),!0}function Ie(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(m('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function Me(e){if(!Se())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),m("Global state copied to clipboard.")}catch(o){if(Ie(o))return;m("Failed to serialize the state. Check the console for more details.","error"),console.error(o)}}async function He(e){if(!Se())try{e.state.value=JSON.parse(await navigator.clipboard.readText()),m("Global state pasted from clipboard.")}catch(o){if(Ie(o))return;m("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(o)}}async function Ge(e){try{we(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(o){m("Failed to export the state as JSON. Check the console for more details.","error")
${r}
Only state can be modified.`);r[0]="$state",x=!1,t.set(a,r,t.state.value),x=!0}})})}function Qe(e,o){G.includes(J(o.$id))||G.push(J(o.$id)),ge({id:"dev.esm.pinia",label:"Pinia \u{1F34D}",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:G,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const t=typeof n.now=="function"?n.now.bind(n):Date.now;o.$onAction(({after:r,onError:i,name:u,args:h})=>{const g=Ee++;n.addTimelineEvent({layerId:A,event:{time:t(),title:"\u{1F6EB} "+u,subtitle:"start",data:{store:S(o.$id),action:S(u),args:h},groupId:g}}),r(p=>{k=void 0,n.addTimelineEvent({layerId:A,event:{time:t(),title:"\u{1F6EC} "+u,subtitle:"end",data:{store:S(o.$id),action:S(u),args:h,result:p},groupId:g}})}),i(p=>{k=void 0,n.addTimelineEvent({layerId:A,event:{time:t(),logType:"error",title:"\u{1F4A5} "+u,subtitle:"end",data:{store:S(o.$id),action:S(u),args:h,error:p},groupId:g}})})},!0),o._customProperties.forEach(r=>{me(()=>xe(o[r]),(i,u)=>{n.notifyComponentUpdate(),n.sendInspectorState(y),x&&n.addTimelineEvent({layerId:A,event:{time:t(),title:"Change",subtitle:r,data:{newValue:i,oldValue:u},groupId:k}})},{deep:!0})}),o.$subscribe(({events:r,type:i},u)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(y),!x)return;const h={time:t(),title:qe(i),data:{store:S(o.$id),...ze(r)},groupId:k};k=void 0,i===E.patchFunction?h.subtitle="\u2935\uFE0F":i===E.patchObject?h.subtitle="\u{1F9E9}":r&&!Array.isArray(r)&&(h.subtitle=r.type),r&&(h.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:r}}),n.addTimelineEvent({layerId:A,event:h})},{detached:!0,flush:"sync"});const s=o._hotUpdate;o._hotUpdate=O(r=>{s(r),n.addTimelineEvent({layerId:A,event:{time:t(),title:"\u{1F525} "+o.$id,subtitle:"HMR update",data:{store:S(o.$id),info:S("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(y),n.sendInspectorState(y)});const{$dispose:a}=o;o.$dispose=()=>{a(),n.notifyComponentUpdate(),n.sendInspectorTree(y),n.sendInspectorState(y),n.getSettings().logStoreChanges&&m(`Disposed "${o.$id}" store \u{1F5D1}`)},n.notifyComponentUpdate(),n.sendInspectorTree(y),n.sendInspectorState(y),n.getSettings().logStoreChanges&&m(`"${o.$id}" store installed \u{1F195}`)})}let Ee=0,k;function le(e,o){const n=o.reduce((t,s)=>(t[s]=B(e)[s],t),{});for(const t in n)e[t]=function(){const s=Ee,a=new Proxy(e,{get(...r){return k=s,Reflect.get(...r)},set(...r){return k=s,Reflect.set(...r)}});return n[t].apply(a,arguments)}}function Ze({app:e,store:o,options:n}){if(!o.$id.startsWith("__hot:")){if(n.state&&(o._isOptionsAPI=!0),typeof n.state=="function"){le(o,Object.keys(n.actions));const t=o._hotUpdate;B(o)._hotUpdate=function(s){t.apply(this,arguments),le(o,Object.keys(s._hmrPayload.actions))}}Qe(e,o)}}function st(){const e=he(!0),o=e.run(()=>K({}));let n=[],t=[];const s=O({install(a){V(s),s._a=a,a.provide(_e,s),a.config.globalProperties.$pinia=s,j&&Xe(a,s),t.forEach(r=>n.push(r)),t=[]},use(a){return!this._a&&!Ce?t.push(a):n.push(a),this},_p:n,_a:null,_e:e,_s:new Map,state:o});return j&&!0&&typeof Proxy<"u"&&s.use(Ze),s}function $e(e,o){for(const n in o){const t=o[n];if(!(n in e))continue;const s=e[n];C(s)&&C(t)&&!F(t)&&!ee(t)?e[n]=$e(s,t):e[n]=t}return e}const Ke=()=>{};function ue(e,o,n,t=Ke){e.push(o);const s=()=>{const a=e.indexOf(o);a>-1&&(e.splice(a,1),t())};return!n&&pe()&&Ue(s),s}function R(e,...o){e.slice().forEach(n=>{n(...o)})}function Q(e,o){for(const n in o){if(!o.hasOwnProperty(n))continue;const t=o[n],s=e[n];C(s)&&C(t)&&e.hasOwnProperty(n)&&!F(t)&&!ee(t)?e[n]=Q(s,t):e[n]=t}return e}const et=Symbol("pinia:skipHydration");function tt(e){return!C(e)||!e.hasOwnProperty(et)}const{assign:I}=Object;function fe(e){return!!(F(e)&&e.effect)}function de(e,o,n,t){const{state:s,actions:a,getters:r}=o,i=n.state.value[e];let u;function h(){!i&&!t&&(n.state.value[e]=s?s():{});const g=t?ie(K(s?s():{}).value):ie(n.state.value[e]);return I(g,a,Object.keys(r||{}).reduce((p,_)=>(_ in g&&console.warn(`[\u{
state: () => new MyClass()
Found in store "${l.$id}".`),L&&a&&n.hydrate&&n.hydrate(l.$state,L),h=!0,g=!0,l}function rt(e,o,n){let t,s;const a=typeof o=="function";typeof e=="string"?(t=e,s=a?n:o):(s=e,t=e.id);function r(i,u){const h=pe();if(i=i||h&&Le(_e),i&&V(i),!q)throw new Error(`[\u{1F34D}]: getActivePinia was called with no active Pinia. Did you forget to install pinia?
const pinia = createPinia()
app.use(pinia)
This will fail in production.`);i=q,i._s.has(t)||(a?Z(t,o,s,i):de(t,s,i),r._pinia=i);const g=i._s.get(t);if(u){const p="__hot:"+t,_=a?Z(p,o,s,i,!0):de(p,I({},s),i,!0);u._hotUpdate(_),delete i.state.value[p],i._s.delete(p)}if(j&&h&&h.proxy&&!u){const p=h.proxy,_="_pStores"in p?p._pStores:p._pStores={};_[t]=g}return g}return r.$id=t,r}export{st as c,rt as d};