1import{h as E,j as $,k as R,l as j,m as B}from"./CQcL1C8p.js";import{a as w,s as U,t as F,al as M,U as z,b as H,y as O,u as L,g as q,x,k as K,am as y,r as N}from"./DnWGbaG4.js";const V=a=>a==="defer"||a===!1;function k(...a){var v;const n=typeof a[a.length-1]=="string"?a.pop():void 0;typeof a[0]!="string"&&a.unshift(n);let[t,c,s={}]=a;if(typeof t!="string")throw new TypeError("[nuxt] [asyncData] key must be a string.");if(typeof c!="function")throw new TypeError("[nuxt] [asyncData] handler must be a function.");const e=$(),u=c,m=()=>null,_=()=>e.isHydrating?e.payload.data[t]:e.static.data[t];s.server=s.server??!0,s.default=s.default??m,s.getCachedData=s.getCachedData??_,s.lazy=s.lazy??!1,s.immediate=s.immediate??!0,s.deep=s.deep??E.deep,s.dedupe=s.dedupe??"cancel";const p=()=>s.getCachedData(t,e)!=null;if(!e._asyncData[t]||!s.immediate){(v=e.payload._errors)[t]??(v[t]=null);const i=s.deep?w:U;e._asyncData[t]={data:i(s.getCachedData(t,e)??s.default()),pending:w(!p()),error:F(e.payload._errors,t),status:w("idle")}}const r={...e._asyncData[t]};r.refresh=r.execute=(i={})=>
1{if(e._asyncDataPromises[t]){if(V(i.dedupe??s.dedupe))return e._asyncDataPromises[t];e._asyncDataPromises[t].cancelled=!0}if((i._initial||e.isHydrating&&i._initial!==!1)&&p())return Promise.resolve(s.getCachedData(t,e));r.pending.value=!0,r.status.value="pending";const f=new Promise((l,o)=>{try{l(u(e))}catch(h){o(h)}}).then(async l=>{if(f.cancelled)return e._asyncDataPromises[t];let o=l;s.transform&&(o=await s.transform(l)),s.pick&&(o=I(o,s.pick)),e.payload.data[t]=o,r.data.value=o,r.error.value=null,r.status.value="success"}).catch(l=>{if(f.cancelled)return e._asyncDataPromises[t];r.error.value=R(l),r.data.value=L(s.default()),r.status.value="error"}).finally(()=>{f.cancelled||(r.pending.value=!1,delete e._asyncDataPromises[t])});return e._asyncDataPromises[t]=f,e._asyncDataPromises[t]},r.clear=()=>G(e,t);const g=()=>r.refresh({_initial:!0}),b=s.server!==!1&&e.payload.serverRendered;{const i=q();if(i&&!i._nuxtOnBeforeMountCbs){i._nuxtOnBeforeMountCbs=[];const o=i._nuxtOnBeforeMountCbs;M(()=>{o.forEach(h=>{h()}),o.splice(0,o.length)}),z(()=>o.splice(0,o.length))}b&&e.isHydrating&&(r.error.value||p())?(r.pending.value=!1,r.status.value=r.error.value?"error":"success"):i&&(e.payload.serverRendered&&e.isHydrating||s.lazy)&&s.immediate?i._nuxtOnBeforeMountCbs.push(g):s.immediate&&g();const f=x();if(s.watch){const o=H(s.watch,()=>r.refresh());f&&O(o)}const l=e.hook("app:data:refresh",async o=>{(!o||o.includes(t))&&await r.refresh()});f&&O(l)}const D=Promise.resolve(e._asyncDataPromises[t]).then(()=>r);return Object.assign(D,r),D}function G(a,n){n in a.payload.data&&(a.payload.data[n]=void 0),n in a.payload._errors&&(a.payload._errors[n]=null),a._asyncData[n]&&(a._asyncData[n].data.value=void 0,a._asyncData[n].error.value=null,a._asyncData[n].pending.value=!1,a._asyncData[n].status.value="idle"),n in a._asyncDataPromises&&(a._asyncDataPromises[n].cancelled=!0,a._asyncDataPromises[n]=void 0)}function I(a,n){const t={};for(const c of n)t[c]=a[c];return t}function S(a,n,t){const[c={},s]=typeof n=="string"?[{},n]:[n,t],e=K(()=>y(a)),u=c.key||j([s,typeof e.value=="string"?e.value:"",...X(c)]);if(!u||typeof u!="string")throw new TypeError("[nuxt] [useFetch] key must be a string: "+u);const m=u===s?"$f"+u:u;if(!c.baseURL&&typeof e.value=="string"&&e.value[0]==="/"&&e.value[1]==="/")throw new Error('[nuxt] [useFetch] the request URL must not start with "//".');const{server:_,lazy:p,default:r,transform:g,pick:b,watch:D,immediate:v,getCachedData:i,deep:f,dedupe:l,...o}=c,h=N({...B,...o,cache:typeof c.cache=="boolean"?void 0:c.cache}),T={server:_,lazy:p,default:r,transform:g,pick:b,immediate:v,getCachedData:i,deep:f,dedupe:l,watch:D===!1?[]:[h,e,...D||[]]};let d;return k(m,()=>{var C;(C=d==null?void 0:d.abort)==null||C.call(d),d=typeof AbortController<"u"?new AbortController:{};const P=y(c.timeout);return P&&setTimeout(()=>d.abort(),P),(c.$fetch||globalThis.$fetch)(e.value,{signal:d.signal,...h})},T)}function X(a){var t;const n=[((t=y(a.method))==null?void 0:t.toUpperCase())||"GET",y(a.baseURL)];for(const c of[a.params||a.query]){const s=y(c);if(!s)continue;const e={};for(const[u,m]of Object.entries(s))e[y(u)]=y(m);n.push(e)}return n}const Z=async(a,n={})=>{const{data:t,error:c}=await S("/api/getData",{method:"POST",body:{name:a,params:n}},"$1T5XyVhOrf");return t.value.data.length===1?t.value.data[0]:t.value.data},A=async()=>{const{data:a,error:n}=await S("/api/getData",{method:"POST",body:{name:"setting"}},"$aEC9yp3Sil");return a.value.data.length===1?a.value.data[0]:a.value.data},ee=async(a,n)=>await $fetch("/api/postData",{method:"POST",body:{name:a,payload:n}});export{A as a,Z as g,ee as p,k as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.