corequery 0.25.3 → 0.27.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.
Files changed (54) hide show
  1. package/package.json +1 -1
  2. package/web/dist/assets/About-D1SmOe8C.js +1 -0
  3. package/web/dist/assets/AdminControls-BKn69L_C.js +1 -0
  4. package/web/dist/assets/{Alert-DJxpAxGW.js → Alert-DHEq-b4e.js} +1 -1
  5. package/web/dist/assets/Debug-Dqf6Ewqg.js +1 -0
  6. package/web/dist/assets/Divider-CxLq6fQR.js +1 -0
  7. package/web/dist/assets/Home-3Bg1eckc.js +1 -0
  8. package/web/dist/assets/Line-DAfosot6.js +1 -0
  9. package/web/dist/assets/LinkText-B2lDAKqQ.js +1 -0
  10. package/web/dist/assets/Markdown-Dfd_0fuA.js +2 -0
  11. package/web/dist/assets/Nearby-Dd2sTCZO.js +1 -0
  12. package/web/dist/assets/NotFound-DvbgBgvr.js +1 -0
  13. package/web/dist/assets/NotFoundPage-u9CGSY_D.js +1 -0
  14. package/web/dist/assets/Page-BPz42hYH.js +1 -0
  15. package/web/dist/assets/Picker-DpF2CqeX.js +1 -0
  16. package/web/dist/assets/Placeholder-gNgvcbQj.js +1 -0
  17. package/web/dist/assets/Service-D5vk-g4j.js +1 -0
  18. package/web/dist/assets/Settings-ClxXcJJI.js +1 -0
  19. package/web/dist/assets/SimpleMobileHeaderContent-BIsmnxmF.js +1 -0
  20. package/web/dist/assets/Status-BWixFyaY.js +1 -0
  21. package/web/dist/assets/Stop-Bhq8H4Gk.js +1 -0
  22. package/web/dist/assets/Strong-B18AJ3bX.js +1 -0
  23. package/web/dist/assets/ZenMode-DiWtZ1Bm.js +1 -0
  24. package/web/dist/assets/index-CFr0vs6V.js +2 -0
  25. package/web/dist/assets/index-CkBVdPll.css +2 -0
  26. package/web/dist/assets/{use-foundational-data-CyGObFfu.js → use-foundational-data-B1dMFR5b.js} +1 -1
  27. package/web/dist/assets/{use-nav-exemptions-pWDQIkAs.js → use-nav-exemptions-heDPohlO.js} +1 -1
  28. package/web/dist/assets/{use-query-DDd1mja8.js → use-query-DqauRKot.js} +2 -2
  29. package/web/dist/assets/use-simple-headers-BieJS-MQ.js +1 -0
  30. package/web/dist/index.html +6 -6
  31. package/web/dist/sw.js +1 -1
  32. package/web/dist/assets/About-DxAX4fbq.js +0 -1
  33. package/web/dist/assets/AdminControls-CkepqAqA.js +0 -1
  34. package/web/dist/assets/Debug-C3aem-Y_.js +0 -1
  35. package/web/dist/assets/Divider-DxcVAB__.js +0 -1
  36. package/web/dist/assets/Home-BWy3tAlX.js +0 -1
  37. package/web/dist/assets/Line-BAgtALS7.js +0 -1
  38. package/web/dist/assets/LinkText-CiPvp0mL.js +0 -1
  39. package/web/dist/assets/Markdown-D2wC6jdy.js +0 -2
  40. package/web/dist/assets/Nearby-GgSNwYjV.js +0 -1
  41. package/web/dist/assets/NotFound-785phBIT.js +0 -1
  42. package/web/dist/assets/NotFoundPage-CkldArMP.js +0 -1
  43. package/web/dist/assets/Page-BMpuMskU.js +0 -1
  44. package/web/dist/assets/Picker-BUr-habm.js +0 -1
  45. package/web/dist/assets/Placeholder-BkXn0vQ2.js +0 -1
  46. package/web/dist/assets/Service-DwfMOmR2.js +0 -1
  47. package/web/dist/assets/Settings-CcOwENSo.js +0 -1
  48. package/web/dist/assets/Status-Cqm0zGEP.js +0 -1
  49. package/web/dist/assets/Stop-1gh0-Vtz.js +0 -1
  50. package/web/dist/assets/Strong-BeqxJ43O.js +0 -1
  51. package/web/dist/assets/ZenMode-Dy3GUHqN.js +0 -1
  52. package/web/dist/assets/index-CpWS5La_.css +0 -2
  53. package/web/dist/assets/index-Ddvtj_a8.js +0 -2
  54. package/web/dist/assets/use-simple-headers-vqWwqqRo.js +0 -1
@@ -1,4 +1,4 @@
1
- import{_ as e,h as t,m as n}from"./use-nav-exemptions-pWDQIkAs.js";function r(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 i(e,t=`|`){return e.map(e=>ce(e)).join(t)}function a(e,t){return typeof t==`bigint`?t.toString():t}var o=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 s(e){return new o(e)}function c(e){return e==null}function l(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function u(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 d(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function f(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function p(e){return f(e._zod.def)??e._zod.def.shape}function m(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return d(this,t,e),e},enumerable:!0,configurable:!0})}function h(e,t,n){t in e?d(e,t,n):e[t]=n}function g(e,t,n,r){let i=p(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?m(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):h(e,a,r?r(n.value,a):n.value))}}function ee(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?m(e,n,()=>t[n]):h(e,n,r.value))}}function _(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function te(e){return JSON.stringify(e)}function ne(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var re=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function ie(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ae=s(()=>{if(j.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function v(e){if(ie(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return ie(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function oe(e){return v(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var se=new Set([`string`,`number`,`symbol`]);function y(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function b(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function x(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 ce(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function le(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var ue={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},de={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function fe(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 g(i,e,pe(e,t)),b(e,_(n,{shape:i,checks:[]}))}function pe(e,t){let n=p(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 me(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(pe(e,t)),a={};return g(a,e,Reflect.ownKeys(p(e)).filter(e=>!i.has(e))),b(e,_(n,{shape:a,checks:[]}))}function he(e,t){if(!v(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=p(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 b(e,_(e._zod.def,{shape:ge(e,t)}))}function ge(e,t){let n={};return g(n,e,Reflect.ownKeys(p(e))),ee(n,t),n}function _e(e,t){if(!v(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return b(e,_(e._zod.def,{shape:ge(e,t)}))}function ve(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 g(n,e,Reflect.ownKeys(p(e))),g(n,t,Reflect.ownKeys(p(t))),b(e,_(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function ye(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(pe(t,n)):void 0,o={};return g(o,t,Reflect.ownKeys(p(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),b(t,_(t._zod.def,{shape:o,checks:[]}))}function be(e,t,n){let r=n?new Set(pe(t,n)):void 0,i={};return g(i,t,Reflect.ownKeys(p(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),b(t,_(t._zod.def,{shape:i}))}function S(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 xe(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 Se(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function C(e){return typeof e==`string`?e:e?.message}function Ce(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function we(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function w(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:C(e.inst?._zod.def?.error?.(e))??C(a?.(e))??C(t?.error?.(e))??C(n.customError?.(e))??C(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 Te=/[\uD800-\uDBFF]/;function Ee(e){let t=e.length;if(!Te.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 De(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Oe(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 T(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function ke(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Me(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 Ae(e,t,n){return E(e,t,n,!1)}function je(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 Me(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 Ne(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Pe,D=!1,Fe={configurable:!0,get(){D=!0}};function O(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&Pe!==e._zod?Pe=void 0:(Pe=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Fe);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 Ie(e,t,n,r){let i=Ne(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 Le=`~constantCatch`;function Re(e){let t=()=>e;return t[Le]=!0,t}var ze,Be={value:void 0,enumerable:!1},Ve=`captureStackTrace`in Error?Error:null;function He(e){let t=Ve;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Ve=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){Be.value=new a(r);try{Object.defineProperty(n,"_zod",Be)}finally{Be.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),ke(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?He(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.`)}},Ue=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(ze=globalThis).__zod_globalConfig??(ze.__zod_globalConfig={});var j=globalThis.__zod_globalConfig;function M(e){return e&&Object.assign(j,e),j}function We(){let e=this._zod;return e.message??=JSON.stringify(e.def,a,2),e.message}function Ge(e){this._zod.message=e}var Ke={get:We,set:Ge,enumerable:!0,configurable:!0},qe={value:void 0,enumerable:!1},Je=new WeakSet([Object.prototype,Error.prototype]),Ye=k(`$ZodError`,(e,t)=>{e.name=`$ZodError`,qe.value=t,Object.defineProperty(e,"issues",qe),qe.value=void 0,Object.defineProperty(e,"message",Ke);let n=Object.getPrototypeOf(e);Je.has(n)||(Je.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})}}))});function Xe(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 Ze(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Xe(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Qe(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 $e(e,t){return{callee:t?.callee??e,Err:t?.Err}}var et=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=>w(e,o,M())));throw re(n,a?.callee??t),n}return s.value};return t},tt=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=>w(e,o,M())));throw re(n,a?.callee??t),n}return s.value};return t},nt=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?rt(e,a.issues,i):{success:!0,data:a.value}};function rt(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>w(e,n,M()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var it=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?rt(e,a.issues,i):{success:!0,data:a.value}},at=Symbol.for(`zod.compile.invalid`),ot=Symbol.for(`zod.compile.fallback`),st=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==at)return!0;if(r.definite===!0&&n===void 0)return!1}return ct(e,t,n)});function ct(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[ot]=!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 lt=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},ut=e=>{let t=et(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,$e(n,a))};return n},dt=e=>{let t=et(e),n=(e,r,i,a)=>t(e,r,i,$e(n,a));return n},ft=e=>{let t=tt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,$e(n,a))};return n},pt=e=>{let t=tt(e),n=async(e,r,i,a)=>await t(e,r,i,$e(n,a));return n},mt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return nt(e)(t,n,i)},ht=e=>(t,n,r)=>nt(e)(t,n,r),gt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return it(e)(t,n,i)},_t=e=>async(t,n,r)=>it(e)(t,n,r),vt=/^[cC][0-9a-z]{6,}$/,yt=/^[0-9a-z]+$/,bt=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,xt=/^[0-9a-vA-V]{20}$/,St=/^[A-Za-z0-9]{27}$/,Ct=/^[a-zA-Z0-9_-]{21}$/;function wt(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Tt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Et=/^([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})$/,Dt=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)$/,Ot=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,kt=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function At(){return new RegExp(kt,`u`)}var jt=/^(?:(?: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])$/,Mt=/^(([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}|:))$/,Nt=/^((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])$/,Pt=/^(([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])$/,Ft=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,It=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Lt=/^https?$/,Rt=/^\+[1-9]\d{6,14}$/,zt=`(?:(?:\\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 Bt(e){return RegExp(`^${e}$`)}var Vt=Bt(zt);function Ht(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 Ut(e){return RegExp(`^${Ht(e)}$`)}function Wt(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Ht({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Ht({precision:e.precision})}`:n;return RegExp(`^${zt}T(?:${r})$`)}var Gt=/^[\s\S]{0,}$/,Kt=/^-?\d+(?:\.\d+)?$/,qt=/^(?:true|false)$/i,Jt=/^[^A-Z]*$/,Yt=/^[^a-z]*$/,N=k(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Xt=e=>{let t=e.value;return!c(t)&&t.length!==void 0},Zt={number:`number`,bigint:`bigint`,object:`date`},Qt=k(`$ZodCheckLessThan`,(e,t)=>{N.init(e,t);let n=Zt[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Zt[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})}}),$t=k(`$ZodCheckGreaterThan`,(e,t)=>{N.init(e,t);let n=Zt[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Zt[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})}}),en=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):u(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})}}),tn=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]=ue[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})}}),nn=k(`$ZodCheckMaxLength`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=Xt),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Ee(r):i)<=t.maximum)return;let a=De(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),rn=k(`$ZodCheckMinLength`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=Xt),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Ee(r):i)>=t.minimum)return;let a=De(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),an=k(`$ZodCheckLengthEquals`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=Xt),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Ee(r):i;if(a===t.length)return;let o=De(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})}}),on=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=()=>{})}),sn=k(`$ZodCheckRegex`,(e,t)=>{on.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})}}),cn=k(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Jt,on.init(e,t)}),ln=k(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Yt,on.init(e,t)}),un=k(`$ZodCheckIncludes`,(e,t)=>{N.init(e,t);let n=y(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})}}),dn=k(`$ZodCheckStartsWith`,(e,t)=>{N.init(e,t);let n=RegExp(`^${y(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})}}),fn=k(`$ZodCheckEndsWith`,(e,t)=>{N.init(e,t);let n=RegExp(`.*${y(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})}}),pn=k(`$ZodCheckOverwrite`,(e,t)=>{N.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),mn=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{g as e,h as t,v as n}from"./use-nav-exemptions-heDPohlO.js";function r(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 i(e,t=`|`){return e.map(e=>ce(e)).join(t)}function a(e,t){return typeof t==`bigint`?t.toString():t}var o=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 s(e){return new o(e)}function c(e){return e==null}function l(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function u(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 d(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function f(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function p(e){return f(e._zod.def)??e._zod.def.shape}function m(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return d(this,t,e),e},enumerable:!0,configurable:!0})}function h(e,t,n){t in e?d(e,t,n):e[t]=n}function g(e,t,n,r){let i=p(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?m(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):h(e,a,r?r(n.value,a):n.value))}}function ee(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?m(e,n,()=>t[n]):h(e,n,r.value))}}function _(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function te(e){return JSON.stringify(e)}function ne(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var re=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function ie(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ae=s(()=>{if(j.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function v(e){if(ie(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return ie(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function oe(e){return v(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var se=new Set([`string`,`number`,`symbol`]);function y(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function b(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function x(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 ce(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function le(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var ue={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},de={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function fe(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 g(i,e,pe(e,t)),b(e,_(n,{shape:i,checks:[]}))}function pe(e,t){let n=p(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 me(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(pe(e,t)),a={};return g(a,e,Reflect.ownKeys(p(e)).filter(e=>!i.has(e))),b(e,_(n,{shape:a,checks:[]}))}function he(e,t){if(!v(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=p(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 b(e,_(e._zod.def,{shape:ge(e,t)}))}function ge(e,t){let n={};return g(n,e,Reflect.ownKeys(p(e))),ee(n,t),n}function _e(e,t){if(!v(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return b(e,_(e._zod.def,{shape:ge(e,t)}))}function ve(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 g(n,e,Reflect.ownKeys(p(e))),g(n,t,Reflect.ownKeys(p(t))),b(e,_(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function ye(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(pe(t,n)):void 0,o={};return g(o,t,Reflect.ownKeys(p(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),b(t,_(t._zod.def,{shape:o,checks:[]}))}function be(e,t,n){let r=n?new Set(pe(t,n)):void 0,i={};return g(i,t,Reflect.ownKeys(p(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),b(t,_(t._zod.def,{shape:i}))}function S(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 xe(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 Se(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function C(e){return typeof e==`string`?e:e?.message}function Ce(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function we(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function w(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:C(e.inst?._zod.def?.error?.(e))??C(a?.(e))??C(t?.error?.(e))??C(n.customError?.(e))??C(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 Te=/[\uD800-\uDBFF]/;function Ee(e){let t=e.length;if(!Te.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 De(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Oe(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 T(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function ke(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Me(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 Ae(e,t,n){return E(e,t,n,!1)}function je(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 Me(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 Ne(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Pe,D=!1,Fe={configurable:!0,get(){D=!0}};function O(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&Pe!==e._zod?Pe=void 0:(Pe=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Fe);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 Ie(e,t,n,r){let i=Ne(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 Le=`~constantCatch`;function Re(e){let t=()=>e;return t[Le]=!0,t}var ze,Be={value:void 0,enumerable:!1},Ve=`captureStackTrace`in Error?Error:null;function He(e){let t=Ve;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Ve=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){Be.value=new a(r);try{Object.defineProperty(n,"_zod",Be)}finally{Be.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),ke(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?He(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.`)}},Ue=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(ze=globalThis).__zod_globalConfig??(ze.__zod_globalConfig={});var j=globalThis.__zod_globalConfig;function M(e){return e&&Object.assign(j,e),j}function We(){let e=this._zod;return e.message??=JSON.stringify(e.def,a,2),e.message}function Ge(e){this._zod.message=e}var Ke={get:We,set:Ge,enumerable:!0,configurable:!0},qe={value:void 0,enumerable:!1},Je=new WeakSet([Object.prototype,Error.prototype]),Ye=k(`$ZodError`,(e,t)=>{e.name=`$ZodError`,qe.value=t,Object.defineProperty(e,"issues",qe),qe.value=void 0,Object.defineProperty(e,"message",Ke);let n=Object.getPrototypeOf(e);Je.has(n)||(Je.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})}}))});function Xe(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 Ze(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Xe(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Qe(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 $e(e,t){return{callee:t?.callee??e,Err:t?.Err}}var et=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=>w(e,o,M())));throw re(n,a?.callee??t),n}return s.value};return t},tt=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=>w(e,o,M())));throw re(n,a?.callee??t),n}return s.value};return t},nt=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?rt(e,a.issues,i):{success:!0,data:a.value}};function rt(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>w(e,n,M()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var it=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?rt(e,a.issues,i):{success:!0,data:a.value}},at=Symbol.for(`zod.compile.invalid`),ot=Symbol.for(`zod.compile.fallback`),st=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==at)return!0;if(r.definite===!0&&n===void 0)return!1}return ct(e,t,n)});function ct(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[ot]=!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 lt=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},ut=e=>{let t=et(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,$e(n,a))};return n},dt=e=>{let t=et(e),n=(e,r,i,a)=>t(e,r,i,$e(n,a));return n},ft=e=>{let t=tt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,$e(n,a))};return n},pt=e=>{let t=tt(e),n=async(e,r,i,a)=>await t(e,r,i,$e(n,a));return n},mt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return nt(e)(t,n,i)},ht=e=>(t,n,r)=>nt(e)(t,n,r),gt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return it(e)(t,n,i)},_t=e=>async(t,n,r)=>it(e)(t,n,r),vt=/^[cC][0-9a-z]{6,}$/,yt=/^[0-9a-z]+$/,bt=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,xt=/^[0-9a-vA-V]{20}$/,St=/^[A-Za-z0-9]{27}$/,Ct=/^[a-zA-Z0-9_-]{21}$/;function wt(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Tt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Et=/^([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})$/,Dt=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)$/,Ot=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,kt=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function At(){return new RegExp(kt,`u`)}var jt=/^(?:(?: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])$/,Mt=/^(([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}|:))$/,Nt=/^((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])$/,Pt=/^(([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])$/,Ft=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,It=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Lt=/^https?$/,Rt=/^\+[1-9]\d{6,14}$/,zt=`(?:(?:\\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 Bt(e){return RegExp(`^${e}$`)}var Vt=Bt(zt);function Ht(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 Ut(e){return RegExp(`^${Ht(e)}$`)}function Wt(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Ht({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Ht({precision:e.precision})}`:n;return RegExp(`^${zt}T(?:${r})$`)}var Gt=/^[\s\S]{0,}$/,Kt=/^-?\d+(?:\.\d+)?$/,qt=/^(?:true|false)$/i,Jt=/^[^A-Z]*$/,Yt=/^[^a-z]*$/,N=k(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Xt=e=>{let t=e.value;return!c(t)&&t.length!==void 0},Zt={number:`number`,bigint:`bigint`,object:`date`},Qt=k(`$ZodCheckLessThan`,(e,t)=>{N.init(e,t);let n=Zt[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Zt[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})}}),$t=k(`$ZodCheckGreaterThan`,(e,t)=>{N.init(e,t);let n=Zt[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Zt[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})}}),en=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):u(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})}}),tn=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]=ue[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})}}),nn=k(`$ZodCheckMaxLength`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=Xt),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Ee(r):i)<=t.maximum)return;let a=De(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),rn=k(`$ZodCheckMinLength`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=Xt),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Ee(r):i)>=t.minimum)return;let a=De(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),an=k(`$ZodCheckLengthEquals`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=Xt),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Ee(r):i;if(a===t.length)return;let o=De(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})}}),on=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=()=>{})}),sn=k(`$ZodCheckRegex`,(e,t)=>{on.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})}}),cn=k(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Jt,on.init(e,t)}),ln=k(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Yt,on.init(e,t)}),un=k(`$ZodCheckIncludes`,(e,t)=>{N.init(e,t);let n=y(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})}}),dn=k(`$ZodCheckStartsWith`,(e,t)=>{N.init(e,t);let n=RegExp(`^${y(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})}}),fn=k(`$ZodCheckEndsWith`,(e,t)=>{N.init(e,t);let n=RegExp(`.*${y(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})}}),pn=k(`$ZodCheckOverwrite`,(e,t)=>{N.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),mn=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))}},hn={major:4,minor:6,patch:7},P=k(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=hn;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=S(t),a;for(let o of n){if(o._zod.def.when){if(xe(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&&(we(t.issues,n,e),i||=S(t,n))});else{if(t.issues.length===n)continue;we(t.issues,n,e),i||=S(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(S(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 Ae(this,`~standard`,vn(this))},set"~standard"(e){E(this,`~standard`,e)}}),gn=(e,t)=>e.issues.length?{issues:e.issues.map(e=>w(e,t,M()))}:{value:e.value};async function _n(e,t){let n={async:!0};return gn(await e._zod.run({value:t,issues:[]},n),n)}function vn(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return gn(r,n)}catch{}return _n(e,t)},vendor:`zod`,version:1}}var yn=k(`$ZodString`,(e,t)=>{P.init(e,t),e._zod.pattern=t.pattern??Gt,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)=>{on.init(e,t),yn.init(e,t)}),bn=k(`$ZodGUID`,(e,t)=>{t.pattern??=Et,F.init(e,t)}),xn=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??=Dt(e)}else t.pattern??=Dt();F.init(e,t)}),Sn=k(`$ZodEmail`,(e,t)=>{t.pattern??=Ot,F.init(e,t)});function Cn(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function wn(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Cn(e)||2:Tn(e,t)}function Tn(e,t){if(!t.normalize&&t.protocol?.source===Lt.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 En=/[\t\n\r]/g;function Dn(e){return e.replace(En,``)}function On(e,t){return t.lastIndex=0,t.test(e.hostname)}function kn(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var An=k(`$ZodURL`,(e,t)=>{F.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=wn(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=Dn(r);return}t.hostname&&!On(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&&!kn(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:Dn(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),jn=k(`$ZodEmoji`,(e,t)=>{t.pattern??=At(),F.init(e,t)}),Mn=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?Ct:wt(t.length),F.init(e,t)}),Nn=k(`$ZodCUID`,(e,t)=>{t.pattern??=vt,F.init(e,t)}),Pn=k(`$ZodCUID2`,(e,t)=>{t.pattern??=yt,F.init(e,t)}),Fn=k(`$ZodULID`,(e,t)=>{t.pattern??=bt,F.init(e,t)}),In=k(`$ZodXID`,(e,t)=>{t.pattern??=xt,F.init(e,t)}),Ln=k(`$ZodKSUID`,(e,t)=>{t.pattern??=St,F.init(e,t)}),Rn=k(`$ZodISODateTime`,(e,t)=>{t.pattern??=Wt(t),F.init(e,t)}),zn=k(`$ZodISODate`,(e,t)=>{t.pattern??=Vt,F.init(e,t)}),Bn=k(`$ZodISOTime`,(e,t)=>{t.pattern??=Ut(t),F.init(e,t)}),Vn=k(`$ZodISODuration`,(e,t)=>{t.pattern??=Tt,F.init(e,t)}),Hn=k(`$ZodIPv4`,(e,t)=>{t.pattern??=jt,F.init(e,t)}),Un=/^[0-9a-fA-F:.]+$/;function Wn(e){return Un.test(e)?Cn(`http://[${e}]`):!1}var Gn=k(`$ZodIPv6`,(e,t)=>{t.pattern??=Mt,F.init(e,t),e._zod.check=n=>{Wn(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Kn=k(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Nt,F.init(e,t)});function qn(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:Wn(n)}var Jn=k(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Pt,F.init(e,t),e._zod.check=n=>{qn(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Yn(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Xn=/^[0-9a-zA-Z+/]*={0,2}$/,Zn=k(`$ZodBase64`,(e,t)=>{t.pattern??=Xn,F.init(e,t),e._zod.check=n=>{Yn(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Qn=/^[A-Za-z0-9_-]*$/;function $n(e){if(!Qn.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Yn(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var er=k(`$ZodBase64URL`,(e,t)=>{t.pattern??=Qn,F.init(e,t),e._zod.check=n=>{$n(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),tr=k(`$ZodE164`,(e,t)=>{t.pattern??=Rt,F.init(e,t)});function nr(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 rr=k(`$ZodJWT`,(e,t)=>{F.init(e,t),e._zod.check=n=>{nr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),ir=k(`$ZodNumber`,(e,t)=>{P.init(e,t),e._zod.pattern=Kt,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}}),ar=k(`$ZodNumberFormat`,(e,t)=>{tn.init(e,t),ir.init(e,t)}),or=k(`$ZodBoolean`,(e,t)=>{P.init(e,t),e._zod.pattern=qt,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}}),sr=k(`$ZodUnknown`,(e,t)=>{P.init(e,t),e._zod.parse=e=>e}),cr=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 lr(e,t){let n=Ce(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of Ce(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,we(n.issues,t,e),n}}return i(n,a)}}var ur=e=>Array.isArray(e)?e.length:-1;function dr(e,t,n){e.issues.length&&t.issues.push(...Se(n,e.issues)),t.value[n]=e.value}var fr=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=>dr(t,r,e)));else if(dr(c,r,e),s&&c.issues.length!==0&&S(c))break}return o.length?Promise.all(o).then(()=>r):r},lr(e,ur)});function pr(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(...Se(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var mr=[];function hr(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:mr,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=le(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function gr(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(S(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=>pr(e,n,i,t,d,f))):pr(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 _r=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=s(()=>hr(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)||d(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=ie,o=t.catchall,c,l=j.memoizer;l?.attach(e),e._zod.parse=(t,n)=>{c??=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=l?l.alloc(e,t,{},n):{};let s=[],u=c.shape,d=n?.abortEarly,f=t.issues.length;for(let e of c.allKeys){if(d&&t.issues.length!==f){if(S(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,c=i._zod.run({value:r[e],issues:[]},n);c instanceof Promise?s.push(c.then(n=>pr(n,t,e,r,a,o))):pr(c,t,e,r,a,o)}return o?gr(s,r,t,n,i.value,e,d===!0):s.length?Promise.all(s).then(()=>t):t}}),vr=k(`$ZodObjectJIT`,(e,t)=>{_r.init(e,t);let n=e._zod.parse,r=s(()=>hr(t)),i=j.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new mn([`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;
@@ -52,4 +52,4 @@ import{_ as e,h as t,m as n}from"./use-nav-exemptions-pWDQIkAs.js";function r(e)
52
52
 
53
53
  `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,c=ie,l=!j.jitless,u=l&&ae.value,d=t.catchall,f;e._zod.parse=(i,s)=>{f??=r.value;let p=i.value;return c(p)?l&&u&&s?.async===!1&&s.jitless!==!0?(o||=a(t.shape),i=o(i,s),d?gr([],p,i,s,f,e,s?.abortEarly===!0):i):n(i,s):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function yr(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!S(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>w(e,r,M())))}),t)}var br=k(`$ZodUnion`,(e,t)=>{P.init(e,t),O(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),O(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),O(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),O(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>l(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>yr(t,r,e,i)):yr(o,r,e,i)}}),xr=k(`$ZodIntersection`,(e,t)=>{P.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Cr(e,t,n)):Cr(e,i,a)}});function Sr(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(v(e)&&v(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Sr(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Sr(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Cr(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Sr(t.value,n.value);if(!c.valid){if(S(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var wr=k(`$ZodEnum`,(e,t)=>{P.init(e,t);let n=r(t.entries),i=new Set(n);e._zod.values=i,O(e,`pattern`,e=>{let t=r(e.def.entries).filter(e=>se.has(typeof e));return RegExp(t.length?`^(${t.map(e=>y(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,r)=>{let a=t.value;return i.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Tr=k(`$ZodLiteral`,(e,t)=>{P.init(e,t);let n=new Set(t.values);e._zod.values=n,O(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?y(e):e?y(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Er=k(`$ZodTransform`,(e,t)=>{P.init(e,t),e._zod.optin=`optional`,j.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ue(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new A;return n.value=i,n}});function Dr(e,t){return e.value=t.issues.length?void 0:t.value,e}var Or=k(`$ZodOptional`,(e,t)=>{P.init(e,t),O(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,O(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),O(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${l(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Dr(e,t)):Dr(e,r)}return t.innerType._zod.run(e,n)}}),kr=k(`$ZodExactOptional`,(e,t)=>{Or.init(e,t),O(e,`values`,e=>e.def.innerType._zod.values),O(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Ar=k(`$ZodNullable`,(e,t)=>{P.init(e,t),O(e,`optin`,e=>e.def.innerType._zod.optin),O(e,`optout`,e=>e.def.innerType._zod.optout),O(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${l(t.source)}|null)$`):void 0}),O(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),jr=k(`$ZodDefault`,(e,t)=>{P.init(e,t),e._zod.optin=`defaulted`,O(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Mr(e,t)):Mr(r,t)}});function Mr(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Nr=k(`$ZodPrefault`,(e,t)=>{P.init(e,t),e._zod.optin=`defaulted`,O(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Pr=k(`$ZodNonOptional`,(e,t)=>{P.init(e,t),O(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Fr(t,e)):Fr(i,e)}});function Fr(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Ir(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>w(e,r,M()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Lr=k(`$ZodCatch`,(e,t)=>{P.init(e,t),O(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),O(e,`optout`,e=>e.def.innerType._zod.optout),O(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Ir(e,r,t,n)):Ir(e,r,t,n)}}),Rr=k(`$ZodPipe`,(e,t)=>{P.init(e,t),O(e,`values`,e=>e.def.in._zod.values),O(e,`optin`,e=>e.def.in._zod.optin),O(e,`optout`,e=>e.def.out._zod.optout),O(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>zr(e,t.in,n)):zr(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>zr(e,t.out,n)):zr(r,t.out,n)}});function zr(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Br=k(`$ZodReadonly`,(e,t)=>{P.init(e,t),O(e,`propValues`,e=>e.def.innerType._zod.propValues),O(e,`values`,e=>e.def.innerType._zod.values),O(e,`optin`,e=>e.def.innerType?._zod?.optin),O(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Vr):Vr(r)}});function Vr(e){return e.memo||(e.value=Object.freeze(e.value)),e}var Hr=k(`$ZodCustom`,(e,t)=>{N.init(e,t),P.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Ur(t,n,r,e));Ur(i,n,r,e)}});function Ur(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(T(e))}}var Wr=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Gr=`~memo`,Kr=[];function qr(e){return typeof e==`object`&&!!e}function Jr(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Yr=new WeakMap,I=0,Xr=1,Zr=2;function Qr(e,t,n){let r=Yr.get(e);if(r!==void 0)return r?Zr:I;if(t.has(e))return Zr;t.add(e);let i=I,a=e=>{if(i!==Zr&&e?._zod){let r=Qr(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=I;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Xr:o.value?._zod?Qr(o.value,t,n):I;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=f(c);s(e?o(e,!0):Xr),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?Qr(r,t,!1):Xr);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),$r(e,i)}function $r(e,t){return t!==Xr&&Yr.set(e,t===Zr),t}function ei(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var ti,ni=[],ri={alloc(e,t,n){let r=ti;if(!r)return n;ti=void 0;let i={value:n,issues:null};return r.set(t.value,i),ni.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&ai(n,e.value))throw new Wr;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=Qr(e,new Set,!1);if(i===I)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Zr||r?n=!0:r=!0}let l=s.value;if(!qr(l))return t(s,c);let u=c[Gr];u||(u={buckets:new WeakMap,backEdges:void 0},c[Gr]=u);let d;i===c?d=a:(d=ei(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...Jr(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;ti=d;let p=ni.length,m=t(s,c);ti=void 0;let h=ni.length>p?ni.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?Jr(e.issues):Kr),e)):(h&&(h.issues=m.issues.length?Jr(m.issues):Kr),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function ii(){return ri}function ai(e,t){let n=e[Gr]?.backEdges;return n!==void 0&&qr(t)&&n.has(t)}var oi=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function a(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${a(e.expected)}, received ${a(Oe(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${ce(e.values[0])}`:`Invalid option: expected one of ${i(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${i(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function si(){return{localeError:oi()}}var ci,li=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function ui(){return new li}(ci=globalThis).__zod_globalRegistry??(ci.__zod_globalRegistry=ui());var L=globalThis.__zod_globalRegistry;function di(e){return e.checks&&=[...e.checks],e}function fi(e,t){return new e(di({type:`string`,...x(t)}))}function pi(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...x(t)})}function mi(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...x(t)})}function hi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...x(t)})}function gi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...x(t)})}function _i(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...x(t)})}function vi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...x(t)})}function yi(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...x(t)})}function bi(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...x(t)})}function xi(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...x(t)})}function Si(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...x(t)})}function Ci(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...x(t)})}function wi(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...x(t)})}function Ti(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...x(t)})}function Ei(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...x(t)})}function Di(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...x(t)})}function Oi(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...x(t)})}function ki(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...x(t)})}function Ai(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...x(t)})}function ji(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...x(t)})}function Mi(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...x(t)})}function Ni(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...x(t)})}function Pi(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...x(t)})}function Fi(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...x(t)})}function Ii(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...x(t)})}function Li(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...x(t)})}function Ri(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...x(t)})}function zi(e,t){return new e(di({type:`number`,checks:[],...x(t)}))}function Bi(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...x(t)})}function Vi(e,t){return new e({type:`boolean`,...x(t)})}function Hi(e){return new e({type:`unknown`})}function Ui(e,t){return new e({type:`never`,...x(t)})}function Wi(e,t){return new Qt({check:`less_than`,...x(t),value:e,inclusive:!1})}function Gi(e,t){return new Qt({check:`less_than`,...x(t),value:e,inclusive:!0})}function Ki(e,t){return new $t({check:`greater_than`,...x(t),value:e,inclusive:!1})}function qi(e,t){return new $t({check:`greater_than`,...x(t),value:e,inclusive:!0})}function Ji(e,t){return new en({check:`multiple_of`,...x(t),value:e})}function Yi(e,t){return new nn({check:`max_length`,...x(t),maximum:e})}function Xi(e,t){return new rn({check:`min_length`,...x(t),minimum:e})}function Zi(e,t){return new an({check:`length_equals`,...x(t),length:e})}function Qi(e,t){return new sn({check:`string_format`,format:`regex`,...x(t),pattern:e})}function $i(e){return new cn({check:`string_format`,format:`lowercase`,...x(e)})}function ea(e){return new ln({check:`string_format`,format:`uppercase`,...x(e)})}function ta(e,t){return new un({check:`string_format`,format:`includes`,...x(t),includes:e})}function na(e,t){return new dn({check:`string_format`,format:`starts_with`,...x(t),prefix:e})}function ra(e,t){return new fn({check:`string_format`,format:`ends_with`,...x(t),suffix:e})}function R(e){return new pn({check:`overwrite`,tx:e})}function ia(e){return R(t=>t.normalize(e))}function aa(){return R(e=>e.trim())}function oa(){return R(e=>e.toLowerCase())}function sa(){return R(e=>e.toUpperCase())}function ca(){return R(e=>ne(e))}function la(e,t,n){return new e({type:`array`,element:t,...x(n)})}function ua(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...x(n)})}function da(e,t){let n=fa(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(T(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(T(r))}},e(t.value,t)),t);return n}function fa(e,t){let n=new N({check:`custom`,...x(t)});return n._zod.check=e,n}function z(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&d(e,t,n[t]);return e}function pa(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??L,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function B(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function V(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,V(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&z(o.schema,c),t.io===`input`&&H(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function ma(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function ha(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${ma(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+ma(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
54
54
 
55
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function ga(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;ga(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var _a=new Set([`type`,`properties`,`required`,`additionalProperties`]),va=[`oneOf`,`anyOf`];function ya(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function ba(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!_a.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??ya(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}d(n,r,e.length===1?e[0]:ba(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=ya(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function xa(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of _a)if(t in e)return;let n=t.filter(e=>va.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=ba(t);else{let e=n[0],i=va.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>ba([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,z(e,r))}function Sa(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):z(i,s),z(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())ga(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])xa(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}z(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,d(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:wa(t,`input`,e.processors),output:wa(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function H(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return H(r.element,n);if(r.type===`set`)return H(r.valueType,n);if(r.type===`lazy`)return H(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return H(r.innerType,n);if(r.type===`intersection`)return H(r.left,n)||H(r.right,n);if(r.type===`record`||r.type===`map`)return H(r.keyType,n)||H(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:H(r.in,n)||H(r.out,n);if(r.type===`object`){for(let e in r.shape)if(H(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(H(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(H(e,n))return!0;return!!(r.rest&&H(r.rest,n))}return!1}var Ca=(e,t={})=>n=>{let r=pa({...n,processors:t});return V(e,r),ha(r,e),Sa(r,e)},wa=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=pa({...i??{},target:a,io:t,processors:n});return V(e,o),ha(o,e),Sa(o,e)},U=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},W=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Ta=(e,t)=>{U(e,`minimum`,t),W(e,`maximum`,t)},Ea=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Da=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Oa=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},ka=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Aa=(e,t)=>U(e,`minimum`,t.minimum),ja=(e,t)=>W(e,`maximum`,t.maximum),Ma=e=>(t,n)=>{ka(t,n.format);let[r,i]=e[n.format];U(t,`minimum`,r),W(t,`maximum`,i)},Na={greater_than:(e,t)=>U(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>W(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Ea(e,t.value),number_format:Ma(ue),bigint_format:Ma(de),min_length:Aa,max_length:ja,length_equals:(e,t)=>Ta(e,t.length),min_size:Aa,max_size:ja,size_equals:(e,t)=>Ta(e,t.size),string_format:(e,t)=>{ka(e,t.format),t.pattern&&Da(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Oa(e,t.mime)};function G(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Na[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&U(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&U(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&W(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&W(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Ea(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Oa(t,i.mime);for(let e of i.patterns??[])Da(t,e);return t}var Pa={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Fa=new Map([[Xn,Ft],[Qn,It]]),Ia=e=>Fa.get(e)??e,La=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=G(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Pa[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Ia);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Ra=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=G(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):B(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},za=(e,t,n,r)=>{n.type=`boolean`},Ba=(e,t,n,r)=>{n.not={}},Va=(e,t,n,i)=>{let a=e._zod.def,o=r(a.entries);o.length===0?n.not={}:(o.every(e=>typeof e==`number`)&&(n.type=`number`),o.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=o)},Ha=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(B(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(B(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},Ua=(e,t,n,r)=>{B(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Wa=(e,t,n,r)=>{B(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Ga=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=G(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=V(a.element,t,{...r,path:[...r.path,`items`]})};function Ka(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Ka(t.out):t.type===`catch`?Ka(t.innerType):e._zod.optin}var qa=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&B(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)d(i.properties,e,V(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?Ka(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=V(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Ja=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>V(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Ya=(e,t,n,r)=>{let i=e._zod.def,a=V(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=V(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},Xa=(e,t,n,r)=>{let i=e._zod.def,a=V(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Za=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Qa=Symbol();function $a(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(B(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Qa):JSON.parse(o)}var eo=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=$a(i.defaultValue,e,t,n,r);o!==Qa&&(n.default=o)},to=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=$a(i.defaultValue,e,t,n,r);o!==Qa&&(n._prefault=o)},no=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{B(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},ro=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;V(o,t,r);let s=t.seen.get(e);s.ref=o},io=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},ao=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},oo=new WeakSet([Object.prototype,Error.prototype]);function so(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var K=k(`ZodError`,(e,t)=>{Ye.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);oo.has(n)||(oo.add(n),so(n,`format`,e=>t=>Qe(e,t)),so(n,`flatten`,e=>t=>Ze(e,t)),so(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,a,2)}),so(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,a,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),co=et(K),lo=tt(K),uo=nt(K),fo=it(K),po=ut(K),mo=dt(K),ho=ft(K),go=pt(K),_o=mt(K),vo=ht(K),yo=gt(K),bo=_t(K);function xo(){j.localeError||M(si())}function So(){j.memoizer||M({memoizer:ii()})}var q=k(`ZodType`,(e,t)=>(xo(),P.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(_(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return b(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Ps(e,t))},superRefine(e,t){return this.check(Fs(e,t))},overwrite(e){return this.check(R(e))},optional(){return gs(this)},exactOptional(){return vs(this)},nullable(){return bs(this)},nullish(){return gs(bs(this))},nonoptional(e){return Es(this,e)},array(){return is(this)},or(e){return ss([this,e])},and(e){return ls(this,e)},transform(e){return As(this,ms(e))},default(e){return Ss(this,e)},prefault(e){return ws(this,e)},catch(e){return Os(this,e)},pipe(e){return As(this,e)},readonly(){return Ms(this)},describe(e){let t=this.clone();return L.add(t,{description:e}),t},meta(...e){if(e.length===0)return L.get(this);let t=this.clone();return L.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Ae(this,`~standard`,{...vn(this),jsonSchema:{input:wa(this,`input`),output:wa(this,`output`)}})},set"~standard"(e){E(this,`~standard`,e)},parse:function e(t,n){return co(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await lo(this,t,n,{callee:e})},safeParse(e,t){return uo(this,e,t)},async safeParseAsync(e,t){return fo(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){E(this,`spa`,e)},validate(e,t){return st(this,e,t)},validateAsync(e,t){return lt(this,e,t)},encode:function e(t,n){return po(this,t,n,{callee:e})},decode:function e(t,n){return mo(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await ho(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await go(this,t,n,{callee:e})},safeEncode(e,t){return _o(this,e,t)},safeDecode(e,t){return vo(this,e,t)},async safeEncodeAsync(e,t){return yo(this,e,t)},async safeDecodeAsync(e,t){return bo(this,e,t)},toJSONSchema(e){return Ca(this,{})(e)},get description(){return L.get(this)?.description},get _def(){return this._zod.def}}),Co=k(`_ZodString`,(e,t)=>{yn.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>La(e,t,n,r)},je({format:e=>G(e).format??null,minLength:e=>G(e).minimum??null,maxLength:e=>G(e).maximum??null},{regex(...e){return this.check(Qi(...e))},includes(...e){return this.check(ta(...e))},startsWith(...e){return this.check(na(...e))},endsWith(...e){return this.check(ra(...e))},min(...e){return this.check(Xi(...e))},max(...e){return this.check(Yi(...e))},length(...e){return this.check(Zi(...e))},nonempty(...e){return this.check(Xi(1,...e))},lowercase(e){return this.check($i(e))},uppercase(e){return this.check(ea(e))},trim(){return this.check(aa())},normalize(...e){return this.check(ia(...e))},toLowerCase(){return this.check(oa())},toUpperCase(){return this.check(sa())},slugify(){return this.check(ca())}})),wo=k(`ZodString`,(e,t)=>{yn.init(e,t),Co.init(e,t)},{email(e){return this.check(pi(ko,e))},url(e){return this.check(yi(Mo,e))},jwt(e){return this.check(Pi(qo,e))},emoji(e){return this.check(bi(No,e))},guid(e){return this.check(mi(Ao,e))},uuid(e){return this.check(hi(jo,e))},uuidv4(e){return this.check(gi(jo,e))},uuidv6(e){return this.check(_i(jo,e))},uuidv7(e){return this.check(vi(jo,e))},nanoid(e){return this.check(xi(Po,e))},cuid(e){return this.check(Si(Fo,e))},cuid2(e){return this.check(Ci(Io,e))},ulid(e){return this.check(wi(Lo,e))},base64(e){return this.check(ji(Wo,e))},base64url(e){return this.check(Mi(Go,e))},xid(e){return this.check(Ti(Ro,e))},ksuid(e){return this.check(Ei(zo,e))},ipv4(e){return this.check(Di(Bo,e))},ipv6(e){return this.check(Oi(Vo,e))},cidrv4(e){return this.check(ki(Ho,e))},cidrv6(e){return this.check(Ai(Uo,e))},e164(e){return this.check(Ni(Ko,e))},datetime(e){return this.check(Fi(To,e))},date(e){return this.check(Ii(Eo,e))},time(e){return this.check(Li(Do,e))},duration(e){return this.check(Ri(Oo,e))}});function J(e){return fi(wo,e)}var Y=k(`ZodStringFormat`,(e,t)=>{F.init(e,t),Co.init(e,t)}),To=k(`ZodISODateTime`,(e,t)=>{Rn.init(e,t),Y.init(e,t)}),Eo=k(`ZodISODate`,(e,t)=>{zn.init(e,t),Y.init(e,t)}),Do=k(`ZodISOTime`,(e,t)=>{Bn.init(e,t),Y.init(e,t)}),Oo=k(`ZodISODuration`,(e,t)=>{Vn.init(e,t),Y.init(e,t)}),ko=k(`ZodEmail`,(e,t)=>{Sn.init(e,t),Y.init(e,t)}),Ao=k(`ZodGUID`,(e,t)=>{bn.init(e,t),Y.init(e,t)}),jo=k(`ZodUUID`,(e,t)=>{xn.init(e,t),Y.init(e,t)}),Mo=k(`ZodURL`,(e,t)=>{An.init(e,t),Y.init(e,t)}),No=k(`ZodEmoji`,(e,t)=>{jn.init(e,t),Y.init(e,t)}),Po=k(`ZodNanoID`,(e,t)=>{Mn.init(e,t),Y.init(e,t)}),Fo=k(`ZodCUID`,(e,t)=>{Nn.init(e,t),Y.init(e,t)}),Io=k(`ZodCUID2`,(e,t)=>{Pn.init(e,t),Y.init(e,t)}),Lo=k(`ZodULID`,(e,t)=>{Fn.init(e,t),Y.init(e,t)}),Ro=k(`ZodXID`,(e,t)=>{In.init(e,t),Y.init(e,t)}),zo=k(`ZodKSUID`,(e,t)=>{Ln.init(e,t),Y.init(e,t)}),Bo=k(`ZodIPv4`,(e,t)=>{Hn.init(e,t),Y.init(e,t)}),Vo=k(`ZodIPv6`,(e,t)=>{Gn.init(e,t),Y.init(e,t)}),Ho=k(`ZodCIDRv4`,(e,t)=>{Kn.init(e,t),Y.init(e,t)}),Uo=k(`ZodCIDRv6`,(e,t)=>{Jn.init(e,t),Y.init(e,t)}),Wo=k(`ZodBase64`,(e,t)=>{Zn.init(e,t),Y.init(e,t)}),Go=k(`ZodBase64URL`,(e,t)=>{er.init(e,t),Y.init(e,t)}),Ko=k(`ZodE164`,(e,t)=>{tr.init(e,t),Y.init(e,t)}),qo=k(`ZodJWT`,(e,t)=>{rr.init(e,t),Y.init(e,t)}),Jo=k(`ZodNumber`,(e,t)=>{ir.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ra(e,t,n,r),e.isFinite=!0},je({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=G(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=G(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=G(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>G(e).format??null},{gt(e,t){return this.check(Ki(e,t))},gte(e,t){return this.check(qi(e,t))},min(e,t){return this.check(qi(e,t))},lt(e,t){return this.check(Wi(e,t))},lte(e,t){return this.check(Gi(e,t))},max(e,t){return this.check(Gi(e,t))},int(e){return this.check(Xo(e))},safe(e){return this.check(Xo(e))},positive(e){return this.check(Ki(0,e))},nonnegative(e){return this.check(qi(0,e))},negative(e){return this.check(Wi(0,e))},nonpositive(e){return this.check(Gi(0,e))},multipleOf(e,t){return this.check(Ji(e,t))},step(e,t){return this.check(Ji(e,t))},finite(){return this}}));function X(e){return zi(Jo,e)}var Yo=k(`ZodNumberFormat`,(e,t)=>{ar.init(e,t),Jo.init(e,t)});function Xo(e){return Bi(Yo,e)}var Zo=k(`ZodBoolean`,(e,t)=>{or.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>za(e,t,n,r)});function Qo(e){return Vi(Zo,e)}var $o=k(`ZodUnknown`,(e,t)=>{sr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function es(){return Hi($o)}var ts=k(`ZodNever`,(e,t)=>{cr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ba(e,t,n,r)});function ns(e){return Ui(ts,e)}var rs=k(`ZodArray`,(e,t)=>{So(),fr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ga(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Xi(e,t))},nonempty(e){return this.check(Xi(1,e))},max(e,t){return this.check(Yi(e,t))},length(e,t){return this.check(Zi(e,t))},unwrap(){return this.element}});function is(e,t){return la(rs,e,t)}var as=k(`ZodObject`,(e,t)=>{So(),vr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qa(e,t,n,r),Ie(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return ds(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(_(this._zod.def,{catchall:e}))},passthrough(){return this.clone(_(this._zod.def,{catchall:es()}))},loose(){return this.clone(_(this._zod.def,{catchall:es()}))},strict(){return this.clone(_(this._zod.def,{catchall:ns()}))},strip(){return this.clone(_(this._zod.def,{catchall:void 0}))},extend(e){return he(this,e)},safeExtend(e){return _e(this,e)},merge(e){return ve(this,e)},pick(e){return fe(this,e)},omit(e){return me(this,e)},partial(...e){return ye(hs,this,e[0])},exactPartial(...e){return ye(_s,this,e[0],`exactPartial`)},required(...e){return be(Ts,this,e[0])}});function Z(e,t){return new as({type:`object`,shape:e??{},...x(t)})}var os=k(`ZodUnion`,(e,t)=>{br.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ja(e,t,n,r),e.options=t.options});function ss(e,t){return new os({type:`union`,options:e,...x(t)})}var cs=k(`ZodIntersection`,(e,t)=>{xr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ya(e,t,n,r)});function ls(e,t){return new cs({type:`intersection`,left:e,right:t})}var us=k(`ZodEnum`,(e,t)=>{wr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Va(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new us({...t,checks:[],...x(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new us({...t,checks:[],...x(r),entries:i})}});function ds(e,t){return new us({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...x(t)})}var fs=k(`ZodLiteral`,(e,t)=>{Tr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ha(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Q(e,t){return new fs({type:`literal`,values:Array.isArray(e)?e:[e],...x(t)})}var ps=k(`ZodTransform`,(e,t)=>{So(),Er.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wa(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ue(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(T(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(T(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function ms(e){return new ps({type:`transform`,transform:e})}var hs=k(`ZodOptional`,(e,t)=>{Or.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ao(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function gs(e){return new hs({type:`optional`,innerType:e})}var _s=k(`ZodExactOptional`,(e,t)=>{kr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ao(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function vs(e){return new _s({type:`optional`,innerType:e})}var ys=k(`ZodNullable`,(e,t)=>{Ar.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xa(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bs(e){return new ys({type:`nullable`,innerType:e})}var xs=k(`ZodDefault`,(e,t)=>{jr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ss(e,t){return new xs({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():oe(t)}})}var Cs=k(`ZodPrefault`,(e,t)=>{Nr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>to(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ws(e,t){return new Cs({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():oe(t)}})}var Ts=k(`ZodNonOptional`,(e,t)=>{Pr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Za(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Es(e,t){return new Ts({type:`nonoptional`,innerType:e,...x(t)})}var Ds=k(`ZodCatch`,(e,t)=>{Lr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>no(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Os(e,t){return new Ds({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Re(t)})}var ks=k(`ZodPipe`,(e,t)=>{Rr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ro(e,t,n,r),e.in=t.in,e.out=t.out});function As(e,t){return new ks({type:`pipe`,in:e,out:t})}var js=k(`ZodReadonly`,(e,t)=>{Br.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>io(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ms(e){return new js({type:`readonly`,innerType:e})}var Ns=k(`ZodCustom`,(e,t)=>{Hr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ua(e,t,n,r)});function Ps(e,t={}){return ua(Ns,e,t)}function Fs(e,t){return da(e,t)}var Is={path:`/about-page/v1`,argsSchema:Z({}),resultSchema:Z({primaryMarkdown:J()})},Ls={path:`/departures/v0`,argsSchema:Z({stopId:X(),count:X()}),resultSchema:Z({departures:Z({sourceId:J(),intrasourceId:J(),primaryDestinationText:J(),secondaryDestinationText:J().nullable(),lineIds:X().array().readonly(),color:Z({lightModeHexCode:J(),darkModeHexCode:J()}).nullable(),isCancelled:Qo(),movement:Z({index:X(),positionId:X().nullable(),time:J(),formerTime:J().nullable()})}).array()})};Z({latitude:X(),longitude:X()});var Rs=Z({lightModeHexCode:J(),darkModeHexCode:J()}),zs=Z({id:X(),name:J(),urlPath:J(),canonicalLinesServingStop:X().array().readonly(),location:Z({latitude:X(),longitude:X()}).nullable()}),$=Z({stopId:X(),type:ds([`regular`,`always-express`])}),Bs=ss([Z({type:Q(`linear`),name:J().nullable(),color:Rs.nullable(),stops:$.array().readonly()}),Z({type:Q(`branch`),name:J().nullable(),color:Rs.nullable(),commonStops:$.array().readonly(),branchAStops:$.array().readonly(),branchBStops:$.array().readonly()}),Z({type:Q(`loop`),name:J().nullable(),color:Rs.nullable(),loopLeftStops:$.array().readonly(),loopRightStops:$.array().readonly(),mainStops:$.array().readonly()})]),Vs={linear:!0,branch:!0,loop:!0};function Hs(e){return e in Vs}var Us=Z({entries:ss([Bs,Z({type:J().refine(e=>!Hs(e))})]).array().readonly(),fallbackStopList:X().array().readonly()}),Ws=Z({id:X(),name:J(),urlPath:J(),color:Rs.nullable(),diagram:Us}),Gs=Z({stop:ds([`stop`,`station`]),line:ds([`line`,`route`])}),Ks=Z({primaryMarkdown:J()}),qs=Z({primaryMarkdown:J()}),Js=Z({metadata:Z({hash:J(),serverVersion:J()}),stops:zs.array().readonly(),lines:Ws.array().readonly(),terminology:Gs,landingPage:Ks,footer:qs}),Ys={path:`/foundational-data/v1`,argsSchema:Z({hash:J().nullable()}),resultSchema:ss([Z({result:Q(`outdated`),foundationalData:Js}),Z({result:Q(`up-to-date`)})])},Xs={path:`/service/v0`,argsSchema:Z({sourceId:J(),intrasourceId:J()}),resultSchema:Z({service:Z({sourceId:J(),intrasourceId:J(),primaryDestinationText:J(),lineIds:X().array().readonly(),color:Z({lightModeHexCode:J(),darkModeHexCode:J()}).nullable(),isCancelled:Qo(),movements:Z({stopId:X(),positionId:X().nullable(),arrivalTime:J().nullable(),formerArrivalTime:J().nullable(),departureTime:J().nullable(),formerDepartureTime:J().nullable()}).array().readonly()}).nullable()})},Zs={path:`/version-check/v1`,argsSchema:Z({frontendVersion:J(),corequeryPackageVersion:J()}),resultSchema:Z({isForceUpdateOfServiceWorkerRequired:Qo()})},Qs={path:`/versions/v1`,argsSchema:Z({}),resultSchema:Z({serverVersion:J(),frontendVersion:J(),corequeryPackageVersion:J(),foundationalDataHash:J(),version:J().meta({deprecated:!0})})};function $s(){return{callApi:ec}}async function ec(e,t,n={}){let{timeout:r,debugDelay:i,debugError:a}=n;if(i!=null&&await new Promise(e=>setTimeout(e,i)),a??!1)throw Error(`Simulated API error`);let o=await fetch(`/api${e.path}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t),signal:r==null?void 0:AbortSignal.timeout(r)});if(!o.ok){let t=await o.text();throw Error(`Error ${o.status} calling /api${e.path}: ${t}`)}return e.resultSchema.parse(await o.json())}function tc(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(typeof e!=`object`)return e===t;if(Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!tc(e[n],t[n]))return!1;return!0}let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n)if(!r.includes(i)||!tc(e[i],t[i]))return!1;return!0}Object.freeze({status:`aborted`});function nc(e,t){let r=rc(t);n(e,r)}function rc(e){let n=t(void 0);return tc(e,n.current)||(n.current=e),n.current}function ic(t,n,r={}){let{callApi:i}=$s(),[a,o]=e(null),[s,c]=e(!0),[l,u]=e(null);return nc(()=>{let e=!1;async function a(){try{c(!0),u(null);let a=await i(t,n,r);e||o(a)}catch(t){e||u(t)}finally{e||c(!1)}}return a(),()=>{e=!0}},[t,n,r]),{data:a,loading:s,error:l}}export{Zs as a,Js as c,Is as d,ds as f,Qs as i,Hs as l,Z as m,tc as n,Xs as o,Q as p,$s as r,Ys as s,ic as t,Ls as u};
55
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function ga(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;ga(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var _a=new Set([`type`,`properties`,`required`,`additionalProperties`]),va=[`oneOf`,`anyOf`];function ya(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function ba(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!_a.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??ya(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}d(n,r,e.length===1?e[0]:ba(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=ya(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function xa(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of _a)if(t in e)return;let n=t.filter(e=>va.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=ba(t);else{let e=n[0],i=va.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>ba([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,z(e,r))}function Sa(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):z(i,s),z(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())ga(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])xa(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}z(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,d(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:wa(t,`input`,e.processors),output:wa(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function H(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return H(r.element,n);if(r.type===`set`)return H(r.valueType,n);if(r.type===`lazy`)return H(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return H(r.innerType,n);if(r.type===`intersection`)return H(r.left,n)||H(r.right,n);if(r.type===`record`||r.type===`map`)return H(r.keyType,n)||H(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:H(r.in,n)||H(r.out,n);if(r.type===`object`){for(let e in r.shape)if(H(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(H(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(H(e,n))return!0;return!!(r.rest&&H(r.rest,n))}return!1}var Ca=(e,t={})=>n=>{let r=pa({...n,processors:t});return V(e,r),ha(r,e),Sa(r,e)},wa=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=pa({...i??{},target:a,io:t,processors:n});return V(e,o),ha(o,e),Sa(o,e)},U=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},W=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Ta=(e,t)=>{U(e,`minimum`,t),W(e,`maximum`,t)},Ea=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Da=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Oa=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},ka=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Aa=(e,t)=>U(e,`minimum`,t.minimum),ja=(e,t)=>W(e,`maximum`,t.maximum),Ma=e=>(t,n)=>{ka(t,n.format);let[r,i]=e[n.format];U(t,`minimum`,r),W(t,`maximum`,i)},Na={greater_than:(e,t)=>U(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>W(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Ea(e,t.value),number_format:Ma(ue),bigint_format:Ma(de),min_length:Aa,max_length:ja,length_equals:(e,t)=>Ta(e,t.length),min_size:Aa,max_size:ja,size_equals:(e,t)=>Ta(e,t.size),string_format:(e,t)=>{ka(e,t.format),t.pattern&&Da(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Oa(e,t.mime)};function G(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Na[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&U(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&U(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&W(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&W(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Ea(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Oa(t,i.mime);for(let e of i.patterns??[])Da(t,e);return t}var Pa={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Fa=new Map([[Xn,Ft],[Qn,It]]),Ia=e=>Fa.get(e)??e,La=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=G(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Pa[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Ia);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Ra=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=G(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):B(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},za=(e,t,n,r)=>{n.type=`boolean`},Ba=(e,t,n,r)=>{n.not={}},Va=(e,t,n,i)=>{let a=e._zod.def,o=r(a.entries);o.length===0?n.not={}:(o.every(e=>typeof e==`number`)&&(n.type=`number`),o.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=o)},Ha=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(B(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(B(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},Ua=(e,t,n,r)=>{B(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Wa=(e,t,n,r)=>{B(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Ga=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=G(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=V(a.element,t,{...r,path:[...r.path,`items`]})};function Ka(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Ka(t.out):t.type===`catch`?Ka(t.innerType):e._zod.optin}var qa=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&B(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)d(i.properties,e,V(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?Ka(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=V(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Ja=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>V(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Ya=(e,t,n,r)=>{let i=e._zod.def,a=V(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=V(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},Xa=(e,t,n,r)=>{let i=e._zod.def,a=V(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Za=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Qa=Symbol();function $a(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(B(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Qa):JSON.parse(o)}var eo=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=$a(i.defaultValue,e,t,n,r);o!==Qa&&(n.default=o)},to=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=$a(i.defaultValue,e,t,n,r);o!==Qa&&(n._prefault=o)},no=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{B(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},ro=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;V(o,t,r);let s=t.seen.get(e);s.ref=o},io=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},ao=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},oo=new WeakSet([Object.prototype,Error.prototype]);function so(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var K=k(`ZodError`,(e,t)=>{Ye.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);oo.has(n)||(oo.add(n),so(n,`format`,e=>t=>Qe(e,t)),so(n,`flatten`,e=>t=>Ze(e,t)),so(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,a,2)}),so(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,a,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),co=et(K),lo=tt(K),uo=nt(K),fo=it(K),po=ut(K),mo=dt(K),ho=ft(K),go=pt(K),_o=mt(K),vo=ht(K),yo=gt(K),bo=_t(K);function xo(){j.localeError||M(si())}function So(){j.memoizer||M({memoizer:ii()})}var q=k(`ZodType`,(e,t)=>(xo(),P.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(_(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return b(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Ps(e,t))},superRefine(e,t){return this.check(Fs(e,t))},overwrite(e){return this.check(R(e))},optional(){return gs(this)},exactOptional(){return vs(this)},nullable(){return bs(this)},nullish(){return gs(bs(this))},nonoptional(e){return Es(this,e)},array(){return is(this)},or(e){return ss([this,e])},and(e){return ls(this,e)},transform(e){return As(this,ms(e))},default(e){return Ss(this,e)},prefault(e){return ws(this,e)},catch(e){return Os(this,e)},pipe(e){return As(this,e)},readonly(){return Ms(this)},describe(e){let t=this.clone();return L.add(t,{description:e}),t},meta(...e){if(e.length===0)return L.get(this);let t=this.clone();return L.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Ae(this,`~standard`,{...vn(this),jsonSchema:{input:wa(this,`input`),output:wa(this,`output`)}})},set"~standard"(e){E(this,`~standard`,e)},parse:function e(t,n){return co(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await lo(this,t,n,{callee:e})},safeParse(e,t){return uo(this,e,t)},async safeParseAsync(e,t){return fo(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){E(this,`spa`,e)},validate(e,t){return st(this,e,t)},validateAsync(e,t){return lt(this,e,t)},encode:function e(t,n){return po(this,t,n,{callee:e})},decode:function e(t,n){return mo(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await ho(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await go(this,t,n,{callee:e})},safeEncode(e,t){return _o(this,e,t)},safeDecode(e,t){return vo(this,e,t)},async safeEncodeAsync(e,t){return yo(this,e,t)},async safeDecodeAsync(e,t){return bo(this,e,t)},toJSONSchema(e){return Ca(this,{})(e)},get description(){return L.get(this)?.description},get _def(){return this._zod.def}}),Co=k(`_ZodString`,(e,t)=>{yn.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>La(e,t,n,r)},je({format:e=>G(e).format??null,minLength:e=>G(e).minimum??null,maxLength:e=>G(e).maximum??null},{regex(...e){return this.check(Qi(...e))},includes(...e){return this.check(ta(...e))},startsWith(...e){return this.check(na(...e))},endsWith(...e){return this.check(ra(...e))},min(...e){return this.check(Xi(...e))},max(...e){return this.check(Yi(...e))},length(...e){return this.check(Zi(...e))},nonempty(...e){return this.check(Xi(1,...e))},lowercase(e){return this.check($i(e))},uppercase(e){return this.check(ea(e))},trim(){return this.check(aa())},normalize(...e){return this.check(ia(...e))},toLowerCase(){return this.check(oa())},toUpperCase(){return this.check(sa())},slugify(){return this.check(ca())}})),wo=k(`ZodString`,(e,t)=>{yn.init(e,t),Co.init(e,t)},{email(e){return this.check(pi(ko,e))},url(e){return this.check(yi(Mo,e))},jwt(e){return this.check(Pi(qo,e))},emoji(e){return this.check(bi(No,e))},guid(e){return this.check(mi(Ao,e))},uuid(e){return this.check(hi(jo,e))},uuidv4(e){return this.check(gi(jo,e))},uuidv6(e){return this.check(_i(jo,e))},uuidv7(e){return this.check(vi(jo,e))},nanoid(e){return this.check(xi(Po,e))},cuid(e){return this.check(Si(Fo,e))},cuid2(e){return this.check(Ci(Io,e))},ulid(e){return this.check(wi(Lo,e))},base64(e){return this.check(ji(Wo,e))},base64url(e){return this.check(Mi(Go,e))},xid(e){return this.check(Ti(Ro,e))},ksuid(e){return this.check(Ei(zo,e))},ipv4(e){return this.check(Di(Bo,e))},ipv6(e){return this.check(Oi(Vo,e))},cidrv4(e){return this.check(ki(Ho,e))},cidrv6(e){return this.check(Ai(Uo,e))},e164(e){return this.check(Ni(Ko,e))},datetime(e){return this.check(Fi(To,e))},date(e){return this.check(Ii(Eo,e))},time(e){return this.check(Li(Do,e))},duration(e){return this.check(Ri(Oo,e))}});function J(e){return fi(wo,e)}var Y=k(`ZodStringFormat`,(e,t)=>{F.init(e,t),Co.init(e,t)}),To=k(`ZodISODateTime`,(e,t)=>{Rn.init(e,t),Y.init(e,t)}),Eo=k(`ZodISODate`,(e,t)=>{zn.init(e,t),Y.init(e,t)}),Do=k(`ZodISOTime`,(e,t)=>{Bn.init(e,t),Y.init(e,t)}),Oo=k(`ZodISODuration`,(e,t)=>{Vn.init(e,t),Y.init(e,t)}),ko=k(`ZodEmail`,(e,t)=>{Sn.init(e,t),Y.init(e,t)}),Ao=k(`ZodGUID`,(e,t)=>{bn.init(e,t),Y.init(e,t)}),jo=k(`ZodUUID`,(e,t)=>{xn.init(e,t),Y.init(e,t)}),Mo=k(`ZodURL`,(e,t)=>{An.init(e,t),Y.init(e,t)}),No=k(`ZodEmoji`,(e,t)=>{jn.init(e,t),Y.init(e,t)}),Po=k(`ZodNanoID`,(e,t)=>{Mn.init(e,t),Y.init(e,t)}),Fo=k(`ZodCUID`,(e,t)=>{Nn.init(e,t),Y.init(e,t)}),Io=k(`ZodCUID2`,(e,t)=>{Pn.init(e,t),Y.init(e,t)}),Lo=k(`ZodULID`,(e,t)=>{Fn.init(e,t),Y.init(e,t)}),Ro=k(`ZodXID`,(e,t)=>{In.init(e,t),Y.init(e,t)}),zo=k(`ZodKSUID`,(e,t)=>{Ln.init(e,t),Y.init(e,t)}),Bo=k(`ZodIPv4`,(e,t)=>{Hn.init(e,t),Y.init(e,t)}),Vo=k(`ZodIPv6`,(e,t)=>{Gn.init(e,t),Y.init(e,t)}),Ho=k(`ZodCIDRv4`,(e,t)=>{Kn.init(e,t),Y.init(e,t)}),Uo=k(`ZodCIDRv6`,(e,t)=>{Jn.init(e,t),Y.init(e,t)}),Wo=k(`ZodBase64`,(e,t)=>{Zn.init(e,t),Y.init(e,t)}),Go=k(`ZodBase64URL`,(e,t)=>{er.init(e,t),Y.init(e,t)}),Ko=k(`ZodE164`,(e,t)=>{tr.init(e,t),Y.init(e,t)}),qo=k(`ZodJWT`,(e,t)=>{rr.init(e,t),Y.init(e,t)}),Jo=k(`ZodNumber`,(e,t)=>{ir.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ra(e,t,n,r),e.isFinite=!0},je({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=G(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=G(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=G(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>G(e).format??null},{gt(e,t){return this.check(Ki(e,t))},gte(e,t){return this.check(qi(e,t))},min(e,t){return this.check(qi(e,t))},lt(e,t){return this.check(Wi(e,t))},lte(e,t){return this.check(Gi(e,t))},max(e,t){return this.check(Gi(e,t))},int(e){return this.check(Xo(e))},safe(e){return this.check(Xo(e))},positive(e){return this.check(Ki(0,e))},nonnegative(e){return this.check(qi(0,e))},negative(e){return this.check(Wi(0,e))},nonpositive(e){return this.check(Gi(0,e))},multipleOf(e,t){return this.check(Ji(e,t))},step(e,t){return this.check(Ji(e,t))},finite(){return this}}));function X(e){return zi(Jo,e)}var Yo=k(`ZodNumberFormat`,(e,t)=>{ar.init(e,t),Jo.init(e,t)});function Xo(e){return Bi(Yo,e)}var Zo=k(`ZodBoolean`,(e,t)=>{or.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>za(e,t,n,r)});function Qo(e){return Vi(Zo,e)}var $o=k(`ZodUnknown`,(e,t)=>{sr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function es(){return Hi($o)}var ts=k(`ZodNever`,(e,t)=>{cr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ba(e,t,n,r)});function ns(e){return Ui(ts,e)}var rs=k(`ZodArray`,(e,t)=>{So(),fr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ga(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Xi(e,t))},nonempty(e){return this.check(Xi(1,e))},max(e,t){return this.check(Yi(e,t))},length(e,t){return this.check(Zi(e,t))},unwrap(){return this.element}});function is(e,t){return la(rs,e,t)}var as=k(`ZodObject`,(e,t)=>{So(),vr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qa(e,t,n,r),Ie(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return ds(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(_(this._zod.def,{catchall:e}))},passthrough(){return this.clone(_(this._zod.def,{catchall:es()}))},loose(){return this.clone(_(this._zod.def,{catchall:es()}))},strict(){return this.clone(_(this._zod.def,{catchall:ns()}))},strip(){return this.clone(_(this._zod.def,{catchall:void 0}))},extend(e){return he(this,e)},safeExtend(e){return _e(this,e)},merge(e){return ve(this,e)},pick(e){return fe(this,e)},omit(e){return me(this,e)},partial(...e){return ye(hs,this,e[0])},exactPartial(...e){return ye(_s,this,e[0],`exactPartial`)},required(...e){return be(Ts,this,e[0])}});function Z(e,t){return new as({type:`object`,shape:e??{},...x(t)})}var os=k(`ZodUnion`,(e,t)=>{br.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ja(e,t,n,r),e.options=t.options});function ss(e,t){return new os({type:`union`,options:e,...x(t)})}var cs=k(`ZodIntersection`,(e,t)=>{xr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ya(e,t,n,r)});function ls(e,t){return new cs({type:`intersection`,left:e,right:t})}var us=k(`ZodEnum`,(e,t)=>{wr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Va(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new us({...t,checks:[],...x(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new us({...t,checks:[],...x(r),entries:i})}});function ds(e,t){return new us({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...x(t)})}var fs=k(`ZodLiteral`,(e,t)=>{Tr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ha(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Q(e,t){return new fs({type:`literal`,values:Array.isArray(e)?e:[e],...x(t)})}var ps=k(`ZodTransform`,(e,t)=>{So(),Er.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wa(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ue(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(T(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(T(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function ms(e){return new ps({type:`transform`,transform:e})}var hs=k(`ZodOptional`,(e,t)=>{Or.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ao(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function gs(e){return new hs({type:`optional`,innerType:e})}var _s=k(`ZodExactOptional`,(e,t)=>{kr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ao(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function vs(e){return new _s({type:`optional`,innerType:e})}var ys=k(`ZodNullable`,(e,t)=>{Ar.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xa(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bs(e){return new ys({type:`nullable`,innerType:e})}var xs=k(`ZodDefault`,(e,t)=>{jr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ss(e,t){return new xs({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():oe(t)}})}var Cs=k(`ZodPrefault`,(e,t)=>{Nr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>to(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ws(e,t){return new Cs({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():oe(t)}})}var Ts=k(`ZodNonOptional`,(e,t)=>{Pr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Za(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Es(e,t){return new Ts({type:`nonoptional`,innerType:e,...x(t)})}var Ds=k(`ZodCatch`,(e,t)=>{Lr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>no(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Os(e,t){return new Ds({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Re(t)})}var ks=k(`ZodPipe`,(e,t)=>{Rr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ro(e,t,n,r),e.in=t.in,e.out=t.out});function As(e,t){return new ks({type:`pipe`,in:e,out:t})}var js=k(`ZodReadonly`,(e,t)=>{Br.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>io(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ms(e){return new js({type:`readonly`,innerType:e})}var Ns=k(`ZodCustom`,(e,t)=>{Hr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ua(e,t,n,r)});function Ps(e,t={}){return ua(Ns,e,t)}function Fs(e,t){return da(e,t)}var Is={path:`/about-page/v1`,argsSchema:Z({}),resultSchema:Z({primaryMarkdown:J()})},Ls={path:`/departures/v0`,argsSchema:Z({stopId:X(),count:X()}),resultSchema:Z({departures:Z({sourceId:J(),intrasourceId:J(),primaryDestinationText:J(),secondaryDestinationText:J().nullable(),lineIds:X().array().readonly(),color:Z({lightModeHexCode:J(),darkModeHexCode:J()}).nullable(),isCancelled:Qo(),movement:Z({index:X(),positionId:X().nullable(),time:J(),formerTime:J().nullable()})}).array()})};Z({latitude:X(),longitude:X()});var Rs=Z({lightModeHexCode:J(),darkModeHexCode:J()}),zs=Z({id:X(),name:J(),urlPath:J(),canonicalLinesServingStop:X().array().readonly(),location:Z({latitude:X(),longitude:X()}).nullable()}),$=Z({stopId:X(),type:ds([`regular`,`always-express`])}),Bs=ss([Z({type:Q(`linear`),name:J().nullable(),color:Rs.nullable(),stops:$.array().readonly()}),Z({type:Q(`branch`),name:J().nullable(),color:Rs.nullable(),commonStops:$.array().readonly(),branchAStops:$.array().readonly(),branchBStops:$.array().readonly()}),Z({type:Q(`loop`),name:J().nullable(),color:Rs.nullable(),loopLeftStops:$.array().readonly(),loopRightStops:$.array().readonly(),mainStops:$.array().readonly()})]),Vs={linear:!0,branch:!0,loop:!0};function Hs(e){return e in Vs}var Us=Z({entries:ss([Bs,Z({type:J().refine(e=>!Hs(e))})]).array().readonly(),fallbackStopList:X().array().readonly()}),Ws=Z({id:X(),name:J(),urlPath:J(),color:Rs.nullable(),diagram:Us}),Gs=Z({stop:ds([`stop`,`station`]),line:ds([`line`,`route`])}),Ks=Z({primaryMarkdown:J()}),qs=Z({primaryMarkdown:J()}),Js=Z({metadata:Z({hash:J(),serverVersion:J()}),stops:zs.array().readonly(),lines:Ws.array().readonly(),terminology:Gs,landingPage:Ks,footer:qs}),Ys={path:`/foundational-data/v1`,argsSchema:Z({hash:J().nullable()}),resultSchema:ss([Z({result:Q(`outdated`),foundationalData:Js}),Z({result:Q(`up-to-date`)})])},Xs={path:`/service/v0`,argsSchema:Z({sourceId:J(),intrasourceId:J()}),resultSchema:Z({service:Z({sourceId:J(),intrasourceId:J(),primaryDestinationText:J(),lineIds:X().array().readonly(),color:Z({lightModeHexCode:J(),darkModeHexCode:J()}).nullable(),isCancelled:Qo(),movements:Z({stopId:X(),positionId:X().nullable(),arrivalTime:J().nullable(),formerArrivalTime:J().nullable(),departureTime:J().nullable(),formerDepartureTime:J().nullable()}).array().readonly()}).nullable()})},Zs={path:`/version-check/v1`,argsSchema:Z({frontendVersion:J(),corequeryPackageVersion:J()}),resultSchema:Z({isForceUpdateOfServiceWorkerRequired:Qo()})},Qs={path:`/versions/v1`,argsSchema:Z({}),resultSchema:Z({serverVersion:J(),frontendVersion:J(),corequeryPackageVersion:J(),foundationalDataHash:J(),version:J().meta({deprecated:!0})})};function $s(){return{callApi:ec}}async function ec(e,t,n={}){let{timeout:r,debugDelay:i,debugError:a}=n;if(i!=null&&await new Promise(e=>setTimeout(e,i)),a??!1)throw Error(`Simulated API error`);let o=await fetch(`/api${e.path}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t),signal:r==null?void 0:AbortSignal.timeout(r)});if(!o.ok){let t=await o.text();throw Error(`Error ${o.status} calling /api${e.path}: ${t}`)}return e.resultSchema.parse(await o.json())}function tc(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(typeof e!=`object`)return e===t;if(Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!tc(e[n],t[n]))return!1;return!0}let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n)if(!r.includes(i)||!tc(e[i],t[i]))return!1;return!0}Object.freeze({status:`aborted`});function nc(e,n){let r=rc(n);t(e,r)}function rc(t){let n=e(void 0);return tc(t,n.current)||(n.current=t),n.current}function ic(e,t,r={}){let{callApi:i}=$s(),[a,o]=n(null),[s,c]=n(!0),[l,u]=n(null);return nc(()=>{let n=!1;async function a(){try{c(!0),u(null);let a=await i(e,t,r);n||o(a)}catch(e){n||u(e)}finally{n||c(!1)}}return a(),()=>{n=!0}},[e,t,r]),{data:a,loading:s,error:l}}export{Zs as a,Js as c,Is as d,ds as f,Qs as i,Hs as l,Z as m,tc as n,Xs as o,Q as p,$s as r,Ys as s,ic as t,Ls as u};
@@ -0,0 +1 @@
1
+ import{c as e,i as t,l as n,n as r,r as i}from"./use-nav-exemptions-heDPohlO.js";import{d as a}from"./index-CFr0vs6V.js";import{n as o,t as s}from"./SimpleMobileHeaderContent-BIsmnxmF.js";function c(c){return{mobileHeader:n(s,{title:c.title,backHref:c.back?.href??null}),desktopHeader:n(r,{children:n(i,{class:e(`mx-4 py-4 gap-8 border-b border-soft-border`,{"pt-8":c.back==null,"pt-6":c.back!=null}),children:[c.back!=null&&n(a,{text:c.back.text,href:c.back.href,icon:o,class:`self-start`,layout:`narrow-icon`}),n(t,{style:`megatitle`,children:c.title})]})})}}export{c as t};
@@ -15,13 +15,13 @@
15
15
  <link rel="mask-icon" href="/favicon.svg" color="#FFFFFF" />
16
16
  <meta name="theme-color" content="#242933" />
17
17
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
18
- <script type="module" crossorigin src="/assets/index-Ddvtj_a8.js"></script>
19
- <link rel="modulepreload" crossorigin href="/assets/use-nav-exemptions-pWDQIkAs.js">
20
- <link rel="modulepreload" crossorigin href="/assets/use-query-DDd1mja8.js">
21
- <link rel="modulepreload" crossorigin href="/assets/use-foundational-data-CyGObFfu.js">
18
+ <script type="module" crossorigin src="/assets/index-CFr0vs6V.js"></script>
19
+ <link rel="modulepreload" crossorigin href="/assets/use-nav-exemptions-heDPohlO.js">
20
+ <link rel="modulepreload" crossorigin href="/assets/use-query-DqauRKot.js">
21
+ <link rel="modulepreload" crossorigin href="/assets/use-foundational-data-B1dMFR5b.js">
22
22
  <link rel="modulepreload" crossorigin href="/assets/scope-B-e4l8Dr.js">
23
- <link rel="modulepreload" crossorigin href="/assets/LinkText-CiPvp0mL.js">
24
- <link rel="stylesheet" crossorigin href="/assets/index-CpWS5La_.css">
23
+ <link rel="modulepreload" crossorigin href="/assets/LinkText-B2lDAKqQ.js">
24
+ <link rel="stylesheet" crossorigin href="/assets/index-CkBVdPll.css">
25
25
  <link rel="manifest" href="/manifest.webmanifest"></head>
26
26
  <body>
27
27
  <script>
package/web/dist/sw.js CHANGED
@@ -1 +1 @@
1
- if(!self.define){let s,e={};const l=(l,n)=>(l=new URL(l+".js",n).href,e[l]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()}).then(()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s}));self.define=(n,i)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let u={};const o=s=>l(s,r),a={module:{uri:r},exports:u,require:o};e[r]=Promise.all(n.map(s=>a[s]||o(s))).then(s=>(i(...s),u))}}define(["./workbox-2fbc6a65"],function(s){"use strict";self.addEventListener("message",s=>{s.data&&"SKIP_WAITING"===s.data.type&&self.skipWaiting()}),s.precacheAndRoute([{url:"pwa-maskable-512x512.png",revision:"9e859d049e78f70ddb5872a3bce2622b"},{url:"pwa-maskable-192x192.png",revision:"f1e5f837a116221b26c9cb9447db5e92"},{url:"pwa-512x512.png",revision:"e5560dba9f85e2959637abbb546643cd"},{url:"pwa-192x192.png",revision:"8b590313fc6296f57d609982dc21f302"},{url:"mona-sans.woff2",revision:"b96cc834af467cf02885a067356abae7"},{url:"index.html",revision:"939758971eb7467eeeeb31454fd71726"},{url:"favicon.svg",revision:"570c2a249bbd511b386a843cd96545e7"},{url:"apple-touch-icon.png",revision:"d5d6ea39bc40ffd5b045b9593da0c890"},{url:"assets/workbox-window.prod.es5-Bd17z0YL.js",revision:null},{url:"assets/use-simple-headers-vqWwqqRo.js",revision:null},{url:"assets/use-query-DDd1mja8.js",revision:null},{url:"assets/use-nav-exemptions-pWDQIkAs.js",revision:null},{url:"assets/use-foundational-data-CyGObFfu.js",revision:null},{url:"assets/scope-B-e4l8Dr.js",revision:null},{url:"assets/integers-BYp6YHG5.js",revision:null},{url:"assets/index-Ddvtj_a8.js",revision:null},{url:"assets/index-CpWS5La_.css",revision:null},{url:"assets/ZenMode-Dy3GUHqN.js",revision:null},{url:"assets/Strong-BeqxJ43O.js",revision:null},{url:"assets/Stop-1gh0-Vtz.js",revision:null},{url:"assets/Status-Cqm0zGEP.js",revision:null},{url:"assets/Settings-CcOwENSo.js",revision:null},{url:"assets/Service-DwfMOmR2.js",revision:null},{url:"assets/Placeholder-BkXn0vQ2.js",revision:null},{url:"assets/Picker-BUr-habm.js",revision:null},{url:"assets/Page-BMpuMskU.js",revision:null},{url:"assets/NotFoundPage-CkldArMP.js",revision:null},{url:"assets/NotFound-785phBIT.js",revision:null},{url:"assets/Nearby-GgSNwYjV.js",revision:null},{url:"assets/Markdown-D2wC6jdy.js",revision:null},{url:"assets/LinkText-CiPvp0mL.js",revision:null},{url:"assets/Line-BAgtALS7.js",revision:null},{url:"assets/Home-BWy3tAlX.js",revision:null},{url:"assets/Divider-DxcVAB__.js",revision:null},{url:"assets/Debug-C3aem-Y_.js",revision:null},{url:"assets/Alert-DJxpAxGW.js",revision:null},{url:"assets/AdminControls-CkepqAqA.js",revision:null},{url:"assets/About-DxAX4fbq.js",revision:null},{url:"pwa-192x192.png",revision:"8b590313fc6296f57d609982dc21f302"},{url:"pwa-512x512.png",revision:"e5560dba9f85e2959637abbb546643cd"},{url:"pwa-maskable-192x192.png",revision:"f1e5f837a116221b26c9cb9447db5e92"},{url:"pwa-maskable-512x512.png",revision:"9e859d049e78f70ddb5872a3bce2622b"},{url:"manifest.webmanifest",revision:"a39f5f893f233a6eed74e0ab828a668b"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html"),{denylist:[/^\/reset\/?$/]}))});
1
+ if(!self.define){let s,e={};const l=(l,n)=>(l=new URL(l+".js",n).href,e[l]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()}).then(()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s}));self.define=(n,i)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let u={};const o=s=>l(s,r),a={module:{uri:r},exports:u,require:o};e[r]=Promise.all(n.map(s=>a[s]||o(s))).then(s=>(i(...s),u))}}define(["./workbox-2fbc6a65"],function(s){"use strict";self.addEventListener("message",s=>{s.data&&"SKIP_WAITING"===s.data.type&&self.skipWaiting()}),s.precacheAndRoute([{url:"pwa-maskable-512x512.png",revision:"9e859d049e78f70ddb5872a3bce2622b"},{url:"pwa-maskable-192x192.png",revision:"f1e5f837a116221b26c9cb9447db5e92"},{url:"pwa-512x512.png",revision:"e5560dba9f85e2959637abbb546643cd"},{url:"pwa-192x192.png",revision:"8b590313fc6296f57d609982dc21f302"},{url:"mona-sans.woff2",revision:"b96cc834af467cf02885a067356abae7"},{url:"index.html",revision:"dc570b3b6aeca30c539fa7ec16c9fe0c"},{url:"favicon.svg",revision:"570c2a249bbd511b386a843cd96545e7"},{url:"apple-touch-icon.png",revision:"d5d6ea39bc40ffd5b045b9593da0c890"},{url:"assets/workbox-window.prod.es5-Bd17z0YL.js",revision:null},{url:"assets/use-simple-headers-BieJS-MQ.js",revision:null},{url:"assets/use-query-DqauRKot.js",revision:null},{url:"assets/use-nav-exemptions-heDPohlO.js",revision:null},{url:"assets/use-foundational-data-B1dMFR5b.js",revision:null},{url:"assets/scope-B-e4l8Dr.js",revision:null},{url:"assets/integers-BYp6YHG5.js",revision:null},{url:"assets/index-CkBVdPll.css",revision:null},{url:"assets/index-CFr0vs6V.js",revision:null},{url:"assets/ZenMode-DiWtZ1Bm.js",revision:null},{url:"assets/Strong-B18AJ3bX.js",revision:null},{url:"assets/Stop-Bhq8H4Gk.js",revision:null},{url:"assets/Status-BWixFyaY.js",revision:null},{url:"assets/SimpleMobileHeaderContent-BIsmnxmF.js",revision:null},{url:"assets/Settings-ClxXcJJI.js",revision:null},{url:"assets/Service-D5vk-g4j.js",revision:null},{url:"assets/Placeholder-gNgvcbQj.js",revision:null},{url:"assets/Picker-DpF2CqeX.js",revision:null},{url:"assets/Page-BPz42hYH.js",revision:null},{url:"assets/NotFoundPage-u9CGSY_D.js",revision:null},{url:"assets/NotFound-DvbgBgvr.js",revision:null},{url:"assets/Nearby-Dd2sTCZO.js",revision:null},{url:"assets/Markdown-Dfd_0fuA.js",revision:null},{url:"assets/LinkText-B2lDAKqQ.js",revision:null},{url:"assets/Line-DAfosot6.js",revision:null},{url:"assets/Home-3Bg1eckc.js",revision:null},{url:"assets/Divider-CxLq6fQR.js",revision:null},{url:"assets/Debug-Dqf6Ewqg.js",revision:null},{url:"assets/Alert-DHEq-b4e.js",revision:null},{url:"assets/AdminControls-BKn69L_C.js",revision:null},{url:"assets/About-D1SmOe8C.js",revision:null},{url:"pwa-192x192.png",revision:"8b590313fc6296f57d609982dc21f302"},{url:"pwa-512x512.png",revision:"e5560dba9f85e2959637abbb546643cd"},{url:"pwa-maskable-192x192.png",revision:"f1e5f837a116221b26c9cb9447db5e92"},{url:"pwa-maskable-512x512.png",revision:"9e859d049e78f70ddb5872a3bce2622b"},{url:"manifest.webmanifest",revision:"a39f5f893f233a6eed74e0ab828a668b"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html"),{denylist:[/^\/reset\/?$/]}))});
@@ -1 +0,0 @@
1
- import{c as e,i as t,r as n}from"./use-nav-exemptions-pWDQIkAs.js";import{d as r,t as i}from"./use-query-DDd1mja8.js";import{n as a}from"./use-foundational-data-CyGObFfu.js";import{v as o}from"./index-Ddvtj_a8.js";import{t as s}from"./Placeholder-BkXn0vQ2.js";import{n as c,t as l}from"./Markdown-D2wC6jdy.js";import{t as u}from"./Page-BMpuMskU.js";import{t as d}from"./use-simple-headers-vqWwqqRo.js";import{t as f}from"./Divider-DxcVAB__.js";import{t as p}from"./Alert-DJxpAxGW.js";function m(){let{appName:m}=o(),{foda:h}=a(),{data:g,loading:_,error:v}=i(r,{}),y=d({title:`About ${m}`});return _?e(u,{...y,children:e(n,{class:`px-4 py-8`,children:[e(s,{class:`w-[30%] text-xl`}),e(`div`,{class:`h-8`}),e(s,{class:`w-full text-md`}),e(`div`,{class:`h-3`}),e(s,{class:`w-full text-md`}),e(`div`,{class:`h-3`}),e(s,{class:`w-[60%] text-md`}),e(`div`,{class:`h-12`}),e(s,{class:`w-[40%] text-lg`}),e(`div`,{class:`h-8`}),e(s,{class:`w-full text-md`}),e(`div`,{class:`h-3`}),e(s,{class:`w-full text-md`}),e(`div`,{class:`h-3`}),e(s,{class:`w-[20%] text-md`}),e(`div`,{class:`h-12`}),e(s,{class:`w-[50%] text-lg`}),e(`div`,{class:`h-8`}),e(s,{class:`w-full text-md`}),e(`div`,{class:`h-3`}),e(s,{class:`w-[80%] text-md`})]})}):v!=null||g==null?e(u,{...y,children:e(n,{class:`px-4 py-8`,children:e(p,{type:`error`,children:e(t,{children:`Unable to load the about page.`})})})}):e(u,{...y,children:e(n,{class:`px-4 py-8 gap-12`,children:[e(l,{markdown:g.primaryMarkdown}),e(n,{class:`gap-8`,children:[e(f,{}),e(t,{as:`p`,style:`small-weak`,children:e(c,{markdown:h.footerPrimaryMarkdown})})]})]})})}export{m as default};
@@ -1 +0,0 @@
1
- import{c as e,i as t,r as n}from"./use-nav-exemptions-pWDQIkAs.js";import{t as r}from"./Page-BMpuMskU.js";import{t as i}from"./use-simple-headers-vqWwqqRo.js";function a(){return e(r,{...i({title:`Admin controls`}),children:e(n,{class:`px-4 py-8 gap-8`,children:e(t,{children:`Maybe the real admin controls were the friends we made along the way?`})})})}export{a as default};
@@ -1 +0,0 @@
1
- import{a as e,c as t,i as n,o as r,r as i,s as a,x as o,y as s}from"./use-nav-exemptions-pWDQIkAs.js";import{i as c,t as l}from"./use-query-DDd1mja8.js";import{n as u}from"./use-foundational-data-CyGObFfu.js";import{a as d,d as f,g as p,h as m,n as h,p as g,t as _,v}from"./index-Ddvtj_a8.js";import{t as y}from"./Placeholder-BkXn0vQ2.js";import{t as b}from"./Page-BMpuMskU.js";import{t as x}from"./use-simple-headers-vqWwqqRo.js";import{t as S}from"./Divider-DxcVAB__.js";import{t as C}from"./Alert-DJxpAxGW.js";var w=o(null);function T(){let e=s(w);if(e==null)throw Error(`Foundational data unavailable outside provider.`);return e}function E(e){let i={info:`bg-soft-accent`,error:`bg-soft-error`,warning:`bg-soft-warning`,success:`bg-soft-success`}[e.type],o={info:`[--color-fg:var(--color-accent-text)]`,error:`[--color-fg:var(--color-error-text)]`,warning:`[--color-fg:var(--color-warning-text)]`,success:`[--color-fg:var(--color-success-text)]`}[e.type];return t(r,{class:a(e.class,i,o,`px-2 py-1.5 rounded-full`),children:t(n,{style:`small`,children:e.text})})}function D(r){return t(g,{class:a(r.class,`gap-x-2 gap-y-3`),wrap:!0,children:[t(n,{style:`strong`,children:r.header}),r.loading&&t(y,{class:`w-[20%] text-md`}),!r.loading&&r.pillContent!=null&&t(h,{heightRem:e(`text-md`),children:t(E,{type:r.pillContent.type,text:r.pillContent.text})})]})}function O(e){return t(D,{class:e.class,header:e.header,pillContent:k(e.currentValue,e.latestValue),loading:e.loading})}function k(e,t){return t==null?null:{text:e===t?`Up to date`:`Outdated`,type:e===t?`success`:`error`}}function A(e){return e.loading?t(r,{class:e.class,children:t(y,{class:`w-[40%] text-md`})}):e.value==null?null:t(n,{class:e.class,children:[e.prefix,`: `,e.value]})}function j(e){return e==null?null:e.length<32||!/^[0-9a-f]+$/.test(e)?e:e.slice(0,7)}function M(r){let{isUpdateAvailable:i,update:o}=d();return i?t(f,{theme:`accent`,text:`Refresh & update`,class:`self-start`,icon:m,onClick:()=>void o()}):t(g,{class:a(r.class,`gap-2`),children:[t(h,{heightRem:e(`text-md`),children:t(p,{})}),t(n,{class:`min-w-0 shrink`,children:`Waiting for service worker to install update...`})]})}function N(e){let{isHotReloadingEnabled:n}=_();return t(n?P:F,{...e})}function P(e){let{data:r,loading:o}=T();return t(i,{class:a(e.class,`gap-6`),children:[t(D,{header:`App version`,pillContent:{text:`Development`,type:`info`},loading:!1}),t(n,{children:`All frontend code is being served with hot-reloading enabled, not through the PWA. (The below values are meaningless.)`}),t(I,{}),t(A,{prefix:`Latest version`,value:r?.frontendVersion.slice(0,8)??null,loading:o})]})}function F(e){let{frontendVersion:n}=v(),{data:r,loading:o}=T(),s=!o&&r!=null&&r?.frontendVersion!==n;return t(i,{class:a(e.class,`gap-8`),children:t(i,{class:`gap-6`,children:[t(O,{header:`App version`,currentValue:n,latestValue:r?.frontendVersion??null,loading:o}),t(I,{}),t(A,{prefix:`Latest version`,value:j(r?.frontendVersion),loading:o}),s&&t(M,{})]})})}function I(){let{frontendVersion:e,versionsOnLastUpdate:r}=v();return t(i,{class:`gap-4`,children:[t(n,{children:[`Current version: `,j(e)]}),t(i,{class:`gap-3`,children:[t(n,{style:`small-weak`,children:[`Server version: `,j(r.serverVersion)]}),t(n,{style:`small-weak`,children:[`CoreQuery version: `,r.corequeryPackageVersion]})]})]})}function L(e){let n=l(c,{});return t(w.Provider,{value:n,children:e.children})}function R(e){let{data:r,loading:o}=T(),{foda:s}=u();return t(i,{class:a(e.class,`gap-6`),children:[t(O,{header:`Foundational data`,currentValue:s.hash,latestValue:r?.foundationalDataHash??null,loading:o}),t(i,{class:`gap-4`,children:[t(n,{children:[`Current version: `,j(s.hash)]}),t(n,{style:`small-weak`,children:[`Server version: `,j(s.serverVersion)]})]}),t(A,{prefix:`Latest version`,value:j(r?.foundationalDataHash),loading:o})]})}function z(e){let{data:r,loading:o}=T();return t(i,{class:a(e.class,`gap-8`),children:t(i,{class:`gap-6`,children:[t(n,{style:`strong`,children:`Server`}),t(B,{}),t(i,{class:`gap-4`,children:[t(A,{prefix:`Server version`,value:j(r?.serverVersion),loading:o}),t(A,{prefix:`CoreQuery version`,value:r?.corequeryPackageVersion??null,loading:o})]})]})})}function B(){let{error:e}=T();return e==null?null:t(C,{type:`error`,children:t(n,{children:`Unable to fetch the latest version info from the server.`})})}function V(){return t(b,{...x({title:`Developer info`}),children:t(L,{children:t(i,{class:`px-4 py-8 gap-8`,children:[t(H,{}),t(N,{}),t(S,{}),t(R,{}),t(S,{}),t(z,{}),t(S,{})]})})})}function H(){let{error:e}=T();return e==null?null:t(C,{type:`error`,children:t(n,{children:`Unable to fetch the latest version info from the server.`})})}export{V as default};
@@ -1 +0,0 @@
1
- import{c as e,s as t}from"./use-nav-exemptions-pWDQIkAs.js";function n(n){return e(`div`,{class:t(n.class,`border-b border-soft-border`)})}export{n as t};
@@ -1 +0,0 @@
1
- import{c as e,r as t}from"./use-nav-exemptions-pWDQIkAs.js";import{n}from"./use-foundational-data-CyGObFfu.js";import{t as r}from"./Markdown-D2wC6jdy.js";import{t as i}from"./Page-BMpuMskU.js";import{t as a}from"./use-simple-headers-vqWwqqRo.js";function o(){let{foda:o}=n();return e(i,{...a({title:`Home`}),children:e(t,{class:`px-4 py-8 gap-12`,children:e(r,{markdown:o.landingPage.primaryMarkdown})})})}export{o as default};
@@ -1 +0,0 @@
1
- import{_ as e,c as t,g as n,h as r,i,m as a,o,p as s,r as c,s as l,v as u}from"./use-nav-exemptions-pWDQIkAs.js";import{l as d}from"./use-query-DDd1mja8.js";import{n as f}from"./use-foundational-data-CyGObFfu.js";import{t as p}from"./scope-B-e4l8Dr.js";import{n as m}from"./integers-BYp6YHG5.js";import{t as h}from"./LinkText-CiPvp0mL.js";import{i as ee,u as g,v as _}from"./index-Ddvtj_a8.js";import{t as v}from"./Page-BMpuMskU.js";import{t as y}from"./use-simple-headers-vqWwqqRo.js";import{n as te,t as b}from"./Alert-DJxpAxGW.js";import{t as x}from"./NotFoundPage-CkldArMP.js";import{t as S}from"./Picker-BUr-habm.js";function C(e){throw Error(`Unexpected value: ${String(e)}`)}function w(e){let{foda:r}=f(),{appName:a}=_(),o=n(()=>e.fallbackStopList.map(e=>r.stops.require(e)).sort((e,t)=>e.name.localeCompare(t.name)),[r.stops,e.fallbackStopList]);return t(c,{class:l(e.class,`gap-6`),children:[t(i,{style:`subtitle`,children:`Stops`}),t(b,{type:`info`,children:t(c,{class:`gap-6`,children:[t(i,{children:[`A neat little diagram is also available for this line, but it's of a new type, and so requires a newer version of `,a,` to be able to view.`,` `]}),t(i,{style:`strong`,children:t(h,{href:`/debug`,children:`Help me update`})})]})}),t(`ul`,{class:`flex-col flex list-disc list-inside gap-4`,children:o.map(e=>t(i,{children:t(`li`,{children:t(h,{href:`/stop/${e.urlPath}`,children:e.name})})}))})]})}var T=class{_canvasContainer;_canvas;ctx;_resizeListener;_resizeObserver;_data;_width;_height;_dpiRatio;_dirty;_running;constructor(e,t){this._canvasContainer=e,this._canvas=t;let n=this._canvas.getContext(`2d`);if(n==null)throw Error(`Failed to get 2D rendering context.`);this.ctx=n,this._resizeListener=this._onResize.bind(this),this._resizeObserver=new ResizeObserver(this._resizeListener),this._data=null,this._width=1,this._height=1,this._dpiRatio=1,this._dirty=!0,this._running=!1}get data(){if(this._data==null)throw Error(`Data not set.`);return this._data}get width(){return this._width}get height(){return this._height}setData(e){this._data=e,this.onDataUpdated(),this._dirty=!0,this._running||this._start()}_start(){this._fitCanvas(),this._running=!0,this._render(),window.addEventListener(`resize`,this._resizeListener),this._resizeObserver.observe(this._canvasContainer),this.onStart()}destroy(){this._running=!1,window.removeEventListener(`resize`,this._resizeListener),this._resizeObserver.unobserve(this._canvasContainer),this.onDestroy()}_render(){this._running&&(requestAnimationFrame(()=>{this._render()}),this._dirty&&(this._dirty=!1,this.ctx.save(),this.ctx.clearRect(0,0,this._width*this._dpiRatio,this._height*this._dpiRatio),this.ctx.scale(this._dpiRatio,this._dpiRatio),this.onRender(),this.ctx.restore()))}onStart(){}onDestroy(){}onDataUpdated(){}_onResize(){this._fitCanvas()}_fitCanvas(){let e=this._canvasContainer.getBoundingClientRect();this._width=e.width,this._height=e.height;let t=window.devicePixelRatio??1,n=this.ctx.backingStorePixelRatio??1;this._dpiRatio=t/n,this._canvas.style.width=`${this._width}px`,this._canvas.style.height=`${this._height}px`,this._canvas.width=this._width*this._dpiRatio,this._canvas.height=this._height*this._dpiRatio,this._dirty=!0}markDirty(){this._dirty=!0}};function E(n){let{data:i,createController:o}=n,s=r(null),c=r(null),[u,d]=e(null),f=n.interceptTouches??!1?{touchAction:`none`}:void 0;return a(()=>{if(s.current==null||c.current==null)return;let e=o(s.current,c.current);return d(e),()=>{e?.destroy()}},[o]),a(()=>{u?.setData(i)},[u,i]),t(`div`,{ref:s,className:l(n.class,`relative overflow-hidden`),children:t(`canvas`,{className:`absolute top-0 left-0`,ref:c,style:f})})}function D(){let e=window.getComputedStyle(document.body);return{bg:e.getPropertyValue(`--color-bg`),fg:e.getPropertyValue(`--color-fg`),"fg-strong":e.getPropertyValue(`--color-fg-strong`),"fg-weak":e.getPropertyValue(`--color-fg-weak`)}}var ne=6,O=6,k=1,A=class extends T{_css;_prefersDark;constructor(e,t){super(e,t),this._css=D(),this._prefersDark=window.matchMedia(`(prefers-color-scheme: dark)`).matches}onRender(){this.ctx.strokeStyle=`#000000`,this._onRenderStructure(),this.ctx.globalCompositeOperation=`source-in`,this.ctx.fillStyle=this._getDiagramColor(),this.ctx.fillRect(0,0,this.width,this.height)}_renderSection({stops:e,x:t,yLevels:n,terminatesAtTop:r,terminatesAtBottom:i,notchSide:a}){if(e.length<1)throw Error(`Expecting at least one stop.`);if(e.length!==n.length)throw Error(`Bad length.`);let o=p(n[0]),s=p(n[n.length-1]);this._drawLine(e=>{e.moveTo(t,o-k),e.lineTo(t,s+k)}),e.forEach((o,s)=>{let c=p(n[s]),l=s===0&&r||s===e.length-1&&i;(o.drawMark??!0)&&this._drawMark(t,c,l,a)})}_drawLine(e){this.ctx.lineWidth=O,this.ctx.beginPath(),e(this.ctx),this.ctx.stroke()}_drawMark(e,t,n,r){let i={left:-1,right:1}[r];this.ctx.lineWidth=ne,this.ctx.beginPath(),this.ctx.moveTo(n?e-8*i:e,t),this.ctx.lineTo(e+8*i,t),this.ctx.stroke()}_extractYLevels(e,t){let n=this._extractChildElements(t);if(e.length!==n.length)throw Error(`Bad length.`);return e.map((e,t)=>{let r=p(n[t]);return e.getOverriddenMarkYPosition==null?this._getDefaultMarkYPosition(r):e.getOverriddenMarkYPosition(r)})}_extractChildElements(e){let t=this._canvasContainer.parentElement?.querySelector(`.${e}`);if(t==null)throw Error(`Couldn't find "${e}".`);return Array.from(t.childNodes.values()).filter(e=>e instanceof HTMLElement)}_getDefaultMarkYPosition(e){let t=this._canvasContainer.getBoundingClientRect(),n=e.getBoundingClientRect();return n.top-t.top+n.height/2}_getDiagramColor(){let e={dark:`darkThemeColorHexCode`,light:`lightThemeColorHexCode`,auto:this._prefersDark?`darkThemeColorHexCode`:`lightThemeColorHexCode`}[this.data.colorTheme];return this.data[e]??this._css.fg}},j=class extends A{_onRenderStructure(){let e=this.data.structure;this._renderSection({stops:e.stops,x:this.width/2,yLevels:this._extractYLevels(e.stops,N),terminatesAtTop:!0,terminatesAtBottom:!0,notchSide:`right`})}};function M(e){return t(c,{class:l(e.class,`gap-2`),xAlign:`center`,children:[t(te,{class:`text-icon-xl text-fg`}),t(i,{align:`center`,children:`An error occurred rendering this diagram.`})]})}var N=`_diagram-stops`;function re(e){let{settings:r}=g(),i=n(()=>({structure:e.structure,lightThemeColorHexCode:e.lightThemeColorHexCode,darkThemeColorHexCode:e.darkThemeColorHexCode,colorTheme:r.theme}),[e.darkThemeColorHexCode,e.lightThemeColorHexCode,e.structure,r.theme]),a=u((e,t)=>new j(e,t),[]);return i.structure.stops.length<2?t(M,{}):t(o,{class:l(e.class,`grid-cols-[auto_1fr] gap-4`),children:[t(E,{class:`w-4`,createController:a,data:i}),t(c,{class:l(`gap-6`,N),children:e.structure.stops.map(e=>t(o,{children:e.content}))})]})}function P(e,n){return n.map(n=>{let r=e.stops.require(n.stopId),a=`/stop/${r.urlPath}`;if(n.type===`regular`)return{content:t(i,{style:`strong`,children:t(h,{href:a,style:`subtle`,children:r.name})})};if(n.type===`always-express`)return{content:t(i,{style:`small-weak`,children:t(h,{href:a,style:`subtle`,children:[`Skips `,r.name]})}),drawMark:!1};C(n.type)})}function F(e){let{foda:r}=f(),i=n(()=>({type:`linear`,stops:P(r,e.diagram.stops)}),[r,e.diagram.stops]);return t(re,{class:e.class,structure:i,lightThemeColorHexCode:e.diagram.color?.lightModeHexCode??null,darkThemeColorHexCode:e.diagram.color?.darkModeHexCode??null})}var I=10,L=15,R=class extends A{_onRenderStructure(){let{commonStops:e,branchAStops:t,branchBStops:n}=this.data.structure,{x:r,y:i}=this._measure();this._renderSection({stops:e,x:r.common,yLevels:i.common.all,terminatesAtTop:!0,terminatesAtBottom:!1,notchSide:`right`}),this._renderSection({stops:t,x:r.branchA,yLevels:i.branchA.all,terminatesAtTop:!1,terminatesAtBottom:!0,notchSide:`left`}),this._renderSection({stops:n,x:r.branchB,yLevels:i.branchB.all,terminatesAtTop:!1,terminatesAtBottom:!0,notchSide:`right`}),this._drawLine(e=>{e.moveTo(r.common,i.common.bottom),e.lineTo(r.common,i.common.bottom+I),e.bezierCurveTo(r.common,i.common.bottom+L+I,r.branchA,i.branches.top-L,r.branchA,i.branches.top),e.lineTo(r.branchA,i.branchA.top),e.moveTo(r.common,i.common.bottom+I),e.bezierCurveTo(r.common,i.common.bottom+L+I,r.branchB,i.branches.top-L,r.branchB,i.branches.top),e.lineTo(r.branchB,i.branchA.top)})}_measure(){let{commonStops:e,branchAStops:t,branchBStops:n}=this.data.structure,r=this._extractYLevels(e,z),i=p(r[0]),a=p(r[r.length-1]),o=this._extractYLevels(t,B),s=p(o[0]),c=p(o[o.length-1]),l=this._extractYLevels(n,V),u=p(l[0]),d=p(l[l.length-1]);return{x:{common:this.width/2,branchA:8,branchB:this.width-8},y:{common:{all:r,top:i,bottom:a},branchA:{all:o,top:s,bottom:c},branchB:{all:l,top:u,bottom:d},branches:{top:Math.min(s,u),bottom:Math.max(c,d)}}}}},z=`_diagram-common-stops`,B=`_diagram-branch-a-stops`,V=`_diagram-branch-b-stops`;function H(e){let{settings:r}=g(),i=n(()=>({structure:e.structure,lightThemeColorHexCode:e.lightThemeColorHexCode,darkThemeColorHexCode:e.darkThemeColorHexCode,colorTheme:r.theme}),[e.darkThemeColorHexCode,e.lightThemeColorHexCode,e.structure,r.theme]),a=u((e,t)=>new R(e,t),[]);return i.structure.commonStops.length<1||i.structure.branchAStops.length<1||i.structure.branchBStops.length<1?t(M,{}):t(o,{class:l(e.class,`grid-cols-[auto_auto_auto] grid-rows-[auto_auto] gap-y-8 gap-x-4`),children:[t(E,{class:`w-12 col-2 row-span-full`,createController:a,data:i}),t(c,{class:l(`gap-6 col-3 row-1 -ml-4`,z),xAlign:`left`,children:e.structure.commonStops.map(e=>t(o,{children:e.content}))}),t(c,{class:l(`gap-6 col-1 row-2`,B),xAlign:`right`,children:e.structure.branchAStops.map(e=>t(o,{children:e.content}))}),t(c,{class:l(`gap-6 col-3 row-2`,V),xAlign:`left`,children:e.structure.branchBStops.map(e=>t(o,{children:e.content}))})]})}function U(e){let{foda:r}=f(),i=n(()=>({type:`branch`,commonStops:P(r,e.diagram.commonStops),branchAStops:P(r,e.diagram.branchAStops),branchBStops:P(r,e.diagram.branchBStops)}),[r,e.diagram]);return t(H,{class:e.class,structure:i,lightThemeColorHexCode:e.diagram.color?.lightModeHexCode??null,darkThemeColorHexCode:e.diagram.color?.darkModeHexCode??null})}var W=10,G=15,K=24,q=1,J=class extends A{_onRenderStructure(){let{loopLeftStops:e,loopRightStops:t,mainStops:n}=this.data.structure,{x:r,y:i}=this._measure();if(e.length>0?this._renderSection({stops:e,x:r.loopLeft,yLevels:i.loopLeft.all,terminatesAtTop:!1,terminatesAtBottom:!1,notchSide:`left`}):this._drawLine(e=>{e.moveTo(r.loopLeft,i.loopLeft.top-q),e.lineTo(r.loopLeft,i.loopLeft.bottom+q)}),t.length>0?this._renderSection({stops:t,x:r.loopRight,yLevels:i.loopRight.all,terminatesAtTop:!1,terminatesAtBottom:!1,notchSide:`right`}):this._drawLine(e=>{e.moveTo(r.loopRight,i.loopRight.top-q),e.lineTo(r.loopRight,i.loopRight.bottom+q)}),n.length>0){let e=p(i.main.top);this._renderSection({stops:n,x:r.main,yLevels:i.main.all,terminatesAtTop:!1,terminatesAtBottom:!0,notchSide:`right`}),this._drawLine(t=>{t.moveTo(r.main,e),t.lineTo(r.main,e-W),t.bezierCurveTo(r.main,e-G-W,r.loopLeft,i.loop.bottom+G,r.loopLeft,i.loop.bottom),t.lineTo(r.loopLeft,i.loopLeft.bottom),t.moveTo(r.main,e-W),t.bezierCurveTo(r.main,e-G-W,r.loopRight,i.loop.bottom+G,r.loopRight,i.loop.bottom),t.lineTo(r.loopRight,i.loopRight.bottom)}),this.ctx.stroke()}else this._drawLine(e=>{e.moveTo(r.loopLeft,i.loopLeft.bottom),e.lineTo(r.loopLeft,i.loop.bottom),e.bezierCurveTo(r.loopLeft,i.loop.bottom+K,r.loopRight,i.loop.bottom+K,r.loopRight,i.loop.bottom),e.lineTo(r.loopRight,i.loopRight.bottom)});this._drawLine(e=>{e.moveTo(r.loopLeft,i.loopLeft.top),e.lineTo(r.loopLeft,i.loop.top),e.bezierCurveTo(r.loopLeft,i.loop.top-K,r.loopRight,i.loop.top-K,r.loopRight,i.loop.top),e.lineTo(r.loopRight,i.loopRight.top)})}_measure(){let{loopLeftStops:e,loopRightStops:t,mainStops:n}=this.data.structure,r=this._extractYLevels(e,X),i=this._extractYLevels(t,Z),a=this._extractYLevels(n,Y),o=r[0],s=i[0],c=r[r.length-1],l=i[i.length-1],u=p(o??s),d=p(s??o),f=p(c??l),m=p(l??c);return{x:{loopLeft:8,loopRight:this.width-8,main:this.width/2},y:{loopLeft:{all:r,top:u,bottom:f},loopRight:{all:i,top:d,bottom:m},main:{all:a,top:a[0]??null,bottom:a[a.length-1]??null},loop:{top:Math.min(u,d),bottom:Math.max(f,m)}}}}},Y=`_diagram-main-stops`,X=`_diagram-loop-left-stops`,Z=`_diagram-loop-right-stops`;function Q(e){let{settings:r}=g(),i=n(()=>({structure:e.structure,lightThemeColorHexCode:e.lightThemeColorHexCode,darkThemeColorHexCode:e.darkThemeColorHexCode,colorTheme:r.theme}),[e.darkThemeColorHexCode,e.lightThemeColorHexCode,e.structure,r.theme]),a=u((e,t)=>new J(e,t),[]),{loopLeftStops:s,loopRightStops:d}=i.structure;return s.length+d.length<1?t(M,{}):t(o,{class:l(e.class,`grid-cols-[auto_auto_auto] grid-rows-[auto_auto] gap-x-4`),children:[t(E,{class:`w-12 col-2 row-span-full`,createController:a,data:i}),t(c,{class:l(`gap-6 col-1 row-1 py-4`,X),xAlign:`right`,yAlign:`center`,children:e.structure.loopLeftStops.map(e=>t(o,{children:e.content}))}),t(c,{class:l(`gap-6 col-3 row-1 py-4`,Z),xAlign:`left`,yAlign:`center`,children:e.structure.loopRightStops.map(e=>t(o,{children:e.content}))}),t(c,{class:l(`gap-6 col-3 row-2 -ml-4`,Y,{"pt-4":e.structure.mainStops.length>0}),xAlign:`left`,children:e.structure.mainStops.map(e=>t(o,{children:e.content}))})]})}function ie(e){let{foda:r}=f(),i=n(()=>({type:`loop`,loopLeftStops:P(r,e.diagram.loopLeftStops),loopRightStops:P(r,e.diagram.loopRightStops),mainStops:P(r,e.diagram.mainStops)}),[r,e.diagram]);return t(Q,{class:e.class,structure:i,lightThemeColorHexCode:e.diagram.color?.lightModeHexCode??null,darkThemeColorHexCode:e.diagram.color?.darkModeHexCode??null})}function $(e){return t(o,{class:l(e.class,`bg-bg-raised px-4 py-8 justify-center rounded-sm border border-soft-border`),children:t(ae,{diagram:e.diagram})})}function ae(e){if(e.diagram.type===`linear`)return t(F,{diagram:e.diagram});if(e.diagram.type===`branch`)return t(U,{diagram:e.diagram});if(e.diagram.type===`loop`)return t(ie,{diagram:e.diagram});C(e.diagram)}function oe(e){let n=e.diagram.entries.filter(e=>d(e.type));return n.length<e.diagram.entries.length?t(w,{fallbackStopList:e.diagram.fallbackStopList}):t(c,{class:l(e.class,`gap-6`),children:[t(i,{style:`subtitle`,children:`Diagram`}),n.length===1?t($,{diagram:p(n[0])}):t(se,{entries:n},n.length)]})}function se(r){let[i,a]=e(0),o=n(()=>r.entries.map((e,t)=>({value:t.toFixed(),label:e.name??`Route ${t+1}`})),[r.entries]);return t(c,{class:`gap-4`,children:[t(S,{class:`self-start`,value:i.toFixed(),options:o,onChange:e=>{a(m(e))}}),t($,{diagram:p(r.entries[i])})]})}function ce(){let{params:{id:e}}=s(),{foda:r}=f(),i=n(()=>r.lines.getByUrlPath(e??``),[r.lines,e]);return i==null?t(x,{afterConfirming:`foundational-data-version`}):t(le,{line:i},i.id)}function le(e){let{formatLine:n}=ee();return t(v,{...y({title:n(e.line.name)}),children:t(c,{class:`px-4 py-8 gap-8`,children:e.line.diagram.entries.length>0&&t(oe,{diagram:e.line.diagram})})})}export{ce as default};
@@ -1 +0,0 @@
1
- import{c as e,s as t}from"./use-nav-exemptions-pWDQIkAs.js";var n={default:`text-accent-text underline`,subtle:`hover:underline`,"strong-subtle":`font-bold text-fg-strong hover:underline`};function r(r){let i=n[r.style??`default`],a=t(i,`inline`,r.class),o=r.colorOverride==null?void 0:{color:`light-dark(${r.colorOverride.lightModeHexCode}, ${r.colorOverride.darkModeHexCode})`};return r.onClick==null?r.href==null?e(`span`,{class:a,style:o,children:r.children}):e(`a`,{class:a,style:o,href:r.href,children:r.children}):e(`span`,{class:a,style:o,onClick:r.onClick,children:r.children})}export{r as t};
@@ -1,2 +0,0 @@
1
- import{S as e,c as t,g as n,i as r,r as i,s as a}from"./use-nav-exemptions-pWDQIkAs.js";import{t as o}from"./LinkText-CiPvp0mL.js";import{t as s}from"./Strong-BeqxJ43O.js";var c=/\[([^[\]]+)\]\(([^()]+)\)/,l=/\*\*(.+?)\*\*/,u=/\*([^*]+)\*/,d=/_([^_]+)_/;function f(n,r){let i=[],a=n;for(;a.length>0;){let n=p(a);if(n==null){i.push(a);break}n.index>0&&i.push(a.slice(0,n.index));let o=f(n.innerContent,r);i.push(n.wrap(t(e,{children:o}),r)),a=a.slice(n.index+n.fullMatch.length)}return i}function p(e){let t=[m(e),h(e),g(e,u),g(e,d)],n=null;for(let e of t)e!=null&&(n==null||e.index<n.index)&&(n=e);return n}function m(e){let t=e.match(c);if(t==null||t.index==null||t[1]==null||t[2]==null)return null;let n=t[2];return!n.startsWith(`https://`)&&!n.startsWith(`/`)?null:{index:t.index,fullMatch:t[0],innerContent:t[1],wrap:(e,t)=>t.link(e,n)}}function h(e){let t=e.match(l);return t==null||t.index==null||t[1]==null?null:{index:t.index,fullMatch:t[0],innerContent:t[1],wrap:(e,t)=>t.bold(e)}}function g(e,t){let n=e.match(t);return n==null||n.index==null||n[1]==null?null:{index:n.index,fullMatch:n[0],innerContent:n[1],wrap:(e,t)=>t.italic(e)}}function _(e){return t(`em`,{class:a(e.class),children:e.children})}var v={bold:e=>t(s,{children:e}),italic:e=>t(_,{children:e}),link:(e,n)=>t(o,{href:n,children:e})},y={h1:{render:(e,n)=>t(r,{as:`h1`,style:`title`,children:e},n),marginTop:`mt-12`},h2:{render:(e,n)=>t(r,{as:`h2`,style:`subtitle`,children:e},n),marginTop:`mt-12`},h3:{render:(e,n)=>t(r,{as:`h3`,style:`strong`,children:e},n),marginTop:`mt-12`},p:{render:(e,n)=>t(r,{as:`p`,children:e},n),marginTop:`mt-8`},bold:v.bold,italic:v.italic,link:v.link};function b(r){let i=r.style??v,a=n(()=>f(r.markdown,i),[r.markdown,i]);return t(e,{children:a})}function x(e){return e.split(`
2
- `).map(e=>e.replace(/[\r\t]/g,``).trim()).filter(e=>e.length>0).map(e=>{let t=e.match(/^### (.+)$/);if(t!=null&&t[1]!=null)return{kind:`h3`,content:t[1]};let n=e.match(/^## (.+)$/);if(n!=null&&n[1]!=null)return{kind:`h2`,content:n[1]};let r=e.match(/^# (.+)$/);return r!=null&&r[1]!=null?{kind:`h1`,content:r[1]}:{kind:`p`,content:e}})}function S(e){let r=e.style??y,o=n(()=>x(e.markdown).map((e,n)=>{let i=r[e.kind],a=n===0?``:i.marginTop;return t(`div`,{class:a,children:i.render(t(b,{style:r,markdown:e.content}),n)},n)}),[e.markdown,r]);return t(i,{class:a(e.class),children:o})}export{b as n,S as t};
@@ -1 +0,0 @@
1
- import{c as e,i as t,r as n}from"./use-nav-exemptions-pWDQIkAs.js";import{t as r}from"./Page-BMpuMskU.js";function i(){return e(r,{mobileHeader:null,desktopHeader:null,children:e(n,{class:`px-4 py-8 gap-8`,children:e(t,{children:`Idk`})})})}export{i as default};
@@ -1 +0,0 @@
1
- import{c as e}from"./use-nav-exemptions-pWDQIkAs.js";import{t}from"./NotFoundPage-CkldArMP.js";function n(){return e(t,{afterConfirming:`frontend-version`})}export{n as default};
@@ -1 +0,0 @@
1
- import{_ as e,c as t,i as n,m as r,r as i}from"./use-nav-exemptions-pWDQIkAs.js";import{i as a,r as o,s,t as c}from"./use-query-DDd1mja8.js";import{n as l}from"./use-foundational-data-CyGObFfu.js";import{_ as u,a as d,d as f,g as p,s as m,t as h,v as g}from"./index-Ddvtj_a8.js";import{t as _}from"./Page-BMpuMskU.js";function v({afterConfirming:v}){let{isHotReloadingEnabled:y}=h(),{frontendVersion:b}=g(),{unregister:x}=d(),{foda:S,updateFoda:C}=l(),{callApi:w}=o(),{data:T,loading:E,error:D}=c(a,{}),[O,k]=e(!1),A=v===`frontend-version`&&!y&&!E&&D==null&&T!=null&&T.frontendVersion!==b,j=v===`foundational-data-version`&&!E&&D==null&&T!=null&&T.foundationalDataHash!==S.hash;return r(()=>{if(!A)return;async function e(){await x(),window.location.reload()}e()},[A,x]),r(()=>{if(!j)return;async function e(){k(!0);try{let e=await w(s,{hash:S.hash});e.result===`outdated`&&C(new u(e.foundationalData))}catch{}finally{k(!1)}}e()},[j,w,S.hash,C]),E||A||O?t(_,{mobileHeader:null,desktopHeader:null,children:t(i,{xAlign:`center`,yAlign:`center`,children:t(p,{})})}):t(_,{mobileHeader:null,desktopHeader:null,children:t(i,{class:`px-4 py-8 gap-8`,xAlign:`center`,yAlign:`center`,children:[t(n,{style:`title`,align:`center`,children:`Page not found`}),t(n,{align:`center`,children:`This page doesn't exist, at least not anymore!`}),t(f,{href:`/`,text:`Go home`,icon:m})]})})}export{v as t};
@@ -1 +0,0 @@
1
- import{c as e,n as t,o as n,s as r,t as i}from"./use-nav-exemptions-pWDQIkAs.js";function a(t){return e(n,{class:r(t.class,`not-desktop:hidden`),children:t.children})}function o(t){return e(n,{class:r(t.class,`fixed top-0 left-0 right-0 bg-bg-navbar border-b border-soft-border desktop:hidden`),children:t.children})}function s(s){let{showMobileNav:c}=i(),l=s.centered??!0;return e(n,{class:r(`bg-bg min-h-svh relative`,{"pt-14":s.mobileHeader!=null,"not-desktop:pb-18":c,"desktop:grid-rows-[auto_1fr]":s.desktopHeader!=null},`desktop:pt-12`),children:[s.desktopHeader!=null&&e(a,{children:s.desktopHeader}),s.mobileHeader!=null&&e(o,{class:`h-14 z-1`,children:s.mobileHeader}),e(n,{class:`z-0`,children:l?e(t,{children:s.children}):s.children})]})}export{s as t};
@@ -1 +0,0 @@
1
- import{c as e,i as t,s as n}from"./use-nav-exemptions-pWDQIkAs.js";import{m as r,p as i}from"./index-Ddvtj_a8.js";var a=[`bg-transparent`,`group-hover:bg-soft-hover`,`group-active:bg-soft-active`],o=[`bg-accent`,`group-hover:bg-accent-hover`,`group-active:bg-accent-active`],s=[`[--color-fg:var(--color-on-accent)]`,`[--color-fg-strong:var(--color-on-accent)]`,`[--color-fg-weak:var(--color-on-accent)]`],c=n(a),l=n(o),u=n(s);function d(t){return e(i,{class:n(t.class,`overflow-hidden rounded-sm border border-accent max-w-full`),children:t.options.map((n,r)=>e(f,{class:`shrink`,label:n.label,active:n.value===t.value,last:r===t.options.length-1,onClick:()=>t.onChange(n.value)},n.value))})}function f(a){return e(r,{class:n(a.class,`relative group min-h-8`,{[u]:a.active,"border-r border-accent":!a.last}),onClick:a.onClick,children:[e(`div`,{class:n(`absolute z-0 top-0 bottom-0 left-0 right-0`,{[c]:!a.active,[l]:a.active})}),e(i,{class:`relative z-1 px-6 py-2 min-w-0`,xAlign:`center`,yAlign:`center`,children:e(t,{class:`shrink min-w-min`,align:`center`,children:a.label})})]})}export{d as t};
@@ -1 +0,0 @@
1
- import{c as e,s as t}from"./use-nav-exemptions-pWDQIkAs.js";function n(n){return e(`div`,{class:t(n.class,`bg-placeholder animate-placeholder-pulse`)})}function r(r){return e(n,{...r,class:t(r.class,`h-[1em] -my-[0.13em]`)})}export{r as t};
@@ -1 +0,0 @@
1
- import{S as e,c as t,i as n,p as r,r as i}from"./use-nav-exemptions-pWDQIkAs.js";import{o as a,t as o}from"./use-query-DDd1mja8.js";import{n as s}from"./use-foundational-data-CyGObFfu.js";import{t as c}from"./integers-BYp6YHG5.js";import{d as l,g as u,s as d}from"./index-Ddvtj_a8.js";import{t as f}from"./Strong-BeqxJ43O.js";import{t as p}from"./Page-BMpuMskU.js";import{t as m}from"./use-simple-headers-vqWwqqRo.js";function h(){let{params:{sourceId:e,intrasourceId:i},query:{from:s}}=r(),{data:l,loading:d,error:f}=o(a,{sourceId:e??``,intrasourceId:i??``}),p=c(s??``);return d?t(u,{}):f!=null||l==null||p==null||p<0||l.service!=null&&p>l.service.movements.length-1?t(n,{children:`Failed to load service.`}):l.service==null?t(_,{}):t(g,{service:l.service,movementIndex:p},`${e}/${i}`)}function g(r){let{foda:a}=s();return t(p,{...m({title:`${r.service.primaryDestinationText} service`}),children:t(i,{class:`px-4 py-8 gap-8`,children:t(i,{class:`gap-6`,children:r.service.movements.map((r,i)=>{let o=r.arrivalTime==null?null:new Date(Date.parse(r.arrivalTime)).toLocaleString(),s=r.departureTime==null?null:new Date(Date.parse(r.departureTime)).toLocaleString();if(o==null&&s==null)return t(n,{style:`small`,children:[`Skips `,a.stops.require(r.stopId).name]},i);let c=s??o,l=r.formerArrivalTime==null?null:new Date(Date.parse(r.formerArrivalTime)).toLocaleString(),u=r.formerDepartureTime==null?null:new Date(Date.parse(r.formerDepartureTime)).toLocaleString(),d=s==null?o==null?null:l:u,p=d==null?``:t(e,{children:[t(`span`,{class:`line-through text-fg-weak`,children:d}),` `]});return t(n,{children:[t(f,{children:a.stops.require(r.stopId).name}),` • `,p,c]},i)})})})})}function _(){return t(p,{mobileHeader:null,desktopHeader:null,children:t(i,{class:`px-4 py-8 gap-8`,xAlign:`center`,yAlign:`center`,children:[t(n,{style:`title`,align:`center`,children:`Service not found`}),t(n,{align:`center`,children:`This can happen if the service was cancelled, or the timetable changed since this link was generated. You might be able to find it again by searching for one of the stops it departed from.`}),t(l,{href:`/`,text:`Go home`,icon:d})]})})}export{h as default};
@@ -1 +0,0 @@
1
- import{c as e,i as t,r as n}from"./use-nav-exemptions-pWDQIkAs.js";import{l as r,u as i}from"./index-Ddvtj_a8.js";import{t as a}from"./Page-BMpuMskU.js";import{t as o}from"./use-simple-headers-vqWwqqRo.js";import{t as s}from"./Divider-DxcVAB__.js";import{t as c}from"./Picker-BUr-habm.js";var l={auto:`Auto`,light:`Light`,dark:`Dark`},u=r.map(e=>({value:e,label:l[e]}));function d(t){let{settings:n,updateSettings:r}=i();return e(c,{class:t.class,value:n.theme,options:u,onChange:e=>{r(t=>t.with({theme:e}))}})}function f(){return e(a,{...o({title:`Settings`}),children:e(n,{class:`px-4 py-8 gap-8`,children:[e(n,{class:`gap-6`,children:[e(t,{style:`strong`,children:`Theme`}),e(t,{children:`"Auto" means the colour theme should follow your device's/browser's settings.`}),e(d,{class:`self-start`})]}),e(s,{}),e(t,{style:`small-weak`,children:`(Settings are saved to your device's/browser's local storage.)`})]})})}export{f as default};
@@ -1 +0,0 @@
1
- import{c as e,i as t,r as n}from"./use-nav-exemptions-pWDQIkAs.js";import{t as r}from"./Page-BMpuMskU.js";import{t as i}from"./use-simple-headers-vqWwqqRo.js";function a(){return e(r,{...i({title:`Status`}),children:e(n,{class:`px-4 py-8 gap-8`,children:e(t,{children:`LGTM`})})})}export{a as default};
@@ -1 +0,0 @@
1
- import{c as e,g as t,i as n,p as r,r as i}from"./use-nav-exemptions-pWDQIkAs.js";import{t as a,u as o}from"./use-query-DDd1mja8.js";import{n as s}from"./use-foundational-data-CyGObFfu.js";import{f as c,g as l,r as u}from"./index-Ddvtj_a8.js";import{t as d}from"./Strong-BeqxJ43O.js";import{t as f}from"./Page-BMpuMskU.js";import{t as p}from"./use-simple-headers-vqWwqqRo.js";import{t as m}from"./NotFoundPage-CkldArMP.js";function h(){let{params:{id:n}}=r(),{foda:i}=s(),a=t(()=>i.stops.getByUrlPath(n??``),[i.stops,n]);return a==null?e(m,{afterConfirming:`foundational-data-version`}):e(g,{stop:a},a.id)}function g(t){let{data:r,loading:s,error:c}=a(o,{stopId:t.stop.id,count:10});return e(f,{...p({title:t.stop.name}),children:e(i,{class:`px-4 py-8 gap-8`,children:[e(u,{lineIds:t.stop.canonicalLinesServingStop,withLinks:!0}),s&&e(l,{}),!s&&(c!=null||r==null)&&e(n,{children:`Error loading departures.`}),!s&&r!=null&&r.departures.length===0&&e(n,{children:`No departures found.`}),!s&&r!=null&&r.departures.length>0&&e(i,{class:`gap-4`,children:r.departures.map(t=>e(_,{departure:t},`${t.sourceId}/${t.intrasourceId}`))})]})})}function _({departure:t}){let r=t.secondaryDestinationText==null?``:` ${t.secondaryDestinationText}`,a=t.isCancelled?` (Cancelled)`:``,o=`/service/${encodeURIComponent(t.sourceId)}/${encodeURIComponent(t.intrasourceId)}?from=${encodeURIComponent(t.movement.index.toString())}`;return e(c,{href:o,class:`p-4`,children:e(i,{class:`gap-4`,children:[e(i,{class:`gap-3`,children:[e(n,{children:[e(d,{children:t.primaryDestinationText}),r,a]}),e(n,{children:new Date(Date.parse(t.movement.time)).toLocaleString()}),t.movement.formerTime!=null&&e(n,{style:`weak-struckout`,children:new Date(Date.parse(t.movement.formerTime)).toLocaleString()})]}),e(n,{style:`small-weak`,children:[`Source: `,t.sourceId,` • ID:`,` `,t.intrasourceId]})]})})}export{h as default};
@@ -1 +0,0 @@
1
- import{c as e,s as t}from"./use-nav-exemptions-pWDQIkAs.js";function n(n){return e(`strong`,{class:t(n.class,`text-fg-strong`),children:n.children})}export{n as t};
@@ -1 +0,0 @@
1
- import{c as e,i as t,r as n}from"./use-nav-exemptions-pWDQIkAs.js";import{t as r}from"./Strong-BeqxJ43O.js";import{t as i}from"./Page-BMpuMskU.js";import{t as a}from"./use-simple-headers-vqWwqqRo.js";function o(){return e(i,{...a({title:`Zen mode`}),children:e(n,{class:`px-4 py-8 gap-8`,children:e(t,{children:[e(r,{children:`✨`}),` Zen! `,e(r,{children:`✨`})]})})})}export{o as default};