@hollware/admin 0.9.0 → 0.9.1
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/client/admin/assets/{Checkbox-BNrwTCq6.js → Checkbox-CX1Z7ANx.js} +1 -1
- package/dist/client/admin/assets/{Collection-BDdTpRiM.js → Collection-CipG9Wh2.js} +1 -1
- package/dist/client/admin/assets/{Collections-DPkOuLc1.js → Collections-utASuXRR.js} +1 -1
- package/dist/client/admin/assets/{Entries-CYF53YcQ.js → Entries-Dkqm8ivX.js} +1 -1
- package/dist/client/admin/assets/{Entry-B5G_gkrm.js → Entry-ByVv3iGP.js} +1 -1
- package/dist/client/admin/assets/{Home-HDwK_yoV.js → Home-DgLZiqMI.js} +1 -1
- package/dist/client/admin/assets/{InputNumber-Cw0VVT5e.js → InputNumber-BDjnMfc0.js} +1 -1
- package/dist/client/admin/assets/{InputTags-Be_jD2Kr.js → InputTags-CXM25qrT.js} +1 -1
- package/dist/client/admin/assets/{NewEntry-BNXbcpra.js → NewEntry-B3jhZJwX.js} +1 -1
- package/dist/client/admin/assets/{People-CHj9ax85.js → People-ChnT7l2-.js} +1 -1
- package/dist/client/admin/assets/{Reviews-B2NKwmBQ.js → Reviews-GXuRFTtw.js} +1 -1
- package/dist/client/admin/assets/{RovingFocusItem-CJk_evG_.js → RovingFocusItem-BXnbqPHm.js} +1 -1
- package/dist/client/admin/assets/{Site-B94U9V9T.js → Site-CPJ13O0q.js} +1 -1
- package/dist/client/admin/assets/{Tokens-BlVDP23a.js → Tokens-Du08JWB5.js} +1 -1
- package/dist/client/admin/assets/{VerdictList-DsCfSQpR.js → VerdictList-iJ1FBr2W.js} +1 -1
- package/dist/client/admin/assets/{bulk-report-Bm4P_LiR.js → bulk-report-BT91Ho7U.js} +1 -1
- package/dist/client/admin/assets/{columns-BTZ69pMc.js → columns-DwvnEvu1.js} +1 -1
- package/dist/client/admin/assets/{index-Dyftza9z.js → index-BFUeS7ic.js} +2 -2
- package/dist/client/admin/assets/{src-JZ2rSopo.js → src-Cvyt4NDD.js} +1 -1
- package/dist/client/admin/index.html +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$t as e,Bt as t,Dr as n,Fi as r,Jn as i,Qr as a,Qt as o,Xt as s,Zt as c,ci as l,d as u,en as d,er as f,f as p,ln as m,on as ee,r as te,sn as ne}from"./session-CzMvpLSp.js";import{o as re}from"./index-Dyftza9z.js";import{t as ie}from"./Alert-CMaqdPPm.js";function ae(e){let t=a(!1),n=a(null),r=a([]),i=a(!1),o=a(null),s=null;async function c(a,c=!1){t.value=!0,r.value=[],o.value=null;try{let t=await a(c);switch(t.outcome){case`needs_confirmation`:s=a,n.value=t.impact??null;break;case`invalid`:r.value=t.problems??[];break;case`conflict`:i.value=!0;break;case`updated`:case`unchanged`:n.value=null,await e(t)}}catch(e){o.value=e instanceof te?`${e.message} ${e.fix}`:String(e)}finally{t.value=!1}}async function l(){let e=s;n.value=null,s=null,e!==null&&await c(e,!0)}function u(){n.value=null,s=null}return{busy:t,impact:n,problems:r,conflict:i,failure:o,run:c,confirmPending:l,cancel:u}}function oe(e,t){return[...e.removedCollections.map(e=>t.removedCollection(e.name,e.entries)),...e.removedLocales.map(e=>t.removedLocale(e.locale,e.entries)),...e.refused.map(e=>t.refused(e.collection,e.entries,e.examples.join(`, `)))]}var se={class:`mt-1 space-y-1`},ce={class:`font-mono text-xs`},le={class:`list-disc space-y-2 pl-5 text-sm`},ue={class:`mt-3 text-sm text-muted`},h=m({__name:`StructureDialogs`,props:{impact:{},problems:{},conflict:{type:Boolean},failure:{}},emits:[`confirm`,`cancel`,`reload`],setup(a,{emit:m}){let te=a,ae=m,h=u(),de=s(()=>te.impact===null?[]:oe(te.impact,h.value.structure)),fe=s({get:()=>te.impact!==null,set:e=>{e||ae(`cancel`)}});return(s,u)=>{let m=ie,te=p,oe=re;return i(),d(t,null,[a.failure===null?e(``,!0):(i(),o(m,{key:0,color:`error`,title:l(h).structure.notSaved,description:a.failure},null,8,[`title`,`description`])),a.problems.length>0?(i(),o(m,{key:1,color:`error`,title:l(h).structure.fixFirst},{description:n(()=>[c(`ul`,se,[(i(!0),d(t,null,f(a.problems,(e,t)=>(i(),d(`li`,{key:t},[c(`span`,ce,r(e.path),1),ee(` — `+r(e.message)+`. `+r(e.fix),1)]))),128))])]),_:1},8,[`title`])):e(``,!0),a.conflict?(i(),o(m,{key:2,color:`warning`,title:l(h).structure.conflictTitle,description:l(h).structure.conflictBody,actions:[{label:l(h).structure.loadAgain,onClick:()=>ae(`reload`)}]},null,8,[`title`,`description`,`actions`])):e(``,!0),ne(oe,{open:fe.value,"onUpdate:open":u[2]||=e=>fe.value=e,title:l(h).structure.impactTitle},{body:n(()=>[c(`ul`,le,[(i(!0),d(t,null,f(de.value,e=>(i(),d(`li`,{key:e},r(e),1))),128))]),c(`p`,ue,r(l(h).structure.noDelete),1)]),footer:n(()=>[ne(te,{label:l(h).common.cancel,variant:`ghost`,onClick:u[0]||=e=>ae(`cancel`)},null,8,[`label`]),ne(te,{label:l(h).structure.applyAnyway,color:`warning`,onClick:u[1]||=e=>ae(`confirm`)},null,8,[`label`])]),_:1},8,[`open`,`title`])],64)}}}),de=new WeakMap;function fe(e,t){return de.set(e,t),e}var pe=new WeakMap;function me(e,t){let n=pe.get(t);if(n===void 0)throw Error(`The built-in contract ${e} runs only through runContracts.`);return n}var he=80;function g(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ge(e,t=he){if(e.length<=t)return e;let n=e.slice(0,t),r=n.charCodeAt(t-1);return`${r>=55296&&r<=56319?n.slice(0,-1):n}…`}function _(e){return JSON.stringify(ge(e))}function _e(e,t){return`${e} ${t}${e===1?``:`s`}`}var ve=20;function ye(e){return(e.path??[]).map(e=>String(typeof e==`object`?e.key:e))}function be(e){return e.reduce((e,t)=>/^\d+$/.test(t)?`${e}[${t}]`:e===``?t:`${e}.${t}`,``)}function xe(e,t){let n=e;for(let e of t){let t=n.properties;if(g(t)&&Object.hasOwn(t,e)){let r=t[e];if(!g(r))return;n=r}else if(/^\d+$/.test(e)&&g(n.items))n=n.items;else return}return n}function Se(e,t){let n=e;for(let e of t)if(Array.isArray(n)&&/^\d+$/.test(e))n=n[Number(e)];else if(g(n)&&Object.hasOwn(n,e))n=n[e];else return;return n}function Ce(e){let t=e.slice(0,ve).map(e=>JSON.stringify(e)).join(`, `),n=e.length-ve;return n>0?`${t} and ${n} more`:t}function we(e,t,n){let r=typeof e==`number`?e:void 0,i=typeof t==`number`?t:void 0;if(r!==void 0&&i!==void 0)return r===i?`exactly ${_e(r,n)}`:`${r} to ${_e(i,n)}`;if(r!==void 0)return`at least ${_e(r,n)}`;if(i!==void 0)return`at most ${_e(i,n)}`}function Te(e){let t=we(e.minLength,e.maxLength,`character`),n=``;return typeof e.format==`string`?n=` in the format ${JSON.stringify(e.format)}`:typeof e.pattern==`string`&&(n=` matching the pattern ${e.pattern}`),`a string${t===void 0?``:` of ${t}`}${n}`}function Ee(e,t){let n=[typeof t.minimum==`number`?`at least ${t.minimum}`:void 0,typeof t.exclusiveMinimum==`number`?`greater than ${t.exclusiveMinimum}`:void 0,typeof t.maximum==`number`?`at most ${t.maximum}`:void 0,typeof t.exclusiveMaximum==`number`?`less than ${t.exclusiveMaximum}`:void 0].filter(e=>e!==void 0),r=e===`integer`?`an integer`:`a number`;return n.length===0?r:`${r} that is ${n.join(` and `)}`}function De(e){let t=we(e.minItems,e.maxItems,`item`),n=g(e.items)?Ae(e.items):void 0;return`an array${t===void 0?``:` of ${t}`}${n===void 0?``:`, each ${n}`}`}function Oe(e){let t=g(e.properties)?Object.keys(e.properties):[];return t.length===0?`an object`:`an object with the keys ${t.join(`, `)}`}function ke(e,t){switch(e){case`string`:return Te(t);case`integer`:case`number`:return Ee(e,t);case`boolean`:return`true or false`;case`null`:return`null`;case`array`:return De(t);case`object`:return Oe(t);default:return}}function Ae(e){if(`const`in e)return`exactly ${JSON.stringify(e.const)}`;if(Array.isArray(e.enum))return`one of ${Ce(e.enum)}`;let t=e.anyOf??e.oneOf,n=Array.isArray(t)?t.map(e=>g(e)?Ae(e):void 0):(Array.isArray(e.type)?e.type:[e.type]).map(t=>ke(t,e));return n.every(e=>e!==void 0)?n.join(` or `):void 0}function je(e,t){let{additionalProperties:n,properties:r}=e;return n!==!1||!g(r)||!g(t)?[]:Object.keys(t).filter(e=>!Object.hasOwn(r,e))}function Me({subject:e,schema:t,input:n,segments:r,message:i}){let a=r.length===0?e.container:`the ${e.noun} ${_(be(r))}`,o=t===null?void 0:xe(t,r);if(o!==void 0){let t=je(o,Se(n,r));if(t.length>0){let n=g(o.properties)?Object.keys(o.properties):[],r=t.length===1?e.noun:`${e.noun}s`,i=n.length===0?`no ${e.noun}s are allowed there`:`the ${e.noun}s allowed there are: ${n.join(`, `)}`;return`Remove the ${r} ${t.map(e=>_(e)).join(`, `)} from ${a}; ${i}.`}}let s=o===void 0?void 0:Ae(o);return s===void 0?`Change ${a} to a value that the schema of ${e.container} accepts: ${i}`:`Set ${a} to ${s}.`}var Ne=new WeakMap;function Pe(e){try{return e[`~standard`].jsonSchema.input({target:`draft-2020-12`})}catch{return null}}function Fe(e){let t=Ne.get(e);return t===void 0&&(t={frontmatter:Pe(e.schema),components:new Map([...e.components].map(([e,t])=>[e,Pe(t.props)]))},Ne.set(e,t)),t}fe({id:`components`,severity:`error`,description:`The props of every component in the body match the schema of that component.`,async check(e){let{collection:t}=me(`components`,e),n=Fe(t).components,r=[];for(let i of e.markdown.extracted.components){let e=t.components.get(i.name);if(e===void 0)continue;let a=await e.props[`~standard`].validate(i.props);if(!a.issues)continue;let o={container:`the component ${_(i.name)}`,noun:`prop`};for(let e of a.issues){let t=ye(e),a=t.length===0?`The props`:`The prop ${_(be(t))}`;r.push({path:`/body`,message:`${a} of the component ${_(i.name)} ${t.length===0?`are`:`is`} invalid: ${e.message}`,fix:Me({subject:o,schema:n.get(i.name)??null,input:i.props,segments:t,message:e.message}),line:i.line})}}return r}},{readsFrontmatter:!1});function Ie(e){return[...e.components.keys()].toSorted()}function Le(e,t,n){return fe({id:e,severity:`error`,description:t,check(t){let{collection:r}=me(e,t);return t.markdown.extracted.disallowed.filter(t=>t.kind===e).map(e=>({path:`/body`,...n(e,r),line:e.line}))}},{readsFrontmatter:!1})}Le(`raw-html`,`The body holds Markdown and the components of the collection, never raw HTML.`,(e,t)=>{let n=Ie(t);return{message:`Raw HTML is not allowed: the body has a <${ge(e.name)}> tag.`,fix:`Remove the HTML and use Markdown${n.length===0?``:` or one of the allowed components: ${n.join(`, `)}`}.`}}),Le(`unknown-component`,`The body uses only the components that the collection declares.`,(e,t)=>{let n=Ie(t);return{message:`The component ${_(e.name)} does not exist in this collection.`,fix:n.length===0?`This collection allows no components: remove it and use Markdown.`:`Use one of the allowed components: ${n.join(`, `)}.`}}),Le(`disallowed-attribute`,`Links, images and code carry only the attributes Markdown produces, and a component only the props its schema declares.`,e=>({message:`The attribute ${_(e.name)} is not allowed.`,fix:`Remove the attribute ${_(e.name)}. Links keep href and title, images keep src, alt, title, width and height, and a component takes only the props its schema declares.`})),Le(`unsafe-url`,`Links and images use an https:, http: or mailto: URL, a path of the site or an anchor.`,e=>({message:`The URL ${_(e.name)} is not allowed.`,fix:`Use an https: or http: URL, a mailto: address, a path of this site that starts with /, or an anchor that starts with #.`}));var Re=[`schema`,`components`,`raw-html`,`unknown-component`,`disallowed-attribute`,`unsafe-url`,`translation-pair`,`internal-links-resolve`,`images-have-alt`,`size-limit`,`frontmatter-syntax`,`comark-parse`,`unique-slug`,`unique-translation`];function ze(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function Be(e,t=`|`){return e.map(e=>ot(e)).join(t)}function Ve(e,t){return typeof t==`bigint`?t.toString():t}var He=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Ue(e){return new He(e)}function We(e){return e==null}function Ge(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Ke(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function v(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function qe(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function y(e){return qe(e._zod.def)??e._zod.def.shape}function Je(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return v(this,t,e),e},enumerable:!0,configurable:!0})}function Ye(e,t,n){t in e?v(e,t,n):e[t]=n}function b(e,t,n,r){let i=y(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?Je(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):Ye(e,a,r?r(n.value,a):n.value))}}function Xe(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?Je(e,n,()=>t[n]):Ye(e,n,r.value))}}function x(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Ze(e){return JSON.stringify(e)}function Qe(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var $e=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function et(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var tt=Ue(()=>{if(j.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function nt(e){if(et(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return et(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function rt(e){return nt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var it=new Set([`string`,`number`,`symbol`]);function at(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function S(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function C(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function ot(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function st(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var ct={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},lt={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function ut(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return b(i,e,dt(e,t)),S(e,x(n,{shape:i,checks:[]}))}function dt(e,t){let n=y(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function ft(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(dt(e,t)),a={};return b(a,e,Reflect.ownKeys(y(e)).filter(e=>!i.has(e))),S(e,x(n,{shape:a,checks:[]}))}function pt(e,t){if(!nt(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=y(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return S(e,x(e._zod.def,{shape:mt(e,t)}))}function mt(e,t){let n={};return b(n,e,Reflect.ownKeys(y(e))),Xe(n,t),n}function ht(e,t){if(!nt(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return S(e,x(e._zod.def,{shape:mt(e,t)}))}function gt(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return b(n,e,Reflect.ownKeys(y(e))),b(n,t,Reflect.ownKeys(y(t))),S(e,x(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function _t(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(dt(t,n)):void 0,o={};return b(o,t,Reflect.ownKeys(y(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),S(t,x(t._zod.def,{shape:o,checks:[]}))}function vt(e,t,n){let r=n?new Set(dt(t,n)):void 0,i={};return b(i,t,Reflect.ownKeys(y(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),S(t,x(t._zod.def,{shape:i}))}function w(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function yt(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function bt(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function xt(e){return typeof e==`string`?e:e?.message}function St(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function T(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:xt(e.inst?._zod.def?.error?.(e))??xt(a?.(e))??xt(t?.error?.(e))??xt(n.customError?.(e))??xt(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var Ct=/[\uD800-\uDBFF]/;function wt(e){let t=e.length;if(!Ct.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Tt(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Et(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Dt(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Ot(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):jt(e,n,r.value)}}function E(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function kt(e,t,n){return E(e,t,n,!1)}function At(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return E(this,n,r(this))},set(e){E(this,n,e)}})}return t}function jt(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:E(this,t,n.bind(this))},set(e){E(this,t,e)}})}function Mt(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Nt,D=!1,Pt={configurable:!0,get(){D=!0}};function O(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Nt!==e._zod){Nt=void 0;return}Nt=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Pt);let e=D;D=!1;try{let r=n(this);return D?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),D||=e,r}catch(n){throw delete this[t],D||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function Ft(e,t,n,r){let i=Mt(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var It=`~constantCatch`;function Lt(e){let t=()=>e;return t[It]=!0,t}var Rt,zt={value:void 0,enumerable:!1},Bt=`captureStackTrace`in Error?Error:null;function Vt(e){let t=Bt;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Bt=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function k(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){zt.value=new a(r);try{Object.defineProperty(n,"_zod",zt)}finally{zt.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Ot(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Vt(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var A=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Ht=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Rt=globalThis).__zod_globalConfig??(Rt.__zod_globalConfig={});var j=globalThis.__zod_globalConfig;function M(e){return e&&Object.assign(j,e),j}function Ut(){let e=this._zod;return e.message??=JSON.stringify(e.def,Ve,2),e.message}function Wt(e){this._zod.message=e}var Gt={get:Ut,set:Wt,enumerable:!0,configurable:!0},Kt={value:void 0,enumerable:!1},qt=new WeakSet([Object.prototype,Error.prototype]),Jt=(e,t)=>{e.name=`$ZodError`,Kt.value=t,Object.defineProperty(e,"issues",Kt),Kt.value=void 0,Object.defineProperty(e,"message",Gt);let n=Object.getPrototypeOf(e);qt.has(n)||(qt.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},Yt=k(`$ZodError`,Jt);k(`$ZodError`,Jt,void 0,{Parent:Error});function Xt(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Zt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Xt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Qt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function $t(e,t){return{callee:t?.callee??e,Err:t?.Err}}var en=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new A;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>T(e,o,M())));throw $e(n,a?.callee??t),n}return s.value};return t},tn=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>T(e,o,M())));throw $e(n,a?.callee??t),n}return s.value};return t},nn=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new A;return a.issues.length?rn(e,a.issues,i):{success:!0,data:a.value}};function rn(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>T(e,n,M()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var an=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?rn(e,a.issues,i):{success:!0,data:a.value}},on=Symbol.for(`zod.compile.invalid`),sn=Symbol.for(`zod.compile.fallback`),cn=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==on)return!0;if(r.definite===!0&&n===void 0)return!1}return ln(e,t,n)});function ln(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[sn]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new A;return a.issues.length===0}var un=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},dn=e=>{let t=en(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,$t(n,a))};return n},fn=e=>{let t=en(e),n=(e,r,i,a)=>t(e,r,i,$t(n,a));return n},pn=e=>{let t=tn(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,$t(n,a))};return n},mn=e=>{let t=tn(e),n=async(e,r,i,a)=>await t(e,r,i,$t(n,a));return n},hn=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return nn(e)(t,n,i)},gn=e=>(t,n,r)=>nn(e)(t,n,r),_n=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return an(e)(t,n,i)},vn=e=>async(t,n,r)=>an(e)(t,n,r),yn=/^[cC][0-9a-z]{6,}$/,bn=/^[0-9a-z]+$/,xn=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Sn=/^[0-9a-vA-V]{20}$/,Cn=/^[A-Za-z0-9]{27}$/,wn=/^[a-zA-Z0-9_-]{21}$/;function Tn(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var En=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Dn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,On=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,kn=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,An=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function jn(){return new RegExp(An,`u`)}var Mn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Nn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Pn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Fn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,In=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ln=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Rn=/^https?$/,zn=/^\+[1-9]\d{6,14}$/,Bn=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function Vn(e){return RegExp(`^${e}$`)}var Hn=Vn(Bn);function Un(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Wn(e){return RegExp(`^${Un(e)}$`)}function Gn(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Un({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Un({precision:e.precision})}`:n;return RegExp(`^${Bn}T(?:${r})$`)}var Kn=/^[\s\S]{0,}$/,qn=/^-?\d+$/,Jn=/^-?\d+(?:\.\d+)?$/,Yn=/^(?:true|false)$/i,Xn=/^[^A-Z]*$/,Zn=/^[^a-z]*$/,N=k(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Qn=e=>{let t=e.value;return!We(t)&&t.length!==void 0},$n={number:`number`,bigint:`bigint`,object:`date`},er=k(`$ZodCheckLessThan`,(e,t)=>{N.init(e,t);let n=$n[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:$n[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tr=k(`$ZodCheckGreaterThan`,(e,t)=>{N.init(e,t);let n=$n[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:$n[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),nr=k(`$ZodCheckMultipleOf`,(e,t)=>{N.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):Ke(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),rr=k(`$ZodCheckNumberFormat`,(e,t)=>{N.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ct[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),ir=k(`$ZodCheckMaxLength`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=Qn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?wt(r):i)<=t.maximum)return;let a=Tt(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ar=k(`$ZodCheckMinLength`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=Qn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?wt(r):i)>=t.minimum)return;let a=Tt(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),or=k(`$ZodCheckLengthEquals`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=Qn),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?wt(r):i;if(a===t.length)return;let o=Tt(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),sr=k(`$ZodCheckStringFormat`,(e,t)=>{var n,r;N.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),cr=k(`$ZodCheckRegex`,(e,t)=>{sr.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),lr=k(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Xn,sr.init(e,t)}),ur=k(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Zn,sr.init(e,t)}),dr=k(`$ZodCheckIncludes`,(e,t)=>{N.init(e,t);let n=at(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),fr=k(`$ZodCheckStartsWith`,(e,t)=>{N.init(e,t);let n=RegExp(`^${at(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),pr=k(`$ZodCheckEndsWith`,(e,t)=>{N.init(e,t);let n=RegExp(`.*${at(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),mr=k(`$ZodCheckOverwrite`,(e,t)=>{N.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),hr=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
1
|
+
import{$t as e,Bt as t,Dr as n,Fi as r,Jn as i,Qr as a,Qt as o,Xt as s,Zt as c,ci as l,d as u,en as d,er as f,f as p,ln as m,on as ee,r as te,sn as ne}from"./session-CzMvpLSp.js";import{o as re}from"./index-BFUeS7ic.js";import{t as ie}from"./Alert-CMaqdPPm.js";function ae(e){let t=a(!1),n=a(null),r=a([]),i=a(!1),o=a(null),s=null;async function c(a,c=!1){t.value=!0,r.value=[],o.value=null;try{let t=await a(c);switch(t.outcome){case`needs_confirmation`:s=a,n.value=t.impact??null;break;case`invalid`:r.value=t.problems??[];break;case`conflict`:i.value=!0;break;case`updated`:case`unchanged`:n.value=null,await e(t)}}catch(e){o.value=e instanceof te?`${e.message} ${e.fix}`:String(e)}finally{t.value=!1}}async function l(){let e=s;n.value=null,s=null,e!==null&&await c(e,!0)}function u(){n.value=null,s=null}return{busy:t,impact:n,problems:r,conflict:i,failure:o,run:c,confirmPending:l,cancel:u}}function oe(e,t){return[...e.removedCollections.map(e=>t.removedCollection(e.name,e.entries)),...e.removedLocales.map(e=>t.removedLocale(e.locale,e.entries)),...e.refused.map(e=>t.refused(e.collection,e.entries,e.examples.join(`, `)))]}var se={class:`mt-1 space-y-1`},ce={class:`font-mono text-xs`},le={class:`list-disc space-y-2 pl-5 text-sm`},ue={class:`mt-3 text-sm text-muted`},h=m({__name:`StructureDialogs`,props:{impact:{},problems:{},conflict:{type:Boolean},failure:{}},emits:[`confirm`,`cancel`,`reload`],setup(a,{emit:m}){let te=a,ae=m,h=u(),de=s(()=>te.impact===null?[]:oe(te.impact,h.value.structure)),fe=s({get:()=>te.impact!==null,set:e=>{e||ae(`cancel`)}});return(s,u)=>{let m=ie,te=p,oe=re;return i(),d(t,null,[a.failure===null?e(``,!0):(i(),o(m,{key:0,color:`error`,title:l(h).structure.notSaved,description:a.failure},null,8,[`title`,`description`])),a.problems.length>0?(i(),o(m,{key:1,color:`error`,title:l(h).structure.fixFirst},{description:n(()=>[c(`ul`,se,[(i(!0),d(t,null,f(a.problems,(e,t)=>(i(),d(`li`,{key:t},[c(`span`,ce,r(e.path),1),ee(` — `+r(e.message)+`. `+r(e.fix),1)]))),128))])]),_:1},8,[`title`])):e(``,!0),a.conflict?(i(),o(m,{key:2,color:`warning`,title:l(h).structure.conflictTitle,description:l(h).structure.conflictBody,actions:[{label:l(h).structure.loadAgain,onClick:()=>ae(`reload`)}]},null,8,[`title`,`description`,`actions`])):e(``,!0),ne(oe,{open:fe.value,"onUpdate:open":u[2]||=e=>fe.value=e,title:l(h).structure.impactTitle},{body:n(()=>[c(`ul`,le,[(i(!0),d(t,null,f(de.value,e=>(i(),d(`li`,{key:e},r(e),1))),128))]),c(`p`,ue,r(l(h).structure.noDelete),1)]),footer:n(()=>[ne(te,{label:l(h).common.cancel,variant:`ghost`,onClick:u[0]||=e=>ae(`cancel`)},null,8,[`label`]),ne(te,{label:l(h).structure.applyAnyway,color:`warning`,onClick:u[1]||=e=>ae(`confirm`)},null,8,[`label`])]),_:1},8,[`open`,`title`])],64)}}}),de=new WeakMap;function fe(e,t){return de.set(e,t),e}var pe=new WeakMap;function me(e,t){let n=pe.get(t);if(n===void 0)throw Error(`The built-in contract ${e} runs only through runContracts.`);return n}var he=80;function g(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ge(e,t=he){if(e.length<=t)return e;let n=e.slice(0,t),r=n.charCodeAt(t-1);return`${r>=55296&&r<=56319?n.slice(0,-1):n}…`}function _(e){return JSON.stringify(ge(e))}function _e(e,t){return`${e} ${t}${e===1?``:`s`}`}var ve=20;function ye(e){return(e.path??[]).map(e=>String(typeof e==`object`?e.key:e))}function be(e){return e.reduce((e,t)=>/^\d+$/.test(t)?`${e}[${t}]`:e===``?t:`${e}.${t}`,``)}function xe(e,t){let n=e;for(let e of t){let t=n.properties;if(g(t)&&Object.hasOwn(t,e)){let r=t[e];if(!g(r))return;n=r}else if(/^\d+$/.test(e)&&g(n.items))n=n.items;else return}return n}function Se(e,t){let n=e;for(let e of t)if(Array.isArray(n)&&/^\d+$/.test(e))n=n[Number(e)];else if(g(n)&&Object.hasOwn(n,e))n=n[e];else return;return n}function Ce(e){let t=e.slice(0,ve).map(e=>JSON.stringify(e)).join(`, `),n=e.length-ve;return n>0?`${t} and ${n} more`:t}function we(e,t,n){let r=typeof e==`number`?e:void 0,i=typeof t==`number`?t:void 0;if(r!==void 0&&i!==void 0)return r===i?`exactly ${_e(r,n)}`:`${r} to ${_e(i,n)}`;if(r!==void 0)return`at least ${_e(r,n)}`;if(i!==void 0)return`at most ${_e(i,n)}`}function Te(e){let t=we(e.minLength,e.maxLength,`character`),n=``;return typeof e.format==`string`?n=` in the format ${JSON.stringify(e.format)}`:typeof e.pattern==`string`&&(n=` matching the pattern ${e.pattern}`),`a string${t===void 0?``:` of ${t}`}${n}`}function Ee(e,t){let n=[typeof t.minimum==`number`?`at least ${t.minimum}`:void 0,typeof t.exclusiveMinimum==`number`?`greater than ${t.exclusiveMinimum}`:void 0,typeof t.maximum==`number`?`at most ${t.maximum}`:void 0,typeof t.exclusiveMaximum==`number`?`less than ${t.exclusiveMaximum}`:void 0].filter(e=>e!==void 0),r=e===`integer`?`an integer`:`a number`;return n.length===0?r:`${r} that is ${n.join(` and `)}`}function De(e){let t=we(e.minItems,e.maxItems,`item`),n=g(e.items)?Ae(e.items):void 0;return`an array${t===void 0?``:` of ${t}`}${n===void 0?``:`, each ${n}`}`}function Oe(e){let t=g(e.properties)?Object.keys(e.properties):[];return t.length===0?`an object`:`an object with the keys ${t.join(`, `)}`}function ke(e,t){switch(e){case`string`:return Te(t);case`integer`:case`number`:return Ee(e,t);case`boolean`:return`true or false`;case`null`:return`null`;case`array`:return De(t);case`object`:return Oe(t);default:return}}function Ae(e){if(`const`in e)return`exactly ${JSON.stringify(e.const)}`;if(Array.isArray(e.enum))return`one of ${Ce(e.enum)}`;let t=e.anyOf??e.oneOf,n=Array.isArray(t)?t.map(e=>g(e)?Ae(e):void 0):(Array.isArray(e.type)?e.type:[e.type]).map(t=>ke(t,e));return n.every(e=>e!==void 0)?n.join(` or `):void 0}function je(e,t){let{additionalProperties:n,properties:r}=e;return n!==!1||!g(r)||!g(t)?[]:Object.keys(t).filter(e=>!Object.hasOwn(r,e))}function Me({subject:e,schema:t,input:n,segments:r,message:i}){let a=r.length===0?e.container:`the ${e.noun} ${_(be(r))}`,o=t===null?void 0:xe(t,r);if(o!==void 0){let t=je(o,Se(n,r));if(t.length>0){let n=g(o.properties)?Object.keys(o.properties):[],r=t.length===1?e.noun:`${e.noun}s`,i=n.length===0?`no ${e.noun}s are allowed there`:`the ${e.noun}s allowed there are: ${n.join(`, `)}`;return`Remove the ${r} ${t.map(e=>_(e)).join(`, `)} from ${a}; ${i}.`}}let s=o===void 0?void 0:Ae(o);return s===void 0?`Change ${a} to a value that the schema of ${e.container} accepts: ${i}`:`Set ${a} to ${s}.`}var Ne=new WeakMap;function Pe(e){try{return e[`~standard`].jsonSchema.input({target:`draft-2020-12`})}catch{return null}}function Fe(e){let t=Ne.get(e);return t===void 0&&(t={frontmatter:Pe(e.schema),components:new Map([...e.components].map(([e,t])=>[e,Pe(t.props)]))},Ne.set(e,t)),t}fe({id:`components`,severity:`error`,description:`The props of every component in the body match the schema of that component.`,async check(e){let{collection:t}=me(`components`,e),n=Fe(t).components,r=[];for(let i of e.markdown.extracted.components){let e=t.components.get(i.name);if(e===void 0)continue;let a=await e.props[`~standard`].validate(i.props);if(!a.issues)continue;let o={container:`the component ${_(i.name)}`,noun:`prop`};for(let e of a.issues){let t=ye(e),a=t.length===0?`The props`:`The prop ${_(be(t))}`;r.push({path:`/body`,message:`${a} of the component ${_(i.name)} ${t.length===0?`are`:`is`} invalid: ${e.message}`,fix:Me({subject:o,schema:n.get(i.name)??null,input:i.props,segments:t,message:e.message}),line:i.line})}}return r}},{readsFrontmatter:!1});function Ie(e){return[...e.components.keys()].toSorted()}function Le(e,t,n){return fe({id:e,severity:`error`,description:t,check(t){let{collection:r}=me(e,t);return t.markdown.extracted.disallowed.filter(t=>t.kind===e).map(e=>({path:`/body`,...n(e,r),line:e.line}))}},{readsFrontmatter:!1})}Le(`raw-html`,`The body holds Markdown and the components of the collection, never raw HTML.`,(e,t)=>{let n=Ie(t);return{message:`Raw HTML is not allowed: the body has a <${ge(e.name)}> tag.`,fix:`Remove the HTML and use Markdown${n.length===0?``:` or one of the allowed components: ${n.join(`, `)}`}.`}}),Le(`unknown-component`,`The body uses only the components that the collection declares.`,(e,t)=>{let n=Ie(t);return{message:`The component ${_(e.name)} does not exist in this collection.`,fix:n.length===0?`This collection allows no components: remove it and use Markdown.`:`Use one of the allowed components: ${n.join(`, `)}.`}}),Le(`disallowed-attribute`,`Links, images and code carry only the attributes Markdown produces, and a component only the props its schema declares.`,e=>({message:`The attribute ${_(e.name)} is not allowed.`,fix:`Remove the attribute ${_(e.name)}. Links keep href and title, images keep src, alt, title, width and height, and a component takes only the props its schema declares.`})),Le(`unsafe-url`,`Links and images use an https:, http: or mailto: URL, a path of the site or an anchor.`,e=>({message:`The URL ${_(e.name)} is not allowed.`,fix:`Use an https: or http: URL, a mailto: address, a path of this site that starts with /, or an anchor that starts with #.`}));var Re=[`schema`,`components`,`raw-html`,`unknown-component`,`disallowed-attribute`,`unsafe-url`,`translation-pair`,`internal-links-resolve`,`images-have-alt`,`size-limit`,`frontmatter-syntax`,`comark-parse`,`unique-slug`,`unique-translation`];function ze(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function Be(e,t=`|`){return e.map(e=>ot(e)).join(t)}function Ve(e,t){return typeof t==`bigint`?t.toString():t}var He=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Ue(e){return new He(e)}function We(e){return e==null}function Ge(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Ke(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function v(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function qe(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function y(e){return qe(e._zod.def)??e._zod.def.shape}function Je(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return v(this,t,e),e},enumerable:!0,configurable:!0})}function Ye(e,t,n){t in e?v(e,t,n):e[t]=n}function b(e,t,n,r){let i=y(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?Je(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):Ye(e,a,r?r(n.value,a):n.value))}}function Xe(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?Je(e,n,()=>t[n]):Ye(e,n,r.value))}}function x(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Ze(e){return JSON.stringify(e)}function Qe(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var $e=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function et(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var tt=Ue(()=>{if(j.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function nt(e){if(et(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return et(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function rt(e){return nt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var it=new Set([`string`,`number`,`symbol`]);function at(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function S(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function C(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function ot(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function st(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var ct={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},lt={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function ut(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return b(i,e,dt(e,t)),S(e,x(n,{shape:i,checks:[]}))}function dt(e,t){let n=y(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function ft(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(dt(e,t)),a={};return b(a,e,Reflect.ownKeys(y(e)).filter(e=>!i.has(e))),S(e,x(n,{shape:a,checks:[]}))}function pt(e,t){if(!nt(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=y(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return S(e,x(e._zod.def,{shape:mt(e,t)}))}function mt(e,t){let n={};return b(n,e,Reflect.ownKeys(y(e))),Xe(n,t),n}function ht(e,t){if(!nt(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return S(e,x(e._zod.def,{shape:mt(e,t)}))}function gt(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return b(n,e,Reflect.ownKeys(y(e))),b(n,t,Reflect.ownKeys(y(t))),S(e,x(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function _t(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(dt(t,n)):void 0,o={};return b(o,t,Reflect.ownKeys(y(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),S(t,x(t._zod.def,{shape:o,checks:[]}))}function vt(e,t,n){let r=n?new Set(dt(t,n)):void 0,i={};return b(i,t,Reflect.ownKeys(y(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),S(t,x(t._zod.def,{shape:i}))}function w(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function yt(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function bt(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function xt(e){return typeof e==`string`?e:e?.message}function St(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function T(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:xt(e.inst?._zod.def?.error?.(e))??xt(a?.(e))??xt(t?.error?.(e))??xt(n.customError?.(e))??xt(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var Ct=/[\uD800-\uDBFF]/;function wt(e){let t=e.length;if(!Ct.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Tt(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Et(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Dt(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Ot(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):jt(e,n,r.value)}}function E(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function kt(e,t,n){return E(e,t,n,!1)}function At(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return E(this,n,r(this))},set(e){E(this,n,e)}})}return t}function jt(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:E(this,t,n.bind(this))},set(e){E(this,t,e)}})}function Mt(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Nt,D=!1,Pt={configurable:!0,get(){D=!0}};function O(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Nt!==e._zod){Nt=void 0;return}Nt=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Pt);let e=D;D=!1;try{let r=n(this);return D?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),D||=e,r}catch(n){throw delete this[t],D||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function Ft(e,t,n,r){let i=Mt(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var It=`~constantCatch`;function Lt(e){let t=()=>e;return t[It]=!0,t}var Rt,zt={value:void 0,enumerable:!1},Bt=`captureStackTrace`in Error?Error:null;function Vt(e){let t=Bt;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Bt=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function k(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){zt.value=new a(r);try{Object.defineProperty(n,"_zod",zt)}finally{zt.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Ot(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Vt(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var A=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Ht=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Rt=globalThis).__zod_globalConfig??(Rt.__zod_globalConfig={});var j=globalThis.__zod_globalConfig;function M(e){return e&&Object.assign(j,e),j}function Ut(){let e=this._zod;return e.message??=JSON.stringify(e.def,Ve,2),e.message}function Wt(e){this._zod.message=e}var Gt={get:Ut,set:Wt,enumerable:!0,configurable:!0},Kt={value:void 0,enumerable:!1},qt=new WeakSet([Object.prototype,Error.prototype]),Jt=(e,t)=>{e.name=`$ZodError`,Kt.value=t,Object.defineProperty(e,"issues",Kt),Kt.value=void 0,Object.defineProperty(e,"message",Gt);let n=Object.getPrototypeOf(e);qt.has(n)||(qt.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},Yt=k(`$ZodError`,Jt);k(`$ZodError`,Jt,void 0,{Parent:Error});function Xt(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Zt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Xt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Qt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function $t(e,t){return{callee:t?.callee??e,Err:t?.Err}}var en=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new A;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>T(e,o,M())));throw $e(n,a?.callee??t),n}return s.value};return t},tn=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>T(e,o,M())));throw $e(n,a?.callee??t),n}return s.value};return t},nn=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new A;return a.issues.length?rn(e,a.issues,i):{success:!0,data:a.value}};function rn(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>T(e,n,M()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var an=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?rn(e,a.issues,i):{success:!0,data:a.value}},on=Symbol.for(`zod.compile.invalid`),sn=Symbol.for(`zod.compile.fallback`),cn=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==on)return!0;if(r.definite===!0&&n===void 0)return!1}return ln(e,t,n)});function ln(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[sn]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new A;return a.issues.length===0}var un=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},dn=e=>{let t=en(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,$t(n,a))};return n},fn=e=>{let t=en(e),n=(e,r,i,a)=>t(e,r,i,$t(n,a));return n},pn=e=>{let t=tn(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,$t(n,a))};return n},mn=e=>{let t=tn(e),n=async(e,r,i,a)=>await t(e,r,i,$t(n,a));return n},hn=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return nn(e)(t,n,i)},gn=e=>(t,n,r)=>nn(e)(t,n,r),_n=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return an(e)(t,n,i)},vn=e=>async(t,n,r)=>an(e)(t,n,r),yn=/^[cC][0-9a-z]{6,}$/,bn=/^[0-9a-z]+$/,xn=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Sn=/^[0-9a-vA-V]{20}$/,Cn=/^[A-Za-z0-9]{27}$/,wn=/^[a-zA-Z0-9_-]{21}$/;function Tn(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var En=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Dn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,On=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,kn=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,An=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function jn(){return new RegExp(An,`u`)}var Mn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Nn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Pn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Fn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,In=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ln=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Rn=/^https?$/,zn=/^\+[1-9]\d{6,14}$/,Bn=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function Vn(e){return RegExp(`^${e}$`)}var Hn=Vn(Bn);function Un(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Wn(e){return RegExp(`^${Un(e)}$`)}function Gn(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Un({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Un({precision:e.precision})}`:n;return RegExp(`^${Bn}T(?:${r})$`)}var Kn=/^[\s\S]{0,}$/,qn=/^-?\d+$/,Jn=/^-?\d+(?:\.\d+)?$/,Yn=/^(?:true|false)$/i,Xn=/^[^A-Z]*$/,Zn=/^[^a-z]*$/,N=k(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Qn=e=>{let t=e.value;return!We(t)&&t.length!==void 0},$n={number:`number`,bigint:`bigint`,object:`date`},er=k(`$ZodCheckLessThan`,(e,t)=>{N.init(e,t);let n=$n[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:$n[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tr=k(`$ZodCheckGreaterThan`,(e,t)=>{N.init(e,t);let n=$n[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:$n[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),nr=k(`$ZodCheckMultipleOf`,(e,t)=>{N.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):Ke(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),rr=k(`$ZodCheckNumberFormat`,(e,t)=>{N.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ct[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),ir=k(`$ZodCheckMaxLength`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=Qn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?wt(r):i)<=t.maximum)return;let a=Tt(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ar=k(`$ZodCheckMinLength`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=Qn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?wt(r):i)>=t.minimum)return;let a=Tt(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),or=k(`$ZodCheckLengthEquals`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=Qn),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?wt(r):i;if(a===t.length)return;let o=Tt(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),sr=k(`$ZodCheckStringFormat`,(e,t)=>{var n,r;N.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),cr=k(`$ZodCheckRegex`,(e,t)=>{sr.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),lr=k(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Xn,sr.init(e,t)}),ur=k(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Zn,sr.init(e,t)}),dr=k(`$ZodCheckIncludes`,(e,t)=>{N.init(e,t);let n=at(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),fr=k(`$ZodCheckStartsWith`,(e,t)=>{N.init(e,t);let n=RegExp(`^${at(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),pr=k(`$ZodCheckEndsWith`,(e,t)=>{N.init(e,t);let n=RegExp(`.*${at(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),mr=k(`$ZodCheckOverwrite`,(e,t)=>{N.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),hr=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
2
2
|
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
|
|
3
3
|
`)}\n};`)(...Object.values(this.closed))}},gr={major:4,minor:6,patch:5},P=k(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=gr;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=w(t),a;for(let o of n){if(o._zod.def.when){if(yt(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new A;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(St(t.issues,n,e),i||=w(t,n))});else{if(t.issues.length===n)continue;St(t.issues,n,e),i||=w(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(w(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new A;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new A;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return kt(this,`~standard`,yr(this))},set"~standard"(e){E(this,`~standard`,e)}}),_r=(e,t)=>e.issues.length?{issues:e.issues.map(e=>T(e,t,M()))}:{value:e.value};async function vr(e,t){let n={async:!0};return _r(await e._zod.run({value:t,issues:[]},n),n)}function yr(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return _r(r,n)}catch{}return vr(e,t)},vendor:`zod`,version:1}}var br=k(`$ZodString`,(e,t)=>{P.init(e,t),e._zod.pattern=t.pattern??Kn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),F=k(`$ZodStringFormat`,(e,t)=>{sr.init(e,t),br.init(e,t)}),xr=k(`$ZodGUID`,(e,t)=>{t.pattern??=Dn,F.init(e,t)}),Sr=k(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=On(e)}else t.pattern??=On();F.init(e,t)}),Cr=k(`$ZodEmail`,(e,t)=>{t.pattern??=kn,F.init(e,t)});function wr(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Tr(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?wr(e)||2:Er(e,t)}function Er(e,t){if(!t.normalize&&t.protocol?.source===Rn.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var Dr=/[\t\n\r]/g;function Or(e){return e.replace(Dr,``)}function kr(e,t){return t.lastIndex=0,t.test(e.hostname)}function Ar(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var jr=k(`$ZodURL`,(e,t)=>{F.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Tr(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Or(r);return}t.hostname&&!kr(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Ar(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Or(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Mr=k(`$ZodEmoji`,(e,t)=>{t.pattern??=jn(),F.init(e,t)}),Nr=k(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?wn:Tn(t.length),F.init(e,t)}),Pr=k(`$ZodCUID`,(e,t)=>{t.pattern??=yn,F.init(e,t)}),Fr=k(`$ZodCUID2`,(e,t)=>{t.pattern??=bn,F.init(e,t)}),Ir=k(`$ZodULID`,(e,t)=>{t.pattern??=xn,F.init(e,t)}),Lr=k(`$ZodXID`,(e,t)=>{t.pattern??=Sn,F.init(e,t)}),Rr=k(`$ZodKSUID`,(e,t)=>{t.pattern??=Cn,F.init(e,t)}),zr=k(`$ZodISODateTime`,(e,t)=>{t.pattern??=Gn(t),F.init(e,t)}),Br=k(`$ZodISODate`,(e,t)=>{t.pattern??=Hn,F.init(e,t)}),Vr=k(`$ZodISOTime`,(e,t)=>{t.pattern??=Wn(t),F.init(e,t)}),Hr=k(`$ZodISODuration`,(e,t)=>{t.pattern??=En,F.init(e,t)}),Ur=k(`$ZodIPv4`,(e,t)=>{t.pattern??=Mn,F.init(e,t)}),Wr=/^[0-9a-fA-F:.]+$/;function Gr(e){return Wr.test(e)?wr(`http://[${e}]`):!1}var Kr=k(`$ZodIPv6`,(e,t)=>{t.pattern??=Nn,F.init(e,t),e._zod.check=n=>{Gr(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),qr=k(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Pn,F.init(e,t)});function Jr(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Gr(n)}var Yr=k(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Fn,F.init(e,t),e._zod.check=n=>{Jr(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Xr(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Zr=/^[0-9a-zA-Z+/]*={0,2}$/,Qr=k(`$ZodBase64`,(e,t)=>{t.pattern??=Zr,F.init(e,t),e._zod.check=n=>{Xr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),$r=/^[A-Za-z0-9_-]*$/;function ei(e){if(!$r.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Xr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var ti=k(`$ZodBase64URL`,(e,t)=>{t.pattern??=$r,F.init(e,t),e._zod.check=n=>{ei(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),ni=k(`$ZodE164`,(e,t)=>{t.pattern??=zn,F.init(e,t)});function ri(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var ii=k(`$ZodJWT`,(e,t)=>{F.init(e,t),e._zod.check=n=>{ri(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),ai=k(`$ZodNumber`,(e,t)=>{P.init(e,t),e._zod.pattern=Jn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),oi=k(`$ZodNumberFormat`,(e,t)=>{rr.init(e,t),ai.init(e,t)}),si=k(`$ZodBoolean`,(e,t)=>{P.init(e,t),e._zod.pattern=Yn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),ci=k(`$ZodUnknown`,(e,t)=>{P.init(e,t),e._zod.parse=e=>e}),li=k(`$ZodNever`,(e,t)=>{P.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function ui(e,t,n){e.issues.length&&t.issues.push(...bt(n,e.issues)),t.value[n]=e.value}var di=k(`$ZodArray`,(e,t)=>{P.init(e,t);let n=j.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>ui(t,r,e)));else if(ui(c,r,e),s&&c.issues.length!==0&&w(c))break}return o.length?Promise.all(o).then(()=>r):r}});function fi(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...bt(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var pi=[];function mi(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:pi,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=st(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function hi(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(w(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>fi(e,n,i,t,d,f))):fi(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var gi=k(`$ZodObject`,(e,t)=>{P.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=Ue(()=>mi(t));O(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||v(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=et,o=t.catchall,s,c=j.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(w(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>fi(n,t,e,r,a,o))):fi(s,t,e,r,a,o)}return o?hi(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),_i=k(`$ZodObjectJIT`,(e,t)=>{gi.init(e,t);let n=e._zod.parse,r=Ue(()=>mi(t)),i=j.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new hr([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
|
|
4
4
|
let ${e}_ab = false;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
<title>Hollware</title>
|
|
7
|
-
<script type="module" crossorigin src="/admin/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/admin/assets/index-BFUeS7ic.js"></script>
|
|
8
8
|
<link rel="modulepreload" crossorigin href="/admin/assets/session-CzMvpLSp.js">
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/admin/assets/DashboardSidebarToggle-DiLFyMk8.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/admin/assets/usePortal-C0d2q6c8.js">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hollware/admin",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "The Hollware admin, prebuilt for the user's Worker.",
|
|
5
5
|
"homepage": "https://hollware.com",
|
|
6
6
|
"bugs": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@comark/vue": "0.7.0",
|
|
39
39
|
"@fontsource-variable/inter": "5.3.0",
|
|
40
40
|
"@fontsource-variable/jetbrains-mono": "5.3.0",
|
|
41
|
-
"@hollware/core": "0.9.
|
|
41
|
+
"@hollware/core": "0.9.1",
|
|
42
42
|
"@iconify-json/lucide": "1.2.143",
|
|
43
43
|
"@iconify/utils": "3.1.7",
|
|
44
44
|
"@iconify/vue": "5.0.3",
|