@noxickon/onyx 0.0.4-dev.8 → 1.0.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 (67) hide show
  1. package/dist/chunks/hooks-DiKvsNs-.js +48 -0
  2. package/dist/chunks/hooks-bJFfbTks.js +8624 -0
  3. package/dist/chunks/query-BhvXa-m6.js +10 -0
  4. package/dist/chunks/query-iDn3qBGF.js +14 -0
  5. package/dist/chunks/ui-ChsTPgui.js +41 -0
  6. package/dist/chunks/ui-DxsSYHCv.js +20634 -0
  7. package/dist/chunks/useAuth-BFgXzu6Q.js +12 -0
  8. package/dist/chunks/useAuth-DxoDe3YA.js +1 -0
  9. package/dist/contexts/contexts.cjs.js +5 -0
  10. package/dist/contexts/contexts.es.js +156 -0
  11. package/dist/contexts.d.ts +117 -0
  12. package/dist/hooks/hooks.cjs.js +1 -6
  13. package/dist/hooks/hooks.es.js +11 -1916
  14. package/dist/hooks.d.ts +84 -22
  15. package/dist/index.d.ts +1782 -268
  16. package/dist/layouts/layouts.cjs.js +1 -0
  17. package/dist/layouts/layouts.es.js +688 -0
  18. package/dist/layouts.d.ts +430 -0
  19. package/dist/onyx.cjs.js +1 -1
  20. package/dist/onyx.es.js +53 -1395
  21. package/dist/pages/pages.cjs.js +2 -2
  22. package/dist/pages/pages.es.js +72 -70
  23. package/dist/pages.d.ts +4 -4
  24. package/dist/routes/routes.cjs.js +1 -0
  25. package/dist/routes/routes.es.js +31 -0
  26. package/dist/routes.d.ts +28 -0
  27. package/dist/shared.css +77 -48
  28. package/dist/ui.css +1 -0
  29. package/dist/utils/utils.cjs.js +1 -1
  30. package/dist/utils/utils.es.js +20 -6
  31. package/dist/utils.d.ts +109 -5
  32. package/package.json +39 -28
  33. package/dist/chunks/AuthContext-CaZKJMxQ.js +0 -2149
  34. package/dist/chunks/AuthContext-uU1aP9gj.js +0 -31
  35. package/dist/chunks/Button-D-v4l8ZE.js +0 -20
  36. package/dist/chunks/Button-bARrxYyo.js +0 -11053
  37. package/dist/chunks/Input-CLi1H63d.js +0 -1
  38. package/dist/chunks/Input-dfvmdIHi.js +0 -138
  39. package/dist/chunks/_commonjsHelpers-C6fGbg64.js +0 -6
  40. package/dist/chunks/_commonjsHelpers-DwGv2jUC.js +0 -1
  41. package/dist/chunks/constants-B1_n9ezb.js +0 -1
  42. package/dist/chunks/constants-CDXq37n6.js +0 -4
  43. package/dist/chunks/errorHelper--G-SWQzN.js +0 -18
  44. package/dist/chunks/errorHelper-DaP_XxEx.js +0 -1
  45. package/dist/chunks/formatTimestamp-CMxOnPo1.js +0 -12
  46. package/dist/chunks/formatTimestamp-TTsNcy7u.js +0 -1
  47. package/dist/chunks/index-CPwC_oqh.js +0 -561
  48. package/dist/chunks/index-DY808_YF.js +0 -2
  49. package/dist/chunks/isObject-BDHKUJKN.js +0 -1
  50. package/dist/chunks/isObject-vmP43YLW.js +0 -6
  51. package/dist/chunks/jsx-runtime--oOP9f8K.js +0 -284
  52. package/dist/chunks/jsx-runtime-CITbqOLs.js +0 -22
  53. package/dist/chunks/tslib.es6-ci7D5hcx.js +0 -44
  54. package/dist/chunks/tslib.es6-nRfFZWHa.js +0 -1
  55. package/dist/chunks/useAuth-BsWbsZD5.js +0 -1
  56. package/dist/chunks/useAuth-CkaMowHd.js +0 -11
  57. package/dist/chunks/useForm-DfmfCtGn.js +0 -3070
  58. package/dist/chunks/useForm-OVVxm4qZ.js +0 -18
  59. package/dist/chunks/useQuery-Dh3SZN5S.js +0 -1482
  60. package/dist/chunks/useQuery-y4De9xeL.js +0 -2
  61. package/dist/context/context.cjs.js +0 -1
  62. package/dist/context/context.es.js +0 -39
  63. package/dist/context.d.ts +0 -47
  64. package/dist/index.css +0 -1
  65. package/dist/layout/layout.cjs.js +0 -1
  66. package/dist/layout/layout.es.js +0 -265
  67. package/dist/layout.d.ts +0 -90
@@ -0,0 +1,48 @@
1
+ "use strict";const k=require("react");function cs(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const I=cs(k);function as(e){return e[0]}function us(e,t){const n=[],r=[];for(let i=0;i<e.length;i++){const o=e[i];t(o)?n.push(o):r.push(o)}return[n,r]}function ls(e){const t=Math.floor(Math.random()*e.length);return e[t]}function ti(e){return typeof e=="symbol"||e instanceof Symbol}function fs(e){return ti(e)?NaN:Number(e)}function ds(e){return e?(e=fs(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function hs(e){const t=ds(e),n=t%1;return n?t-n:t}function ps(e,t,n){return t=t===void 0?1:hs(t),e.slice(0,t)}function ms(e){return Array.from(new Set(e))}function ys(e,t){return ms(e.concat(t))}function _n(e){return e}function gs(){}function bs(e,t,n){return n==null?Math.min(e,t):Math.min(Math.max(e,t),n)}function ni(e){return e==null||typeof e!="object"&&typeof e!="function"}function ri(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Kt(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function dt(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const ii="[object RegExp]",En="[object String]",vn="[object Number]",wn="[object Boolean]",ht="[object Arguments]",oi="[object Symbol]",si="[object Date]",ci="[object Map]",ai="[object Set]",ui="[object Array]",_s="[object Function]",li="[object ArrayBuffer]",ot="[object Object]",Es="[object Error]",fi="[object DataView]",di="[object Uint8Array]",hi="[object Uint8ClampedArray]",pi="[object Uint16Array]",mi="[object Uint32Array]",vs="[object BigUint64Array]",yi="[object Int8Array]",gi="[object Int16Array]",bi="[object Int32Array]",ws="[object BigInt64Array]",_i="[object Float32Array]",Ei="[object Float64Array]";function As(e,t){return se(e,void 0,e,new Map,t)}function se(e,t,n,r=new Map,i=void 0){const o=i?.(e,t,n,r);if(o!==void 0)return o;if(ni(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){const s=new Array(e.length);r.set(e,s);for(let c=0;c<e.length;c++)s[c]=se(e[c],c,n,r,i);return Object.hasOwn(e,"index")&&(s.index=e.index),Object.hasOwn(e,"input")&&(s.input=e.input),s}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const s=new RegExp(e.source,e.flags);return s.lastIndex=e.lastIndex,s}if(e instanceof Map){const s=new Map;r.set(e,s);for(const[c,a]of e)s.set(c,se(a,c,n,r,i));return s}if(e instanceof Set){const s=new Set;r.set(e,s);for(const c of e)s.add(se(c,void 0,n,r,i));return s}if(typeof Buffer<"u"&&Buffer.isBuffer(e))return e.subarray();if(ri(e)){const s=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,s);for(let c=0;c<e.length;c++)s[c]=se(e[c],c,n,r,i);return s}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const s=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,s),ie(s,e,n,r,i),s}if(typeof File<"u"&&e instanceof File){const s=new File([e],e.name,{type:e.type});return r.set(e,s),ie(s,e,n,r,i),s}if(e instanceof Blob){const s=new Blob([e],{type:e.type});return r.set(e,s),ie(s,e,n,r,i),s}if(e instanceof Error){const s=new e.constructor;return r.set(e,s),s.message=e.message,s.name=e.name,s.stack=e.stack,s.cause=e.cause,ie(s,e,n,r,i),s}if(typeof e=="object"&&Os(e)){const s=Object.create(Object.getPrototypeOf(e));return r.set(e,s),ie(s,e,n,r,i),s}return e}function ie(e,t,n=e,r,i){const o=[...Object.keys(t),...Kt(t)];for(let s=0;s<o.length;s++){const c=o[s],a=Object.getOwnPropertyDescriptor(e,c);(a==null||a.writable)&&(e[c]=se(t[c],c,n,r,i))}}function Os(e){switch(dt(e)){case ht:case ui:case li:case fi:case wn:case si:case _i:case Ei:case yi:case gi:case bi:case ci:case vn:case ot:case ii:case ai:case En:case oi:case di:case hi:case pi:case mi:return!0;default:return!1}}function vi(e){return se(e,void 0,e,new Map,void 0)}function Fe(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)==="[object Object]":!1}function Ss(e,t){const n={},r=Object.keys(e);for(let i=0;i<r.length;i++){const o=r[i],s=e[o];n[o]=t(s,o,e)}return n}function $e(e){return e==="__proto__"}function Re(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r++){const i=n[r];if($e(i))continue;const o=t[i],s=e[i];Array.isArray(o)?Array.isArray(s)?e[i]=Re(s,o):e[i]=Re([],o):Fe(o)?Fe(s)?e[i]=Re(s,o):e[i]=Re({},o):(s===void 0||o!==void 0)&&(e[i]=o)}return e}function ks(e,t){const n={...e};for(let r=0;r<t.length;r++){const i=t[r];delete n[i]}return n}function xs(e,t){const n={},r=Object.keys(e);for(let i=0;i<r.length;i++){const o=r[i],s=e[o];t(s,o)||(n[o]=s)}return n}function Is(e,t){const n={};for(let r=0;r<t.length;r++){const i=t[r];Object.hasOwn(e,i)&&(n[i]=e[i])}return n}function pt(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function Ts(e,t,n){return De(e,t,void 0,void 0,void 0,void 0,n)}function De(e,t,n,r,i,o,s){const c=s(e,t,n,r,i,o);if(c!==void 0)return c;if(typeof e==typeof t)switch(typeof e){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return e===t;case"number":return e===t||Object.is(e,t);case"function":return e===t;case"object":return ze(e,t,o,s)}return ze(e,t,o,s)}function ze(e,t,n,r){if(Object.is(e,t))return!0;let i=dt(e),o=dt(t);if(i===ht&&(i=ot),o===ht&&(o=ot),i!==o)return!1;switch(i){case En:return e.toString()===t.toString();case vn:{const a=e.valueOf(),u=t.valueOf();return pt(a,u)}case wn:case si:case oi:return Object.is(e.valueOf(),t.valueOf());case ii:return e.source===t.source&&e.flags===t.flags;case _s:return e===t}n=n??new Map;const s=n.get(e),c=n.get(t);if(s!=null&&c!=null)return s===t;n.set(e,t),n.set(t,e);try{switch(i){case ci:{if(e.size!==t.size)return!1;for(const[a,u]of e.entries())if(!t.has(a)||!De(u,t.get(a),a,e,t,n,r))return!1;return!0}case ai:{if(e.size!==t.size)return!1;const a=Array.from(e.values()),u=Array.from(t.values());for(let l=0;l<a.length;l++){const h=a[l],g=u.findIndex(_=>De(h,_,void 0,e,t,n,r));if(g===-1)return!1;u.splice(g,1)}return!0}case ui:case di:case hi:case pi:case mi:case vs:case yi:case gi:case bi:case ws:case _i:case Ei:{if(typeof Buffer<"u"&&Buffer.isBuffer(e)!==Buffer.isBuffer(t)||e.length!==t.length)return!1;for(let a=0;a<e.length;a++)if(!De(e[a],t[a],a,e,t,n,r))return!1;return!0}case li:return e.byteLength!==t.byteLength?!1:ze(new Uint8Array(e),new Uint8Array(t),n,r);case fi:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:ze(new Uint8Array(e),new Uint8Array(t),n,r);case Es:return e.name===t.name&&e.message===t.message;case ot:{if(!(ze(e.constructor,t.constructor,n,r)||Fe(e)&&Fe(t)))return!1;const u=[...Object.keys(e),...Kt(e)],l=[...Object.keys(t),...Kt(t)];if(u.length!==l.length)return!1;for(let h=0;h<u.length;h++){const g=u[h],_=e[g];if(!Object.hasOwn(t,g))return!1;const f=t[g];if(!De(_,f,g,e,t,n,r))return!1}return!0}default:return!1}}finally{n.delete(e),n.delete(t)}}function Ns(e,t){return Ts(e,t,gs)}function wi(e){return typeof e=="function"}function Rs(e){return Number.isSafeInteger(e)&&e>=0}function Ds(e){return e==null}function Ai(e){return typeof e=="string"}function Cs(e){return Array.isArray(e)?e:Array.from(e)}function An(e){return e!=null&&typeof e!="function"&&Rs(e.length)}function Oi(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}function On(e){return typeof e=="string"||typeof e=="symbol"?e:Object.is(e?.valueOf?.(),-0)?"-0":String(e)}function Sn(e){const t=[],n=e.length;if(n===0)return t;let r=0,i="",o="",s=!1;for(e.charCodeAt(0)===46&&(t.push(""),r++);r<n;){const c=e[r];o?c==="\\"&&r+1<n?(r++,i+=e[r]):c===o?o="":i+=c:s?c==='"'||c==="'"?o=c:c==="]"?(s=!1,t.push(i),i=""):i+=c:c==="["?(s=!0,i&&(t.push(i),i="")):c==="."?i&&(t.push(i),i=""):i+=c,r++}return i&&t.push(i),t}function At(e,t,n){if(e==null)return n;switch(typeof t){case"string":{if($e(t))return n;const r=e[t];return r===void 0?Oi(t)?At(e,Sn(t),n):n:r}case"number":case"symbol":{typeof t=="number"&&(t=On(t));const r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return Ps(e,t,n);if(Object.is(t?.valueOf(),-0)?t="-0":t=String(t),$e(t))return n;const r=e[t];return r===void 0?n:r}}}function Ps(e,t,n){if(t.length===0)return n;let r=e;for(let i=0;i<t.length;i++){if(r==null||$e(t[i]))return n;r=r[t[i]]}return r===void 0?n:r}function zs(e){return function(t){return At(t,e)}}function mt(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function Fs(e,t,n){return typeof n!="function"?kn(e,t):Qt(e,t,function r(i,o,s,c,a,u){const l=n(i,o,s,c,a,u);return l!==void 0?!!l:Qt(i,o,r,u)},new Map)}function Qt(e,t,n,r){if(t===e)return!0;switch(typeof t){case"object":return $s(e,t,n,r);case"function":return Object.keys(t).length>0?Qt(e,{...t},n,r):pt(e,t);default:return mt(e)?typeof t=="string"?t==="":!0:pt(e,t)}}function $s(e,t,n,r){if(t==null)return!0;if(Array.isArray(t))return Si(e,t,n,r);if(t instanceof Map)return Ls(e,t,n,r);if(t instanceof Set)return js(e,t,n,r);const i=Object.keys(t);if(e==null)return i.length===0;if(i.length===0)return!0;if(r&&r.has(t))return r.get(t)===e;r&&r.set(t,e);try{for(let o=0;o<i.length;o++){const s=i[o];if(!ni(e)&&!(s in e)||t[s]===void 0&&e[s]!==void 0||t[s]===null&&e[s]!==null||!n(e[s],t[s],s,e,t,r))return!1}return!0}finally{r&&r.delete(t)}}function Ls(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(const[i,o]of t.entries()){const s=e.get(i);if(n(s,o,i,e,t,r)===!1)return!1}return!0}function Si(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;const i=new Set;for(let o=0;o<t.length;o++){const s=t[o];let c=!1;for(let a=0;a<e.length;a++){if(i.has(a))continue;const u=e[a];let l=!1;if(n(u,s,o,e,t,r)&&(l=!0),l){i.add(a),c=!0;break}}if(!c)return!1}return!0}function js(e,t,n,r){return t.size===0?!0:e instanceof Set?Si([...e],[...t],n,r):!1}function kn(e,t){return Fs(e,t,()=>{})}function Us(e){return e=vi(e),t=>kn(t,e)}function Ms(e,t){return As(e,(n,r,i,o)=>{if(typeof e=="object")switch(Object.prototype.toString.call(e)){case vn:case En:case wn:{const s=new e.constructor(e?.valueOf());return ie(s,e),s}case ht:{const s={};return ie(s,e),s.length=e.length,s[Symbol.iterator]=e[Symbol.iterator],s}default:return}})}function Zs(e){return Ms(e)}const Bs=/^(?:0|[1-9]\d*)$/;function ki(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return Bs.test(e)}}function xi(e){return e!==null&&typeof e=="object"&&dt(e)==="[object Arguments]"}function Ce(e,t){let n;if(Array.isArray(t)?n=t:typeof t=="string"&&Oi(t)&&e?.[t]==null?n=Sn(t):n=[t],n.length===0)return!1;let r=e;for(let i=0;i<n.length;i++){const o=n[i];if((r==null||!Object.hasOwn(r,o))&&!((Array.isArray(r)||xi(r))&&ki(o)&&o<r.length))return!1;r=r[o]}return!0}function Vs(e,t){switch(typeof e){case"object":{Object.is(e?.valueOf(),-0)&&(e="-0");break}case"number":{e=On(e);break}}return t=Zs(t),function(n){const r=At(n,e);return r===void 0?Ce(n,e):t===void 0?r===void 0:kn(r,t)}}function Ii(e){if(e==null)return _n;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?Vs(e[0],e[1]):Us(e);case"string":case"symbol":case"number":return zs(e)}}function qs(e,t=_n){if(!e)return[];if(t=Ii(t),!Array.isArray(e)){const i=[],o=Object.keys(e),s=An(e)?e.length:o.length;for(let c=0;c<s;c++){const a=o[c],u=e[a];t(u,a,e)&&i.push(u)}return i}const n=[],r=e.length;for(let i=0;i<r;i++){const o=e[i];t(o,i,e)&&n.push(o)}return n}function Ws(e){if(An(e))return as(Cs(e))}const Hs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Js=/^\w*$/;function Gs(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||ti(e)?!0:typeof e=="string"&&(Js.test(e)||!Hs.test(e))||t!=null&&Object.hasOwn(t,e)}function Ys(e){if(typeof e!="function")throw new TypeError("Expected a function");return function(...t){return!e.apply(this,t)}}function Xs(e,t=_n){return qs(e,Ys(Ii(t)))}function qn(e){return e==null}const Ks=(e,t,n)=>{const r=e[t];(!(Object.hasOwn(e,t)&&pt(r,n))||n===void 0&&!(t in e))&&(e[t]=n)};function Qs(e,t,n,r){if(e==null&&!mt(e))return e;const i=Gs(t,e)?[t]:Array.isArray(t)?t:typeof t=="string"?Sn(t):[t];let o=e;for(let s=0;s<i.length&&o!=null;s++){const c=On(i[s]);if($e(c))continue;let a;if(s===i.length-1)a=n(o[c]);else{const u=o[c],l=r?.(u,c,e);a=l!==void 0?l:mt(u)?u:ki(i[s+1])?[]:{}}Ks(o,c,a),o=o[c]}return e}function ec(e,t,n){return Qs(e,t,()=>n,()=>{})}function tc(e){const t=e?.constructor,n=typeof t=="function"?t.prototype:Object.prototype;return e===n}function nc(e){return ri(e)}function Ot(e){if(e==null)return!0;if(An(e))return typeof e.splice!="function"&&typeof e!="string"&&(typeof Buffer>"u"||!Buffer.isBuffer(e))&&!nc(e)&&!xi(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return tc(e)?t.filter(n=>n!=="constructor").length===0:t.length===0}return!0}let rc=0;function ic(e=""){const t=++rc;return`${e}${t}`}function oc({defaultValue:e,name:t="Component",onChange:n,value:r}){const[i,o]=k.useState(e),s=r!==void 0,c=s?r:i,a=k.useRef(n);if(a.current=n,process.env.NODE_ENV!=="production"){const l=k.useRef(s);k.useEffect(()=>{const h=l.current;h!==s&&console.warn(`${t} is switching from ${h?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should maintain consistent control throughout their lifecycle.`),l.current=s},[s,t])}const u=k.useCallback(l=>{const h=wi(l)?l(c):l;s?h!==r&&a.current?.(h):(o(h),a.current?.(h))},[s,r,c]);return[c,u]}const sc='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',cc=({containerRef:e,options:t={}})=>{const{autoFocus:n=!1,enabled:r=!0,restoreFocus:i=!1,trapFocus:o=!1}=t,s=k.useRef(null),c=k.useCallback(()=>{if(!e.current)return[];const h=e.current.querySelectorAll(sc);return Array.from(h)},[e]),a=k.useCallback(()=>{const g=c()[0];g?g.focus():e.current&&e.current.focus()},[c,e]),u=k.useCallback(()=>{const h=c(),g=h[h.length-1];g&&g.focus()},[c]),l=k.useCallback(()=>document.activeElement,[]);return k.useEffect(()=>{if(!(!r||!e.current))return i&&(s.current=document.activeElement),n&&requestAnimationFrame(()=>{a()}),()=>{i&&s.current&&(s.current.focus(),s.current=null)}},[r,i,n,a,e]),k.useEffect(()=>{if(!r||!o||!e.current)return;const h=g=>{if(g.key!=="Tab")return;const _=c();if(_.length===0)return;const f=_[0],m=_[_.length-1],b=document.activeElement;g.shiftKey?b===f&&(g.preventDefault(),m.focus()):b===m&&(g.preventDefault(),f.focus())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r,o,c,e]),{focusFirst:a,focusLast:u,getCurrentFocus:l,getFocusableElements:c}};function p(e,t,n){function r(c,a){var u;Object.defineProperty(c,"_zod",{value:c._zod??{},enumerable:!1}),(u=c._zod).traits??(u.traits=new Set),c._zod.traits.add(e),t(c,a);for(const l in s.prototype)l in c||Object.defineProperty(c,l,{value:s.prototype[l].bind(c)});c._zod.constr=s,c._zod.def=a}const i=n?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:e});function s(c){var a;const u=n?.Parent?new o:this;r(u,c),(a=u._zod).deferred??(a.deferred=[]);for(const l of u._zod.deferred)l();return u}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class ve extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ti extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Ni={};function de(e){return Ni}function ac(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function en(e,t){return typeof t=="bigint"?t.toString():t}function xn(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Be(e){return e==null}function In(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function uc(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let i=(r.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(r)){const a=r.match(/\d?e-(\d?)/);a?.[1]&&(i=Number.parseInt(a[1]))}const o=n>i?n:i,s=Number.parseInt(e.toFixed(o).replace(".","")),c=Number.parseInt(t.toFixed(o).replace(".",""));return s%c/10**o}const Wn=Symbol("evaluating");function N(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Wn)return r===void 0&&(r=Wn,r=n()),r},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function ye(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ge(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Hn(e){return JSON.stringify(e)}const Ri="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function yt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const lc=xn(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Le(e){if(yt(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(yt(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Di(e){return Le(e)?{...e}:Array.isArray(e)?[...e]:e}const fc=new Set(["string","number","symbol"]);function St(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function te(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function v(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new 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 dc(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const hc={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function pc(e,t){const n=e._zod.def,r=ge(e._zod.def,{get shape(){const i={};for(const o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(i[o]=n.shape[o])}return ye(this,"shape",i),i},checks:[]});return te(e,r)}function mc(e,t){const n=e._zod.def,r=ge(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&delete i[o]}return ye(this,"shape",i),i},checks:[]});return te(e,r)}function yc(e,t){if(!Le(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const i=ge(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return ye(this,"shape",o),o},checks:[]});return te(e,i)}function gc(e,t){if(!Le(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const r={...e._zod.def.shape,...t};return ye(this,"shape",r),r},checks:e._zod.def.checks};return te(e,n)}function bc(e,t){const n=ge(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return ye(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return te(e,n)}function _c(e,t,n){const r=ge(t._zod.def,{get shape(){const i=t._zod.def.shape,o={...i};if(n)for(const s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(o[s]=e?new e({type:"optional",innerType:i[s]}):i[s])}else for(const s in i)o[s]=e?new e({type:"optional",innerType:i[s]}):i[s];return ye(this,"shape",o),o},checks:[]});return te(t,r)}function Ec(e,t,n){const r=ge(t._zod.def,{get shape(){const i=t._zod.def.shape,o={...i};if(n)for(const s in n){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(o[s]=new e({type:"nonoptional",innerType:i[s]}))}else for(const s in i)o[s]=new e({type:"nonoptional",innerType:i[s]});return ye(this,"shape",o),o},checks:[]});return te(t,r)}function _e(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 Ci(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Ke(e){return typeof e=="string"?e:e?.message}function he(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const i=Ke(e.inst?._zod.def?.error?.(e))??Ke(t?.error?.(e))??Ke(n.customError?.(e))??Ke(n.localeError?.(e))??"Invalid input";r.message=i}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Pi(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Tn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function je(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const zi=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,en,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Fi=p("$ZodError",zi),$i=p("$ZodError",zi,{Parent:Error});function vc(e,t=n=>n.message){const n={},r=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function wc(e,t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>i({issues:c}));else if(s.code==="invalid_key")i({issues:s.issues});else if(s.code==="invalid_element")i({issues:s.issues});else if(s.path.length===0)r._errors.push(n(s));else{let c=r,a=0;for(;a<s.path.length;){const u=s.path[a];a===s.path.length-1?(c[u]=c[u]||{_errors:[]},c[u]._errors.push(n(s))):c[u]=c[u]||{_errors:[]},c=c[u],a++}}};return i(e),r}const Nn=e=>(t,n,r,i)=>{const o=r?Object.assign(r,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new ve;if(s.issues.length){const c=new(i?.Err??e)(s.issues.map(a=>he(a,o,de())));throw Ri(c,i?.callee),c}return s.value},Rn=e=>async(t,n,r,i)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){const c=new(i?.Err??e)(s.issues.map(a=>he(a,o,de())));throw Ri(c,i?.callee),c}return s.value},kt=e=>(t,n,r)=>{const i=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new ve;return o.issues.length?{success:!1,error:new(e??Fi)(o.issues.map(s=>he(s,i,de())))}:{success:!0,data:o.value}},Ac=kt($i),xt=e=>async(t,n,r)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(s=>he(s,i,de())))}:{success:!0,data:o.value}},Oc=xt($i),Sc=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Nn(e)(t,n,i)},kc=e=>(t,n,r)=>Nn(e)(t,n,r),xc=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Rn(e)(t,n,i)},Ic=e=>async(t,n,r)=>Rn(e)(t,n,r),Tc=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return kt(e)(t,n,i)},Nc=e=>(t,n,r)=>kt(e)(t,n,r),Rc=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return xt(e)(t,n,i)},Dc=e=>async(t,n,r)=>xt(e)(t,n,r),Cc=/^[cC][^\s-]{8,}$/,Pc=/^[0-9a-z]+$/,zc=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Fc=/^[0-9a-vA-V]{20}$/,$c=/^[A-Za-z0-9]{27}$/,Lc=/^[a-zA-Z0-9_-]{21}$/,jc=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Uc=/^([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})$/,Jn=e=>e?new 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)$/,Mc=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Zc="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Bc(){return new RegExp(Zc,"u")}const Vc=/^(?:(?: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])$/,qc=/^(([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}|:))$/,Wc=/^((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])$/,Hc=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Jc=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Li=/^[A-Za-z0-9_-]*$/,Gc=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Yc=/^\+(?:[0-9]){6,14}[0-9]$/,ji="(?:(?:\\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])))",Xc=new RegExp(`^${ji}$`);function Ui(e){const 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}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Kc(e){return new RegExp(`^${Ui(e)}$`)}function Qc(e){const t=Ui({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${ji}T(?:${r})$`)}const ea=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},ta=/^-?\d+$/,na=/^-?\d+(?:\.\d+)?/,ra=/^(?:true|false)$/i,ia=/^[^A-Z]*$/,oa=/^[^a-z]*$/,L=p("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Mi={number:"number",bigint:"bigint",object:"date"},Zi=p("$ZodCheckLessThan",(e,t)=>{L.init(e,t);const n=Mi[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,o=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Bi=p("$ZodCheckGreaterThan",(e,t)=>{L.init(e,t);const n=Mi[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,o=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),sa=p("$ZodCheckMultipleOf",(e,t)=>{L.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):uc(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})}}),ca=p("$ZodCheckNumberFormat",(e,t)=>{L.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[i,o]=hc[t.format];e._zod.onattach.push(s=>{const c=s._zod.bag;c.format=t.format,c.minimum=i,c.maximum=o,n&&(c.pattern=ta)}),e._zod.check=s=>{const c=s.value;if(n){if(!Number.isInteger(c)){s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort});return}}c<i&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),c>o&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:o,inst:e})}}),aa=p("$ZodCheckMaxSize",(e,t)=>{var n;L.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!Be(i)&&i.size!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const i=r.value;i.size<=t.maximum||r.issues.push({origin:Pi(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),ua=p("$ZodCheckMinSize",(e,t)=>{var n;L.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!Be(i)&&i.size!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const i=r.value;i.size>=t.minimum||r.issues.push({origin:Pi(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),la=p("$ZodCheckMaxLength",(e,t)=>{var n;L.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!Be(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const i=r.value;if(i.length<=t.maximum)return;const s=Tn(i);r.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),fa=p("$ZodCheckMinLength",(e,t)=>{var n;L.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!Be(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const i=r.value;if(i.length>=t.minimum)return;const s=Tn(i);r.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),da=p("$ZodCheckLengthEquals",(e,t)=>{var n;L.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!Be(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=r=>{const i=r.value,o=i.length;if(o===t.length)return;const s=Tn(i),c=o>t.length;r.issues.push({origin:s,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),It=p("$ZodCheckStringFormat",(e,t)=>{var n,r;L.init(e,t),e._zod.onattach.push(i=>{const o=i._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ha=p("$ZodCheckRegex",(e,t)=>{It.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})}}),pa=p("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ia),It.init(e,t)}),ma=p("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=oa),It.init(e,t)}),ya=p("$ZodCheckIncludes",(e,t)=>{L.init(e,t);const n=St(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),ga=p("$ZodCheckStartsWith",(e,t)=>{L.init(e,t);const n=new RegExp(`^${St(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),ba=p("$ZodCheckEndsWith",(e,t)=>{L.init(e,t);const n=new RegExp(`.*${St(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),_a=p("$ZodCheckMimeType",(e,t)=>{L.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(r=>{r._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),Ea=p("$ZodCheckOverwrite",(e,t)=>{L.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class va{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
2
+ `).filter(s=>s),i=Math.min(...r.map(s=>s.length-s.trimStart().length)),o=r.map(s=>s.slice(i)).map(s=>" ".repeat(this.indent*2)+s);for(const s of o)this.content.push(s)}compile(){const t=Function,n=this?.args,i=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...n,i.join(`
3
+ `))}}const wa={major:4,minor:1,patch:11},R=p("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=wa;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const i of r)for(const o of i._zod.onattach)o(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(s,c,a)=>{let u=_e(s),l;for(const h of c){if(h._zod.def.when){if(!h._zod.def.when(s))continue}else if(u)continue;const g=s.issues.length,_=h._zod.check(s);if(_ instanceof Promise&&a?.async===!1)throw new ve;if(l||_ instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await _,s.issues.length!==g&&(u||(u=_e(s,g)))});else{if(s.issues.length===g)continue;u||(u=_e(s,g))}}return l?l.then(()=>s):s},o=(s,c,a)=>{if(_e(s))return s.aborted=!0,s;const u=i(c,r,a);if(u instanceof Promise){if(a.async===!1)throw new ve;return u.then(l=>e._zod.parse(l,a))}return e._zod.parse(u,a)};e._zod.run=(s,c)=>{if(c.skipChecks)return e._zod.parse(s,c);if(c.direction==="backward"){const u=e._zod.parse({value:s.value,issues:[]},{...c,skipChecks:!0});return u instanceof Promise?u.then(l=>o(l,s,c)):o(u,s,c)}const a=e._zod.parse(s,c);if(a instanceof Promise){if(c.async===!1)throw new ve;return a.then(u=>i(u,r,c))}return i(a,r,c)}}e["~standard"]={validate:i=>{try{const o=Ac(e,i);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Oc(e,i).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),Dn=p("$ZodString",(e,t)=>{R.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ea(e._zod.bag),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}}),D=p("$ZodStringFormat",(e,t)=>{It.init(e,t),Dn.init(e,t)}),Aa=p("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Uc),D.init(e,t)}),Oa=p("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Jn(r))}else t.pattern??(t.pattern=Jn());D.init(e,t)}),Sa=p("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Mc),D.init(e,t)}),ka=p("$ZodURL",(e,t)=>{D.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Gc.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),xa=p("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Bc()),D.init(e,t)}),Ia=p("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Lc),D.init(e,t)}),Ta=p("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Cc),D.init(e,t)}),Na=p("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Pc),D.init(e,t)}),Ra=p("$ZodULID",(e,t)=>{t.pattern??(t.pattern=zc),D.init(e,t)}),Da=p("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Fc),D.init(e,t)}),Ca=p("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=$c),D.init(e,t)}),Pa=p("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Qc(t)),D.init(e,t)}),za=p("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Xc),D.init(e,t)}),Fa=p("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Kc(t)),D.init(e,t)}),$a=p("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=jc),D.init(e,t)}),La=p("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Vc),D.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv4"})}),ja=p("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=qc),D.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Ua=p("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Wc),D.init(e,t)}),Ma=p("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Hc),D.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[i,o]=r;if(!o)throw new Error;const s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Vi(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Za=p("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Jc),D.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{Vi(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Ba(e){if(!Li.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Vi(n)}const Va=p("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Li),D.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{Ba(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),qa=p("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Yc),D.init(e,t)});function Wa(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const Ha=p("$ZodJWT",(e,t)=>{D.init(e,t),e._zod.check=n=>{Wa(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),qi=p("$ZodNumber",(e,t)=>{R.init(e,t),e._zod.pattern=e._zod.bag.pattern??na,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const o=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...o?{received:o}:{}}),n}}),Ja=p("$ZodNumber",(e,t)=>{ca.init(e,t),qi.init(e,t)}),Ga=p("$ZodBoolean",(e,t)=>{R.init(e,t),e._zod.pattern=ra,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const i=n.value;return typeof i=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),Ya=p("$ZodAny",(e,t)=>{R.init(e,t),e._zod.parse=n=>n}),Xa=p("$ZodUnknown",(e,t)=>{R.init(e,t),e._zod.parse=n=>n}),Ka=p("$ZodNever",(e,t)=>{R.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Qa=p("$ZodDate",(e,t)=>{R.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}const i=n.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:e}),n}});function Gn(e,t,n){e.issues.length&&t.issues.push(...Ci(n,e.issues)),t.value[n]=e.value}const eu=p("$ZodArray",(e,t)=>{R.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);const o=[];for(let s=0;s<i.length;s++){const c=i[s],a=t.element._zod.run({value:c,issues:[]},r);a instanceof Promise?o.push(a.then(u=>Gn(u,n,s))):Gn(a,n,s)}return o.length?Promise.all(o).then(()=>n):n}});function gt(e,t,n,r){e.issues.length&&t.issues.push(...Ci(n,e.issues)),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Wi(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=dc(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Hi(e,t,n,r,i,o){const s=[],c=i.keySet,a=i.catchall._zod,u=a.def.type;for(const l of Object.keys(t)){if(c.has(l))continue;if(u==="never"){s.push(l);continue}const h=a.run({value:t[l],issues:[]},r);h instanceof Promise?e.push(h.then(g=>gt(g,n,l,t))):gt(h,n,l,t)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const tu=p("$ZodObject",(e,t)=>{if(R.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const a={...c};return Object.defineProperty(t,"shape",{value:a}),a}})}const r=xn(()=>Wi(t));N(e._zod,"propValues",()=>{const c=t.shape,a={};for(const u in c){const l=c[u]._zod;if(l.values){a[u]??(a[u]=new Set);for(const h of l.values)a[u].add(h)}}return a});const i=yt,o=t.catchall;let s;e._zod.parse=(c,a)=>{s??(s=r.value);const u=c.value;if(!i(u))return c.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),c;c.value={};const l=[],h=s.shape;for(const g of s.keys){const f=h[g]._zod.run({value:u[g],issues:[]},a);f instanceof Promise?l.push(f.then(m=>gt(m,c,g,u))):gt(f,c,g,u)}return o?Hi(l,u,c,a,r.value,e):l.length?Promise.all(l).then(()=>c):c}}),nu=p("$ZodObjectJIT",(e,t)=>{tu.init(e,t);const n=e._zod.parse,r=xn(()=>Wi(t)),i=g=>{const _=new va(["shape","payload","ctx"]),f=r.value,m=E=>{const w=Hn(E);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};_.write("const input = payload.value;");const b=Object.create(null);let O=0;for(const E of f.keys)b[E]=`key_${O++}`;_.write("const newResult = {};");for(const E of f.keys){const w=b[E],x=Hn(E);_.write(`const ${w} = ${m(E)};`),_.write(`
4
+ if (${w}.issues.length) {
5
+ payload.issues = payload.issues.concat(${w}.issues.map(iss => ({
6
+ ...iss,
7
+ path: iss.path ? [${x}, ...iss.path] : [${x}]
8
+ })));
9
+ }
10
+
11
+
12
+ if (${w}.value === undefined) {
13
+ if (${x} in input) {
14
+ newResult[${x}] = undefined;
15
+ }
16
+ } else {
17
+ newResult[${x}] = ${w}.value;
18
+ }
19
+
20
+ `)}_.write("payload.value = newResult;"),_.write("return payload;");const T=_.compile();return(E,w)=>T(g,E,w)};let o;const s=yt,c=!Ni.jitless,u=c&&lc.value,l=t.catchall;let h;e._zod.parse=(g,_)=>{h??(h=r.value);const f=g.value;return s(f)?c&&u&&_?.async===!1&&_.jitless!==!0?(o||(o=i(t.shape)),g=o(g,_),l?Hi([],f,g,_,h,e):g):n(g,_):(g.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),g)}});function Yn(e,t,n,r){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const i=e.filter(o=>!_e(o));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(o=>o.issues.map(s=>he(s,r,de())))}),t)}const ru=p("$ZodUnion",(e,t)=>{R.init(e,t),N(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),N(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),N(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),N(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${i.map(o=>In(o.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,o)=>{if(n)return r(i,o);let s=!1;const c=[];for(const a of t.options){const u=a._zod.run({value:i.value,issues:[]},o);if(u instanceof Promise)c.push(u),s=!0;else{if(u.issues.length===0)return u;c.push(u)}}return s?Promise.all(c).then(a=>Yn(a,i,e,o)):Yn(c,i,e,o)}}),iu=p("$ZodIntersection",(e,t)=>{R.init(e,t),e._zod.parse=(n,r)=>{const i=n.value,o=t.left._zod.run({value:i,issues:[]},r),s=t.right._zod.run({value:i,issues:[]},r);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([a,u])=>Xn(n,a,u)):Xn(n,o,s)}});function tn(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Le(e)&&Le(t)){const n=Object.keys(t),r=Object.keys(e).filter(o=>n.indexOf(o)!==-1),i={...e,...t};for(const o of r){const s=tn(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};i[o]=s.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const i=e[r],o=t[r],s=tn(i,o);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Xn(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),_e(e))return e;const r=tn(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const ou=p("$ZodEnum",(e,t)=>{R.init(e,t);const n=ac(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(i=>fc.has(typeof i)).map(i=>typeof i=="string"?St(i):i.toString()).join("|")})$`),e._zod.parse=(i,o)=>{const s=i.value;return r.has(s)||i.issues.push({code:"invalid_value",values:n,input:s,inst:e}),i}}),su=p("$ZodFile",(e,t)=>{R.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;return i instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),n}}),cu=p("$ZodTransform",(e,t)=>{R.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Ti(e.constructor.name);const i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(s=>(n.value=s,n));if(i instanceof Promise)throw new ve;return n.value=i,n}});function Kn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const au=p("$ZodOptional",(e,t)=>{R.init(e,t),e._zod.optin="optional",e._zod.optout="optional",N(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),N(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${In(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>Kn(o,n.value)):Kn(i,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),uu=p("$ZodNullable",(e,t)=>{R.init(e,t),N(e._zod,"optin",()=>t.innerType._zod.optin),N(e._zod,"optout",()=>t.innerType._zod.optout),N(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${In(n.source)}|null)$`):void 0}),N(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),lu=p("$ZodDefault",(e,t)=>{R.init(e,t),e._zod.optin="optional",N(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>Qn(o,t)):Qn(i,t)}});function Qn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const fu=p("$ZodPrefault",(e,t)=>{R.init(e,t),e._zod.optin="optional",N(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),du=p("$ZodNonOptional",(e,t)=>{R.init(e,t),N(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>er(o,e)):er(i,e)}});function er(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const hu=p("$ZodCatch",(e,t)=>{R.init(e,t),N(e._zod,"optin",()=>t.innerType._zod.optin),N(e._zod,"optout",()=>t.innerType._zod.optout),N(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(s=>he(s,r,de()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(o=>he(o,r,de()))},input:n.value}),n.issues=[]),n)}}),pu=p("$ZodPipe",(e,t)=>{R.init(e,t),N(e._zod,"values",()=>t.in._zod.values),N(e._zod,"optin",()=>t.in._zod.optin),N(e._zod,"optout",()=>t.out._zod.optout),N(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const o=t.out._zod.run(n,r);return o instanceof Promise?o.then(s=>Qe(s,t.in,r)):Qe(o,t.in,r)}const i=t.in._zod.run(n,r);return i instanceof Promise?i.then(o=>Qe(o,t.out,r)):Qe(i,t.out,r)}});function Qe(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const mu=p("$ZodReadonly",(e,t)=>{R.init(e,t),N(e._zod,"propValues",()=>t.innerType._zod.propValues),N(e._zod,"values",()=>t.innerType._zod.values),N(e._zod,"optin",()=>t.innerType._zod.optin),N(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(tr):tr(i)}});function tr(e){return e.value=Object.freeze(e.value),e}const yu=p("$ZodCustom",(e,t)=>{L.init(e,t),R.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(o=>nr(o,n,r,e));nr(i,n,r,e)}});function nr(e,t,n,r){if(!e){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(je(i))}}class gu{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];if(this._map.set(t,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const i={...r,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function bu(){return new gu}const et=bu();function _u(e,t){return new e({type:"string",...v(t)})}function Ji(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...v(t)})}function rr(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...v(t)})}function Eu(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...v(t)})}function vu(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...v(t)})}function wu(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...v(t)})}function Au(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...v(t)})}function Gi(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...v(t)})}function Ou(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...v(t)})}function Su(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...v(t)})}function ku(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...v(t)})}function xu(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...v(t)})}function Iu(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...v(t)})}function Tu(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...v(t)})}function Nu(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...v(t)})}function Yi(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...v(t)})}function Ru(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...v(t)})}function Du(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...v(t)})}function Cu(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...v(t)})}function Pu(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...v(t)})}function zu(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...v(t)})}function Fu(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...v(t)})}function $u(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...v(t)})}function Lu(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...v(t)})}function ju(e,t){return new e({type:"string",format:"date",check:"string_format",...v(t)})}function Uu(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...v(t)})}function Mu(e,t){return new e({type:"string",format:"duration",check:"string_format",...v(t)})}function Zu(e,t){return new e({type:"number",checks:[],...v(t)})}function Bu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...v(t)})}function Vu(e,t){return new e({type:"boolean",...v(t)})}function qu(e){return new e({type:"any"})}function Wu(e){return new e({type:"unknown"})}function Hu(e,t){return new e({type:"never",...v(t)})}function Ju(e,t){return new e({type:"date",...v(t)})}function ir(e,t){return new Zi({check:"less_than",...v(t),value:e,inclusive:!1})}function st(e,t){return new Zi({check:"less_than",...v(t),value:e,inclusive:!0})}function or(e,t){return new Bi({check:"greater_than",...v(t),value:e,inclusive:!1})}function ct(e,t){return new Bi({check:"greater_than",...v(t),value:e,inclusive:!0})}function sr(e,t){return new sa({check:"multiple_of",...v(t),value:e})}function Gu(e,t){return new aa({check:"max_size",...v(t),maximum:e})}function Yu(e,t){return new ua({check:"min_size",...v(t),minimum:e})}function Xi(e,t){return new la({check:"max_length",...v(t),maximum:e})}function bt(e,t){return new fa({check:"min_length",...v(t),minimum:e})}function Ki(e,t){return new da({check:"length_equals",...v(t),length:e})}function Xu(e,t){return new ha({check:"string_format",format:"regex",...v(t),pattern:e})}function Ku(e){return new pa({check:"string_format",format:"lowercase",...v(e)})}function Qu(e){return new ma({check:"string_format",format:"uppercase",...v(e)})}function el(e,t){return new ya({check:"string_format",format:"includes",...v(t),includes:e})}function tl(e,t){return new ga({check:"string_format",format:"starts_with",...v(t),prefix:e})}function nl(e,t){return new ba({check:"string_format",format:"ends_with",...v(t),suffix:e})}function rl(e,t){return new _a({check:"mime_type",mime:e,...v(t)})}function Ve(e){return new Ea({check:"overwrite",tx:e})}function il(e){return Ve(t=>t.normalize(e))}function ol(){return Ve(e=>e.trim())}function sl(){return Ve(e=>e.toLowerCase())}function cl(){return Ve(e=>e.toUpperCase())}function al(e,t,n){return new e({type:"array",element:t,...v(n)})}function ul(e,t){return new e({type:"file",...v(t)})}function ll(e,t,n){return new e({type:"custom",check:"custom",fn:t,...v(n)})}function fl(e){const t=dl(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(je(r,n.value,t._zod.def));else{const i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(je(i))}},e(n.value,n)));return t}function dl(e,t){const n=new L({check:"custom",...v(t)});return n._zod.check=e,n}const hl=p("ZodISODateTime",(e,t)=>{Pa.init(e,t),P.init(e,t)});function pl(e){return Lu(hl,e)}const ml=p("ZodISODate",(e,t)=>{za.init(e,t),P.init(e,t)});function yl(e){return ju(ml,e)}const gl=p("ZodISOTime",(e,t)=>{Fa.init(e,t),P.init(e,t)});function bl(e){return Uu(gl,e)}const _l=p("ZodISODuration",(e,t)=>{$a.init(e,t),P.init(e,t)});function El(e){return Mu(_l,e)}const vl=(e,t)=>{Fi.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>wc(e,n)},flatten:{value:n=>vc(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,en,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,en,2)}},isEmpty:{get(){return e.issues.length===0}}})},q=p("ZodError",vl,{Parent:Error}),wl=Nn(q),Al=Rn(q),Ol=kt(q),Sl=xt(q),kl=Sc(q),xl=kc(q),Il=xc(q),Tl=Ic(q),Nl=Tc(q),Rl=Nc(q),Dl=Rc(q),Cl=Dc(q),C=p("ZodType",(e,t)=>(R.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ge(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]})),e.clone=(n,r)=>te(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>wl(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Ol(e,n,r),e.parseAsync=async(n,r)=>Al(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Sl(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>kl(e,n,r),e.decode=(n,r)=>xl(e,n,r),e.encodeAsync=async(n,r)=>Il(e,n,r),e.decodeAsync=async(n,r)=>Tl(e,n,r),e.safeEncode=(n,r)=>Nl(e,n,r),e.safeDecode=(n,r)=>Rl(e,n,r),e.safeEncodeAsync=async(n,r)=>Dl(e,n,r),e.safeDecodeAsync=async(n,r)=>Cl(e,n,r),e.refine=(n,r)=>e.check(xf(n,r)),e.superRefine=n=>e.check(If(n)),e.overwrite=n=>e.check(Ve(n)),e.optional=()=>lr(e),e.nullable=()=>fr(e),e.nullish=()=>lr(fr(e)),e.nonoptional=n=>Ef(e,n),e.array=()=>V(e),e.or=n=>so([e,n]),e.and=n=>co(e,n),e.transform=n=>dr(e,pf(n)),e.default=n=>gf(e,n),e.prefault=n=>_f(e,n),e.catch=n=>wf(e,n),e.pipe=n=>dr(e,n),e.readonly=()=>Sf(e),e.describe=n=>{const r=e.clone();return et.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return et.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return et.get(e);const r=e.clone();return et.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Qi=p("_ZodString",(e,t)=>{Dn.init(e,t),C.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(Xu(...r)),e.includes=(...r)=>e.check(el(...r)),e.startsWith=(...r)=>e.check(tl(...r)),e.endsWith=(...r)=>e.check(nl(...r)),e.min=(...r)=>e.check(bt(...r)),e.max=(...r)=>e.check(Xi(...r)),e.length=(...r)=>e.check(Ki(...r)),e.nonempty=(...r)=>e.check(bt(1,...r)),e.lowercase=r=>e.check(Ku(r)),e.uppercase=r=>e.check(Qu(r)),e.trim=()=>e.check(ol()),e.normalize=(...r)=>e.check(il(...r)),e.toLowerCase=()=>e.check(sl()),e.toUpperCase=()=>e.check(cl())}),Pl=p("ZodString",(e,t)=>{Dn.init(e,t),Qi.init(e,t),e.email=n=>e.check(Ji(eo,n)),e.url=n=>e.check(Gi(no,n)),e.jwt=n=>e.check($u(Gl,n)),e.emoji=n=>e.check(Ou(zl,n)),e.guid=n=>e.check(rr(cr,n)),e.uuid=n=>e.check(Eu(tt,n)),e.uuidv4=n=>e.check(vu(tt,n)),e.uuidv6=n=>e.check(wu(tt,n)),e.uuidv7=n=>e.check(Au(tt,n)),e.nanoid=n=>e.check(Su(Fl,n)),e.guid=n=>e.check(rr(cr,n)),e.cuid=n=>e.check(ku($l,n)),e.cuid2=n=>e.check(xu(Ll,n)),e.ulid=n=>e.check(Iu(jl,n)),e.base64=n=>e.check(Pu(Wl,n)),e.base64url=n=>e.check(zu(Hl,n)),e.xid=n=>e.check(Tu(Ul,n)),e.ksuid=n=>e.check(Nu(Ml,n)),e.ipv4=n=>e.check(Yi(io,n)),e.ipv6=n=>e.check(Ru(Bl,n)),e.cidrv4=n=>e.check(Du(Vl,n)),e.cidrv6=n=>e.check(Cu(ql,n)),e.e164=n=>e.check(Fu(Jl,n)),e.datetime=n=>e.check(pl(n)),e.date=n=>e.check(yl(n)),e.time=n=>e.check(bl(n)),e.duration=n=>e.check(El(n))});function ue(e){return _u(Pl,e)}const P=p("ZodStringFormat",(e,t)=>{D.init(e,t),Qi.init(e,t)}),eo=p("ZodEmail",(e,t)=>{Sa.init(e,t),P.init(e,t)});function to(e){return Ji(eo,e)}const cr=p("ZodGUID",(e,t)=>{Aa.init(e,t),P.init(e,t)}),tt=p("ZodUUID",(e,t)=>{Oa.init(e,t),P.init(e,t)}),no=p("ZodURL",(e,t)=>{ka.init(e,t),P.init(e,t)});function ro(e){return Gi(no,e)}const zl=p("ZodEmoji",(e,t)=>{xa.init(e,t),P.init(e,t)}),Fl=p("ZodNanoID",(e,t)=>{Ia.init(e,t),P.init(e,t)}),$l=p("ZodCUID",(e,t)=>{Ta.init(e,t),P.init(e,t)}),Ll=p("ZodCUID2",(e,t)=>{Na.init(e,t),P.init(e,t)}),jl=p("ZodULID",(e,t)=>{Ra.init(e,t),P.init(e,t)}),Ul=p("ZodXID",(e,t)=>{Da.init(e,t),P.init(e,t)}),Ml=p("ZodKSUID",(e,t)=>{Ca.init(e,t),P.init(e,t)}),io=p("ZodIPv4",(e,t)=>{La.init(e,t),P.init(e,t)});function Zl(e){return Yi(io,e)}const Bl=p("ZodIPv6",(e,t)=>{ja.init(e,t),P.init(e,t)}),Vl=p("ZodCIDRv4",(e,t)=>{Ua.init(e,t),P.init(e,t)}),ql=p("ZodCIDRv6",(e,t)=>{Ma.init(e,t),P.init(e,t)}),Wl=p("ZodBase64",(e,t)=>{Za.init(e,t),P.init(e,t)}),Hl=p("ZodBase64URL",(e,t)=>{Va.init(e,t),P.init(e,t)}),Jl=p("ZodE164",(e,t)=>{qa.init(e,t),P.init(e,t)}),Gl=p("ZodJWT",(e,t)=>{Ha.init(e,t),P.init(e,t)}),oo=p("ZodNumber",(e,t)=>{qi.init(e,t),C.init(e,t),e.gt=(r,i)=>e.check(or(r,i)),e.gte=(r,i)=>e.check(ct(r,i)),e.min=(r,i)=>e.check(ct(r,i)),e.lt=(r,i)=>e.check(ir(r,i)),e.lte=(r,i)=>e.check(st(r,i)),e.max=(r,i)=>e.check(st(r,i)),e.int=r=>e.check(ar(r)),e.safe=r=>e.check(ar(r)),e.positive=r=>e.check(or(0,r)),e.nonnegative=r=>e.check(ct(0,r)),e.negative=r=>e.check(ir(0,r)),e.nonpositive=r=>e.check(st(0,r)),e.multipleOf=(r,i)=>e.check(sr(r,i)),e.step=(r,i)=>e.check(sr(r,i)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function ce(e){return Zu(oo,e)}const Yl=p("ZodNumberFormat",(e,t)=>{Ja.init(e,t),oo.init(e,t)});function ar(e){return Bu(Yl,e)}const Xl=p("ZodBoolean",(e,t)=>{Ga.init(e,t),C.init(e,t)});function Kl(e){return Vu(Xl,e)}const Ql=p("ZodAny",(e,t)=>{Ya.init(e,t),C.init(e,t)});function oe(){return qu(Ql)}const ef=p("ZodUnknown",(e,t)=>{Xa.init(e,t),C.init(e,t)});function ur(){return Wu(ef)}const tf=p("ZodNever",(e,t)=>{Ka.init(e,t),C.init(e,t)});function nf(e){return Hu(tf,e)}const rf=p("ZodDate",(e,t)=>{Qa.init(e,t),C.init(e,t),e.min=(r,i)=>e.check(ct(r,i)),e.max=(r,i)=>e.check(st(r,i));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function of(e){return Ju(rf,e)}const sf=p("ZodArray",(e,t)=>{eu.init(e,t),C.init(e,t),e.element=t.element,e.min=(n,r)=>e.check(bt(n,r)),e.nonempty=n=>e.check(bt(1,n)),e.max=(n,r)=>e.check(Xi(n,r)),e.length=(n,r)=>e.check(Ki(n,r)),e.unwrap=()=>e.element});function V(e,t){return al(sf,e,t)}const cf=p("ZodObject",(e,t)=>{nu.init(e,t),C.init(e,t),N(e,"shape",()=>t.shape),e.keyof=()=>ff(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ur()}),e.loose=()=>e.clone({...e._zod.def,catchall:ur()}),e.strict=()=>e.clone({...e._zod.def,catchall:nf()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>yc(e,n),e.safeExtend=n=>gc(e,n),e.merge=n=>bc(e,n),e.pick=n=>pc(e,n),e.omit=n=>mc(e,n),e.partial=(...n)=>_c(ao,e,n[0]),e.required=(...n)=>Ec(uo,e,n[0])});function af(e,t){const n={type:"object",shape:e??{},...v(t)};return new cf(n)}const uf=p("ZodUnion",(e,t)=>{ru.init(e,t),C.init(e,t),e.options=t.options});function so(e,t){return new uf({type:"union",options:e,...v(t)})}const lf=p("ZodIntersection",(e,t)=>{iu.init(e,t),C.init(e,t)});function co(e,t){return new lf({type:"intersection",left:e,right:t})}const nn=p("ZodEnum",(e,t)=>{ou.init(e,t),C.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{const o={};for(const s of r)if(n.has(s))o[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new nn({...t,checks:[],...v(i),entries:o})},e.exclude=(r,i)=>{const o={...t.entries};for(const s of r)if(n.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new nn({...t,checks:[],...v(i),entries:o})}});function ff(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new nn({type:"enum",entries:n,...v(t)})}const df=p("ZodFile",(e,t)=>{su.init(e,t),C.init(e,t),e.min=(n,r)=>e.check(Yu(n,r)),e.max=(n,r)=>e.check(Gu(n,r)),e.mime=(n,r)=>e.check(rl(Array.isArray(n)?n:[n],r))});function Q(e){return ul(df,e)}const hf=p("ZodTransform",(e,t)=>{cu.init(e,t),C.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Ti(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(je(o,n.value,t));else{const s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(je(s))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(o=>(n.value=o,n)):(n.value=i,n)}});function pf(e){return new hf({type:"transform",transform:e})}const ao=p("ZodOptional",(e,t)=>{au.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType});function lr(e){return new ao({type:"optional",innerType:e})}const mf=p("ZodNullable",(e,t)=>{uu.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType});function fr(e){return new mf({type:"nullable",innerType:e})}const yf=p("ZodDefault",(e,t)=>{lu.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function gf(e,t){return new yf({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Di(t)}})}const bf=p("ZodPrefault",(e,t)=>{fu.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType});function _f(e,t){return new bf({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Di(t)}})}const uo=p("ZodNonOptional",(e,t)=>{du.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ef(e,t){return new uo({type:"nonoptional",innerType:e,...v(t)})}const vf=p("ZodCatch",(e,t)=>{hu.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function wf(e,t){return new vf({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Af=p("ZodPipe",(e,t)=>{pu.init(e,t),C.init(e,t),e.in=t.in,e.out=t.out});function dr(e,t){return new Af({type:"pipe",in:e,out:t})}const Of=p("ZodReadonly",(e,t)=>{mu.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Sf(e){return new Of({type:"readonly",innerType:e})}const kf=p("ZodCustom",(e,t)=>{yu.init(e,t),C.init(e,t)});function xf(e,t={}){return ll(kf,e,t)}function If(e){return fl(e)}const hr={"arrayEach:string":()=>V(ue({error:"Each item must be a string"})),"arrayEach:number":()=>V(ce({error:"Each item must be a number"})),"arrayEach:email":()=>V(to({error:"Each item must be a valid email"})),"arrayEach:url":()=>V(ro({error:"Each item must be a valid URL"})),"arrayEach:file":()=>V(Q({error:"Each item must be a file"}))},pr={nullable:()=>ue().nullable().optional(),required:()=>so([ue().min(1,{error:"This field is required"}),Q({error:"This field is required"}),V(oe()).min(1,{error:"This field is required"})]),string:()=>ue({error:"Must be a string"}),email:()=>to({error:"Invalid email format"}),url:()=>ro({error:"Invalid URL format"}),number:()=>ce({error:"Must be a number"}),integer:()=>ce().int({error:"Must be an integer"}),positive:()=>ce().positive({error:"Must be positive"}),negative:()=>ce().negative({error:"Must be negative"}),ipv4:()=>Zl({error:"Must be valid IPv4"}),boolean:()=>Kl({error:"Must be a boolean"}),date:()=>of({error:"Must be a valid date"}),array:()=>V(oe(),{error:"Must be an array"}),object:()=>af({},{error:"Must be an object"}),file:()=>Q({error:"Must be a file"})},mr=e=>{const t={B:1,KB:1024,MB:1048576,GB:1073741824,TB:1099511627776},n=e.match(/^(\d+(?:\.\d+)?)\s*(B|KB|MB|GB|TB)$/i);if(!n)throw new Error(`Invalid size format: ${e}`);const[,r,i]=n;return Math.round(Number(r)*t[i.toUpperCase()])},yr=e=>{if(e.includes(",")){const t=e.split(",").map(n=>n.trim());return Q().refine(n=>t.some(r=>r.endsWith("/*")?n.type.startsWith(r.slice(0,-1)):n.type===r),{error:`Must be one of: ${t.join(", ")}`})}else if(e.endsWith("/*")){const t=e.slice(0,-1);return Q().refine(n=>n.type.startsWith(t),{error:`Must be ${e} file`})}else return Q().mime(e,{error:`Must be ${e} file`})},lo=e=>{const[t,n]=us(e,i=>typeof i=="function");return[...t.map(i=>{const o=i;return oe().refine(i,{message:o.message||"Validation failed"})}),...n.map(i=>{if(!Ai(i))return oe();if(i in pr)return pr[i]();if(i in hr)return hr[i]();if(i.startsWith("min:")){const o=parseInt(i.split(":")[1]);return ce().min(o,{error:`Must be at least ${o}`})}if(i.startsWith("max:")){const o=parseInt(i.split(":")[1]);return ce().max(o,{error:`Must be at most ${o}`})}if(i.startsWith("minLength:")){const o=parseInt(i.split(":")[1]);return ue().min(o,{error:`Must be at least ${o} characters`})}if(i.startsWith("maxLength:")){const o=parseInt(i.split(":")[1]);return ue().max(o,{error:`Must be at most ${o} characters`})}if(i.startsWith("arrayMinLength:")){const o=parseInt(i.split(":")[1]);return V(oe()).min(o,{error:`Must have at least ${o} items`})}if(i.startsWith("arrayMaxLength:")){const o=parseInt(i.split(":")[1]);return V(oe()).max(o,{error:`Must have at most ${o} items`})}if(i.startsWith("pattern:")){const o=i.split(":")[1];return ue().regex(new RegExp(o),{error:"Invalid format"})}if(i.startsWith("fileSize:")){const o=i.split(":")[1],s=mr(o);return Q().max(s,{error:`File too large (max ${o})`})}if(i.startsWith("arrayEach:fileSize:")){const o=i.split(":")[2],s=mr(o);return V(Q().max(s,{error:`Each file must be smaller than ${o}`}))}if(i.startsWith("fileType:")){const o=i.split(":")[1];return yr(o)}if(i.startsWith("arrayEach:fileType:")){const o=i.split(":")[2],s=yr(o);return V(s)}return oe()})].reduce((i,o)=>co(i,o))},Tt=({initialData:e,validationRules:t})=>{const[n,r]=k.useState(e),[i,o]=k.useState({}),s=k.useMemo(()=>!Ot(i),[i]),c=k.useMemo(()=>!Ns(n,e),[n,e]),a=k.useCallback(((m,b)=>{if(typeof m=="string"){if(!Ce(e,m))throw new Error(`Invalid path: '${m}'`);r(O=>ec(vi(O),m,b))}else r(O=>({...O,...m}))}),[e]),u=k.useCallback(((m,b)=>{if(m!=="root"&&!Ce(e,m))throw new Error(`Invalid path: '${m}'`);o(O=>({...O,[m]:b}))}),[e]),l=k.useCallback((m=>{if(!Ce(e,m))throw new Error(`Invalid path: '${m}'`);return!!i[m]}),[i,e]),h=k.useCallback((m=>{if(!Ce(e,m))throw new Error(`Invalid path: '${m}'`);o(b=>ks(b,[m]))}),[e]),g=k.useCallback((()=>{o({})}),[]),_=k.useCallback((()=>{r(e),o({})}),[e]),f=k.useCallback(()=>{let m=!0;return t&&Ss(t,(b,O)=>{const T=At(n,O),w=lo(b).safeParse(T);if(w.success)h(O);else{const x=w.error.issues.map(U=>U.message);u(O,x),m=w.success}}),m},[n,t,h,u]);return{data:n,setData:a,errors:i,hasErrors:s,clearErrors:g,clearError:h,setError:u,hasError:l,reset:_,isDirty:c,validate:f}},Tf=(e,t)=>{const n=r=>e(r);return Object.defineProperty(n,"message",{value:t}),n};function Y(e){try{return e()}catch{}}const gr=Y(()=>globalThis)||Y(()=>window)||Y(()=>self)||Y(()=>global)||Y(function(){return Y.constructor("return this")()}),fo="4.0.7",br=new Map;function Nf(e){const t=br.get(e)||1;return br.set(e,t+1),`${e}:${t}:${Math.random().toString(36).slice(2)}`}function Rf(e,t=0){const n=Nf("stringifyForDisplay");return JSON.stringify(e,(r,i)=>i===void 0?n:i,t).split(JSON.stringify(n)).join("<undefined>")}const _r="Invariant Violation";class Cn extends Error{constructor(t=_r){super(t),this.name=_r,Object.setPrototypeOf(this,Cn.prototype)}}const ho=["debug","log","warn","error","silent"];let Df=ho.indexOf("silent");function ee(e,...t){if(!e)throw Cf(...t)}function Nt(e){return function(t,...n){if(ho.indexOf(e)>=Df){const r=console[e]||console.log;if(typeof t=="number"){const i=t;t=po(i),t||(t=mo(i,n),n=[])}r(t,...n)}}}ee.debug=Nt("debug");ee.log=Nt("log");ee.warn=Nt("warn");ee.error=Nt("error");function Cf(e,...t){return new Cn(po(e,t)||mo(e,t))}const Er=Symbol.for("ApolloErrorMessageHandler_"+fo);function rn(e){if(typeof e=="string")return e;try{return Rf(e,2).slice(0,1e3)}catch{return"<non-serializable>"}}function po(e,t=[]){if(e)return gr[Er]&&gr[Er](e,t.map(rn))}function mo(e,t=[]){if(e)return typeof e=="string"?t.reduce((n,r)=>n.replace(/%[sdfo]/,rn(r)),e):`An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#${encodeURIComponent(JSON.stringify({version:fo,message:e,args:t.map(rn)}))}`}const vr=Symbol.for("__APOLLO_CONTEXT__");function yo(){ee("createContext"in I,37);let e=I.createContext[vr];return e||(Object.defineProperty(I.createContext,vr,{value:e=I.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}function Rt(e){const t=I.useContext(yo()),n=e||t.client;return ee(!!n,28),n}const{toString:wr,hasOwnProperty:Pf}=Object.prototype,Ar=Function.prototype.toString,on=new Map;function W(e,t){try{return sn(e,t)}finally{on.clear()}}function sn(e,t){if(e===t)return!0;const n=wr.call(e),r=wr.call(t);if(n!==r)return!1;switch(n){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(Sr(e,t))return!0;const i=Or(e),o=Or(t),s=i.length;if(s!==o.length)return!1;for(let c=0;c<s;++c)if(!Pf.call(t,i[c]))return!1;for(let c=0;c<s;++c){const a=i[c];if(!sn(e[a],t[a]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!==e)return t!==t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e==`${t}`;case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(Sr(e,t))return!0;const i=e.entries(),o=n==="[object Map]";for(;;){const s=i.next();if(s.done)break;const[c,a]=s.value;if(!t.has(c)||o&&!sn(a,t.get(c)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{let i=e.byteLength;if(i===t.byteLength)for(;i--&&e[i]===t[i];);return i===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const i=Ar.call(e);return i!==Ar.call(t)?!1:!$f(i,Ff)}}return!1}function Or(e){return Object.keys(e).filter(zf,e)}function zf(e){return this[e]!==void 0}const Ff="{ [native code] }";function $f(e,t){const n=e.length-t.length;return n>=0&&e.indexOf(t,n)===n}function Sr(e,t){let n=on.get(e);if(n){if(n.has(t))return!0}else on.set(e,n=new Set);return n.add(t),!1}function Zt(e,t){if(!!!e)throw new Error(t)}function Lf(e){return typeof e=="object"&&e!==null}function jf(e,t){if(!!!e)throw new Error("Unexpected invariant triggered.")}const Uf=/\r\n|[\n\r]/g;function cn(e,t){let n=0,r=1;for(const i of e.body.matchAll(Uf)){if(typeof i.index=="number"||jf(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Mf(e){return go(e.source,cn(e.source,e.start))}function go(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,s=t.line+o,c=t.line===1?n:0,a=t.column+c,u=`${e.name}:${s}:${a}
21
+ `,l=r.split(/\r\n|[\n\r]/g),h=l[i];if(h.length>120){const g=Math.floor(a/80),_=a%80,f=[];for(let m=0;m<h.length;m+=80)f.push(h.slice(m,m+80));return u+kr([[`${s} |`,f[0]],...f.slice(1,g+1).map(m=>["|",m]),["|","^".padStart(_)],["|",f[g+1]]])}return u+kr([[`${s-1} |`,l[i-1]],[`${s} |`,h],["|","^".padStart(a)],[`${s+1} |`,l[i+1]]])}function kr(e){const t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
22
+ `)}function Zf(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class Pn extends Error{constructor(t,...n){var r,i,o;const{nodes:s,source:c,positions:a,path:u,originalError:l,extensions:h}=Zf(n);super(t),this.name="GraphQLError",this.path=u??void 0,this.originalError=l??void 0,this.nodes=xr(Array.isArray(s)?s:s?[s]:void 0);const g=xr((r=this.nodes)===null||r===void 0?void 0:r.map(f=>f.loc).filter(f=>f!=null));this.source=c??(g==null||(i=g[0])===null||i===void 0?void 0:i.source),this.positions=a??g?.map(f=>f.start),this.locations=a&&c?a.map(f=>cn(c,f)):g?.map(f=>cn(f.source,f.start));const _=Lf(l?.extensions)?l?.extensions:void 0;this.extensions=(o=h??_)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),l!=null&&l.stack?Object.defineProperty(this,"stack",{value:l.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Pn):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(t+=`
23
+
24
+ `+Mf(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=`
25
+
26
+ `+go(this.source,n);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function xr(e){return e===void 0||e.length===0?void 0:e}function $(e,t,n){return new Pn(`Syntax Error: ${n}`,{source:e,positions:[t]})}class Bf{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class bo{constructor(t,n,r,i,o,s){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=o,this.value=s,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Vf={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};new Set(Object.keys(Vf));var Ee;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(Ee||(Ee={}));var an;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(an||(an={}));var A;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(A||(A={}));function qf(e){return e===9||e===32}function Ue(e){return e>=48&&e<=57}function _o(e){return e>=97&&e<=122||e>=65&&e<=90}function Eo(e){return _o(e)||e===95}function Wf(e){return _o(e)||Ue(e)||e===95}function Hf(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let s=0;s<e.length;++s){var o;const c=e[s],a=Jf(c);a!==c.length&&(r=(o=r)!==null&&o!==void 0?o:s,i=s,s!==0&&a<n&&(n=a))}return e.map((s,c)=>c===0?s:s.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function Jf(e){let t=0;for(;t<e.length&&qf(e.charCodeAt(t));)++t;return t}var y;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(y||(y={}));class Gf{constructor(t){const n=new bo(y.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==y.EOF)do if(t.next)t=t.next;else{const n=Xf(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===y.COMMENT);return t}}function Yf(e){return e===y.BANG||e===y.DOLLAR||e===y.AMP||e===y.PAREN_L||e===y.PAREN_R||e===y.SPREAD||e===y.COLON||e===y.EQUALS||e===y.AT||e===y.BRACKET_L||e===y.BRACKET_R||e===y.BRACE_L||e===y.PIPE||e===y.BRACE_R}function Oe(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Dt(e,t){return vo(e.charCodeAt(t))&&wo(e.charCodeAt(t+1))}function vo(e){return e>=55296&&e<=56319}function wo(e){return e>=56320&&e<=57343}function pe(e,t){const n=e.source.body.codePointAt(t);if(n===void 0)return y.EOF;if(n>=32&&n<=126){const r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function F(e,t,n,r,i){const o=e.line,s=1+n-e.lineStart;return new bo(t,n,r,o,s,i)}function Xf(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const o=n.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Kf(e,i);case 33:return F(e,y.BANG,i,i+1);case 36:return F(e,y.DOLLAR,i,i+1);case 38:return F(e,y.AMP,i,i+1);case 40:return F(e,y.PAREN_L,i,i+1);case 41:return F(e,y.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return F(e,y.SPREAD,i,i+3);break;case 58:return F(e,y.COLON,i,i+1);case 61:return F(e,y.EQUALS,i,i+1);case 64:return F(e,y.AT,i,i+1);case 91:return F(e,y.BRACKET_L,i,i+1);case 93:return F(e,y.BRACKET_R,i,i+1);case 123:return F(e,y.BRACE_L,i,i+1);case 124:return F(e,y.PIPE,i,i+1);case 125:return F(e,y.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?id(e,i):ed(e,i)}if(Ue(o)||o===45)return Qf(e,i,o);if(Eo(o))return od(e,i);throw $(e.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Oe(o)||Dt(n,i)?`Unexpected character: ${pe(e,i)}.`:`Invalid character: ${pe(e,i)}.`)}return F(e,y.EOF,r,r)}function Kf(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const o=n.charCodeAt(i);if(o===10||o===13)break;if(Oe(o))++i;else if(Dt(n,i))i+=2;else break}return F(e,y.COMMENT,t,i,n.slice(t+1,i))}function Qf(e,t,n){const r=e.source.body;let i=t,o=n,s=!1;if(o===45&&(o=r.charCodeAt(++i)),o===48){if(o=r.charCodeAt(++i),Ue(o))throw $(e.source,i,`Invalid number, unexpected digit after 0: ${pe(e,i)}.`)}else i=Bt(e,i,o),o=r.charCodeAt(i);if(o===46&&(s=!0,o=r.charCodeAt(++i),i=Bt(e,i,o),o=r.charCodeAt(i)),(o===69||o===101)&&(s=!0,o=r.charCodeAt(++i),(o===43||o===45)&&(o=r.charCodeAt(++i)),i=Bt(e,i,o),o=r.charCodeAt(i)),o===46||Eo(o))throw $(e.source,i,`Invalid number, expected digit but got: ${pe(e,i)}.`);return F(e,s?y.FLOAT:y.INT,t,i,r.slice(t,i))}function Bt(e,t,n){if(!Ue(n))throw $(e.source,t,`Invalid number, expected digit but got: ${pe(e,t)}.`);const r=e.source.body;let i=t+1;for(;Ue(r.charCodeAt(i));)++i;return i}function ed(e,t){const n=e.source.body,r=n.length;let i=t+1,o=i,s="";for(;i<r;){const c=n.charCodeAt(i);if(c===34)return s+=n.slice(o,i),F(e,y.STRING,t,i+1,s);if(c===92){s+=n.slice(o,i);const a=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?td(e,i):nd(e,i):rd(e,i);s+=a.value,i+=a.size,o=i;continue}if(c===10||c===13)break;if(Oe(c))++i;else if(Dt(n,i))i+=2;else throw $(e.source,i,`Invalid character within String: ${pe(e,i)}.`)}throw $(e.source,i,"Unterminated string.")}function td(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const o=n.charCodeAt(t+i++);if(o===125){if(i<5||!Oe(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|Pe(o),r<0)break}throw $(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function nd(e,t){const n=e.source.body,r=Ir(n,t+2);if(Oe(r))return{value:String.fromCodePoint(r),size:6};if(vo(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const i=Ir(n,t+8);if(wo(i))return{value:String.fromCodePoint(r,i),size:12}}throw $(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function Ir(e,t){return Pe(e.charCodeAt(t))<<12|Pe(e.charCodeAt(t+1))<<8|Pe(e.charCodeAt(t+2))<<4|Pe(e.charCodeAt(t+3))}function Pe(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function rd(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
27
+ `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw $(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function id(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,o=t+3,s=o,c="";const a=[];for(;o<r;){const u=n.charCodeAt(o);if(u===34&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34){c+=n.slice(s,o),a.push(c);const l=F(e,y.BLOCK_STRING,t,o+3,Hf(a).join(`
28
+ `));return e.line+=a.length-1,e.lineStart=i,l}if(u===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){c+=n.slice(s,o),s=o+1,o+=4;continue}if(u===10||u===13){c+=n.slice(s,o),a.push(c),u===13&&n.charCodeAt(o+1)===10?o+=2:++o,c="",s=o,i=o;continue}if(Oe(u))++o;else if(Dt(n,o))o+=2;else throw $(e.source,o,`Invalid character within String: ${pe(e,o)}.`)}throw $(e.source,o,"Unterminated string.")}function od(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const o=n.charCodeAt(i);if(Wf(o))++i;else break}return F(e,y.NAME,t,i,n.slice(t,i))}const sd=10,Ao=2;function Oo(e){return Ct(e,[])}function Ct(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return cd(e,t);default:return String(e)}}function cd(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(ad(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:Ct(r,n)}else if(Array.isArray(e))return ld(e,n);return ud(e,n)}function ad(e){return typeof e.toJSON=="function"}function ud(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>Ao?"["+fd(e)+"]":"{ "+n.map(([i,o])=>i+": "+Ct(o,t)).join(", ")+" }"}function ld(e,t){if(e.length===0)return"[]";if(t.length>Ao)return"[Array]";const n=Math.min(sd,e.length),r=e.length-n,i=[];for(let o=0;o<n;++o)i.push(Ct(e[o],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function fd(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}const dd=globalThis.process&&process.env.NODE_ENV==="production",hd=dd?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;const i=n.prototype[Symbol.toStringTag],o=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===o){const s=Oo(t);throw new Error(`Cannot use ${i} "${s}" from another module or realm.
29
+
30
+ Ensure that there is only one instance of "graphql" in the node_modules
31
+ directory. If different versions of "graphql" are the dependencies of other
32
+ relied on modules, use "resolutions" to ensure only one version is installed.
33
+
34
+ https://yarnpkg.com/en/docs/selective-version-resolutions
35
+
36
+ Duplicate "graphql" modules cannot be used at the same time since different
37
+ versions may have different capabilities and behavior. The data from one
38
+ version used in the function from another could produce confusing and
39
+ spurious results.`)}}return!1};class So{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||Zt(!1,`Body must be a string. Received: ${Oo(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||Zt(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Zt(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function pd(e){return hd(e,So)}function md(e,t){const n=new yd(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}class yd{constructor(t,n={}){const r=pd(t)?t:new So(t);this._lexer=new Gf(r),this._options=n,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(y.NAME);return this.node(t,{kind:A.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:A.DOCUMENT,definitions:this.many(y.SOF,this.parseDefinition,y.EOF)})}parseDefinition(){if(this.peek(y.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===y.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw $(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(y.BRACE_L))return this.node(t,{kind:A.OPERATION_DEFINITION,operation:Ee.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let r;return this.peek(y.NAME)&&(r=this.parseName()),this.node(t,{kind:A.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(y.NAME);switch(t.value){case"query":return Ee.QUERY;case"mutation":return Ee.MUTATION;case"subscription":return Ee.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(y.PAREN_L,this.parseVariableDefinition,y.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:A.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(y.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(y.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(y.DOLLAR),this.node(t,{kind:A.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:A.SELECTION_SET,selections:this.many(y.BRACE_L,this.parseSelection,y.BRACE_R)})}parseSelection(){return this.peek(y.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,n=this.parseName();let r,i;return this.expectOptionalToken(y.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:A.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(y.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(y.PAREN_L,n,y.PAREN_R)}parseArgument(t=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(y.COLON),this.node(n,{kind:A.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(y.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(y.NAME)?this.node(t,{kind:A.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:A.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:A.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:A.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const n=this._lexer.token;switch(n.kind){case y.BRACKET_L:return this.parseList(t);case y.BRACE_L:return this.parseObject(t);case y.INT:return this.advanceLexer(),this.node(n,{kind:A.INT,value:n.value});case y.FLOAT:return this.advanceLexer(),this.node(n,{kind:A.FLOAT,value:n.value});case y.STRING:case y.BLOCK_STRING:return this.parseStringLiteral();case y.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:A.BOOLEAN,value:!0});case"false":return this.node(n,{kind:A.BOOLEAN,value:!1});case"null":return this.node(n,{kind:A.NULL});default:return this.node(n,{kind:A.ENUM,value:n.value})}case y.DOLLAR:if(t)if(this.expectToken(y.DOLLAR),this._lexer.token.kind===y.NAME){const r=this._lexer.token.value;throw $(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:A.STRING,value:t.value,block:t.kind===y.BLOCK_STRING})}parseList(t){const n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:A.LIST,values:this.any(y.BRACKET_L,n,y.BRACKET_R)})}parseObject(t){const n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:A.OBJECT,fields:this.any(y.BRACE_L,n,y.BRACE_R)})}parseObjectField(t){const n=this._lexer.token,r=this.parseName();return this.expectToken(y.COLON),this.node(n,{kind:A.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){const n=[];for(;this.peek(y.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const n=this._lexer.token;return this.expectToken(y.AT),this.node(n,{kind:A.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let n;if(this.expectOptionalToken(y.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(y.BRACKET_R),n=this.node(t,{kind:A.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(y.BANG)?this.node(t,{kind:A.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:A.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(y.STRING)||this.peek(y.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),i=this.many(y.BRACE_L,this.parseOperationTypeDefinition,y.BRACE_R);return this.node(t,{kind:A.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,n=this.parseOperationType();this.expectToken(y.COLON);const r=this.parseNamedType();return this.node(t,{kind:A.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:A.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(t,{kind:A.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:o,fields:s})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(y.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(y.BRACE_L,this.parseFieldDefinition,y.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(y.COLON);const o=this.parseTypeReference(),s=this.parseConstDirectives();return this.node(t,{kind:A.FIELD_DEFINITION,description:n,name:r,arguments:i,type:o,directives:s})}parseArgumentDefs(){return this.optionalMany(y.PAREN_L,this.parseInputValueDef,y.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(y.COLON);const i=this.parseTypeReference();let o;this.expectOptionalToken(y.EQUALS)&&(o=this.parseConstValueLiteral());const s=this.parseConstDirectives();return this.node(t,{kind:A.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:o,directives:s})}parseInterfaceTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(t,{kind:A.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:o,fields:s})}parseUnionTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),i=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(t,{kind:A.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(y.EQUALS)?this.delimitedMany(y.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),i=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(t,{kind:A.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:o})}parseEnumValuesDefinition(){return this.optionalMany(y.BRACE_L,this.parseEnumValueDefinition,y.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:A.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw $(this._lexer.source,this._lexer.token.start,`${nt(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),i=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(t,{kind:A.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(y.BRACE_L,this.parseInputValueDef,y.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===y.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.optionalMany(y.BRACE_L,this.parseOperationTypeDefinition,y.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:A.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:A.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:A.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:o})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:A.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:A.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:A.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:A.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(y.AT);const r=this.parseName(),i=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const s=this.parseDirectiveLocations();return this.node(t,{kind:A.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:o,locations:s})}parseDirectiveLocations(){return this.delimitedMany(y.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(an,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new Bf(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){const n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw $(this._lexer.source,n.start,`Expected ${ko(t)}, found ${nt(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const n=this._lexer.token;if(n.kind===y.NAME&&n.value===t)this.advanceLexer();else throw $(this._lexer.source,n.start,`Expected "${t}", found ${nt(n)}.`)}expectOptionalKeyword(t){const n=this._lexer.token;return n.kind===y.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const n=t??this._lexer.token;return $(this._lexer.source,n.start,`Unexpected ${nt(n)}.`)}any(t,n,r){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);const r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){const{maxTokens:t}=this._options,n=this._lexer.advance();if(n.kind!==y.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw $(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function nt(e){const t=e.value;return ko(e.kind)+(t!=null?` "${t}"`:"")}function ko(e){return Yf(e)?`"${e}"`:e}var un=function(e,t){return un=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},un(e,t)};function ne(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");un(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var _t=function(){return _t=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},_t.apply(this,arguments)};function Tr(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Me(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(c){s={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function Ze(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function le(e){return typeof e=="function"}function gd(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Vt=gd(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
40
+ `+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
41
+ `):"",this.name="UnsubscriptionError",this.errors=n}});function ln(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Pt=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var c=Tr(s),a=c.next();!a.done;a=c.next()){var u=a.value;u.remove(this)}}catch(m){t={error:m}}finally{try{a&&!a.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}else s.remove(this);var l=this.initialTeardown;if(le(l))try{l()}catch(m){o=m instanceof Vt?m.errors:[m]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var g=Tr(h),_=g.next();!_.done;_=g.next()){var f=_.value;try{Nr(f)}catch(m){o=o??[],m instanceof Vt?o=Ze(Ze([],Me(o)),Me(m.errors)):o.push(m)}}}catch(m){r={error:m}}finally{try{_&&!_.done&&(i=g.return)&&i.call(g)}finally{if(r)throw r.error}}}if(o)throw new Vt(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Nr(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&ln(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&ln(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})();Pt.EMPTY;function bd(e){return e instanceof Pt||e&&"closed"in e&&le(e.remove)&&le(e.add)&&le(e.unsubscribe)}function Nr(e){le(e)?e():e.unsubscribe()}var _d={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Ze([e,t],Me(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Ed(e){_d.setTimeout(function(){throw e})}function Rr(){}var xo=(function(e){ne(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,bd(n)&&n.add(r)):r.destination=Od,r}return t.create=function(n,r,i){return new wd(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(Pt),vd=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){rt(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){rt(r)}else rt(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){rt(n)}},e})(),wd=(function(e){ne(t,e);function t(n,r,i){var o=e.call(this)||this,s;return le(n)||!n?s={next:n??void 0,error:r??void 0,complete:i??void 0}:s=n,o.destination=new vd(s),o}return t})(xo);function rt(e){Ed(e)}function Ad(e){throw e}var Od={closed:!0,next:Rr,error:Ad,complete:Rr};function Sd(e){return le(e?.lift)}function kd(e){return function(t){if(Sd(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function xd(e,t,n,r,i){return new Id(e,t,n,r,i)}var Id=(function(e){ne(t,e);function t(n,r,i,o,s,c){var a=e.call(this,n)||this;return a.onFinalize=s,a.shouldUnsubscribe=c,a._next=r?function(u){try{r(u)}catch(l){n.error(l)}}:e.prototype._next,a._error=o?function(u){try{o(u)}catch(l){n.error(l)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=i?function(){try{i()}catch(u){n.error(u)}finally{this.unsubscribe()}}:e.prototype._complete,a}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t})(xo),Td={now:function(){return Date.now()}},Nd=(function(e){ne(t,e);function t(n,r){return e.call(this)||this}return t.prototype.schedule=function(n,r){return this},t})(Pt),Dr={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Ze([e,t],Me(n)))},clearInterval:function(e){return clearInterval(e)},delegate:void 0},Rd=(function(e){ne(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return t.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,s=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(s,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(s,this.id,r),this},t.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),Dr.setInterval(n.flush.bind(n,this),i)},t.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&Dr.clearInterval(r)},t.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(s){i=!0,o=s||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},t.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,ln(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t})(Nd),Dd=1,qt,fn={};function Cr(e){return e in fn?(delete fn[e],!0):!1}var Io={setImmediate:function(e){var t=Dd++;return fn[t]=!0,qt||(qt=Promise.resolve()),qt.then(function(){return Cr(t)&&e()}),t},clearImmediate:function(e){Cr(e)}},Cd=Io.setImmediate,Pd=Io.clearImmediate,Pr={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Cd.apply(void 0,Ze([],Me(e)))},clearImmediate:function(e){return Pd(e)},delegate:void 0},zd=(function(e){ne(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.scheduler=n,i.work=r,i}return t.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),i!==null&&i>0?e.prototype.requestAsyncId.call(this,n,r,i):(n.actions.push(this),n._scheduled||(n._scheduled=Pr.setImmediate(n.flush.bind(n,void 0))))},t.prototype.recycleAsyncId=function(n,r,i){var o;if(i===void 0&&(i=0),i!=null?i>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,n,r,i);var s=n.actions;r!=null&&((o=s[s.length-1])===null||o===void 0?void 0:o.id)!==r&&(Pr.clearImmediate(r),n._scheduled===r&&(n._scheduled=void 0))},t})(Rd),zr=(function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(t,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,t).schedule(r,n)},e.now=Td.now,e})(),Fd=(function(e){ne(t,e);function t(n,r){r===void 0&&(r=zr.now);var i=e.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},t})(zr),$d=(function(e){ne(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(n){this._active=!0;var r=this._scheduled;this._scheduled=void 0;var i=this.actions,o;n=n||i.shift();do if(o=n.execute(n.state,n.delay))break;while((n=i[0])&&n.id===r&&i.shift());if(this._active=!1,o){for(;(n=i[0])&&n.id===r&&i.shift();)n.unsubscribe();throw o}},t})(Fd),Ld=new $d(zd);function Wt(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function jd(e,t){return t===void 0&&(t=0),kd(function(n,r){n.subscribe(xd(r,function(i){return Wt(r,e,function(){return r.next(i)},t)},function(){return Wt(r,e,function(){return r.complete()},t)},function(i){return Wt(r,e,function(){return r.error(i)},t)}))})}const To=typeof Y(()=>window.document.createElement)=="function";function Fr(...e){const t={};return e.forEach(n=>{n&&Object.keys(n).forEach(r=>{const i=n[r];i!==void 0&&(t[r]=i)})}),t}function dn(e,t){return Fr(e,t,t.variables&&{variables:Fr({...e&&e.variables,...t.variables})})}function Ud(e){return e.catch(()=>{}),e}var Et;(function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error",e[e.streaming=9]="streaming"})(Et||(Et={}));var at=new Map,hn=new Map,No=!0,vt=!1;function Ro(e){return e.replace(/[\s,]+/g," ").trim()}function Md(e){return Ro(e.source.body.substring(e.start,e.end))}function Zd(e){var t=new Set,n=[];return e.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=Md(r.loc),s=hn.get(i);s&&!s.has(o)?No&&console.warn("Warning: fragment with name "+i+` already exists.
42
+ graphql-tag enforces all fragment names across your application to be unique; read more about
43
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||hn.set(i,s=new Set),s.add(o),t.has(o)||(t.add(o),n.push(r))}else n.push(r)}),_t(_t({},e),{definitions:n})}function Bd(e){var t=new Set(e.definitions);t.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var o=r[i];o&&typeof o=="object"&&t.add(o)})});var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}function Vd(e){var t=Ro(e);if(!at.has(t)){var n=md(e,{experimentalFragmentVariables:vt,allowLegacyFragmentVariables:vt});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");at.set(t,Bd(Zd(n)))}return at.get(t)}function we(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];typeof e=="string"&&(e=[e]);var r=e[0];return t.forEach(function(i,o){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=e[o+1]}),Vd(r)}function qd(){at.clear(),hn.clear()}function Wd(){No=!1}function Hd(){vt=!0}function Jd(){vt=!1}var Ie={gql:we,resetCaches:qd,disableFragmentWarnings:Wd,enableExperimentalFragmentVariables:Hd,disableExperimentalFragmentVariables:Jd};(function(e){e.gql=Ie.gql,e.resetCaches=Ie.resetCaches,e.disableFragmentWarnings=Ie.disableFragmentWarnings,e.enableExperimentalFragmentVariables=Ie.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=Ie.disableExperimentalFragmentVariables})(we||(we={}));we.default=we;function Do(e,t){const n=I.useRef(void 0);return(!n.current||!W(n.current.deps,t))&&(n.current={value:e(),deps:t}),n.current.value}let Ht;function Gd(){}function Yd(){return Ht||(Ht=I.createContext(null)),I.useCallback(()=>{const e=console.error;try{return console.error=Gd,I.useContext(Ht),!0}catch{return!1}finally{console.error=e}},[])}const Xd=Symbol.for("apollo.hook.wrappers");function Kd(e,t,n){const r=[n.queryManager,e.startsWith("use")?I.useContext(yo()):void 0];let i=t;for(const o of r){const s=o?.[Xd]?.[e];s&&(i=s(i))}return i}const Co=To?I.useLayoutEffect:I.useEffect,Qd="useSyncExternalStore",eh=I[Qd],th=Y(()=>navigator.product)=="ReactNative",nh=Y(()=>navigator.userAgent.indexOf("jsdom")>=0)||!1,rh=(To||th)&&!nh,Po=eh||((e,t,n)=>{const r=t(),[{inst:i},o]=I.useState({inst:{value:r,getSnapshot:t}});return rh?I.useLayoutEffect(()=>{Object.assign(i,{value:r,getSnapshot:t}),Jt(i)&&o({inst:i})},[e,r,t]):Object.assign(i,{value:r,getSnapshot:t}),I.useEffect(()=>(Jt(i)&&o({inst:i}),e(function(){Jt(i)&&o({inst:i})})),[e]),r});function Jt({value:e,getSnapshot:t}){try{return e!==t()}catch{return!0}}const ih=["refetch","fetchMore","updateQuery","startPolling","stopPolling","subscribeToMore"];function oh(e,t){const n=Rt(t?.client),r=I.useRef(void 0),i=I.useRef(void 0),o=Do(()=>t,[t]),s=Yd();function c(){return n.watchQuery({...t,query:e,initialFetchPolicy:t?.fetchPolicy,fetchPolicy:"standby"})}const[a,u]=I.useState(n),[l,h]=I.useState(c);a!==n&&(u(n),h(c()));const g=I.useCallback((E,w)=>{const x=i.current?.data;x&&!W(x,E.data)&&(r.current=x),i.current=E,w()},[]),_=Po(I.useCallback(E=>{const w=l.subscribe(x=>{W(i.current,x)||g(x,E)});return()=>{w.unsubscribe()}},[l,g]),()=>i.current||$r,()=>$r),f=I.useMemo(()=>{const E={};for(const w of ih)E[w]=function(...x){return ee(i.current,29,w),l[w](...x)};return E},[l]);I.useEffect(()=>{const E={query:e,errorPolicy:o?.errorPolicy,refetchWritePolicy:o?.refetchWritePolicy,returnPartialData:o?.returnPartialData,notifyOnNetworkStatusChange:o?.notifyOnNetworkStatusChange,nextFetchPolicy:t?.nextFetchPolicy,skipPollAttempt:t?.skipPollAttempt};l.options.fetchPolicy!=="standby"&&o?.fetchPolicy&&(E.fetchPolicy=o.fetchPolicy),l.applyOptions(E)},[e,l,o,t?.nextFetchPolicy,t?.skipPollAttempt]);const m=I.useCallback((...E)=>{ee(!s(),30);const[w]=E;let x=l.options.fetchPolicy;return x==="standby"&&(x=l.options.initialFetchPolicy),l.reobserve({fetchPolicy:x,variables:w?.variables,context:w?.context??{}})},[l,s]),b=I.useRef(m);Co(()=>{b.current=m});const O=I.useCallback((...E)=>b.current(...E),[]),T=I.useMemo(()=>{const{partial:E,...w}=_;return{...f,...w,client:n,previousData:r.current,variables:l.variables,observable:l,called:!!i.current}},[n,_,f,l]);return[O,T]}const $r={data:void 0,dataState:"empty",loading:!1,networkStatus:Et.ready,partial:!0};function sh(e,t){const n=Rt(t?.client),[r,i]=I.useState(()=>Lr(n)),o=I.useRef({result:r,mutationId:0,isMounted:!0,client:n,mutation:e,options:t});Co(()=>{Object.assign(o.current,{client:n,options:t,mutation:e})});const s=I.useCallback((a={})=>{const{options:u,mutation:l}=o.current,h={...u,mutation:l},g=a.client||o.current.client;!o.current.result.loading&&o.current.isMounted&&i(o.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:g});const _=++o.current.mutationId,f=dn(h,a);return Ud(g.mutate(f).then(m=>{const{data:b,error:O}=m,T=a.onError||o.current.options?.onError;if(O&&T&&T(O,f),_===o.current.mutationId){const w={called:!0,loading:!1,data:b,error:O,client:g};o.current.isMounted&&!W(o.current.result,w)&&i(o.current.result=w)}const E=a.onCompleted||o.current.options?.onCompleted;return O||E?.(m.data,f),m},m=>{if(_===o.current.mutationId&&o.current.isMounted){const O={loading:!1,error:m,data:void 0,called:!0,client:g};W(o.current.result,O)||i(o.current.result=O)}const b=a.onError||o.current.options?.onError;throw b&&b(m,f),m}))},[]),c=I.useCallback(()=>{if(o.current.isMounted){const a=Lr(o.current.client);Object.assign(o.current,{mutationId:0,result:a}),i(a)}},[]);return I.useEffect(()=>{const a=o.current;return a.isMounted=!0,()=>{a.isMounted=!1}},[]),[s,{reset:c,...r}]}function Lr(e){return{data:void 0,error:void 0,called:!1,loading:!1,client:e}}const ch=Symbol.for("apollo.skipToken"),Te=Symbol();function zn(e,...[t]){"use no memo";return Kd("useQuery",ah,Rt(typeof t=="object"?t.client:void 0))(e,t)}function ah(e,t={}){const n=Rt(typeof t=="object"?t.client:void 0),{ssr:r}=typeof t=="object"?t:{},i=uh(e,t,n.defaultOptions.watchQuery);function o(_){const f=n.watchQuery(i);return{client:n,query:e,observable:f,resultData:{current:f.getCurrentResult(),previousData:_?.resultData.current.data,variables:f.variables}}}let[s,c]=I.useState(o);(n!==s.client||e!==s.query)&&c(s=o(s));const{observable:a,resultData:u}=s;lh(i,a),dh(u,a,i);const l=fh(a,u,r),h=I.useMemo(()=>({refetch:a.refetch.bind(a),fetchMore:a.fetchMore.bind(a),updateQuery:a.updateQuery.bind(a),startPolling:a.startPolling.bind(a),stopPolling:a.stopPolling.bind(a),subscribeToMore:a.subscribeToMore.bind(a)}),[a]),g=u.previousData;return I.useMemo(()=>{const{partial:_,...f}=l;return{...f,client:n,observable:a,variables:a.variables,previousData:g,...h}},[l,n,a,g,h])}const zo=Symbol();function uh(e,t,n){return Do(()=>{if(t===ch){const i=dn(n,{query:e,fetchPolicy:"standby"});return i[zo]=!0,i}const r=dn(n,{...t,query:e});return t.skip&&(r.initialFetchPolicy=t.initialFetchPolicy||t.fetchPolicy,r.fetchPolicy="standby"),r},[e,t,n])}function lh(e,t){"use no memo";e.fetchPolicy||(e.fetchPolicy=t.options.initialFetchPolicy)}function fh(e,t,n){"use no memo";return Po(I.useCallback(r=>{const i=e.pipe(jd(Ld)).subscribe(o=>{const s=t.current;W(s,o)&&W(t.variables,e.variables)||(t.variables=e.variables,s.data&&!W(s.data,o.data)&&(t.previousData=s.data),t.current=o,r())});return()=>{setTimeout(()=>i.unsubscribe())}},[e,t]),()=>t.current,()=>n===!1?zn.ssrDisabledResult:t.current)}function dh(e,t,n){"use no memo";if(t[Te]&&!W(t[Te],n)){t[Te][zo]&&!n.initialFetchPolicy&&(n.initialFetchPolicy=n.fetchPolicy),hh(t[Te],n)?t.reobserve(n):t.applyOptions(n);const r=t.getCurrentResult();W(r.data,e.current.data)||(e.previousData=e.current.data||e.previousData),e.current=r,e.variables=t.variables}t[Te]=n}function hh(e,t){return e.query!==t.query||!W(e.variables,t.variables)||e.fetchPolicy!==t.fetchPolicy&&(t.fetchPolicy==="standby"||e.fetchPolicy==="standby")}zn.ssrDisabledResult={loading:!0,data:void 0,dataState:"empty",error:void 0,networkStatus:Et.loading,partial:!0};const ph=({headers:e={},initialData:t,operation:n,options:r={},validationRules:i})=>{const o=Tt({initialData:t,validationRules:i}),s=k.useRef(null),[c,{loading:a}]=sh(n,{errorPolicy:"all",...r}),u=k.useCallback((h={})=>{const{onBefore:g=()=>{},onError:_=()=>{},onFinish:f=()=>{},onSuccess:m=()=>{},skipValidation:b=!1}=h;if(!b&&!o.validate())return;const O=s.current?s.current(o.data):o.data;g?.(),c({variables:{input:O},...!Ot(e)&&{context:{headers:e}}}).then(T=>{T.error?_?.(T.error):m?.(T)}).catch(T=>{_?.(T)}).finally(()=>{f?.()})},[o,c,e]),l=k.useCallback(h=>(s.current=h,{...o,isLoading:a,submit:u}),[a,o,u]);return{...o,isLoading:a,submit:u,transform:l}};function Fo(e,t){return function(){return e.apply(t,arguments)}}const{toString:mh}=Object.prototype,{getPrototypeOf:Fn}=Object,{iterator:zt,toStringTag:$o}=Symbol,Ft=(e=>t=>{const n=mh.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),H=e=>(e=e.toLowerCase(),t=>Ft(t)===e),$t=e=>t=>typeof t===e,{isArray:Se}=Array,Ae=$t("undefined");function qe(e){return e!==null&&!Ae(e)&&e.constructor!==null&&!Ae(e.constructor)&&M(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Lo=H("ArrayBuffer");function yh(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Lo(e.buffer),t}const gh=$t("string"),M=$t("function"),jo=$t("number"),We=e=>e!==null&&typeof e=="object",bh=e=>e===!0||e===!1,ut=e=>{if(Ft(e)!=="object")return!1;const t=Fn(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!($o in e)&&!(zt in e)},_h=e=>{if(!We(e)||qe(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Eh=H("Date"),vh=H("File"),wh=H("Blob"),Ah=H("FileList"),Oh=e=>We(e)&&M(e.pipe),Sh=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||M(e.append)&&((t=Ft(e))==="formdata"||t==="object"&&M(e.toString)&&e.toString()==="[object FormData]"))},kh=H("URLSearchParams"),[xh,Ih,Th,Nh]=["ReadableStream","Request","Response","Headers"].map(H),Rh=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function He(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Se(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(qe(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let c;for(r=0;r<s;r++)c=o[r],t.call(null,e[c],c,e)}}function Uo(e,t){if(qe(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const ae=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Mo=e=>!Ae(e)&&e!==ae;function pn(){const{caseless:e,skipUndefined:t}=Mo(this)&&this||{},n={},r=(i,o)=>{const s=e&&Uo(n,o)||o;ut(n[s])&&ut(i)?n[s]=pn(n[s],i):ut(i)?n[s]=pn({},i):Se(i)?n[s]=i.slice():(!t||!Ae(i))&&(n[s]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&He(arguments[i],r);return n}const Dh=(e,t,n,{allOwnKeys:r}={})=>(He(t,(i,o)=>{n&&M(i)?e[o]=Fo(i,n):e[o]=i},{allOwnKeys:r}),e),Ch=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ph=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},zh=(e,t,n,r)=>{let i,o,s;const c={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!c[s]&&(t[s]=e[s],c[s]=!0);e=n!==!1&&Fn(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Fh=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},$h=e=>{if(!e)return null;if(Se(e))return e;let t=e.length;if(!jo(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Lh=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Fn(Uint8Array)),jh=(e,t)=>{const r=(e&&e[zt]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},Uh=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Mh=H("HTMLFormElement"),Zh=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),jr=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Bh=H("RegExp"),Zo=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};He(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},Vh=e=>{Zo(e,(t,n)=>{if(M(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(M(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},qh=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Se(e)?r(e):r(String(e).split(t)),n},Wh=()=>{},Hh=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Jh(e){return!!(e&&M(e.append)&&e[$o]==="FormData"&&e[zt])}const Gh=e=>{const t=new Array(10),n=(r,i)=>{if(We(r)){if(t.indexOf(r)>=0)return;if(qe(r))return r;if(!("toJSON"in r)){t[i]=r;const o=Se(r)?[]:{};return He(r,(s,c)=>{const a=n(s,i+1);!Ae(a)&&(o[c]=a)}),t[i]=void 0,o}}return r};return n(e,0)},Yh=H("AsyncFunction"),Xh=e=>e&&(We(e)||M(e))&&M(e.then)&&M(e.catch),Bo=((e,t)=>e?setImmediate:t?((n,r)=>(ae.addEventListener("message",({source:i,data:o})=>{i===ae&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),ae.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",M(ae.postMessage)),Kh=typeof queueMicrotask<"u"?queueMicrotask.bind(ae):typeof process<"u"&&process.nextTick||Bo,Qh=e=>e!=null&&M(e[zt]),d={isArray:Se,isArrayBuffer:Lo,isBuffer:qe,isFormData:Sh,isArrayBufferView:yh,isString:gh,isNumber:jo,isBoolean:bh,isObject:We,isPlainObject:ut,isEmptyObject:_h,isReadableStream:xh,isRequest:Ih,isResponse:Th,isHeaders:Nh,isUndefined:Ae,isDate:Eh,isFile:vh,isBlob:wh,isRegExp:Bh,isFunction:M,isStream:Oh,isURLSearchParams:kh,isTypedArray:Lh,isFileList:Ah,forEach:He,merge:pn,extend:Dh,trim:Rh,stripBOM:Ch,inherits:Ph,toFlatObject:zh,kindOf:Ft,kindOfTest:H,endsWith:Fh,toArray:$h,forEachEntry:jh,matchAll:Uh,isHTMLForm:Mh,hasOwnProperty:jr,hasOwnProp:jr,reduceDescriptors:Zo,freezeMethods:Vh,toObjectSet:qh,toCamelCase:Zh,noop:Wh,toFiniteNumber:Hh,findKey:Uo,global:ae,isContextDefined:Mo,isSpecCompliantForm:Jh,toJSONObject:Gh,isAsyncFn:Yh,isThenable:Xh,setImmediate:Bo,asap:Kh,isIterable:Qh};function S(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}d.inherits(S,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:d.toJSONObject(this.config),code:this.code,status:this.status}}});const Vo=S.prototype,qo={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{qo[e]={value:e}});Object.defineProperties(S,qo);Object.defineProperty(Vo,"isAxiosError",{value:!0});S.from=(e,t,n,r,i,o)=>{const s=Object.create(Vo);d.toFlatObject(e,s,function(l){return l!==Error.prototype},u=>u!=="isAxiosError");const c=e&&e.message?e.message:"Error",a=t==null&&e?e.code:t;return S.call(s,c,a,n,r,i),e&&s.cause==null&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",o&&Object.assign(s,o),s};const ep=null;function mn(e){return d.isPlainObject(e)||d.isArray(e)}function Wo(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function Ur(e,t,n){return e?e.concat(t).map(function(i,o){return i=Wo(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function tp(e){return d.isArray(e)&&!e.some(mn)}const np=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function Lt(e,t,n){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=d.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!d.isUndefined(b[m])});const r=n.metaTokens,i=n.visitor||l,o=n.dots,s=n.indexes,a=(n.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(t);if(!d.isFunction(i))throw new TypeError("visitor must be a function");function u(f){if(f===null)return"";if(d.isDate(f))return f.toISOString();if(d.isBoolean(f))return f.toString();if(!a&&d.isBlob(f))throw new S("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(f)||d.isTypedArray(f)?a&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function l(f,m,b){let O=f;if(f&&!b&&typeof f=="object"){if(d.endsWith(m,"{}"))m=r?m:m.slice(0,-2),f=JSON.stringify(f);else if(d.isArray(f)&&tp(f)||(d.isFileList(f)||d.endsWith(m,"[]"))&&(O=d.toArray(f)))return m=Wo(m),O.forEach(function(E,w){!(d.isUndefined(E)||E===null)&&t.append(s===!0?Ur([m],w,o):s===null?m:m+"[]",u(E))}),!1}return mn(f)?!0:(t.append(Ur(b,m,o),u(f)),!1)}const h=[],g=Object.assign(np,{defaultVisitor:l,convertValue:u,isVisitable:mn});function _(f,m){if(!d.isUndefined(f)){if(h.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(f),d.forEach(f,function(O,T){(!(d.isUndefined(O)||O===null)&&i.call(t,O,d.isString(T)?T.trim():T,m,g))===!0&&_(O,m?m.concat(T):[T])}),h.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return _(e),t}function Mr(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function $n(e,t){this._pairs=[],e&&Lt(e,this,t)}const Ho=$n.prototype;Ho.append=function(t,n){this._pairs.push([t,n])};Ho.toString=function(t){const n=t?function(r){return t.call(this,r,Mr)}:Mr;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function rp(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Jo(e,t,n){if(!t)return e;const r=n&&n.encode||rp;d.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=d.isURLSearchParams(t)?t.toString():new $n(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Zr{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){d.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Go={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ip=typeof URLSearchParams<"u"?URLSearchParams:$n,op=typeof FormData<"u"?FormData:null,sp=typeof Blob<"u"?Blob:null,cp={isBrowser:!0,classes:{URLSearchParams:ip,FormData:op,Blob:sp},protocols:["http","https","file","blob","url","data"]},Ln=typeof window<"u"&&typeof document<"u",yn=typeof navigator=="object"&&navigator||void 0,ap=Ln&&(!yn||["ReactNative","NativeScript","NS"].indexOf(yn.product)<0),up=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",lp=Ln&&window.location.href||"http://localhost",fp=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ln,hasStandardBrowserEnv:ap,hasStandardBrowserWebWorkerEnv:up,navigator:yn,origin:lp},Symbol.toStringTag,{value:"Module"})),j={...fp,...cp};function dp(e,t){return Lt(e,new j.classes.URLSearchParams,{visitor:function(n,r,i,o){return j.isNode&&d.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function hp(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function pp(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function Yo(e){function t(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const c=Number.isFinite(+s),a=o>=n.length;return s=!s&&d.isArray(i)?i.length:s,a?(d.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!c):((!i[s]||!d.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&d.isArray(i[s])&&(i[s]=pp(i[s])),!c)}if(d.isFormData(e)&&d.isFunction(e.entries)){const n={};return d.forEachEntry(e,(r,i)=>{t(hp(r),i,n,0)}),n}return null}function mp(e,t,n){if(d.isString(e))try{return(t||JSON.parse)(e),d.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Je={transitional:Go,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=d.isObject(t);if(o&&d.isHTMLForm(t)&&(t=new FormData(t)),d.isFormData(t))return i?JSON.stringify(Yo(t)):t;if(d.isArrayBuffer(t)||d.isBuffer(t)||d.isStream(t)||d.isFile(t)||d.isBlob(t)||d.isReadableStream(t))return t;if(d.isArrayBufferView(t))return t.buffer;if(d.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return dp(t,this.formSerializer).toString();if((c=d.isFileList(t))||r.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return Lt(c?{"files[]":t}:t,a&&new a,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),mp(t)):t}],transformResponse:[function(t){const n=this.transitional||Je.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(d.isResponse(t)||d.isReadableStream(t))return t;if(t&&d.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(c){if(s)throw c.name==="SyntaxError"?S.from(c,S.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:j.classes.FormData,Blob:j.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],e=>{Je.headers[e]={}});const yp=d.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),gp=e=>{const t={};let n,r,i;return e&&e.split(`
44
+ `).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&yp[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Br=Symbol("internals");function Ne(e){return e&&String(e).trim().toLowerCase()}function lt(e){return e===!1||e==null?e:d.isArray(e)?e.map(lt):String(e)}function bp(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const _p=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Gt(e,t,n,r,i){if(d.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!d.isString(t)){if(d.isString(r))return t.indexOf(r)!==-1;if(d.isRegExp(r))return r.test(t)}}function Ep(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function vp(e,t){const n=d.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}let Z=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(c,a,u){const l=Ne(a);if(!l)throw new Error("header name must be a non-empty string");const h=d.findKey(i,l);(!h||i[h]===void 0||u===!0||u===void 0&&i[h]!==!1)&&(i[h||a]=lt(c))}const s=(c,a)=>d.forEach(c,(u,l)=>o(u,l,a));if(d.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(d.isString(t)&&(t=t.trim())&&!_p(t))s(gp(t),n);else if(d.isObject(t)&&d.isIterable(t)){let c={},a,u;for(const l of t){if(!d.isArray(l))throw TypeError("Object iterator must return a key-value pair");c[u=l[0]]=(a=c[u])?d.isArray(a)?[...a,l[1]]:[a,l[1]]:l[1]}s(c,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=Ne(t),t){const r=d.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return bp(i);if(d.isFunction(n))return n.call(this,i,r);if(d.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ne(t),t){const r=d.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Gt(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=Ne(s),s){const c=d.findKey(r,s);c&&(!n||Gt(r,r[c],c,n))&&(delete r[c],i=!0)}}return d.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||Gt(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return d.forEach(this,(i,o)=>{const s=d.findKey(r,o);if(s){n[s]=lt(i),delete n[o];return}const c=t?Ep(o):String(o).trim();c!==o&&delete n[o],n[c]=lt(i),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return d.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&d.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
45
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Br]=this[Br]={accessors:{}}).accessors,i=this.prototype;function o(s){const c=Ne(s);r[c]||(vp(i,s),r[c]=!0)}return d.isArray(t)?t.forEach(o):o(t),this}};Z.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(Z.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});d.freezeMethods(Z);function Yt(e,t){const n=this||Je,r=t||n,i=Z.from(r.headers);let o=r.data;return d.forEach(e,function(c){o=c.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Xo(e){return!!(e&&e.__CANCEL__)}function ke(e,t,n){S.call(this,e??"canceled",S.ERR_CANCELED,t,n),this.name="CanceledError"}d.inherits(ke,S,{__CANCEL__:!0});function Ko(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new S("Request failed with status code "+n.status,[S.ERR_BAD_REQUEST,S.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function wp(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Ap(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(a){const u=Date.now(),l=r[o];s||(s=u),n[i]=a,r[i]=u;let h=o,g=0;for(;h!==i;)g+=n[h++],h=h%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-s<t)return;const _=l&&u-l;return _?Math.round(g*1e3/_):void 0}}function Op(e,t){let n=0,r=1e3/t,i,o;const s=(u,l=Date.now())=>{n=l,i=null,o&&(clearTimeout(o),o=null),e(...u)};return[(...u)=>{const l=Date.now(),h=l-n;h>=r?s(u,l):(i=u,o||(o=setTimeout(()=>{o=null,s(i)},r-h)))},()=>i&&s(i)]}const wt=(e,t,n=3)=>{let r=0;const i=Ap(50,250);return Op(o=>{const s=o.loaded,c=o.lengthComputable?o.total:void 0,a=s-r,u=i(a),l=s<=c;r=s;const h={loaded:s,total:c,progress:c?s/c:void 0,bytes:a,rate:u||void 0,estimated:u&&c&&l?(c-s)/u:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(h)},n)},Vr=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},qr=e=>(...t)=>d.asap(()=>e(...t)),Sp=j.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,j.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(j.origin),j.navigator&&/(msie|trident)/i.test(j.navigator.userAgent)):()=>!0,kp=j.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const s=[e+"="+encodeURIComponent(t)];d.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),d.isString(r)&&s.push("path="+r),d.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function xp(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ip(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Qo(e,t,n){let r=!xp(t);return e&&(r||n==!1)?Ip(e,t):t}const Wr=e=>e instanceof Z?{...e}:e;function me(e,t){t=t||{};const n={};function r(u,l,h,g){return d.isPlainObject(u)&&d.isPlainObject(l)?d.merge.call({caseless:g},u,l):d.isPlainObject(l)?d.merge({},l):d.isArray(l)?l.slice():l}function i(u,l,h,g){if(d.isUndefined(l)){if(!d.isUndefined(u))return r(void 0,u,h,g)}else return r(u,l,h,g)}function o(u,l){if(!d.isUndefined(l))return r(void 0,l)}function s(u,l){if(d.isUndefined(l)){if(!d.isUndefined(u))return r(void 0,u)}else return r(void 0,l)}function c(u,l,h){if(h in t)return r(u,l);if(h in e)return r(void 0,u)}const a={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c,headers:(u,l,h)=>i(Wr(u),Wr(l),h,!0)};return d.forEach(Object.keys({...e,...t}),function(l){const h=a[l]||i,g=h(e[l],t[l],l);d.isUndefined(g)&&h!==c||(n[l]=g)}),n}const es=e=>{const t=me({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:c}=t;if(t.headers=s=Z.from(s),t.url=Jo(Qo(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),d.isFormData(n)){if(j.hasStandardBrowserEnv||j.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(d.isFunction(n.getHeaders)){const a=n.getHeaders(),u=["content-type","content-length"];Object.entries(a).forEach(([l,h])=>{u.includes(l.toLowerCase())&&s.set(l,h)})}}if(j.hasStandardBrowserEnv&&(r&&d.isFunction(r)&&(r=r(t)),r||r!==!1&&Sp(t.url))){const a=i&&o&&kp.read(o);a&&s.set(i,a)}return t},Tp=typeof XMLHttpRequest<"u",Np=Tp&&function(e){return new Promise(function(n,r){const i=es(e);let o=i.data;const s=Z.from(i.headers).normalize();let{responseType:c,onUploadProgress:a,onDownloadProgress:u}=i,l,h,g,_,f;function m(){_&&_(),f&&f(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function O(){if(!b)return;const E=Z.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),x={data:!c||c==="text"||c==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:E,config:e,request:b};Ko(function(B){n(B),m()},function(B){r(B),m()},x),b=null}"onloadend"in b?b.onloadend=O:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(O)},b.onabort=function(){b&&(r(new S("Request aborted",S.ECONNABORTED,e,b)),b=null)},b.onerror=function(w){const x=w&&w.message?w.message:"Network Error",U=new S(x,S.ERR_NETWORK,e,b);U.event=w||null,r(U),b=null},b.ontimeout=function(){let w=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const x=i.transitional||Go;i.timeoutErrorMessage&&(w=i.timeoutErrorMessage),r(new S(w,x.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,e,b)),b=null},o===void 0&&s.setContentType(null),"setRequestHeader"in b&&d.forEach(s.toJSON(),function(w,x){b.setRequestHeader(x,w)}),d.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),c&&c!=="json"&&(b.responseType=i.responseType),u&&([g,f]=wt(u,!0),b.addEventListener("progress",g)),a&&b.upload&&([h,_]=wt(a),b.upload.addEventListener("progress",h),b.upload.addEventListener("loadend",_)),(i.cancelToken||i.signal)&&(l=E=>{b&&(r(!E||E.type?new ke(null,e,b):E),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));const T=wp(i.url);if(T&&j.protocols.indexOf(T)===-1){r(new S("Unsupported protocol "+T+":",S.ERR_BAD_REQUEST,e));return}b.send(o||null)})},Rp=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(u){if(!i){i=!0,c();const l=u instanceof Error?u:this.reason;r.abort(l instanceof S?l:new ke(l instanceof Error?l.message:l))}};let s=t&&setTimeout(()=>{s=null,o(new S(`timeout ${t} of ms exceeded`,S.ETIMEDOUT))},t);const c=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:a}=r;return a.unsubscribe=()=>d.asap(c),a}},Dp=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},Cp=async function*(e,t){for await(const n of Pp(e))yield*Dp(n,t)},Pp=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Hr=(e,t,n,r)=>{const i=Cp(e,t);let o=0,s,c=a=>{s||(s=!0,r&&r(a))};return new ReadableStream({async pull(a){try{const{done:u,value:l}=await i.next();if(u){c(),a.close();return}let h=l.byteLength;if(n){let g=o+=h;n(g)}a.enqueue(new Uint8Array(l))}catch(u){throw c(u),u}},cancel(a){return c(a),i.return()}},{highWaterMark:2})},Jr=64*1024,{isFunction:it}=d,zp=(({Request:e,Response:t})=>({Request:e,Response:t}))(d.global),{ReadableStream:Gr,TextEncoder:Yr}=d.global,Xr=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Fp=e=>{e=d.merge.call({skipUndefined:!0},zp,e);const{fetch:t,Request:n,Response:r}=e,i=t?it(t):typeof fetch=="function",o=it(n),s=it(r);if(!i)return!1;const c=i&&it(Gr),a=i&&(typeof Yr=="function"?(f=>m=>f.encode(m))(new Yr):async f=>new Uint8Array(await new n(f).arrayBuffer())),u=o&&c&&Xr(()=>{let f=!1;const m=new n(j.origin,{body:new Gr,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!m}),l=s&&c&&Xr(()=>d.isReadableStream(new r("").body)),h={stream:l&&(f=>f.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!h[f]&&(h[f]=(m,b)=>{let O=m&&m[f];if(O)return O.call(m);throw new S(`Response type '${f}' is not supported`,S.ERR_NOT_SUPPORT,b)})});const g=async f=>{if(f==null)return 0;if(d.isBlob(f))return f.size;if(d.isSpecCompliantForm(f))return(await new n(j.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(d.isArrayBufferView(f)||d.isArrayBuffer(f))return f.byteLength;if(d.isURLSearchParams(f)&&(f=f+""),d.isString(f))return(await a(f)).byteLength},_=async(f,m)=>{const b=d.toFiniteNumber(f.getContentLength());return b??g(m)};return async f=>{let{url:m,method:b,data:O,signal:T,cancelToken:E,timeout:w,onDownloadProgress:x,onUploadProgress:U,responseType:B,headers:Ut,withCredentials:Ge="same-origin",fetchOptions:jn}=es(f),Un=t||fetch;B=B?(B+"").toLowerCase():"text";let Ye=Rp([T,E&&E.toAbortSignal()],w),xe=null;const re=Ye&&Ye.unsubscribe&&(()=>{Ye.unsubscribe()});let Mn;try{if(U&&u&&b!=="get"&&b!=="head"&&(Mn=await _(Ut,O))!==0){let K=new n(m,{method:"POST",body:O,duplex:"half"}),be;if(d.isFormData(O)&&(be=K.headers.get("content-type"))&&Ut.setContentType(be),K.body){const[Mt,Xe]=Vr(Mn,wt(qr(U)));O=Hr(K.body,Jr,Mt,Xe)}}d.isString(Ge)||(Ge=Ge?"include":"omit");const J=o&&"credentials"in n.prototype,Zn={...jn,signal:Ye,method:b.toUpperCase(),headers:Ut.normalize().toJSON(),body:O,duplex:"half",credentials:J?Ge:void 0};xe=o&&new n(m,Zn);let X=await(o?Un(xe,jn):Un(m,Zn));const Bn=l&&(B==="stream"||B==="response");if(l&&(x||Bn&&re)){const K={};["status","statusText","headers"].forEach(Vn=>{K[Vn]=X[Vn]});const be=d.toFiniteNumber(X.headers.get("content-length")),[Mt,Xe]=x&&Vr(be,wt(qr(x),!0))||[];X=new r(Hr(X.body,Jr,Mt,()=>{Xe&&Xe(),re&&re()}),K)}B=B||"text";let ss=await h[d.findKey(h,B)||"text"](X,f);return!Bn&&re&&re(),await new Promise((K,be)=>{Ko(K,be,{data:ss,headers:Z.from(X.headers),status:X.status,statusText:X.statusText,config:f,request:xe})})}catch(J){throw re&&re(),J&&J.name==="TypeError"&&/Load failed|fetch/i.test(J.message)?Object.assign(new S("Network Error",S.ERR_NETWORK,f,xe),{cause:J.cause||J}):S.from(J,J&&J.code,f,xe)}}},$p=new Map,ts=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let s=o.length,c=s,a,u,l=$p;for(;c--;)a=o[c],u=l.get(a),u===void 0&&l.set(a,u=c?new Map:Fp(t)),l=u;return u};ts();const gn={http:ep,xhr:Np,fetch:{get:ts}};d.forEach(gn,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Kr=e=>`- ${e}`,Lp=e=>d.isFunction(e)||e===null||e===!1,ns={getAdapter:(e,t)=>{e=d.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let s=0;s<n;s++){r=e[s];let c;if(i=r,!Lp(r)&&(i=gn[(c=String(r)).toLowerCase()],i===void 0))throw new S(`Unknown adapter '${c}'`);if(i&&(d.isFunction(i)||(i=i.get(t))))break;o[c||"#"+s]=i}if(!i){const s=Object.entries(o).map(([a,u])=>`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let c=n?s.length>1?`since :
46
+ `+s.map(Kr).join(`
47
+ `):" "+Kr(s[0]):"as no adapter specified";throw new S("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return i},adapters:gn};function Xt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ke(null,e)}function Qr(e){return Xt(e),e.headers=Z.from(e.headers),e.data=Yt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ns.getAdapter(e.adapter||Je.adapter,e)(e).then(function(r){return Xt(e),r.data=Yt.call(e,e.transformResponse,r),r.headers=Z.from(r.headers),r},function(r){return Xo(r)||(Xt(e),r&&r.response&&(r.response.data=Yt.call(e,e.transformResponse,r.response),r.response.headers=Z.from(r.response.headers))),Promise.reject(r)})}const rs="1.12.2",jt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{jt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ei={};jt.transitional=function(t,n,r){function i(o,s){return"[Axios v"+rs+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,c)=>{if(t===!1)throw new S(i(s," has been removed"+(n?" in "+n:"")),S.ERR_DEPRECATED);return n&&!ei[s]&&(ei[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,c):!0}};jt.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function jp(e,t,n){if(typeof e!="object")throw new S("options must be an object",S.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const c=e[o],a=c===void 0||s(c,o,e);if(a!==!0)throw new S("option "+o+" must be "+a,S.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new S("Unknown option "+o,S.ERR_BAD_OPTION)}}const ft={assertOptions:jp,validators:jt},G=ft.validators;let fe=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Zr,response:new Zr}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
48
+ `+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=me(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&ft.assertOptions(r,{silentJSONParsing:G.transitional(G.boolean),forcedJSONParsing:G.transitional(G.boolean),clarifyTimeoutError:G.transitional(G.boolean)},!1),i!=null&&(d.isFunction(i)?n.paramsSerializer={serialize:i}:ft.assertOptions(i,{encode:G.function,serialize:G.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ft.assertOptions(n,{baseUrl:G.spelling("baseURL"),withXsrfToken:G.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&d.merge(o.common,o[n.method]);o&&d.forEach(["delete","get","head","post","put","patch","common"],f=>{delete o[f]}),n.headers=Z.concat(s,o);const c=[];let a=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(a=a&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let l,h=0,g;if(!a){const f=[Qr.bind(this),void 0];for(f.unshift(...c),f.push(...u),g=f.length,l=Promise.resolve(n);h<g;)l=l.then(f[h++],f[h++]);return l}g=c.length;let _=n;for(;h<g;){const f=c[h++],m=c[h++];try{_=f(_)}catch(b){m.call(this,b);break}}try{l=Qr.call(this,_)}catch(f){return Promise.reject(f)}for(h=0,g=u.length;h<g;)l=l.then(u[h++],u[h++]);return l}getUri(t){t=me(this.defaults,t);const n=Qo(t.baseURL,t.url,t.allowAbsoluteUrls);return Jo(n,t.params,t.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(t){fe.prototype[t]=function(n,r){return this.request(me(r||{},{method:t,url:n,data:(r||{}).data}))}});d.forEach(["post","put","patch"],function(t){function n(r){return function(o,s,c){return this.request(me(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}fe.prototype[t]=n(),fe.prototype[t+"Form"]=n(!0)});let Up=class is{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(c=>{r.subscribe(c),o=c}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,c){r.reason||(r.reason=new ke(o,s,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new is(function(i){t=i}),cancel:t}}};function Mp(e){return function(n){return e.apply(null,n)}}function Zp(e){return d.isObject(e)&&e.isAxiosError===!0}const bn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(bn).forEach(([e,t])=>{bn[t]=e});function os(e){const t=new fe(e),n=Fo(fe.prototype.request,t);return d.extend(n,fe.prototype,t,{allOwnKeys:!0}),d.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return os(me(e,i))},n}const z=os(Je);z.Axios=fe;z.CanceledError=ke;z.CancelToken=Up;z.isCancel=Xo;z.VERSION=rs;z.toFormData=Lt;z.AxiosError=S;z.Cancel=z.CanceledError;z.all=function(t){return Promise.all(t)};z.spread=Mp;z.isAxiosError=Zp;z.mergeConfig=me;z.AxiosHeaders=Z;z.formToJSON=e=>Yo(d.isHTMLForm(e)?new FormData(e):e);z.getAdapter=ns.getAdapter;z.HttpStatusCode=bn;z.default=z;const{Axios:Gp,AxiosError:Yp,CanceledError:Xp,isCancel:Kp,CancelToken:Qp,VERSION:em,all:tm,Cancel:nm,isAxiosError:rm,spread:im,toFormData:om,AxiosHeaders:sm,HttpStatusCode:cm,formToJSON:am,getAdapter:um,mergeConfig:lm}=z,Bp=({endpoint:e,headers:t={},initialData:n,validationRules:r})=>{const i=Tt({initialData:n,validationRules:r}),[o,s]=k.useState(!1),c=k.useRef(null),a=k.useCallback((l={})=>{const{onBefore:h=()=>{},onCancel:g=()=>{},onError:_=()=>{},onFinish:f=()=>{},onSuccess:m=()=>{},onUpload:b=()=>{},skipValidation:O=!1}=l;if(!O&&!i.validate())return;const T=new FormData;Object.entries(i.data).forEach(([E,w])=>{Array.isArray(w)?w.forEach(x=>{x instanceof File?T.append(E,x):T.append(E,String(x))}):w instanceof File?T.append(E,w):T.append(E,String(w))}),h?.(),s(!0),c.current=new AbortController,z.post(e,T,{headers:{"Content-Type":"multipart/form-data",...t},signal:c.current.signal,onUploadProgress:E=>{b?.(E)}}).then(E=>{m?.(E)}).catch(E=>{z.isCancel(E)?g?.(E):_?.(E)}).finally(()=>{f?.(),s(!1),c.current=null})},[e,t,i]),u=k.useCallback(()=>{c.current&&c.current.abort("Upload cancelled by user")},[]);return{...i,upload:a,isUploading:o,cancel:u}},Vp=({headers:e={},initialData:t,options:n={},query:r,validationRules:i})=>{const{data:o,setData:s,validate:c,...a}=Tt({initialData:t,validationRules:i}),[u,{data:l,error:h,loading:g,refetch:_}]=oh(r,{fetchPolicy:"network-only",errorPolicy:"all",notifyOnNetworkStatusChange:!0,...n}),f=k.useCallback((b={})=>{const{onBefore:O=()=>{},onError:T=()=>{},onFinish:E=()=>{},onSuccess:w=()=>{},skipValidation:x=!1}=b;!x&&!c()||(O?.(),u({variables:{filters:o},...!Ot(e)&&{context:{headers:e}}}).then(U=>{w?.(U)}).catch(U=>{T?.(U)}).finally(()=>{E?.()}))},[o,u,e,c]),m=k.useCallback(()=>{_&&_({filters:o})},[_,o]);return{...a,validate:c,filter:o,setFilter:s,isLoading:g,query:f,refetch:m,data:l,error:h}},qp=({allowRepeat:e=!1,enabled:t=!0,onArrowDown:n,onArrowUp:r,onEnter:i,onEscape:o,onTab:s})=>{const c=k.useRef({onArrowDown:n,onArrowUp:r,onEnter:i,onEscape:o,onTab:s});c.current={onArrowDown:n,onArrowUp:r,onEnter:i,onEscape:o,onTab:s},k.useEffect(()=>{if(!t)return;const a=u=>{if(u.repeat&&!e)return;const{onArrowDown:l,onArrowUp:h,onEnter:g,onEscape:_,onTab:f}=c.current;switch(u.key){case"ArrowDown":l&&(u.preventDefault(),l());break;case"ArrowUp":h&&(u.preventDefault(),h());break;case"Enter":g&&(u.preventDefault(),g());break;case"Escape":_&&(u.preventDefault(),_());break;case"Tab":f&&f();break}};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[t,e])},Wp=({selector:e='[data-ox-state="selected"]'}={})=>{const[t,n]=k.useState(0),r=k.useRef(null),i=k.useCallback(()=>{if(qn(r.current))return;const s=r.current,c=s.querySelectorAll(e);c.forEach(u=>u.style.removeProperty("display"));let a=0;for(let u=c.length-1;u>=0;u--){const l=c[u];if(s.scrollWidth<=s.clientWidth)break;a=c.length-u,l.style.display="none"}n(a)},[e]),o=k.useCallback(s=>{if(r.current=s,qn(s))return()=>{};const c=new ResizeObserver(i);return c.observe(s),()=>{c.disconnect(),r.current=null}},[i]);return{overflowAmount:t,checkOverflow:i,handleResize:o}};exports.clamp=bs;exports.gql=we;exports.handleRules=lo;exports.head=Ws;exports.isEmpty=Ot;exports.isFunction=wi;exports.isNil=Ds;exports.isObject=mt;exports.isPlainObject=Fe;exports.isString=Ai;exports.merge=Re;exports.omitBy=xs;exports.pick=Is;exports.reject=Xs;exports.sample=ls;exports.take=ps;exports.union=ys;exports.uniqueId=ic;exports.useControllableState=oc;exports.useFileUpload=Bp;exports.useFilter=Vp;exports.useFocus=cc;exports.useForm=ph;exports.useFormState=Tt;exports.useKeyboard=qp;exports.useOverflowDetection=Wp;exports.useQuery=zn;exports.validator=Tf;