@nullix/zod-mongoose-studio 2.0.0 → 2.2.0
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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{BkE1sm_1.js → BYb-oWZd.js} +1 -1
- package/.output/public/_nuxt/{CCh0PVV0.js → BslsNWeO.js} +1 -1
- package/.output/public/_nuxt/{r6LdR7DN.js → ByzCJ9qg.js} +1 -1
- package/.output/public/_nuxt/{DJe7Wxdv.js → CEydsZ8-.js} +1 -1
- package/.output/public/_nuxt/{koEZfutw.js → CLz6MNQ2.js} +3 -3
- package/.output/public/_nuxt/{BC5hGokz.js → CVTJORg5.js} +1 -1
- package/.output/public/_nuxt/{CADbZwE5.js → CYpPdUat.js} +1 -1
- package/.output/public/_nuxt/{DV2n9B6m.js → CdDk3SWJ.js} +1 -1
- package/.output/public/_nuxt/{DVD-jGiv.js → CtvobD-H.js} +1 -1
- package/.output/public/_nuxt/{5KLjKHc1.js → DKUkGVFq.js} +1 -1
- package/.output/public/_nuxt/{BJwN20Xm.js → DNMZmLbK.js} +1 -1
- package/.output/public/_nuxt/{B2UrsJHg.js → Dfsc_W0R.js} +1 -1
- package/.output/public/_nuxt/{rEfOp38p.js → DvCFhKNi.js} +1 -1
- package/.output/public/_nuxt/EQtuxex4.js +33 -0
- package/.output/public/_nuxt/_u12_qo6.js +61 -0
- package/.output/public/_nuxt/{CB0WRoVi.js → b184ulLB.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/e94f7b27-aec2-4561-afff-7f7a9eb9f6e9.json +1 -0
- package/.output/public/_nuxt/{0J_bLG6U.js → c0F15Q-s.js} +1 -1
- package/.output/public/_nuxt/{Cr0GW7rA.js → cVykzrJ8.js} +1 -1
- package/.output/public/_nuxt/entry.J_CbC0oY.css +1 -0
- package/.output/public/_nuxt/{BMgDPqps.js → qtXB1NaS.js} +1 -1
- package/.output/public/_nuxt/{B_sGF2qN.js → s1ajeyOL.js} +1 -1
- package/.output/public/_nuxt/{DRBrUaE5.js → yvar5_gl.js} +1 -1
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/index-B4T6zHp0.mjs +1904 -0
- package/.output/server/chunks/build/index-B4T6zHp0.mjs.map +1 -0
- package/.output/server/chunks/build/server.mjs +223 -11
- package/.output/server/chunks/build/styles.mjs +3 -3
- package/.output/server/chunks/nitro/nitro.mjs +651 -336
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/api/parse.post.mjs +127 -24
- package/.output/server/chunks/routes/api/parse.post.mjs.map +1 -1
- package/.output/server/index.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/app/components/ZodMongooseStudio.vue +135 -46
- package/package.json +2 -2
- package/server/api/parse.post.ts +6 -0
- package/.output/public/_nuxt/BeaJ7I-K.js +0 -33
- package/.output/public/_nuxt/Dk9qGA5X.js +0 -59
- package/.output/public/_nuxt/builds/meta/dc761332-547d-4953-b51d-b2d453009b48.json +0 -1
- package/.output/public/_nuxt/entry.V-_Q9qpd.css +0 -1
- package/.output/server/chunks/build/index-Dnrh1ePF.mjs +0 -528
- package/.output/server/chunks/build/index-Dnrh1ePF.mjs.map +0 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CLz6MNQ2.js","./EQtuxex4.js","./entry.J_CbC0oY.css","./editor.CdBKkuhR.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{f as re,g as F,h as ve,i as ge,j as ee,o as h,k,w as b,r as T,l,P as H,m as le,n as y,p as P,q as te,s as ye,b as z,v as W,x as B,y as be,z as A,A as ie,B as ue,C as Z,D as X,E as he,F as xe,G as Y,H as I,I as _e,c as U,t as Se,J as V,K as ce,L as de,M as pe,N as Q,O as fe,Q as ze,R as we,S as ke,T as Ce,U as G,a as M,V as Me,W as Te,X as Oe,Y as qe,Z as Ee,d as L,$ as De,a0 as $e,a1 as Ae,a2 as Ie,_ as Re}from"./EQtuxex4.js";function j(e){if(typeof e!="object")return e;var n,t,o=Object.prototype.toString.call(e);if(o==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){t=new e.constructor;for(n in e)e.hasOwnProperty(n)&&t[n]!==e[n]&&(t[n]=j(e[n]))}else{t={};for(n in e)n==="__proto__"?Object.defineProperty(t,n,{value:j(e[n]),configurable:!0,enumerable:!0,writable:!0}):t[n]=j(e[n])}return t}if(o==="[object Array]"){for(n=e.length,t=Array(n);n--;)t[n]=j(e[n]);return t}return o==="[object Set]"?(t=new Set,e.forEach(function(a){t.add(j(a))}),t):o==="[object Map]"?(t=new Map,e.forEach(function(a,r){t.set(j(r),j(a))}),t):o==="[object Date]"?new Date(+e):o==="[object RegExp]"?(t=new RegExp(e.source,e.flags),t.lastIndex=e.lastIndex,t):o==="[object DataView]"?new e.constructor(j(e.buffer)):o==="[object ArrayBuffer]"?e.slice(0):o.slice(-6)==="Array]"?new e.constructor(e):e}function je(e,n="reka"){let t;return t=re?.(),n?`${n}-${t}`:t}const[me,Ne]=le("CollapsibleRoot");var Ve=F({__name:"CollapsibleRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:open"],setup(e,{expose:n,emit:t}){const o=e,r=ve(o,"open",t,{defaultValue:o.defaultOpen,passive:o.open===void 0}),{disabled:s,unmountOnHide:i}=ge(o);return Ne({contentId:"",disabled:s,open:r,unmountOnHide:i,onOpenToggle:()=>{s.value||(r.value=!r.value)}}),n({open:r}),ee(),(u,p)=>(h(),k(l(H),{as:u.as,"as-child":o.asChild,"data-state":l(r)?"open":"closed","data-disabled":l(s)?"":void 0},{default:b(()=>[T(u.$slots,"default",{open:l(r)})]),_:3},8,["as","as-child","data-state","data-disabled"]))}}),Be=Ve,Pe=F({inheritAttrs:!1,__name:"CollapsibleContent",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["contentFound"],setup(e,{emit:n}){const t=e,o=n,a=me();a.contentId||=je(void 0,"reka-collapsible-content");const r=y(),{forwardRef:s,currentElement:i}=ee(),u=y(0),p=y(0),v=A(()=>a.open.value),m=y(v.value),g=y();P(()=>[v.value,r.value?.present],async()=>{await ie();const f=i.value;if(!f)return;g.value=g.value||{transitionDuration:f.style.transitionDuration,animationName:f.style.animationName},f.style.transitionDuration="0s",f.style.animationName="none";const C=f.getBoundingClientRect();p.value=C.height,u.value=C.width,m.value||(f.style.transitionDuration=g.value.transitionDuration,f.style.animationName=g.value.animationName)},{immediate:!0});const _=A(()=>m.value&&a.open.value);return te(()=>{requestAnimationFrame(()=>{m.value=!1})}),ye(i,"beforematch",f=>{requestAnimationFrame(()=>{a.onOpenToggle(),o("contentFound")})}),(f,C)=>(h(),k(l(be),{ref_key:"presentRef",ref:r,present:f.forceMount||l(a).open.value,"force-mount":!0},{default:b(({present:w})=>[z(l(H),W(f.$attrs,{id:l(a).contentId,ref:l(s),"as-child":t.asChild,as:f.as,hidden:w?void 0:l(a).unmountOnHide.value?"":"until-found","data-state":_.value?void 0:l(a).open.value?"open":"closed","data-disabled":l(a).disabled?.value?"":void 0,style:{"--reka-collapsible-content-height":`${p.value}px`,"--reka-collapsible-content-width":`${u.value}px`}}),{default:b(()=>[!l(a).unmountOnHide.value||w?T(f.$slots,"default",{key:0}):B("v-if",!0)]),_:2},1040,["id","as-child","as","hidden","data-state","data-disabled","style"])]),_:3},8,["present"]))}}),Le=Pe,Ue=F({__name:"CollapsibleTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const n=e;ee();const t=me();return(o,a)=>(h(),k(l(H),{type:o.as==="button"?"button":void 0,as:o.as,"as-child":n.asChild,"aria-controls":l(t).contentId,"aria-expanded":l(t).open.value,"data-state":l(t).open.value?"open":"closed","data-disabled":l(t).disabled?.value?"":void 0,disabled:l(t).disabled?.value,onClick:l(t).onOpenToggle},{default:b(()=>[T(o.$slots,"default")]),_:3},8,["type","as","as-child","aria-controls","aria-expanded","data-state","data-disabled","disabled","onClick"]))}}),Fe=Ue;const He={slots:{base:"font-medium inline-flex items-center",label:"truncate",leadingIcon:"shrink-0",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailingIcon:"shrink-0"},variants:{fieldGroup:{horizontal:"not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]",vertical:"not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{solid:"",outline:"",soft:"",subtle:""},size:{xs:{base:"text-[8px]/3 px-1 py-0.5 gap-1 rounded-sm",leadingIcon:"size-3",leadingAvatarSize:"3xs",trailingIcon:"size-3"},sm:{base:"text-[10px]/3 px-1.5 py-1 gap-1 rounded-sm",leadingIcon:"size-3",leadingAvatarSize:"3xs",trailingIcon:"size-3"},md:{base:"text-xs px-2 py-1 gap-1 rounded-md",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},lg:{base:"text-sm px-2 py-1 gap-1.5 rounded-md",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},xl:{base:"text-base px-2.5 py-1 gap-1.5 rounded-md",leadingIcon:"size-6",leadingAvatarSize:"2xs",trailingIcon:"size-6"}},square:{true:""}},compoundVariants:[{color:"primary",variant:"solid",class:"bg-primary text-inverted"},{color:"secondary",variant:"solid",class:"bg-secondary text-inverted"},{color:"success",variant:"solid",class:"bg-success text-inverted"},{color:"info",variant:"solid",class:"bg-info text-inverted"},{color:"warning",variant:"solid",class:"bg-warning text-inverted"},{color:"error",variant:"solid",class:"bg-error text-inverted"},{color:"primary",variant:"outline",class:"text-primary ring ring-inset ring-primary/50"},{color:"secondary",variant:"outline",class:"text-secondary ring ring-inset ring-secondary/50"},{color:"success",variant:"outline",class:"text-success ring ring-inset ring-success/50"},{color:"info",variant:"outline",class:"text-info ring ring-inset ring-info/50"},{color:"warning",variant:"outline",class:"text-warning ring ring-inset ring-warning/50"},{color:"error",variant:"outline",class:"text-error ring ring-inset ring-error/50"},{color:"primary",variant:"soft",class:"bg-primary/10 text-primary"},{color:"secondary",variant:"soft",class:"bg-secondary/10 text-secondary"},{color:"success",variant:"soft",class:"bg-success/10 text-success"},{color:"info",variant:"soft",class:"bg-info/10 text-info"},{color:"warning",variant:"soft",class:"bg-warning/10 text-warning"},{color:"error",variant:"soft",class:"bg-error/10 text-error"},{color:"primary",variant:"subtle",class:"bg-primary/10 text-primary ring ring-inset ring-primary/25"},{color:"secondary",variant:"subtle",class:"bg-secondary/10 text-secondary ring ring-inset ring-secondary/25"},{color:"success",variant:"subtle",class:"bg-success/10 text-success ring ring-inset ring-success/25"},{color:"info",variant:"subtle",class:"bg-info/10 text-info ring ring-inset ring-info/25"},{color:"warning",variant:"subtle",class:"bg-warning/10 text-warning ring ring-inset ring-warning/25"},{color:"error",variant:"subtle",class:"bg-error/10 text-error ring ring-inset ring-error/25"},{color:"neutral",variant:"solid",class:"text-inverted bg-inverted"},{color:"neutral",variant:"outline",class:"ring ring-inset ring-accented text-default bg-default"},{color:"neutral",variant:"soft",class:"text-default bg-elevated"},{color:"neutral",variant:"subtle",class:"ring ring-inset ring-accented text-default bg-elevated"},{size:"xs",square:!0,class:"p-0.5"},{size:"sm",square:!0,class:"p-1"},{size:"md",square:!0,class:"p-1"},{size:"lg",square:!0,class:"p-1"},{size:"xl",square:!0,class:"p-1"}],defaultVariants:{color:"primary",variant:"solid",size:"md"}},Ze={__name:"UBadge",props:{as:{type:null,required:!1,default:"span"},label:{type:[String,Number],required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1}},setup(e){const n=e,t=ue(),o=Z(),a=X("badge",n),{orientation:r,size:s}=he(n),{isLeading:i,isTrailing:u,leadingIconName:p,trailingIconName:v}=xe(n),m=A(()=>V({extend:V(He),...o.ui?.badge||{}})({color:n.color,variant:n.variant,size:s.value||n.size,square:n.square||!t.default&&!n.label,fieldGroup:r.value}));return(g,_)=>(h(),k(l(H),{as:e.as,"data-slot":"base",class:I(m.value.base({class:[l(a)?.base,n.class]}))},{default:b(()=>[T(g.$slots,"leading",{ui:m.value},()=>[l(i)&&l(p)?(h(),k(Y,{key:0,name:l(p),"data-slot":"leadingIcon",class:I(m.value.leadingIcon({class:l(a)?.leadingIcon}))},null,8,["name","class"])):e.avatar?(h(),k(_e,W({key:1,size:l(a)?.leadingAvatarSize||m.value.leadingAvatarSize()},e.avatar,{"data-slot":"leadingAvatar",class:m.value.leadingAvatar({class:l(a)?.leadingAvatar})}),null,16,["size","class"])):B("",!0)]),T(g.$slots,"default",{ui:m.value},()=>[e.label!==void 0&&e.label!==null?(h(),U("span",{key:0,"data-slot":"label",class:I(m.value.label({class:l(a)?.label}))},Se(e.label),3)):B("",!0)]),T(g.$slots,"trailing",{ui:m.value},()=>[l(u)&&l(v)?(h(),k(Y,{key:0,name:l(v),"data-slot":"trailingIcon",class:I(m.value.trailingIcon({class:l(a)?.trailingIcon}))},null,8,["name","class"])):B("",!0)])]),_:3},8,["as","class"]))}},Xe=F({__name:"StudioEditor",props:{modelValue:{}},emits:["update:modelValue"],setup(e,{emit:n}){const t=e,o=n,a=y(null),r=pe(null);return te(async()=>{if(!a.value)return;const s=await ce(()=>import("./CLz6MNQ2.js").then(i=>i.b),__vite__mapDeps([0,1,2,3]),import.meta.url);s.typescript.typescriptDefaults.setCompilerOptions({target:s.typescript.ScriptTarget.ESNext,allowNonTsExtensions:!0,moduleResolution:s.typescript.ModuleResolutionKind.NodeJs,module:s.typescript.ModuleKind.ESNext,noEmit:!0}),s.typescript.typescriptDefaults.addExtraLib(`
|
|
3
|
+
declare module 'zod/v4' {
|
|
4
|
+
export const z: any;
|
|
5
|
+
export type ZodTypeAny = any;
|
|
6
|
+
export type ZodObject<T> = any;
|
|
7
|
+
export type ZodString = any;
|
|
8
|
+
export type ZodNumber = any;
|
|
9
|
+
}
|
|
10
|
+
`,"file:///node_modules/@types/zod-v4/index.d.ts"),s.typescript.typescriptDefaults.addExtraLib(`
|
|
11
|
+
declare module '@nullix/zod-mongoose' {
|
|
12
|
+
import { z } from 'zod/v4';
|
|
13
|
+
import mongoose, { SchemaOptions } from 'mongoose';
|
|
14
|
+
import * as hookable from 'hookable';
|
|
15
|
+
|
|
16
|
+
interface MongooseMeta extends Record<string, any> {
|
|
17
|
+
explicitId?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const mongooseRegistry: z.core.$ZodRegistry<MongooseMeta, z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
20
|
+
declare function withMongoose<T extends z.ZodTypeAny>(schema: T, meta: MongooseMeta): T;
|
|
21
|
+
|
|
22
|
+
type ToMongooseType<T extends z.ZodTypeAny> = any; // Simplified for Monaco perf
|
|
23
|
+
|
|
24
|
+
export declare function extractMongooseDef<T extends z.ZodTypeAny>(schema: T, visited?: Map<z.ZodTypeAny, any>, isField?: boolean): ToMongooseType<T> & Record<string, any>;
|
|
25
|
+
|
|
26
|
+
interface ToMongooseSchemaOptions extends SchemaOptions {
|
|
27
|
+
plugins?: Array<(schema: mongoose.Schema, options?: any) => void>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export declare function toMongooseSchema<T extends z.ZodTypeAny>(schema: T, options?: ToMongooseSchemaOptions): mongoose.Schema<z.infer<T>>;
|
|
31
|
+
|
|
32
|
+
export declare const zObjectId: (options?: MongooseMeta) => any;
|
|
33
|
+
export declare const zBuffer: (options?: MongooseMeta) => any;
|
|
34
|
+
export declare const zPopulated: <T extends z.ZodTypeAny>(ref: string, schema: T, options?: MongooseMeta) => any;
|
|
35
|
+
export declare const genTimestampsSchema: <CrAt = "createdAt", UpAt = "updatedAt">(createdAtField?: any, updatedAtField?: any) => any;
|
|
36
|
+
|
|
37
|
+
export type PopulatedSchema<T, K extends keyof T> = any;
|
|
38
|
+
export declare const bufferMongooseGetter: (value: unknown) => any;
|
|
39
|
+
export declare const getMongoose: () => any;
|
|
40
|
+
export declare const setFrontendMode: (enabled: boolean) => void;
|
|
41
|
+
export declare const getFrontendMode: () => boolean;
|
|
42
|
+
|
|
43
|
+
export type MongooseZodHooks = any;
|
|
44
|
+
export declare const hooks: any;
|
|
45
|
+
export declare function callHookSync<Name extends keyof MongooseZodHooks>(name: Name, ...args: Parameters<MongooseZodHooks[Name]>): void;
|
|
46
|
+
}
|
|
47
|
+
`,"file:///node_modules/@nullix/zod-mongoose/index.d.ts"),r.value=s.editor.create(a.value,{value:t.modelValue,language:"typescript",theme:"vs-dark",minimap:{enabled:!1},automaticLayout:!0,fontSize:14,padding:{top:16}}),r.value.onDidChangeModelContent(()=>{o("update:modelValue",r.value?.getValue()||"")})}),P(()=>t.modelValue,s=>{r.value&&r.value.getValue()!==s&&r.value.setValue(s)}),de(()=>{r.value&&r.value.dispose()}),(s,i)=>(h(),U("div",{ref_key:"editorContainer",ref:a,class:"w-full h-full"},null,512))}}),Ge=Object.assign(Xe,{__name:"StudioEditor"}),Ke=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function Je(e,n){if(typeof e!="string")throw new TypeError("argument str must be a string");const t=new Ke,o=n||{},a=o.decode||We;let r=0;for(;r<e.length;){const s=e.indexOf("=",r);if(s===-1)break;let i=e.indexOf(";",r);if(i===-1)i=e.length;else if(i<s){r=e.lastIndexOf(";",s-1)+1;continue}const u=e.slice(r,s).trim();if(o?.filter&&!o?.filter(u)){r=i+1;continue}if(t[u]===void 0){let p=e.slice(s+1,i).trim();p.codePointAt(0)===34&&(p=p.slice(1,-1)),t[u]=Ye(p,a)}r=i+1}return t}function We(e){return e.includes("%")?decodeURIComponent(e):e}function Ye(e,n){try{return n(e)}catch{return e}}const K=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function ae(e,n,t){const o=t||{},a=o.encode||encodeURIComponent;if(typeof a!="function")throw new TypeError("option encode is invalid");if(!K.test(e))throw new TypeError("argument name is invalid");const r=a(n);if(r&&!K.test(r))throw new TypeError("argument val is invalid");let s=e+"="+r;if(o.maxAge!==void 0&&o.maxAge!==null){const i=o.maxAge-0;if(Number.isNaN(i)||!Number.isFinite(i))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(i)}if(o.domain){if(!K.test(o.domain))throw new TypeError("option domain is invalid");s+="; Domain="+o.domain}if(o.path){if(!K.test(o.path))throw new TypeError("option path is invalid");s+="; Path="+o.path}if(o.expires){if(!Qe(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(s+="; HttpOnly"),o.secure&&(s+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":{s+="; Priority=Low";break}case"medium":{s+="; Priority=Medium";break}case"high":{s+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:{s+="; SameSite=Strict";break}case"lax":{s+="; SameSite=Lax";break}case"strict":{s+="; SameSite=Strict";break}case"none":{s+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(s+="; Partitioned"),s}function Qe(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}function et(e){if(e!=="undefined")try{const n=JSON.parse(e);return typeof n=="number"&&String(n)!==e?e:n}catch{return e}}const tt={path:"/",watch:!0,decode:e=>et(decodeURIComponent(e)),encode:e=>{if(typeof e!="string"||e==="undefined")return encodeURIComponent(JSON.stringify(e));try{if(typeof JSON.parse(e)!="string")return encodeURIComponent(JSON.stringify(e))}catch{}return encodeURIComponent(e)},refresh:!1},J=globalThis.cookieStore;function ot(e,n){const t={...tt,...n};t.filter??=p=>p===e;const o=ne(t)||{};let a;t.maxAge!==void 0?a=t.maxAge*1e3:t.expires&&(a=t.expires.getTime()-Date.now());const r=a!==void 0&&a<=0,s=r||o[e]===void 0||o[e]===null,i=j(r?void 0:o[e]??t.default?.()),u=a&&!r?st(i,a,t.watch&&t.watch!=="shallow"):y(i);{let p=null;try{!J&&typeof BroadcastChannel<"u"&&(p=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const v=(f=!1)=>{!f&&(t.readonly||we(u.value,o[e]))||(nt(e,u.value,t),o[e]=j(u.value),p?.postMessage({value:t.encode(u.value)}))},m=f=>{const C=f.refresh?ne(t)?.[e]:t.decode(f.value);g=!0,u.value=C,o[e]=j(C),ie(()=>{g=!1})};let g=!1;const _=!!fe();if(_&&Q(()=>{g=!0,v(),p?.close()}),J){const f=C=>{const w=C.changed.find(q=>q.name===e),c=C.deleted.find(q=>q.name===e);w&&m({value:w.value}),c&&m({value:null})};J.addEventListener("change",f),_&&Q(()=>J.removeEventListener("change",f))}else p&&(p.onmessage=({data:f})=>m(f));t.watch&&P(u,()=>{g||v(t.refresh)},{deep:t.watch!=="shallow"}),s&&v(s)}return u}function ne(e={}){return Je(document.cookie,e)}function at(e,n,t={}){return n==null?ae(e,n,{...t,maxAge:-1}):ae(e,n,t)}function nt(e,n,t={}){document.cookie=at(e,n,t)}const se=2147483647;function st(e,n,t){let o,a,r=0;const s=t?y(e):{value:e};return fe()&&Q(()=>{a?.(),clearTimeout(o)}),ze((i,u)=>{t&&(a=P(s,u));function p(){const m=n-r,g=m<se?m:se;o=setTimeout(()=>{if(r+=g,r<n)return p();s.value=void 0,u()},g)}function v(){r=0,clearTimeout(o),p()}return{get(){return i(),s.value},set(m){v(),s.value=m,u()}}})}function rt(e,n={},{collapsed:t=y(!1)}={}){const o=y(null),a=A(()=>({side:"left",minSize:0,maxSize:100,defaultSize:0,storage:"cookie",persistent:!0,collapsible:!1,collapsedSize:0,resizable:!0,unit:"%",...G(n)?n.value:n})),{dir:r}=ke(),s={size:a.value.defaultSize,collapsed:l(t)??!1},i=a.value.persistent&&(a.value.resizable||a.value.collapsible)?a.value.storage==="cookie"?ot(e,{default:()=>s}):Ce(e,s):y(s),u=A({get:()=>i.value.collapsed,set:d=>{a.value.collapsible&&(G(t)&&(t.value=d),i.value.collapsed=d)}}),p=y(a.value.defaultSize),v=A({get:()=>i.value.size,set:d=>{i.value.size=d}}),m=A(()=>u.value?a.value.collapsedSize:v.value),g=y(!1),_=(d,x,R)=>{if(!o.value||!a.value.resizable)return;const N=o.value.parentElement?.offsetWidth||1,$=r.value==="rtl";let S;$?S=a.value.side==="left"?x-d.clientX:d.clientX-x:S=a.value.side==="left"?d.clientX-x:x-d.clientX;const O=R+S;let E;if(a.value.unit==="rem"){const D=Number.parseFloat(getComputedStyle(document.documentElement).fontSize);E=O/D}else a.value.unit==="px"?E=O:E=O/N*100;if(a.value.collapsible&&E<a.value.collapsedSize+4){q(!0);return}else u.value&&q(!1);v.value=Math.min(a.value.maxSize,Math.max(a.value.minSize,E))},f=d=>{if(!o.value||!a.value.resizable)return;d.preventDefault(),d.stopPropagation();const x=o.value.getBoundingClientRect().width;if(!x)return;const R=d.clientX,N=x;g.value=!0;const $=O=>{_(O,R,N)},S=()=>{g.value=!1,document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",S)};document.addEventListener("mousemove",$),document.addEventListener("mouseup",S)},C=(d,x,R)=>{if(!o.value||!a.value.resizable||!d.touches[0])return;const N=o.value.parentElement?.offsetWidth||1,$=r.value==="rtl";let S;$?S=a.value.side==="left"?x-d.touches[0].clientX:d.touches[0].clientX-x:S=a.value.side==="left"?d.touches[0].clientX-x:x-d.touches[0].clientX;const O=R+S;let E;if(a.value.unit==="rem"){const D=Number.parseFloat(getComputedStyle(document.documentElement).fontSize);E=O/D}else a.value.unit==="px"?E=O:E=O/N*100;if(a.value.collapsible&&E<a.value.collapsedSize+4){q(!0);return}else u.value&&q(!1);v.value=Math.min(a.value.maxSize,Math.max(a.value.minSize,E))},w=d=>{if(!o.value||!a.value.resizable||!d.touches[0])return;d.preventDefault(),d.stopPropagation();const x=o.value.getBoundingClientRect().width;if(!x)return;const R=d.touches[0].clientX,N=x;g.value=!0;const $=O=>{C(O,R,N)},S=()=>{g.value=!1,document.removeEventListener("touchmove",$),document.removeEventListener("touchend",S),document.removeEventListener("touchcancel",S)};document.addEventListener("touchmove",$,{passive:!1}),document.addEventListener("touchend",S),document.addEventListener("touchcancel",S)},c=d=>{!o.value||!a.value.resizable||(d.preventDefault(),d.stopPropagation(),u.value&&q(!1),v.value=a.value.defaultSize)},q=d=>{if(!a.value.collapsible)return;const x=d??!u.value;x&&!u.value?p.value=v.value:!x&&u.value&&(v.value=p.value),u.value=x};return G(t)&&i.value.collapsed&&(t.value=i.value.collapsed),G(t)&&P(t,d=>{a.value.collapsible&&i.value.collapsed!==d&&(i.value.collapsed=d)}),{el:o,size:m,isDragging:g,isCollapsed:u,onMouseDown:f,onTouchStart:w,onDoubleClick:c,collapse:q}}const[lt,it]=le("DashboardGroup"),ut={base:"hidden lg:block touch-none select-none cursor-ew-resize relative before:absolute before:inset-y-0 before:-left-1.5 before:-right-1.5 before:z-1"},ct={__name:"UDashboardResizeHandle",props:{as:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(e){const n=e,t=Z(),o=X("dashboardResizeHandle",n),a=A(()=>V({extend:V(ut),...t.ui?.dashboardResizeHandle||{}}));return(r,s)=>(h(),k(l(H),{as:e.as,role:"separator",class:I(a.value({class:[l(o)?.base,n.class]}))},{default:b(()=>[T(r.$slots,"default")]),_:3},8,["as","class"]))}},dt={slots:{root:"relative flex flex-col min-w-0 min-h-svh lg:not-last:border-e lg:not-last:border-default shrink-0",body:"flex flex-col gap-4 sm:gap-6 flex-1 overflow-y-auto p-4 sm:p-6",handle:""},variants:{size:{true:{root:"w-full lg:w-(--width)"},false:{root:"flex-1"}}}},pt=["data-dragging"],ft=Object.assign({inheritAttrs:!1},{__name:"UDashboardPanel",props:{class:{type:null,required:!1},ui:{type:Object,required:!1},id:{type:String,required:!1},minSize:{type:Number,required:!1,default:15},maxSize:{type:Number,required:!1},defaultSize:{type:Number,required:!1},resizable:{type:Boolean,required:!1,default:!1}},setup(e){const n=e,t=Z(),o=X("dashboardPanel",n),a=lt({storageKey:"dashboard",unit:"%"}),r=`${a.storageKey}-panel-${n.id||re()}`,{el:s,size:i,isDragging:u,onMouseDown:p,onTouchStart:v,onDoubleClick:m}=rt(r,Te(()=>({...a,...n}))),g=A(()=>V({extend:V(dt),...t.ui?.dashboardPanel||{}})({size:!!i.value}));return(_,f)=>(h(),U(Me,null,[M("div",W({id:r,ref_key:"el",ref:s},_.$attrs,{"data-dragging":l(u),"data-slot":"root",class:g.value.root({class:[l(o)?.root,n.class]}),style:[l(i)?{"--width":`${l(i)}${l(a).unit}`}:void 0]}),[T(_.$slots,"default",{},()=>[T(_.$slots,"header"),M("div",{"data-slot":"body",class:I(g.value.body({class:l(o)?.body}))},[T(_.$slots,"body")],2),T(_.$slots,"footer")])],16,pt),T(_.$slots,"resize-handle",{onMouseDown:l(p),onTouchStart:l(v),onDoubleClick:l(m)},()=>[e.resizable?(h(),k(ct,{key:0,"aria-controls":r,"data-slot":"handle",class:I(g.value.handle({class:l(o)?.handle})),onMousedown:l(p),onTouchstart:l(v),onDblclick:l(m)},null,8,["class","onMousedown","onTouchstart","onDblclick"])):B("",!0)])],64))}}),mt=F({__name:"StudioOutput",props:{modelValue:{}},setup(e){const n=e,t=y(null),o=pe(null);return te(async()=>{if(!t.value)return;const a=await ce(()=>import("./CLz6MNQ2.js").then(r=>r.b),__vite__mapDeps([0,1,2,3]),import.meta.url);o.value=a.editor.create(t.value,{value:n.modelValue,language:"typescript",theme:"vs-dark",minimap:{enabled:!1},automaticLayout:!0,readOnly:!0,fontSize:14,padding:{top:16}})}),P(()=>n.modelValue,a=>{o.value&&o.value.setValue(a)}),de(()=>{o.value&&o.value.dispose()}),(a,r)=>(h(),U("div",{ref_key:"outputContainer",ref:t,class:"w-full h-full"},null,512))}}),vt=Object.assign(mt,{__name:"StudioOutput"}),gt={slots:{root:"",content:"data-[state=open]:animate-[collapsible-down_200ms_ease-out] data-[state=closed]:animate-[collapsible-up_200ms_ease-out] overflow-hidden"}},yt={__name:"UCollapsible",props:{as:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(e,{emit:n}){const t=e,o=n,a=ue(),r=Z(),s=X("collapsible",t),i=Oe(qe(t,"as","defaultOpen","open","disabled","unmountOnHide"),o),u=A(()=>V({extend:V(gt),...r.ui?.collapsible||{}})());return(p,v)=>(h(),k(l(Be),W(l(i),{"data-slot":"root",class:u.value.root({class:[l(s)?.root,t.class]})}),{default:b(({open:m})=>[a.default?(h(),k(l(Fe),{key:0,"as-child":""},{default:b(()=>[T(p.$slots,"default",{open:m})]),_:2},1024)):B("",!0),z(l(Le),{"data-slot":"content",class:I(u.value.content({class:l(s)?.content}))},{default:b(()=>[T(p.$slots,"content")]),_:3},8,["class"])]),_:3},16,["class"]))}},bt={base:"fixed inset-0 flex overflow-hidden"},ht={__name:"UDashboardGroup",props:{as:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},storage:{type:String,required:!1,default:"cookie"},storageKey:{type:String,required:!1,default:"dashboard"},persistent:{type:Boolean,required:!1,default:!0},unit:{type:String,required:!1,default:"%"}},setup(e){const n=e,t=Ee(),o=Z(),a=X("dashboardGroup",n),r=A(()=>V({extend:V(bt),...o.ui?.dashboardGroup||{}})),s=y(!1),i=y(!1);return it({storage:n.storage,storageKey:n.storageKey,persistent:n.persistent,unit:n.unit,sidebarOpen:s,toggleSidebar:()=>{t.hooks.callHook("dashboard:sidebar:toggle")},sidebarCollapsed:i,collapseSidebar:u=>{t.hooks.callHook("dashboard:sidebar:collapse",u)},toggleSearch:()=>{t.hooks.callHook("dashboard:search:toggle")}}),(u,p)=>(h(),k(l(H),{as:e.as,class:I(r.value({class:[l(a)?.base,n.class]}))},{default:b(()=>[T(u.$slots,"default")]),_:3},8,["as","class"]))}},xt={class:"bg-white dark:bg-gray-900 border-b border-gray-200 dark:border-gray-800 py-3 px-4 flex justify-between items-center shrink-0 z-20"},_t={class:"flex items-center gap-4"},St={class:"flex items-center gap-2"},zt={key:1,class:"text-sm text-gray-500"},wt={class:"h-full relative bg-white dark:bg-gray-950"},kt={class:"px-3 py-1 bg-gray-100 dark:bg-gray-900 text-xs font-semibold text-gray-600 dark:text-gray-400 border-b border-gray-200 dark:border-gray-800 z-10 flex justify-between items-center cursor-pointer select-none"},Ct={class:"flex-1 relative"},Mt={class:"px-3 py-1 bg-gray-100 dark:bg-gray-900 text-xs font-semibold text-gray-600 dark:text-gray-400 border-b border-gray-200 dark:border-gray-800 z-10 flex justify-between items-center cursor-pointer select-none"},Tt={class:"flex items-center gap-2"},Ot={class:"flex-1 relative"},qt=F({__name:"ZodMongooseStudio",setup(e){let n;const t=Ie(),o=y(t.public.isLocalMode),a=y(t.public.isDocsMode),r=y(`import { z } from 'zod/v4';
|
|
48
|
+
import { extractMongooseDef, toMongooseSchema } from '@nullix/zod-mongoose';
|
|
49
|
+
|
|
50
|
+
const UserSchema = z.object({
|
|
51
|
+
name: z.string(),
|
|
52
|
+
age: z.number().optional()
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// Export your schema so the Studio can transform it
|
|
56
|
+
export default UserSchema;`),s=y("// Definition output..."),i=y("// Mongoose Schema output..."),u=y("// Mongoose Schema tree output..."),p=y("// Mongoose Schema paths output..."),v=y("obj"),m=A(()=>{switch(v.value){case"obj":return i;case"tree":return u;case"paths":return p}}),g=y(!0),_=y(!0),f=y(!1),C=async()=>{f.value=!0;try{const w=await $fetch("/api/parse",{method:"POST",body:{sourceCode:r.value}});s.value=`// Result of extractMongooseDef()
|
|
57
|
+
const definition = ${w.definition};`,i.value=`// Result of toMongooseSchema().obj
|
|
58
|
+
const schemaObj = ${w.schemaObj};`,u.value=`// Result of toMongooseSchema().tree
|
|
59
|
+
const schemaTree = ${w.schemaTree};`,p.value=`// Result of toMongooseSchema().paths
|
|
60
|
+
const schemaPaths = ${w.schemaPaths};`}catch(w){const c=`// Error
|
|
61
|
+
${w.data?.message||w.message}`;s.value=c,i.value=c,u.value=c,p.value=c}finally{f.value=!1}};return P(r,()=>{a.value||(clearTimeout(n),n=setTimeout(C,600))}),a.value&&C(),(w,c)=>{const q=Ze,d=Ae,x=Ge,R=De,N=ft,$=Y,S=vt,O=yt,E=ht;return h(),U("div",{class:I(["flex flex-col bg-gray-50 dark:bg-gray-950 overflow-hidden relative",[a.value?"h-[calc(100vh-var(--ui-header-height,64px))] sticky top-[var(--ui-header-height,64px)]":"h-screen"]])},[M("header",xt,[M("div",_t,[c[9]||(c[9]=M("h1",{class:"text-xl font-bold text-primary"}," @nullix/zod-mongoose Studio ",-1)),o.value?(h(),k(q,{key:0,color:"success",variant:"soft"},{default:b(()=>[...c[7]||(c[7]=[L("Local Mode",-1)])]),_:1})):(h(),k(q,{key:1,color:"info",variant:"soft"},{default:b(()=>[...c[8]||(c[8]=[L("Docs Mode",-1)])]),_:1}))]),M("div",St,[a.value?(h(),k(d,{key:0,icon:"i-heroicons-play-solid",color:"primary",loading:f.value,onClick:C},{default:b(()=>[...c[10]||(c[10]=[L(" Run ",-1)])]),_:1},8,["loading"])):f.value?(h(),U("span",zt,"Transforming...")):B("",!0)])]),z(E,{class:"flex-1 min-h-0 !relative !inset-auto","storage-key":"studio-layout"},{default:b(()=>[z(N,{id:"editor",collapsible:"",resizable:"","min-size":20},{default:b(()=>[M("div",wt,[z(R,null,{default:b(()=>[z(x,{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=D=>r.value=D)},null,8,["modelValue"])]),_:1})])]),_:1}),z(N,{id:"outputs",resizable:"","min-size":20,class:"flex flex-col h-full bg-gray-200 dark:bg-gray-800 overflow-hidden"},{default:b(()=>[z(O,{open:g.value,"onUpdate:open":c[1]||(c[1]=D=>g.value=D),class:I([[g.value?"flex-1":"flex-none"],"bg-white dark:bg-gray-950 flex flex-col min-h-0"]),ui:{content:"flex-1 flex flex-col min-h-0"}},{default:b(({open:D})=>[M("div",kt,[c[11]||(c[11]=M("span",null,"extractMongooseDef()",-1)),z($,{name:D?"i-heroicons-chevron-down":"i-heroicons-chevron-right"},null,8,["name"])])]),content:b(()=>[M("div",Ct,[z(R,null,{default:b(()=>[z(S,{"model-value":s.value},null,8,["model-value"])]),_:1})])]),_:1},8,["open","class"]),z(O,{open:_.value,"onUpdate:open":c[6]||(c[6]=D=>_.value=D),class:I([[_.value?"flex-1":"flex-none"],"bg-white dark:bg-gray-950 flex flex-col min-h-0"]),ui:{content:"flex-1 flex flex-col min-h-0"}},{default:b(({open:D})=>[M("div",Mt,[M("div",Tt,[c[15]||(c[15]=M("span",null,"toMongooseSchema()",-1)),M("div",{class:"flex gap-1",onClick:c[5]||(c[5]=$e(()=>{},["stop"]))},[z(d,{size:"xs",variant:"ghost",color:v.value==="obj"?"primary":"neutral",onClick:c[2]||(c[2]=oe=>v.value="obj")},{default:b(()=>[...c[12]||(c[12]=[L(" .obj ",-1)])]),_:1},8,["color"]),z(d,{size:"xs",variant:"ghost",color:v.value==="tree"?"primary":"neutral",onClick:c[3]||(c[3]=oe=>v.value="tree")},{default:b(()=>[...c[13]||(c[13]=[L(" .tree ",-1)])]),_:1},8,["color"]),z(d,{size:"xs",variant:"ghost",color:v.value==="paths"?"primary":"neutral",onClick:c[4]||(c[4]=oe=>v.value="paths")},{default:b(()=>[...c[14]||(c[14]=[L(" .paths ",-1)])]),_:1},8,["color"])])]),z($,{name:D?"i-heroicons-chevron-down":"i-heroicons-chevron-right"},null,8,["name"])])]),content:b(()=>[M("div",Ot,[z(R,null,{default:b(()=>[z(S,{"model-value":l(m).value},null,8,["model-value"])]),_:1})])]),_:1},8,["open","class"])]),_:1})]),_:1})],2)}}}),Et=Object.assign(qt,{__name:"ZodMongooseStudio"}),Dt={};function $t(e,n){const t=Et;return h(),k(t)}const It=Re(Dt,[["render",$t]]);export{It as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./
|
|
1
|
+
import{l as e}from"./CLz6MNQ2.js";import"./EQtuxex4.js";const o={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},r={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};export{o as conf,r as language};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"e94f7b27-aec2-4561-afff-7f7a9eb9f6e9","timestamp":1780648761593}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"e94f7b27-aec2-4561-afff-7f7a9eb9f6e9","timestamp":1780648761593,"prerendered":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as P,l as _,e as B}from"./
|
|
1
|
+
import{c as P,l as _,e as B}from"./CLz6MNQ2.js";import{f as Y,g as J,C as Q,H as y,b as G,d as Z,F as X,S as $,e as K}from"./yvar5_gl.js";import{a as Oe,D as Ie,h as Le,R as Ne,c as Ee,i as Ue,j as De,t as Be,k as Re}from"./yvar5_gl.js";import"./EQtuxex4.js";const x=120*1e3;class C{constructor(i){this._defaults=i,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>x&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=P({moduleId:"vs/language/json/jsonWorker",createWorker:()=>new Worker(new URL(""+new URL("json.worker-BoL8UZqY.js",import.meta.url).href,import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...i){let t;return this._getClient().then(n=>{t=n}).then(n=>{if(this._worker)return this._worker.withSyncedResources(i)}).then(n=>t)}}function ee(e,i=!1){const t=e.length;let n=0,o="",p=0,l=16,u=0,m=0,w=0,v=0,c=0;function O(s,g){let a=0,r=0;for(;a<s;){let f=e.charCodeAt(n);if(f>=48&&f<=57)r=r*16+f-48;else if(f>=65&&f<=70)r=r*16+f-65+10;else if(f>=97&&f<=102)r=r*16+f-97+10;else break;n++,a++}return a<s&&(r=-1),r}function U(s){n=s,o="",p=0,l=16,c=0}function N(){let s=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&T(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&T(e.charCodeAt(n)))for(n++;n<e.length&&T(e.charCodeAt(n));)n++;else return c=3,e.substring(s,n);let g=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&T(e.charCodeAt(n))){for(n++;n<e.length&&T(e.charCodeAt(n));)n++;g=n}else c=3;return e.substring(s,g)}function H(){let s="",g=n;for(;;){if(n>=t){s+=e.substring(g,n),c=2;break}const a=e.charCodeAt(n);if(a===34){s+=e.substring(g,n),n++;break}if(a===92){if(s+=e.substring(g,n),n++,n>=t){c=2;break}switch(e.charCodeAt(n++)){case 34:s+='"';break;case 92:s+="\\";break;case 47:s+="/";break;case 98:s+="\b";break;case 102:s+="\f";break;case 110:s+=`
|
|
2
2
|
`;break;case 114:s+="\r";break;case 116:s+=" ";break;case 117:const f=O(4);f>=0?s+=String.fromCharCode(f):c=4;break;default:c=5}g=n;continue}if(a>=0&&a<=31)if(I(a)){s+=e.substring(g,n),c=2;break}else c=6;n++}return s}function D(){if(o="",c=0,p=n,m=u,v=w,n>=t)return p=t,l=17;let s=e.charCodeAt(n);if(E(s)){do n++,o+=String.fromCharCode(s),s=e.charCodeAt(n);while(E(s));return l=15}if(I(s))return n++,o+=String.fromCharCode(s),s===13&&e.charCodeAt(n)===10&&(n++,o+=`
|
|
3
3
|
`),u++,w=n,l=14;switch(s){case 123:return n++,l=1;case 125:return n++,l=2;case 91:return n++,l=3;case 93:return n++,l=4;case 58:return n++,l=6;case 44:return n++,l=5;case 34:return n++,o=H(),l=10;case 47:const g=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n<t&&!I(e.charCodeAt(n));)n++;return o=e.substring(g,n),l=12}if(e.charCodeAt(n+1)===42){n+=2;const a=t-1;let r=!1;for(;n<a;){const f=e.charCodeAt(n);if(f===42&&e.charCodeAt(n+1)===47){n+=2,r=!0;break}n++,I(f)&&(f===13&&e.charCodeAt(n)===10&&n++,u++,w=n)}return r||(n++,c=1),o=e.substring(g,n),l=13}return o+=String.fromCharCode(s),n++,l=16;case 45:if(o+=String.fromCharCode(s),n++,n===t||!T(e.charCodeAt(n)))return l=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=N(),l=11;default:for(;n<t&&d(s);)n++,s=e.charCodeAt(n);if(p!==n){switch(o=e.substring(p,n),o){case"true":return l=8;case"false":return l=9;case"null":return l=7}return l=16}return o+=String.fromCharCode(s),n++,l=16}}function d(s){if(E(s)||I(s))return!1;switch(s){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function z(){let s;do s=D();while(s>=12&&s<=15);return s}return{setPosition:U,getPosition:()=>n,scan:i?z:D,getToken:()=>l,getTokenValue:()=>o,getTokenOffset:()=>p,getTokenLength:()=>n-p,getTokenStartLine:()=>m,getTokenStartCharacter:()=>p-v,getTokenError:()=>c}}function E(e){return e===32||e===9}function I(e){return e===10||e===13}function T(e){return e>=48&&e<=57}var R;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(R||(R={}));new Array(20).fill(0).map((e,i)=>" ".repeat(i));const A=200;new Array(A).fill(0).map((e,i)=>`
|
|
4
4
|
`+" ".repeat(i)),new Array(A).fill(0).map((e,i)=>"\r"+" ".repeat(i)),new Array(A).fill(0).map((e,i)=>`\r
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as s,u as a,o as i,c as u,a as t,t as n,b as c,w as l,d,e as f}from"./
|
|
1
|
+
import{_ as s,u as a,o as i,c as u,a as t,t as n,b as c,w as l,d,e as f}from"./EQtuxex4.js";const p={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},m={class:"max-w-520px text-center"},h=["textContent"],b=["textContent"],x=["textContent"],g={class:"flex items-center justify-center w-full"},y={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},status:{type:Number,default:404},statusText:{type:String,default:"Page not found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(e){const r=e;return a({title:`${r.status} - ${r.statusText} | ${r.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(k,w)=>{const o=f;return i(),u("div",p,[t("div",m,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:n(e.status)},null,8,h),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:n(e.statusText)},null,8,b),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:n(e.description)},null,8,x),t("div",g,[c(o,{to:"/",class:"font-medium hover:text-[#00DC82] text-sm underline underline-offset-3"},{default:l(()=>[d(n(e.backHome),1)]),_:1})])])])}}},v=s(y,[["__scopeId","data-v-9e2b7285"]]);export{v as default};
|