PageSourceSearch

https://xoxd.ai/_app/immutable/chunks/DJ0X_2km.js

js xoxd.ai collected 2026-10-05 13:24:08 UTC 135,739 bytes, 55 lines download raw bytes

1import{C as e,Ct as t,D as n,F as r,G as i,I as a,L as o,M as s,N as c,Q as l,R as u,S as d,T as f,U as p,X as m,Y as h,_ as g,a as _,at as v,bt as y,c as ee,ct as b,d as x,et as S,f as C,g as w,ht as T,j as E,k as D,l as te,m as ne,mt as O,nt as k,o as A,p as re,r as ie,rt as ae,st as j,tt as M,u as N,wt as oe,xt as P,y as se,yt as ce,z as le}from"./BQ5i3HPE.js";import"./xihTtKlq.js";import{t as ue}from"./Czr6tvRo.js";import{H as de,J as fe,N as pe,O as F,R as I,U as me,V as he,W as ge,X as _e,_ as ve,a as L,c as ye,d as be,et as xe,f as Se,i as Ce,l as we,m as Te,n as Ee,o as De,p as Oe,q as ke,r as Ae,s as je,t as Me,u as Ne,y as Pe}from"./C9eliEmi.js";import{n as Fe}from"./FEn-48i9.js";import{t as Ie}from"./TRWfDKy-.js";var{floor:Le,abs:Re,round:ze,min:Be,max:Ve,pow:He,sign:Ue}=Math,We=e=>Number.isNaN(e),Ge=e=>We(e)?0:e,Ke=(e,t,n)=>Be(Ve(Ge(e),t),n),qe=e=>typeof e==`number`?`${e}px`:e,Je=`default`,Ye=``,Xe=new WeakMap;function Ze(e={}){let{target:t,doc:n}=e,r=n??document,i=r.documentElement;return Pe()?(Je==="default"&&(Ye=i.style.webkitUserSelect,i.style.webkitUserSelect=`none`),Je=`disabled`):t&&(Xe.set(t,t.style.userSelect),t.style.userSelect=`none`),()=>Qe({target:t,doc:r})}function Qe(e={}){let{target:t,doc:n}=e,r=(n??document).documentElement;if(Pe()){if(Je!==`disabled`)return;Je=`restoring`,setTimeout(()=>{ye(()=>{Je===`restoring`&&(r.style.webkitUserSelect===`none`&&(r.style.webkitUserSelect=Ye||``),Ye=``,Je=`default`)})},300)}else if(t&&Xe.has(t)){let e=Xe.get(t);t.style.userSelect===`none`&&(t.style.userSelect=e??``),t.getAttribute(`style`)===``&&t.removeAttribute(`style`),Xe.delete(t)}}function $e(e={}){let{defer:t,target:n,...r}=e,i=t?we:e=>e(),a=[];return a.push(i(()=>{let e=typeof n==`function`?n():n;a.push(Ze({...r,target:e}))})),()=>{a.forEach(e=>e?.())}}function et(e,t){let{onPointerMove:n,onPointerUp:r}=t,i=e=>{let t=Se(e);if(!(Math.sqrt(t.x**2+t.y**2)<(e.pointerType===`touch`?10:5))){if(e.pointerType===`mouse`&&e.buttons===0){a(e);return}n({point:t,event:e})}},a=e=>{let t=Se(e);r({point:t,event:e})},o=[Ne(e,`pointermove`,i,!1),Ne(e,`pointerup`,a,!1),Ne(e,`pointercancel`,a,!1),Ne(e,`contextmenu`,a,!1),$e({doc:e})];return()=>{o.forEach(e=>e())}}function tt(e){let t=new WeakMap,n,r=new WeakMap,i=e=>n||(n=new e.ResizeObserver(e=>{for(let n of e){r.set(n.target,n);let e=t.get(n.target);if(e)for(let t of e)t(n)}}),n);return{observe:(n,r)=>{let a=t.get(n)||new Set;a.add(r),t.set(n,a);let o=F(n);return i(o).observe(n,e),()=>{let e=t.get(n);e&&(e.delete(r),e.size===0&&(t.delete(n),i(o).unobserve(n)))}},unobserve:e=>{t.delete(e),n?.unobserve(e)}}}var nt=tt({box:`border-box`}),R=xe(),rt=c(`<div><!></div>`);function it(r,i){T(i,!0);let a=A(i,[`$$slots`,`$$events`,`$$legacy`]),o=R.consume(),c=b(()=>i.element),l=b(()=>i.children),u=b(()=>P(a,[`element`,`children`])),d=b(()=>L(o().getBodyProps(),p(u)));var f=s(),m=M(f),h=t=>{var n=s(),r=M(n);e(r,()=>p(c),()=>p(d)),E(t,n)},g=n=>{var r=rt();N(r,()=>({...p(d)}));var i=S(r);e(i,()=>p(l)??t),y(r),E(n,r)};n(m,e=>{p(c)?e(h):e(g,-1)}),E(r,f),O()}var at=c(`<button><!></button>`);function ot(r,i){T(i,!0);let a=A(i,[`$$slots`,`$$events`,`$$legacy`]),o=R.consume(),c=b(()=>i.element),l=b(()=>i.children),u=b(()=>P(a,[`element`,`children`])),d=b(()=>L(o().getCloseTriggerProps(),p(u)));var f=s(),m=M(f),h=t=>{var n=s(),r=M(n);e(r,()=>p(c),()=>p(d)),E(t,n)},g=n=>{var r=at();N(r,()=>({...p(d)}));var i=S(r);e(i,()=>p(l)??t),y(r),E(n,r)};n(m,e=>{p(c)?e(h):e(g,-1)}),E(r,f),O()}var st=c(`<div><!></div>`);function ct(r,i){T(i,!0);let a=A(i,[`$$slots`,`$$events`,`$$legacy`]),o=R.consume(),c=b(()=>i.element),l=b(()=>i.children),u=b(()=>P(a,[`element`,`children`])),d=b(()=>L(o().getContentProps(),p(u)));var f=s(),m=M(f),h=t=>{var n=s(),r=M(n);e(r,()=>p(c),()=>p(d)),E(t,n)},g=n=>{var r=st();N(r,()=>({...p(d)}));var i=S(r);e(i,()=>p(l)??t),y(r),E(n,r)};n(m,e=>{p(c)?e(h):e(g,-1)}),E(r,f),O()}var lt=c(`<div><!></div>`);function ut(r,i){T(i,!0);let a=A(i,[`$$slots`,`$$events`,`$$legacy`]),o=R.consume(),c=b(()=>i.element),l=b(()=>i.children),u=b(()=>P(a,[`element`,`children`])),d=b(()=>L(o().getControlProps(),p(u)));var f=s(),m=M(f),h=t=>{var n=s(),r=M(n);e(r,()=>p(c),()=>p(d)),E(t,n)},g=n=>{var r=lt();N(r,()=>({...p(d)}));var i=S(r);e(i,()=>p(l)??t),y(r),E(n,r)};n(m,e=>{p(c)?e(h):e(g,-1)}),E(r,f),O()}var dt=c(`<div><!></div>`);function ft(r,i){T(i,!0);let a=A(i,[`$$slots`,`$$events`,`$$legacy`]),o=R.consume(),c=b(()=>i.element),l=b(()=>i.children),u=b(()=>P(a,[`element`,`children`])),d=b(()=>L(o().getDragTriggerProps(),p(u)));var f=s(),m=M(f),h=t=>{var n=s(),r=M(n);e(r,()=>p(c),()=>p(d)),E(t,n)},g=n=>{var r=dt();N(r,()=>({...p(d)}));var i=S(r);e(i,()=>p(l)??t),y(r),E(n,r)};n(m,e=>{p(c)?e(h):e(g,-1)}),E(r,f),O()}var pt=c(`<div><!></div>`);function mt(r,i){T(i,!0);let a=A(i,[`$$slots`,`$$events`,`$$legacy`]),o=R.consume(),c=b(()=>i.element),l=b(()=>i.children),u=b(()=>P(a,[`element`,`children`])),d=b(()=>L(o().getHeaderProps(),p(u)));var f=s(),m=M(f),h=t=>{var n=s(),r=M(n);e(r,()=>p(c),()=>p(d)),E(t,n)},g=n=>{var r=pt();N(r,()=>({...p(d)}));var i=S(r);e(i,()=>p(l)??t),y(r),E(n,r)};n(m,e=>{p(c)?e(h):e(g,-1)}),E(r,f),O()}var ht=c(`<div><!></div>`);function gt(r,i){T(i,!0);let a=A(i,[`$$slots`,`$$events`,`$$legacy`]),o=R.consume(),c=b(()=>i.element),l=b(()=>i.children),u=b(()=>P(a,[`element`,`children`])),d=b(()=>L(o().getPositionerProps(),p(u)));var f=s(),m=M(f),h=t=>{var n=s(),r=M(n);e(r,()=>p(c),()=>p(d)),E(t,n)},g=n=>{var r=ht();N(r,()=>({...p(d)}));var i=S(r);e(i,()=>p(l)??t),y(r),E(n,r)};n(m,e=>{p(c)?e(h):e(g,-1)}),E(r,f),O()}var z=Ae(`floating-panel`).parts(`trigger`,`positioner`,`content`,`header`,`body`,`title`,`resizeTrigger`,`dragTrigger`,`stageTrigger`,`closeTrigger`,`control`).build(),_t=Object.defineProperty,vt=(e,t,n)=>t in e?_t(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}
1):e[t]=n,yt=(e,t,n)=>vt(e,typeof t==`symbol`?t:t+``,n),bt=class e{constructor([t,n,r,i,a,o]=[0,0,0,0,0,0]){yt(this,`m00`),yt(this,`m01`),yt(this,`m02`),yt(this,`m10`),yt(this,`m11`),yt(this,`m12`),yt(this,`rotate`,(...t)=>this.prepend(e.rotate(...t))),yt(this,`scale`,(...t)=>this.prepend(e.scale(...t))),yt(this,`translate`,(...t)=>this.prepend(e.translate(...t))),this.m00=t,this.m01=n,this.m02=r,this.m10=i,this.m11=a,this.m12=o}applyTo(e){let{x:t,y:n}=e,{m00:r,m01:i,m02:a,m10:o,m11:s,m12:c}=this;return{x:r*t+i*n+a,y:o*t+s*n+c}}prepend(t){return new e([this.m00*t.m00+this.m01*t.m10,this.m00*t.m01+this.m01*t.m11,this.m00*t.m02+this.m01*t.m12+this.m02,this.m10*t.m00+this.m11*t.m10,this.m10*t.m01+this.m11*t.m11,this.m10*t.m02+this.m11*t.m12+this.m12])}append(t){return new e([t.m00*this.m00+t.m01*this.m10,t.m00*this.m01+t.m01*this.m11,t.m00*this.m02+t.m01*this.m12+t.m02,t.m10*this.m00+t.m11*this.m10,t.m10*this.m01+t.m11*this.m11,t.m10*this.m02+t.m11*this.m12+t.m12])}get determinant(){return this.m00*this.m11-this.m01*this.m10}get isInvertible(){let e=this.determinant;return isFinite(e)&&isFinite(this.m02)&&isFinite(this.m12)&&e!==0}invert(){let t=this.determinant;return new e([this.m11/t,-this.m01/t,(this.m01*this.m12-this.m11*this.m02)/t,-this.m10/t,this.m00/t,(this.m10*this.m02-this.m00*this.m12)/t])}get array(){return[this.m00,this.m01,this.m02,this.m10,this.m11,this.m12,0,0,1]}get float32Array(){return new Float32Array(this.array)}static get identity(){return new e([1,0,0,0,1,0])}static rotate(t,n){let r=new e([Math.cos(t),-Math.sin(t),0,Math.sin(t),Math.cos(t),0]);return n&&(n.x!==0||n.y!==0)?e.multiply(e.translate(n.x,n.y),r,e.translate(-n.x,-n.y)):r}static scale(t,n=t,r={x:0,y:0}){let i=new e([t,0,0,0,n,0]);return r.x!==0||r.y!==0?e.multiply(e.translate(r.x,r.y),i,e.translate(-r.x,-r.y)):i}static translate(t,n){return new e([1,0,t,0,1,n])}static multiply(...[t,...n]){return t?n.reduce((e,t)=>e.prepend(t),t):e.identity}get a(){return this.m00}get b(){return this.m10}get c(){return this.m01}get d(){return this.m11}get tx(){return this.m02}get ty(){return this.m12}get scaleComponents(){return{x:this.a,y:this.d}}get translationComponents(){return{x:this.tx,y:this.ty}}get skewComponents(){return{x:this.c,y:this.b}}toString(){return`matrix(${this.a}, ${this.b}, ${this.c}, ${this.d}, ${this.tx}, ${this.ty})`}},xt=(e,t,n)=>Math.min(Math.max(e,t),n),St=(e,t,n)=>({x:xt(e.x,n.x,n.x+n.width-t.width),y:xt(e.y,n.y,n.y+n.height-t.height)}),Ct={width:0,height:0},wt={width:1/0,height:1/0},Tt=(e,t=Ct,n=wt)=>({width:Math.min(Math.max(e.width,t.width),n.width),height:Math.min(Math.max(e.height,t.height),n.height)}),Et=(e,t)=>({x:e,y:t}),Dt=(e,t)=>t?Et(e.x-t.x,e.y-t.y):e,Ot=(e,t)=>Et(e.x+t.x,e.y+t.y);function kt(e){let{x:t,y:n,width:r,height:i}=e,a=t+r/2,o=n+i/2;return{x:t,y:n,width:r,height:i,minX:t,minY:n,maxX:t+r,maxY:n+i,midX:a,midY:o,center:Et(a,o)}}var At=(e,t)=>({x:Math.max(t.x,Math.min(e.x,t.x+t.width-e.width)),y:Math.max(t.y,Math.min(e.y,t.y+t.height-e.height)),width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}),jt=(e,t)=>e.width===t?.width&&e.height===t?.height,Mt=(e,t)=>e.x===t?.x&&e.y===t?.y,Nt=new WeakMap;function Pt(e){if(!Nt.has(e)){let t=e.ownerDocument.defaultView||window;Nt.set(e,t.getComputedStyle(e))}return Nt.get(e)}function Ft(e,t={}){return kt(It(e,t))}function It(e,t={}){let{excludeScrollbar:n=!1,excludeBorders:r=!1}=t,{x:i,y:a,width:o,height:s}=e.getBoundingClientRect(),c={x:i,y:a,width:o,height:s},{borderLeftWidth:l,borderTopWidth:u,borderRightWidth:d,borderBottomWidth:f}=Pt(e),p=Rt(l,d),m=Rt(u,f);if(r&&(c.width-=p,c.height-=m,c.x+=Lt(l),c.y+=Lt(u)),n){let t=e.offsetWidth-e.clientWidth-p,n=e.offsetHeight-e.clientHeight-m;c.width-=t,c.height-=n}return c}var Lt=e=>parseFloat(e.replace(`px`,``)),Rt=(...e)=>e.reduce((e,t)=>e+(t?Lt(t):0),0);function zt(e,t={}){return kt(Bt(e,t))}function Bt(e,t){let{excludeScrollbar:n=!1}=t,{innerWidth:r,innerHeight:i,document:a,visualViewport:o}=e,s={x:0,y:0,width:o?.width||r,height:o?.height||i};if(n){let e=r-a.documentElement.clientWidth,t=i-a.documentElement.clientHeight;s.width-=e,s.height-=t}return s}var Vt={n:{x:.5,y:0},ne:{x:1,y:0},e:{x:1,y:.5},se:{x:1,y:1},s:{x:.5,y:1},sw:{x:0,y:1},w:{x:0,y:.5},nw:{x:0,y:0}},Ht={n:`s`,ne:`sw`,e:`w`,se:`nw`,s:`n`,sw:`ne`,w:`e`,nw:`se`},{sign:Ut,abs:Wt,min:Gt}=Math;function Kt(e,t){let{minX:n,minY:r,maxX:i,maxY:a,midX:o,midY:s}
1=e;return{x:t.includes(`w`)?n:t.includes(`e`)?i:o,y:t.includes(`n`)?r:t.includes(`s`)?a:s}}function qt(e){return Ht[e]}function Jt(e,t,n,r){let{scalingOriginMode:i,lockAspectRatio:a}=r,o=Kt(e,n),s=Kt(e,qt(n));i===`center`&&(t={x:t.x*2,y:t.y*2});let c={x:o.x+t.x,y:o.y+t.y},l={x:Vt[n].x*2-1,y:Vt[n].y*2-1},u={width:c.x-s.x,height:c.y-s.y},d=l.x*u.width/e.width,f=l.y*u.height/e.height,p=Wt(d)>Wt(f)?d:f,m=a?{x:p,y:p}:{x:o.x===s.x?1:d,y:o.y===s.y?1:f};switch(o.y===s.y?m.y=Wt(m.y):Ut(m.y)!==Ut(f)&&(m.y*=-1),o.x===s.x?m.x=Wt(m.x):Ut(m.x)!==Ut(d)&&(m.x*=-1),i){case`extent`:return Xt(e,bt.scale(m.x,m.y,s),!1);case`center`:return Xt(e,bt.scale(m.x,m.y,{x:e.midX,y:e.midY}),!1)}}function Yt(e,t,n=!0){return n?{x:Gt(t.x,e.x),y:Gt(t.y,e.y),width:Wt(t.x-e.x),height:Wt(t.y-e.y)}:{x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}}function Xt(e,t,n=!0){return Yt(t.applyTo({x:e.minX,y:e.minY}),t.applyTo({x:e.maxX,y:e.maxY}),n)}var Zt=e=>e.ids?.trigger??`float:${e.id}:trigger`,Qt=e=>e.ids?.positioner??`float:${e.id}:positioner`,$t=e=>e.ids?.content??`float:${e.id}:content`,en=e=>e.ids?.title??`float:${e.id}:title`,tn=e=>e.ids?.header??`float:${e.id}:header`,nn=e=>e.getById(Zt(e)),rn=e=>e.getById(Qt(e)),an=e=>e.getById($t(e)),on=e=>e.getById(tn(e)),sn=(e,t,n)=>{let r;return r=pe(t)?Ft(t):zt(e.getWin()),n&&(r=kt({x:-r.width,y:r.minY,width:r.width*3,height:r.height*2})),fe(r,[`x`,`y`,`width`,`height`])};function cn(e){switch(e){case`n`:return{cursor:`n-resize`,width:`100%`,top:0,left:`50%`,translate:`-50%`};case`e`:return{cursor:`e-resize`,height:`100%`,right:0,top:`50%`,translate:`0 -50%`};case`s`:return{cursor:`s-resize`,width:`100%`,bottom:0,left:`50%`,translate:`-50%`};case`w`:return{cursor:`w-resize`,height:`100%`,left:0,top:`50%`,translate:`0 -50%`};case`se`:return{cursor:`se-resize`,bottom:0,right:0};case`sw`:return{cursor:`sw-resize`,bottom:0,left:0};case`ne`:return{cursor:`ne-resize`,top:0,right:0};case`nw`:return{cursor:`nw-resize`,top:0,left:0};default:throw Error(`Invalid axis: ${e}`)}}var ln=new Set([`minimized`,`maximized`,`default`]);function un(e,t){let{state:n,send:r,scope:i,prop:a,computed:o,context:s}=e,c=n.hasTag(`open`),l=n.matches(`open.dragging`),u=n.matches(`open.resizing`),d=s.get(`isTopmost`),f=s.get(`size`),p=s.get(`position`),m=o(`isMaximized`),h=o(`isMinimized`),g=o(`isStaged`),_=o(`canResize`),v=o(`canDrag`);return{open:c,resizable:a(`resizable`),draggable:a(`draggable`),setOpen(e){n.hasTag(`open`)!==e&&r({type:e?`OPEN`:`CLOSE`})},dragging:l,resizing:u,position:p,size:f,setPosition(e){r({type:`SET_POSITION`,position:e})},setSize(e){r({type:`SET_SIZE`,size:e})},minimize(){r({type:`MINIMIZE`})},maximize(){r({type:`MAXIMIZE`})},restore(){r({type:`RESTORE`})},getTriggerProps(){return t.button({...z.trigger.attrs,dir:a(`dir`),type:`button`,disabled:a(`disabled`),id:Zt(i),"data-state":c?`open`:`closed`,"data-dragging":I(l),"aria-controls":$t(i),onClick(e){if(e.defaultPrevented||a(`disabled`))return;let t=n.hasTag(`open`);r({type:t?`CLOSE`:`OPEN`,src:`trigger`})}})},getPositionerProps(){return t.element({...z.positioner.attrs,dir:a(`dir`),id:Qt(i),style:{"--width":qe(f?.width),"--height":qe(f?.height),"--x":qe(p?.x),"--y":qe(p?.y),position:a(`strategy`),top:`var(--y)`,left:`var(--x)`}})},getContentProps(){return t.element({...z.content.attrs,dir:a(`dir`),role:`dialog`,tabIndex:0,hidden:!c,id:$t(i),"aria-labelledby":en(i),"data-state":c?`open`:`closed`,"data-dragging":I(l),"data-topmost":I(d),"data-behind":I(!d),"data-minimized":I(h),"data-maximized":I(m),"data-staged":I(g),style:{width:`var(--width)`,height:`var(--height)`,overflow:h?`hidden`:void 0},onFocus(){r({type:`CONTENT_FOCUS`})},onKeyDown(e){if(e.defaultPrevented)return;if(e.key===`Escape`&&d){r({type:`ESCAPE`});return}if(e.currentTarget!==Te(e))return;let t=Oe(e)*a(`gridSize`),n={ArrowLeft(){r({type:`MOVE`,direction:`left`,step:t})},ArrowRight(){r({type:`MOVE`,direction:`right`,step:t})},ArrowUp(){r({type:`MOVE`,direction:`up`,step:t})},ArrowDown(){r({type:`MOVE`,direction:`down`,step:t})}}[be(e,{dir:a(`dir`)})];n&&(e.preventDefault(),n(e))}})},getCloseTriggerProps(){return t.button({...z.closeTrigger.attrs,dir:a(`dir`),disabled:a(`disabled`),"aria-label":`Close Window`,type:`button`,onClick(e){e.defaultPrevented||r({type:`CLOSE`})}})},getStageTriggerProps(e){if(!ln.has(e.stage))throw Error(`[zag-js] Invalid stage: ${e.stage}. Must be one of: ${Array.from(ln).join(`, `)}`);let n=a(`translations`),i=_e(e.stage,{minimized:()=>({"aria-label":n.minimize,hidden:g}),maximized:()=>({"aria-label":n.maximize,hidden:g}),default:()=>({"aria-label":n.restore,hidden:!g})});return t.button({...z.stageTrigger.attrs,dir:a(`dir`),disabled:a(`disabled`),"data-stage":e.stage,...i,type:`button`,onClick(t){if(t.defaultPrevented||!a(`resizable`))return;let n=_e(e.stage,{minimized:()=>`MINIMIZE`,maximized:()=>`MAXIMIZE`,default:()=>`RESTORE`});r({type:n.toUpperCase()})}})},getResizeTriggerProps(e){return t.element({...z.resizeTrigger.attrs,dir:a(`dir`),"data-disabled":I(!_),"data-axis":e.axis,onPointerDown(t){_&&ve(t)&&(t.currentTarget.setPointerCapture(t.pointerId),t.stopPropagation(),r({type:`RESIZE_START`,axis:e.axis,position:{x:t.clientX,y:t.clientY}}))},onPointerUp(e){if(!_)return;let t=e.currentTarget;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId)},style:{position:`absolute`,touchAction:`none`,...cn(e.axis)}})},getDragTriggerProps(){return t.element({...z.dragTrigger.attrs,dir:a(`dir`),"data-disabled":I(!v),onPointerDown(e){if(!v||!ve(e))return;let t=Te(e);t?.closest(`button`)||t?.closest(`[data-no-drag]`)||(e.currentTarget.setPointerCapture(e.pointerId),e.stopPropagation(),r({type:`DRAG_START`,pointerId:e.pointerId,position:{x:e.clientX,y:e.clientY}}))},onPointerUp(e){if(!v)return;let t=e.currentTarget;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId)},onDoubleClick(e){e.defaultPrevented||a(`resizable`)&&r({type:g?`RESTORE`:`MAXIMIZE`})},style:{WebkitUserSelect:`none`,userSelect:`none`,touchAction:`none`,cursor:`move`}})},getControlProps(){return t.element({...z.control.attrs,dir:a(`dir`),"data-disabled":I(a(`disabled`)),"data-stage":s.get(`stage`),"data-minimized":I(h),"data-maximized":I(m),"data-staged":I(g)})},getTitleProps(){return t.element({...z.title.attrs,dir:a(`dir`),id:en(i)})},getHeaderProps(){return t.element({...z.header.attrs,dir:a(`dir`),id:tn(i),"data-dragging":I(l),"data-topmost":I(d),"data-behind":I(!d),"data-minimized":I(h),"data-maximized":I(m),"data-staged":I(g)})},getBodyProps(){return t.element({...z.body.attrs,dir:a(`dir`),"data-dragging":I(l),"data-minimized":I(h),"data-maximized":I(m),"data-staged":I(g),hidden:h})}}}function dn(){if(typeof globalThis<`u`)return globalThis;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(typeof global<`u`)return global}function fn(e,t){let n=dn();return n?(n[e]||(n[e]=t()),n[e]):t()}var pn=fn(`__zag__refSet`,()=>new WeakSet),mn=e=>typeof e==`object`&&!!e&&`$$typeof`in e&&`props`in e,hn=e=>typeof e==`object`&&!!e&&`__v_isVNode`in e,gn=e=>typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeName==`string`,_n=e=>mn(e)||hn(e)||gn(e),vn=e=>typeof e==`object`&&!!e,yn=e=>vn(e)&&!pn.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!_n(e)&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)&&!(e instanceof Promise)&&!(e instanceof File)&&!(e instanceof Blob)&&!(e instanceof AbortController),bn=()=>!1,xn=Symbol(),Sn=Object.getPrototypeOf,Cn=new WeakMap,wn=e=>e&&(Cn.has(e)?Cn.get(e):Sn(e)===Object.prototype||Sn(e)===Array.prototype),Tn=e=>wn(e)&&e[xn]||null,En=(e,t=!0)=>{Cn.set(e,t)},Dn=fn(`__zag__proxyStateMap`,()=>new WeakMap),[On]=((e=Object.is,t=(e,t)=>new Proxy(e,t),n=new WeakMap,r=(e,t)=>{let r=n.get(e);if(r?.[0]===t)return r[1];let i=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return En(i,!0),n.set(e,[t,i]),Reflect.ownKeys(e).forEach(t=>{let n=Reflect.get(e,t);pn.has(n)?(En(n,!1),i[t]=n):Dn.has(n)?i[t]=jn(n):i[t]=n}),Object.freeze(i)},i=new WeakMap,a=[1,1],o=n=>{if(!vn(n))throw Error(`object required`);let o=i.get(n);if(o)return o;let s=a[0],c=new Set,l=(e,t=++a[0])=>
1{s!==t&&(s=t,c.forEach(n=>n(e,t)))},u=a[1],d=(e=++a[1])=>(u!==e&&!c.size&&(u=e,p.forEach(([t])=>{let n=t[1](e);n>s&&(s=n)})),s),f=e=>(t,n)=>{let r=[...t];r[1]=[e,...r[1]],l(r,n)},p=new Map,m=(e,t)=>{if(bn()&&p.has(e))throw Error(`prop listener already exists`);if(c.size){let n=t[3](f(e));p.set(e,[t,n])}else p.set(e,[t])},h=e=>{let t=p.get(e);t&&(p.delete(e),t[1]?.())},g=e=>(c.add(e),c.size===1&&p.forEach(([e,t],n)=>{if(bn()&&t)throw Error(`remove already exists`);let r=e[3](f(n));p.set(n,[e,r])}),()=>{c.delete(e),c.size===0&&p.forEach(([e,t],n)=>{t&&(t(),p.set(n,[e]))})}),_=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n)),v=t(_,{deleteProperty(e,t){let n=Reflect.get(e,t);h(t);let r=Reflect.deleteProperty(e,t);return r&&l([`delete`,[t],n]),r},set(t,n,r,a){let o=Reflect.has(t,n),s=Reflect.get(t,n,a);if(o&&(e(s,r)||i.has(r)&&e(s,i.get(r))))return!0;h(n),vn(r)&&(r=Tn(r)||r);let c=r;if(!Object.getOwnPropertyDescriptor(t,n)?.set){!Dn.has(r)&&yn(r)&&(c=kn(r));let e=!pn.has(c)&&Dn.get(c);e&&m(n,e)}return Reflect.set(t,n,c,a),l([`set`,[n],r,s]),!0}});i.set(n,v);let y=[_,d,r,g];return Dn.set(v,y),Reflect.ownKeys(n).forEach(e=>{let t=Object.getOwnPropertyDescriptor(n,e);t.get||t.set?Object.defineProperty(_,e,t):v[e]=n[e]}),v})=>[o,Dn,pn,e,t,yn,n,r,i,a])();function kn(e={}){return On(e)}function An(e,t,n){let r=Dn.get(e);bn()&&!r&&console.warn(`Please use proxy object`);let i,a=[],o=r[3],s=!1,c=o(e=>{if(a.push(e),n){t(a.splice(0));return}i||=Promise.resolve().then(()=>{i=void 0,s&&t(a.splice(0))})});return s=!0,()=>{s=!1,c()}}function jn(e){let t=Dn.get(e);bn()&&!t&&console.warn(`Please use proxy object`);let[n,r,i]=t;return i(n,r())}var Mn=kn({stack:[],count(){return this.stack.length},add(e){this.stack.includes(e)||this.stack.push(e)},remove(e){let t=this.stack.indexOf(e);t<0||this.stack.splice(t,1)},bringToFront(e){this.remove(e),this.add(e)},isTopmost(e){return this.stack[this.stack.length-1]===e},indexOf(e){return this.stack.indexOf(e)}}),{not:Nn,and:Pn}=he(),Fn={minimize:`Minimize window`,maximize:`Maximize window`,restore:`Restore window`},In=Object.freeze({width:320,height:240}),Ln=Object.freeze({x:300,y:100}),Rn=de({props({props:e}){return me(e,[`id`],`floating-panel`),{strategy:`fixed`,gridSize:1,allowOverflow:!0,resizable:!0,draggable:!0,...e,translations:{...Fn,...e.translations}}},initialState({prop:e}){return e(`open`)??e(`defaultOpen`)?`open`:`closed`},context({prop:e,bindable:t}){return{size:t(()=>({defaultValue:e(`defaultSize`)??In,value:e(`size`),isEqual:jt,hash(e){return`W:${e.width} H:${e.height}`},onChange(t){e(`onSizeChange`)?.({size:t})}})),position:t(()=>({defaultValue:e(`defaultPosition`)??Ln,value:e(`position`),isEqual:Mt,hash(e){return`X:${e.x} Y:${e.y}`},onChange(t){e(`onPositionChange`)?.({position:t})}})),stage:t(()=>({defaultValue:`default`,onChange(t){e(`onStageChange`)?.({stage:t})}})),lastEventPosition:t(()=>({defaultValue:null})),prevPosition:t(()=>({defaultValue:null})),prevSize:t(()=>({defaultValue:null})),isTopmost:t(()=>({defaultValue:void 0}))}},computed:{isMaximized:({context:e})=>e.get(`stage`)===`maximized`,isMinimized:({context:e})=>e.get(`stage`)===`minimized`,isStaged:({context:e})=>e.get(`stage`)!=="default",hasSpecifiedPosition:({prop:e})=>e(`defaultPosition`)!=null||e(`position`)!=null,canResize:({context:e,prop:t})=>t(`resizable`)&&!t(`disabled`)&&e.get(`stage`)==="default",canDrag:({prop:e,computed:t})=>e(`draggable`)&&!e(`disabled`)&&!t(`isMaximized`)},watch({track:e,context:t,action:n,prop:r}){e([()=>t.hash(`position`)],()=>{n([`setPositionStyle`])}),e([()=>t.hash(`size`)],()=>{n([`setSizeStyle`])}),e([()=>r(`open`)],()=>{n([`toggleVisibility`])})},effects:[`trackPanelStack`],on:{CONTENT_FOCUS:{actions:[`bringToFrontOfPanelStack`]},SET_POSITION:{actions:[`setPosition`]},SET_SIZE:{actions:[`setSize`]}},states:{closed:{tags:[`closed`],on:{"CONTROLLED.OPEN":{target:`open`,actions:[`setAnchorPosition`,`setPositionStyle`,`setSizeStyle`,`setInitialFocus`]},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`,`setAnchorPosition`,`setPositionStyle`,`setSizeStyle`,`setInitialFocus`]}]}},open:{tags:[`open`],entry:[`bringToFrontOfPanelStack`],initial:`idle`,on:{"CONTROLLED.CLOSE":{target:`closed`,actions:[`resetRect`,`setFinalFocus`]},CLOSE:[{guard:`isOpenControlled`,target:`closed`,actions:[`invokeOnClose`,`setFinalFocus`]},{target:`closed`,actions:[`invokeOnClose`,`resetRect`,`setFinalFocus`]}]},states:{idle:{effects:[`trackBoundaryRect`],on:{DRAG_START:{guard:Nn(`isMaximized`),target:`dragging`,actions:[`setPrevPosition`]},RESIZE_START:{guard:Nn(`isMinimized`),target:`resizing`,actions:[`setPrevSize`]},ESCAPE:[{guard:Pn(`isOpenControlled`,`closeOnEsc`),actions:[`invokeOnClose`]},{guard:`closeOnEsc`,target:`closed`,actions:[`invokeOnClose`,`resetRect`,`setFinalFocus`]}
1],MINIMIZE:{actions:[`setMinimized`]},MAXIMIZE:{actions:[`setMaximized`]},RESTORE:{actions:[`setRestored`]},MOVE:{actions:[`setPositionFromKeyboard`]}}},dragging:{effects:[`trackPointerMove`],on:{DRAG:{actions:[`setPositionFromDrag`]},DRAG_END:{target:`idle`,actions:[`invokeOnDragEnd`,`clearPrevPosition`]},ESCAPE:{target:`idle`,actions:[`restorePosition`,`clearPrevPosition`]}}},resizing:{effects:[`trackPointerMove`],on:{DRAG:{actions:[`setSizeFromDrag`]},DRAG_END:{target:`idle`,actions:[`invokeOnResizeEnd`,`clearPrevSize`]},ESCAPE:{target:`idle`,actions:[`restoreSize`,`clearPrevSize`]}}}}}},implementations:{guards:{closeOnEsc:({prop:e})=>!!e(`closeOnEscape`),isMaximized:({context:e})=>e.get(`stage`)===`maximized`,isMinimized:({context:e})=>e.get(`stage`)===`minimized`,isOpenControlled:({prop:e})=>e(`open`)!=null},effects:{trackPointerMove({scope:e,send:t,event:n,prop:r}){let i=e.getDoc(),a=r(`getBoundaryEl`)?.(),o=sn(e,a,!1);return et(i,{onPointerMove({point:e,event:r}){let{altKey:i,shiftKey:a}=r;t({type:`DRAG`,position:{x:Ke(e.x,o.x,o.x+o.width),y:Ke(e.y,o.y,o.y+o.height)},axis:n.axis,altKey:i,shiftKey:a})},onPointerUp(){t({type:`DRAG_END`})}})},trackBoundaryRect({context:e,scope:t,prop:n,computed:r}){let i=t.getWin(),a=!0,o=()=>{if(a){a=!1;return}let i=n(`getBoundaryEl`)?.(),o=sn(t,i,!1);r(`isMaximized`)||(o=At({...e.get(`position`),...e.get(`size`)},o)),e.set(`size`,fe(o,[`width`,`height`])),e.set(`position`,fe(o,[`x`,`y`]))},s=n(`getBoundaryEl`)?.();return pe(s)?nt.observe(s,o):Ne(i,`resize`,o)},trackPanelStack({context:e,scope:t}){let n=An(Mn,()=>{e.set(`isTopmost`,Mn.isTopmost(t.id));let n=an(t);if(!n)return;let r=Mn.indexOf(t.id);r!==-1&&n.style.setProperty(`--z-index`,`${r+1}`)});return()=>{Mn.remove(t.id),n()}}},actions:{setPosition({context:e,event:t,prop:n,scope:r}){let i=n(`getBoundaryEl`)?.(),a=sn(r,i,n(`allowOverflow`)),o=St(t.position,e.get(`size`),a);e.set(`position`,o)},setSize({context:e,event:t,scope:n,prop:r}){let i=r(`getBoundaryEl`)?.(),a=sn(n,i,!1),o=t.size;o=Tt(o,r(`minSize`),r(`maxSize`)),o=Tt(o,r(`minSize`),a);let s=St(e.get(`position`),o,a);e.set(`size`,o),e.set(`position`,s)},setAnchorPosition({context:e,computed:t,prop:n,scope:r}){if(t(`hasSpecifiedPosition`))return;let i=e.get(`prevPosition`)||e.get(`prevSize`);if(n(`persistRect`)&&i)return;let a=nn(r),o=sn(r,n(`getBoundaryEl`)?.(),!1),s=n(`getAnchorPosition`)?.({triggerRect:a?DOMRect.fromRect(Ft(a)):null,boundaryRect:DOMRect.fromRect(o)});if(!s){let t=e.get(`size`);s={x:o.x+(o.width-t.width)/2,y:o.y+(o.height-t.height)/2}}s&&e.set(`position`,s)},setPrevPosition({context:e,event:t}){e.set(`prevPosition`,{...e.get(`position`)}),e.set(`lastEventPosition`,t.position)},clearPrevPosition({context:e,prop:t}){t(`persistRect`)||e.set(`prevPosition`,null),e.set(`lastEventPosition`,null)},restorePosition({context:e}){let t=e.get(`prevPosition`);t&&e.set(`position`,t)},setPositionFromDrag({context:e,event:t,prop:n,scope:r}){let i=Dt(t.position,e.get(`lastEventPosition`));i.x=Math.round(i.x/n(`gridSize`))*n(`gridSize`),i.y=Math.round(i.y/n(`gridSize`))*n(`gridSize`);let a=e.get(`prevPosition`);if(!a)return;let o=Ot(a,i),s=n(`getBoundaryEl`)?.(),c=sn(r,s,n(`allowOverflow`));o=St(o,e.get(`size`),c),e.set(`position`,o)},setPositionStyle({scope:e,context:t}){let n=rn(e),r=t.get(`position`);n?.style.setProperty(`--x`,`${r.x}px`),n?.style.setProperty(`--y`,`${r.y}px`)},resetRect({context:e,prop:t}){e.set(`stage`,`default`),t(`persistRect`)||(e.set(`position`,e.initial(`position`)),e.set(`size`,e.initial(`size`)))},setPrevSize({context:e,event:t}){e.set(`prevSize`,{...e.get(`size`)}),e.set(`prevPosition`,{...e.get(`position`)}),e.set(`lastEventPosition`,t.position)},clearPrevSize({context:e}){e.set(`prevSize`,null),e.set(`prevPosition`,null),e.set(`lastEventPosition`,null)},restoreSize({context:e}){let t=e.get(`prevSize`);t&&e.set(`size`,t);let n=e.get(`prevPosition`);n&&e.set(`position`,n)},setSizeFromDrag({context:e,event:t,scope:n,prop:r}){let i=e.get(`prevSize`),a=e.get(`prevPosition`),o=e.get(`lastEventPosition`);if(!i||!a||!o)return;let s=Jt(kt({...a,...i}),Dt(t.position,o),t.axis,{scalingOriginMode:t.altKey?`center`:`extent`,lockAspectRatio:!!r(`lockAspectRatio`)||t.shiftKey}),c=fe(s,[`width`,`height`]),l=fe(s,[`x`,`y`]),u=r(`getBoundaryEl`)?.(),d=sn(n,u,!1);if(c=Tt(c,r(`minSize`),r(`maxSize`)),c=Tt(c,r(`minSize`),d),e.set(`size`,c),l){let t=St(l,c,d);e.set(`position`,t)}},setSizeStyle({scope:e,context:t}){queueMicrotask(()=>{let n=rn(e),r=t.get(`size`);n?.style.setProperty(`--width`,`${r.width}px`),n?.style.setProperty(`--height`,`${r.height}px`)})}
1,setMaximized({context:e,prop:t,scope:n}){if(e.get(`stage`)===`maximized`)return;let r=e.get(`stage`)==="default",i=e.get(`size`),a=e.get(`position`),o=t(`getBoundaryEl`)?.(),s=sn(n,o,!1),c=fe(s,[`x`,`y`]),l=fe(s,[`height`,`width`]);e.set(`stage`,`maximized`),r&&(e.set(`prevSize`,i),e.set(`prevPosition`,a)),e.set(`position`,c),e.set(`size`,l)},setMinimized({context:e,scope:t}){if(e.get(`stage`)===`minimized`)return;let n=e.get(`stage`)==="default",r=e.get(`size`),i=e.get(`position`);e.set(`stage`,`minimized`),n&&(e.set(`prevSize`,r),e.set(`prevPosition`,i));let a=on(t);if(!a)return;let o={...r,height:a?.offsetHeight};e.set(`size`,o)},setRestored({context:e,prop:t,scope:n}){let r=sn(n,t(`getBoundaryEl`)?.(),!1);e.set(`stage`,`default`);let i=e.get(`size`),a=e.get(`prevSize`);a&&(i=Tt(a,t(`minSize`),t(`maxSize`)),i=Tt(i,t(`minSize`),r));let o=e.get(`position`),s=e.get(`prevPosition`);s&&(o=St(s,i,r)),e.set(`size`,i),e.set(`position`,o),e.set(`prevSize`,null),e.set(`prevPosition`,null)},setPositionFromKeyboard({context:e,event:t,prop:n,scope:r}){ge(t.step==null,`step is required`);let i=e.get(`position`),a=t.step,o=_e(t.direction,{left:{x:i.x-a,y:i.y},right:{x:i.x+a,y:i.y},up:{x:i.x,y:i.y-a},down:{x:i.x,y:i.y+a}}),s=n(`getBoundaryEl`)?.(),c=sn(r,s,!1);o=St(o,e.get(`size`),c),e.set(`position`,o)},bringToFrontOfPanelStack({prop:e}){Mn.bringToFront(e(`id`))},invokeOnOpen({prop:e}){e(`onOpenChange`)?.({open:!0})},invokeOnClose({prop:e}){e(`onOpenChange`)?.({open:!1})},invokeOnDragEnd({context:e,prop:t}){t(`onPositionChangeEnd`)?.({position:e.get(`position`)})},invokeOnResizeEnd({context:e,prop:t}){t(`onSizeChangeEnd`)?.({size:e.get(`size`)})},setFinalFocus({scope:e,prop:t}){t(`restoreFocus`)!==!1&&we(()=>{(t(`finalFocusEl`)?.()??nn(e))?.focus({preventScroll:!0})})},setInitialFocus({scope:e,prop:t}){we(()=>{(t(`initialFocusEl`)?.()??an(e))?.focus({preventScroll:!0})})},toggleVisibility({send:e,prop:t,event:n}){e({type:t(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:n})}}}}),zn=je()(`allowOverflow.closeOnEscape.defaultOpen.defaultPosition.defaultSize.dir.disabled.draggable.finalFocusEl.getAnchorPosition.getBoundaryEl.getRootNode.gridSize.id.initialFocusEl.ids.lockAspectRatio.maxSize.minSize.onOpenChange.onPositionChange.onPositionChangeEnd.onSizeChange.onSizeChangeEnd.onStageChange.open.persistRect.position.resizable.restoreFocus.size.strategy.translations`.split(`.`)),Bn=ke(zn),Vn=je()([`axis`]),Hn=ke(Vn),Un=c(`<div><!></div>`);function Wn(r,i){T(i,!0);let a=A(i,[`$$slots`,`$$events`,`$$legacy`]),o=R.consume(),c=b(()=>Hn(a)),l=b(()=>oe(p(c),2)),u=b(()=>p(l)[0]),d=b(()=>p(l)[1]),f=b(()=>p(d).element),m=b(()=>p(d).children),h=b(()=>P(p(d),[`element`,`children`])),g=b(()=>L(o().getResizeTriggerProps(p(u)),p(h)));var _=s(),v=M(_),ee=t=>{var n=s(),r=M(n);e(r,()=>p(f),()=>p(g)),E(t,n)},x=n=>{var r=Un();N(r,()=>({...p(g)}));var i=S(r);e(i,()=>p(m)??t),y(r),E(n,r)};n(v,e=>{p(f)?e(ee):e(x,-1)}),E(r,_),O()}function Gn(t,n){T(n,!0),A(n,[`$$slots`,`$$events`,`$$legacy`]);let r=R.consume(),i=b(()=>n.children);var a=s(),o=M(a);e(o,()=>p(i),()=>r),E(t,a),O()}function Kn(n,r){T(r,!0),A(r,[`$$slots`,`$$events`,`$$legacy`]);let i=b(()=>r.children),a=b(()=>r.value);R.provide(()=>p(a)());var o=s(),c=M(o);e(c,()=>p(i)??t),E(n,o),O()}function qn(e){let t=Ee.consume(),n=Ce(Rn,()=>({dir:t().dir,...typeof e==`function`?e():e})),r=b(()=>un(n,De));return()=>p(r)}function Jn(n,i){let a=r();T(i,!0);let o=A(i,[`$$slots`,`$$events`,`$$legacy`]),c=b(()=>Bn(o)),l=b(()=>oe(p(c),2)),u=b(()=>p(l)[0]),d=b(()=>p(l)[1]),f=b(()=>p(d).children),m=qn(()=>({...p(u),id:a}));R.provide(()=>m());var h=s(),g=M(h);e(g,()=>p(f)??t),E(n,h),O()}var Yn=c(`<button><!></button>`);function Xn(r,i){T(i,!0);let a=A(i,[`$$slots`,`$$events`,`$$legacy`]),o=R.consume(),c=b(()=>i.element),l=b(()=>i.children),u=b(()=>i.stage),d=b(()=>P(a,[`element`,`children`,`stage`])),f=b(()=>L(o().getStageTriggerProps({stage:p(u)}),p(d)));var m=s(),h=M(m),g=t=>{var n=s(),r=M(n);e(r,()=>p(c),()=>p(f)),E(t,n)},_=n=>{var r=Yn();N(r,()=>({...p(f)}));var i=S(r);e(i,()=>p(l)??t),y(r),E(n,r)};n(h,e=>{p(c)?e(g):e(_,-1)}),E(r,m),O()}var Zn=c(`<div><!></div>`);function Qn(r,i){T(i,!0);let a=A(i,[`$$slots`,`$$events`,`$$legacy`]),o=R.consume(),c=b(()=>i.element),l=b(()=>i.children),u=b(()=>P(a,[`element`,`children`])),d=b(()=>L(o().getTitleProps(),p(u)));var f=s(),m=M(f),h=t=>{var n=s(),r=M(n);e(r,()=>p(c),()=>p(d)),E(t,n)},g=n=>{var r=Zn();N(r,()=>({...p(d)}));var i=S(r);e(i,()=>p(l)??t),y(r),E(n,r)};n(m,e=>{p(c)?e(h):e(g,-1)}),E(r,f),O()}var $n=c(`<button><!></button>`);function er(r,i){T(i,!0);let a=A(i,[`$$slots`,`$$events`,`$$legacy`]),o=R.consume(),c=b(()=>i.element),l=b(()=>i.children),u=b(()=>P(a,[`element`,`children`])),d=b(()=>L(o().getTriggerProps(),p(u)));var f=s(),m=M(f),h=t=>{var n=s(),r=M(n);e(r,()=>p(c),()=>p(d)),E(t,n)},g=n=>{var r=$n();N(r,()=>({...p(d)}));var i=S(r);e(i,()=>p(l)??t),y(r),E(n,r)};n(m,e=>{p(c)?e(h):e(g,-1)}),E(r,f),O()}var B=Object.assign(Jn,{Provider:Kn,Context:Gn,Trigger:er,Positioner:gt,Content:ct,DragTrigger:ft,Header:mt,Title:Qn,Control:ut,StageTrigger:Xn,CloseTrigger:ot,Body:it,ResizeTrigger:Wn});function tr(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}
1function nr(e,t=`|`){return e.map(e=>Er(e)).join(t)}function rr(e,t){return typeof t==`bigint`?t.toString():t}var ir=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function ar(e){return new ir(e)}function or(e){return e==null}function sr(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function cr(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function lr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ur(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function dr(e){return ur(e._zod.def)??e._zod.def.shape}function fr(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return lr(this,t,e),e},enumerable:!0,configurable:!0})}function pr(e,t,n){t in e?lr(e,t,n):e[t]=n}function mr(e,t,n,r){let i=dr(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?fr(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):pr(e,a,r?r(n.value,a):n.value))}}function hr(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?fr(e,n,()=>t[n]):pr(e,n,r.value))}}function V(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function gr(e){return JSON.stringify(e)}function _r(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var vr=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function yr(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var br=ar(()=>{if(mi.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function xr(e){if(yr(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return yr(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function Sr(e){return xr(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Cr=new Set([`string`,`number`,`symbol`]);function wr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Tr(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function H(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Er(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Dr(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Or={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},kr={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Ar(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return mr(i,e,jr(e,t)),Tr(e,V(n,{shape:i,checks:[]}))}function jr(e,t){let n=dr(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function Mr(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(jr(e,t)),a={};return mr(a,e,Reflect.ownKeys(dr(e)).filter(e=>!i.has(e))),Tr(e,V(n,{shape:a,checks:[]}))}function Nr(e,t){if(!xr(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=dr(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot over
1write keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Tr(e,V(e._zod.def,{shape:Pr(e,t)}))}function Pr(e,t){let n={};return mr(n,e,Reflect.ownKeys(dr(e))),hr(n,t),n}function Fr(e,t){if(!xr(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Tr(e,V(e._zod.def,{shape:Pr(e,t)}))}function Ir(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return mr(n,e,Reflect.ownKeys(dr(e))),mr(n,t,Reflect.ownKeys(dr(t))),Tr(e,V(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Lr(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(jr(t,n)):void 0,o={};return mr(o,t,Reflect.ownKeys(dr(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),Tr(t,V(t._zod.def,{shape:o,checks:[]}))}function Rr(e,t,n){let r=n?new Set(jr(t,n)):void 0,i={};return mr(i,t,Reflect.ownKeys(dr(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),Tr(t,V(t._zod.def,{shape:i}))}function zr(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 Br(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Vr(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Hr(e){return typeof e==`string`?e:e?.message}function Ur(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Wr(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Hr(e.inst?._zod.def?.error?.(e))??Hr(a?.(e))??Hr(t?.error?.(e))??Hr(n.customError?.(e))??Hr(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var Gr=/[\uD800-\uDBFF]/;function Kr(e){let t=e.length;if(!Gr.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function qr(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Jr(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Yr(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Xr(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):ei(e,n,r.value)}}function Zr(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Qr(e,t,n){return Zr(e,t,n,!1)}function $r(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return Zr(this,n,r(this))},set(e){Zr(this,n,e)}})}return t}function ei(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Zr(this,t,n.bind(this))},set(e){Zr(this,t,e)}})}function ti(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var ni,ri=!1,ii={configurable:!0,get(){ri=!0}};function U(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&ni!==e._zod){ni=void 0;return}ni=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,ii);let e=ri;ri=!1;try{let r=n(this);return ri?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),ri||=e,r}catch(n){throw delete this[t],ri||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function ai(e,t,n,r){let i=ti(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};
vendor: 4,555 bytes, line 1
1return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var oi=`~constantCatch`;function si(e){let t=()=>e;return t[oi]=!0,t}var ci,li={value:void 0,enumerable:!1},ui=`captureStackTrace`in Error?Error:null;function di(e){let t=ui;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return ui=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function W(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){li.value=new a(r);try{Object.defineProperty(n,"_zod",li)}finally{li.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Xr(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?di(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var fi=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},pi=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(ci=globalThis).__zod_globalConfig??(ci.__zod_globalConfig={});var mi=globalThis.__zod_globalConfig;function hi(e){return e&&Object.assign(mi,e),mi}function gi(){let e=this._zod;return e.message??=JSON.stringify(e.def,rr,2),e.message}function _i(e){this._zod.message=e}var vi={get:gi,set:_i,enumerable:!0,configurable:!0},yi={value:void 0,enumerable:!1},bi=new WeakSet([Object.prototype,Error.prototype]),xi=(e,t)=>{e.name=`$ZodError`,yi.value=t,Object.defineProperty(e,"issues",yi),yi.value=void 0,Object.defineProperty(e,"message",vi);let n=Object.getPrototypeOf(e);bi.has(n)||(bi.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},Si=W(`$ZodError`,xi);W(`$ZodError`,xi,void 0,{Parent:Error});function Ci(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function wi(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Ci(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Ti(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function Ei(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Di=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new fi;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Wr(e,o,hi())));throw vr(n,a?.callee??t),n}return s.value};return t},Oi=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Wr(e,o,hi())));throw vr(n,a?.callee??t),n}return s.value};return t},ki=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new fi;return a.issues.length?Ai(e,a.issues,i):{success:!0,data:a.value}};
1function Ai(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Wr(e,n,hi()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var ji=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Ai(e,a.issues,i):{success:!0,data:a.value}},Mi=Symbol.for(`zod.compile.invalid`),Ni=Symbol.for(`zod.compile.fallback`),Pi=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==Mi)return!0;if(r.definite===!0&&n===void 0)return!1}return Fi(e,t,n)});function Fi(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Ni]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new fi;return a.issues.length===0}var Ii=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},Li=e=>{let t=Di(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,Ei(n,a))};return n},Ri=e=>{let t=Di(e),n=(e,r,i,a)=>t(e,r,i,Ei(n,a));return n},zi=e=>{let t=Oi(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,Ei(n,a))};return n},Bi=e=>{let t=Oi(e),n=async(e,r,i,a)=>await t(e,r,i,Ei(n,a));return n},Vi=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ki(e)(t,n,i)},Hi=e=>(t,n,r)=>ki(e)(t,n,r),Ui=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ji(e)(t,n,i)},Wi=e=>async(t,n,r)=>ji(e)(t,n,r),Gi=/^[cC][0-9a-z]{6,}$/,Ki=/^[0-9a-z]+$/,qi=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Ji=/^[0-9a-vA-V]{20}$/,Yi=/^[A-Za-z0-9]{27}$/,Xi=/^[a-zA-Z0-9_-]{21}$/;function Zi(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Qi=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,$i=/^([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})$/,ea=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ta=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,na=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function ra(){return new RegExp(na,`u`)}var ia=/^(?:(?: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])$/,aa=/^(([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}|:))$/,oa=/^((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])$/,sa=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ca=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,la=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,ua=/^https?$/,da=/^\+[1-9]\d{6,14}$/,fa=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function pa(e){return RegExp(`^${e}$`)}var ma=pa(fa);function ha(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ga(e){return RegExp(`^${ha(e)}$`)}function _a(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${ha({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${ha({precision:e.precision})}`:n;return RegExp(`^${fa}T(?:${r})$`)}var va=/^[\s\S]{0,}$/,ya=/^-?\d+(?:\.\d+)?$/,ba=/^(?:true|false)$/i,xa=/^[^A-Z]*$/,Sa=/^[^a-z]*$/,G=W(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ca=e=>{let t=e.value;return!or(t)&&t.length!==void 0},wa={number:`number`,bigint:`bigint`,object:`date`},Ta=W(`$ZodCheckLessThan`,(e,t)=>{G.init(e,t);let n=wa[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:wa[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ea=W(`$ZodCheckGreaterThan`,(e,t)=>{G.init(e,t);let n=wa[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:wa[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Da=W(`$ZodCheckMultipleOf`,(e,t)=>{G.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):cr(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})}}),Oa=W(`$ZodCheckNumberFormat`,(e,t)=>{G.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Or[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>
10?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),ka=W(`$ZodCheckMaxLength`,(e,t)=>{var n;G.init(e,t),(n=e._zod.def).when??(n.when=Ca),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Kr(r):i)<=t.maximum)return;let a=qr(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Aa=W(`$ZodCheckMinLength`,(e,t)=>{var n;G.init(e,t),(n=e._zod.def).when??(n.when=Ca),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Kr(r):i)>=t.minimum)return;let a=qr(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ja=W(`$ZodCheckLengthEquals`,(e,t)=>{var n;G.init(e,t),(n=e._zod.def).when??(n.when=Ca),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Kr(r):i;if(a===t.length)return;let o=qr(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ma=W(`$ZodCheckStringFormat`,(e,t)=>{var n,r;G.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Na=W(`$ZodCheckRegex`,(e,t)=>{Ma.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=W(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=xa,Ma.init(e,t)}),Fa=W(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Sa,Ma.init(e,t)}),Ia=W(`$ZodCheckIncludes`,(e,t)=>{G.init(e,t);let n=wr(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),La=W(`$ZodCheckStartsWith`,(e,t)=>{G.init(e,t);let n=RegExp(`^${wr(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Ra=W(`$ZodCheckEndsWith`,(e,t)=>{G.init(e,t);let n=RegExp(`.*${wr(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),za=W(`$ZodCheckOverwrite`,(e,t)=>{G.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Ba=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
2`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
3`)}\n};`)(...Object.values(this.closed))}},Va={major:4,minor:6,patch:5},K=W(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Va;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=zr(t),a;for(let o of n){if(o._zod.def.when){if(Br(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new fi;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Ur(t.issues,n,e),i||=zr(t,n))});else{if(t.issues.length===n)continue;Ur(t.issues,n,e),i||=zr(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(zr(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new fi;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new fi;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Qr(this,`~standard`,Wa(this))},set"~standard"(e){Zr(this,`~standard`,e)}}),Ha=(e,t)=>e.issues.length?{issues:e.issues.map(e=>Wr(e,t,hi()))}:{value:e.value};async function Ua(e,t){let n={async:!0};return Ha(await e._zod.run({value:t,issues:[]},n),n)}function Wa(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Ha(r,n)}catch{}return Ua(e,t)},vendor:`zod`,version:1}}var Ga=W(`$ZodString`,(e,t)=>{K.init(e,t),e._zod.pattern=t.pattern??va,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}}),q=W(`$ZodStringFormat`,(e,t)=>{Ma.init(e,t),Ga.init(e,t)}),Ka=W(`$ZodGUID`,(e,t)=>{t.pattern??=$i,q.init(e,t)}),qa=W(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=ea(e)}else t.pattern??=ea();q.init(e,t)}),Ja=W(`$ZodEmail`,(e,t)=>{t.pattern??=ta,q.init(e,t)});function Ya(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Xa(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Ya(e)||2:Za(e,t)}function Za(e,t){if(!t.normalize&&t.protocol?.source===ua.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var Qa=/[\t\n\r]/g;function $a(e){return e.replace(Qa,``)}function eo(e,t){return t.lastIndex=0,t.test(e.hostname)}function to(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var no=W(`$ZodURL`,(e,t)=>{q.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Xa(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=$a(r);return}t.hostname&&!eo(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!to(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:$a(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),ro=W(`$ZodEmoji`,(e,t)=>{t.pattern??=ra(),q.init(e,t)}),io=W(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Xi:Zi(t.length),q.init(e,t)}),ao=W(`$ZodCUID`,(e,t)=>{t.pattern??=Gi,q.init(e,t)}),oo=W(`$ZodCUID2`,(e,t)=>{t.pattern??=Ki,q.init(e,t)}),so=W(`$ZodULID`,(e,t)=>{t.pattern??=qi,q.init(e,t)}),co=W(`$ZodXID`,(e,t)=>{t.pattern??=Ji,q.init(e,t)}),lo=W(`$ZodKSUID`,(e,t)=>{t.pattern??=Yi,q.init(e,t)}),uo=W(`$ZodISODateTime`,(e,t)=>{t.pattern??=_a(t),q.init(e,t)}),fo=W(`$ZodISODate`,(e,t)=>{t.pattern??=ma,q.init(e,t)}),po=W(`$ZodISOTime`,(e,t)=>{t.pattern??=ga(t),q.init(e,t)}),mo=W(`$ZodISODuration`,(e,t)=>{t.pattern??=Qi,q.init(e,t)}),ho=W(`$ZodIPv4`,(e,t)=>{t.pattern??=ia,q.init(e,t)}),go=/^[0-9a-fA-F:.]+$/;function _o(e){return go.test(e)?Ya(`http://[${e}]`):!1}var vo=W(`$ZodIPv6`,(e,t)=>{t.pattern??=aa,q.init(e,t),e._zod.check=n=>{_o(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),yo=W(`$ZodCIDRv4`,(e,t)=>{t.pattern??=oa,q.init(e,t)});function bo(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:_o(n)}var xo=W(`$ZodCIDRv6`,(e,t)=>{t.pattern??=sa,q.init(e,t),e._zod.check=n=>{bo(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function So(e){if(e===``)return!0;
3if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Co=/^[0-9a-zA-Z+/]*={0,2}$/,wo=W(`$ZodBase64`,(e,t)=>{t.pattern??=Co,q.init(e,t),e._zod.check=n=>{So(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),To=/^[A-Za-z0-9_-]*$/;function Eo(e){if(!To.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return So(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Do=W(`$ZodBase64URL`,(e,t)=>{t.pattern??=To,q.init(e,t),e._zod.check=n=>{Eo(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Oo=W(`$ZodE164`,(e,t)=>{t.pattern??=da,q.init(e,t)});function ko(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Ao=W(`$ZodJWT`,(e,t)=>{q.init(e,t),e._zod.check=n=>{ko(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),jo=W(`$ZodNumber`,(e,t)=>{K.init(e,t),e._zod.pattern=ya,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Mo=W(`$ZodNumberFormat`,(e,t)=>{Oa.init(e,t),jo.init(e,t)}),No=W(`$ZodBoolean`,(e,t)=>{K.init(e,t),e._zod.pattern=ba,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Po=W(`$ZodUnknown`,(e,t)=>{K.init(e,t),e._zod.parse=e=>e}),Fo=W(`$ZodNever`,(e,t)=>{K.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Io(e,t,n){e.issues.length&&t.issues.push(...Vr(n,e.issues)),t.value[n]=e.value}var Lo=W(`$ZodArray`,(e,t)=>{K.init(e,t);let n=mi.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>Io(t,r,e)));else if(Io(c,r,e),s&&c.issues.length!==0&&zr(c))break}return o.length?Promise.all(o).then(()=>r):r}});function Ro(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...Vr(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var zo=[];function Bo(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:zo,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Dr(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Vo(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(zr(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Ro(e,n,i,t,d,f))):Ro(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var Ho=W(`$ZodObject`,(e,t)=>{K.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=ar(()=>Bo(t));U(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||lr(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=yr,o=t.catchall,s,c=mi.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};
vendor: 9,337 bytes, lines 3-53
3let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(zr(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>Ro(n,t,e,r,a,o))):Ro(s,t,e,r,a,o)}return o?Vo(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),Uo=W(`$ZodObjectJIT`,(e,t)=>{Ho.init(e,t);let n=e._zod.parse,r=ar(()=>Bo(t)),i=mi.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Ba([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
4          let ${e}_ab = false;
5          for (let i = 0; i < ${e}.issues.length; i++) {
6            const iss = ${e}.issues[i];
7            iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
8            payload.issues.push(iss);
9            if (iss.continue !== true) ${e}_ab = true;
10          }
11          if (${e}_ab && ctx && ctx.abortEarly) {
12            payload.value = newResult;
13            return payload;
14          }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:gr(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
15        const ${n}_present = ${i};
16        if (!${n}.issues.length || ${n}_present) {
17          if (${n}.issues.length) {${c(n,r)}
18          }
19
20          if (${e}) {
21            newResult[${r}] = ${n}.value;
22          }
23        }
24
25      `)}else f?(o.write(`
26        if (${n}.issues.length) {${c(n,r)}
27        }
28      `),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
29        if (${n}.value !== undefined || ${i}) {
30          newResult[${r}] = ${n}.value;
31        }
32      `)):o.write(`
33        const ${n}_present = ${i};
34        if (${n}.issues.length) {${c(n,r)}
35        }
36        if (!${n}_present && !${n}.issues.length) {
37          payload.issues.push({
38            code: "invalid_type",
39            expected: "nonoptional",
40            input: undefined,
41            path: [${r}]
42          });
43          if (ctx && ctx.abortEarly) {
44            payload.value = newResult;
45            return payload;
46          }
47        }
48
49        if (${n}_present) {
50          newResult[${r}] = ${n}.value;
51        }
52
53      `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=yr,c=!mi.jitless,l=c&&br.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Vo([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function Wo(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!zr(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Wr(e,r,hi())))}),t)}var Go=W(`$ZodUnion`,(e,t)=>{K.init(e,t),U(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),U(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),U(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),U(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>sr(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Wo(t,r,e,i)):Wo(o,r,e,i)}}),Ko=W(`$ZodIntersection`,(e,t)=>{K.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Jo(e,t,n)):Jo(e,i,a)}});function qo(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(xr(e)&&xr(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=qo(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=qo(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Jo(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=qo(t.value,n.value);if(!c.valid){if(zr(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Yo=W(`$ZodEnum`,(e,t)=>{K.init(e,t);let n=tr(t.entries),r=new Set(n);e._zod.values=r,U(e,`pattern`,e=>{let t=tr(e.def.entries).filter(e=>Cr.has(typeof e));return RegExp(t.length?`^(${t.map(e=>wr(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Xo=W(`$ZodLiteral`,(e,t)=>{K.init(e,t);let n=new Set(t.values);e._zod.values=n,U(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?wr(e):e?wr(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Zo=W(`$ZodTransform`,(e,t)=>{K.init(e,t),e._zod.optin=`optional`,mi.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new pi(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new fi;return n.value=i,n}});function Qo(e,t){return e.value=t.issues.length?void 0:t.value,e}var $o=W(`$ZodOptional`,(e,t)=>{K.init(e,t),U(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,U(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),U(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${sr(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Qo(e,t)):Qo(e,r)}return t.innerType._zod.run(e,n)}}),es=W(`$ZodExactOptional`,(e,t)=>{$o.init(e,t),U(e,`values`,e=>e.def.innerType._zod.values),U(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),ts=W(`$ZodNullable`,(e,t)=>{K.init(e,t),U(e,`optin`,e=>e.def.innerType._zod.optin),U(e,`optout`,e=>e.def.innerType._zod.optout),U(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${sr(t.source)}|null)$`):void 0}),U(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),ns=W(`$ZodDefault`,(e,t)=>{K.init(e,t),e._zod.optin=`defaulted`,U(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>rs(e,t)):rs(r,t)}});function rs(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var is=W(`$ZodPrefault`,(e,t)=>{K.init(e,t),e._zod.optin=`defaulted`,U(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),as=W(`$ZodNonOptional`,(e,t)=>{K.init(e,t),U(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>os(t,e)):os(i,e)}});function os(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}
53function ss(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Wr(e,r,hi()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var cs=W(`$ZodCatch`,(e,t)=>{K.init(e,t),U(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),U(e,`optout`,e=>e.def.innerType._zod.optout),U(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>ss(e,r,t,n)):ss(e,r,t,n)}}),ls=W(`$ZodPipe`,(e,t)=>{K.init(e,t),U(e,`values`,e=>e.def.in._zod.values),U(e,`optin`,e=>e.def.in._zod.optin),U(e,`optout`,e=>e.def.out._zod.optout),U(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>us(e,t.in,n)):us(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>us(e,t.out,n)):us(r,t.out,n)}});function us(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var ds=W(`$ZodReadonly`,(e,t)=>{K.init(e,t),U(e,`propValues`,e=>e.def.innerType._zod.propValues),U(e,`values`,e=>e.def.innerType._zod.values),U(e,`optin`,e=>e.def.innerType?._zod?.optin),U(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(fs):fs(r)}});function fs(e){return e.memo||(e.value=Object.freeze(e.value)),e}var ps=W(`$ZodCustom`,(e,t)=>{G.init(e,t),K.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>ms(t,n,r,e));ms(i,n,r,e)}});function ms(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Yr(e))}}var hs=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},gs=`~memo`,_s=[];function vs(e){return typeof e==`object`&&!!e}function ys(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var bs=new WeakMap,xs=0,Ss=1,Cs=2;function ws(e,t,n){let r=bs.get(e);if(r!==void 0)return r?Cs:xs;if(t.has(e))return Cs;t.add(e);let i=xs,a=e=>{if(i!==Cs&&e?._zod){let r=ws(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=xs;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Ss:o.value?._zod?ws(o.value,t,n):xs;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=ur(c);s(e?o(e,!0):Ss),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?ws(r,t,!1):Ss);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),Ts(e,i)}function Ts(e,t){return t!==Ss&&bs.set(e,t===Cs),t}function Es(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var Ds,Os=[],ks={alloc(e,t,n){let r=Ds;if(!r)return n;Ds=void 0;let i={value:n,issues:null};return r.set(t.value,i),Os.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&js(n,e.value))throw new hs;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=ws(e,new Set,!1);if(i===xs)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Cs||r?n=!0:r=!0}let l=s.value;if(!vs(l))return t(s,c);let u=c[gs];u||(u={buckets:new WeakMap,backEdges:void 0},c[gs]=u);let d;i===c?d=a:(d=Es(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...ys(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;Ds=d;let p=Os.length,m=t(s,c);Ds=void 0;let h=Os.length>p?Os.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?ys(e.issues):_s),e)):(h&&(h.issues=m.issues.length?ys(m.issues):_s),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function As(){return ks}function js(e,t){let n=e[gs]?.backEdges;return n!==void 0&&vs(t)&&n.has(t)}var Ms=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBA
53N`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Jr(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Er(e.values[0])}`:`Invalid option: expected one of ${nr(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${nr(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function Ns(){return{localeError:Ms()}}var Ps,Fs=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Is(){return new Fs}(Ps=globalThis).__zod_globalRegistry??(Ps.__zod_globalRegistry=Is());var Ls=globalThis.__zod_globalRegistry;function Rs(e){return e.checks&&=[...e.checks],e}function zs(e,t){return new e(Rs({type:`string`,...H(t)}))}function Bs(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...H(t)})}function Vs(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...H(t)})}function Hs(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...H(t)})}function Us(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...H(t)})}function Ws(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...H(t)})}function Gs(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...H(t)})}function Ks(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...H(t)})}function qs(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...H(t)})}function Js(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...H(t)})}function Ys(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...H(t)})}function Xs(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...H(t)})}function Zs(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...H(t)})}function Qs(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...H(t)})}function $s(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...H(t)})}function ec(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...H(t)})}function tc(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...H(t)})}function nc(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...H(t)})}function rc(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...H(t)})}function ic(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...H(t)})}function ac(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...H(t)})}function oc(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...H(t)})}function sc(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...H(t)})}function cc(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...H(t)})}function lc(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...H(t)})}function uc(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...H(t)})}function dc(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...H(t)})}function fc(e,t){return new e(Rs({type:`number`,checks:[],...H(t)}))}function pc(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...H(t)})}function mc(e,t){return new e({type:`boolean`,...H(t)})}function hc(e){return new e({type:`unknown`})}function gc(e,t){return new e({type:`never`,...H(t)})}function _c(e,t){return new Ta({check:`less_than`,...H(t),value:e,inclusive:!1})}function vc(e,t){return new Ta({check:`less_than`,...H(t),value:e,inclusive:!0})}function yc(e,t){return new Ea({check:`greater_than`,...H(t),value:e,inclusive:!1})}function bc(e,t){return new Ea({check:`greater_than`,...H(t),value:e,inclusive:!0})}function xc(e,t){return new Da({check:`multiple_of`,...H(t),value:e})}function Sc(e,t){return new ka({check:`max_length`,...H(t),maximum:e})}function Cc(e,t){return new Aa({check:`min_length`,...H(t),minimum:e})}function wc(e,t){return new ja({check:`length_equals`,...H(t),length:e})}function Tc(e,t){return new Na({check:`string_format`,format:`regex`,...H(t),pattern:e})}function Ec(e){return new Pa({check:`string_format`,format:`lowercase`,...H(e)})}function Dc(e){return new Fa({check:`string_format`,format:`uppercase`,...H(e)})}function Oc(e,t){return new Ia({check:`string_format`,format:`includes`,...H(t),includes:e})}
vendor: 1,137 bytes, line 53
53function kc(e,t){return new La({check:`string_format`,format:`starts_with`,...H(t),prefix:e})}function Ac(e,t){return new Ra({check:`string_format`,format:`ends_with`,...H(t),suffix:e})}function jc(e){return new za({check:`overwrite`,tx:e})}function Mc(e){return jc(t=>t.normalize(e))}function Nc(){return jc(e=>e.trim())}function Pc(){return jc(e=>e.toLowerCase())}function Fc(){return jc(e=>e.toUpperCase())}function Ic(){return jc(e=>_r(e))}function Lc(e,t,n){return new e({type:`array`,element:t,...H(n)})}function Rc(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...H(n)})}function zc(e,t){let n=Bc(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Yr(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Yr(r))}},e(t.value,t)),t);return n}function Bc(e,t){let n=new G({check:`custom`,...H(t)});return n._zod.check=e,n}function Vc(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&lr(e,t,n[t]);return e}function Hc(e){let t=e?.target??`draft-2020-12`;
vendor: 5,222 bytes, lines 53-55
53return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Ls,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function Uc(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function J(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,J(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Vc(o.schema,c),t.io===`input`&&Y(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Wc(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Gc(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${Wc(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+Wc(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
54
55Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function Kc(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Kc(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var qc=new Set([`type`,`properties`,`required`,`additionalProperties`]),Jc=[`oneOf`,`anyOf`];function Yc(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function Xc(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!qc.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??Yc(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}lr(n,r,e.length===1?e[0]:Xc(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=Yc(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Zc(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of qc)if(t in e)return;let n=t.filter(e=>Jc.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=Xc(t);else{let e=n[0],i=Jc.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>Xc([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,Vc(e,r))}function Qc(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;
vendor: 3,065 bytes, line 55
55if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Vc(i,s),Vc(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Kc(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Zc(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Vc(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,lr(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:el(t,`input`,e.processors),output:el(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function Y(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return Y(r.element,n);if(r.type===`set`)return Y(r.valueType,n);if(r.type===`lazy`)return Y(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return Y(r.innerType,n);if(r.type===`intersection`)return Y(r.left,n)||Y(r.right,n);if(r.type===`record`||r.type===`map`)return Y(r.keyType,n)||Y(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:Y(r.in,n)||Y(r.out,n);if(r.type===`object`){for(let e in r.shape)if(Y(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(Y(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(Y(e,n))return!0;
55return!!(r.rest&&Y(r.rest,n))}return!1}var $c=(e,t={})=>n=>{let r=Hc({...n,processors:t});return J(e,r),Gc(r,e),Qc(r,e)},el=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Hc({...i??{},target:a,io:t,processors:n});return J(e,o),Gc(o,e),Qc(o,e)},tl=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},nl=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},rl=(e,t)=>{tl(e,`minimum`,t),nl(e,`maximum`,t)},il=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},al=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},ol=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},sl=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},cl=(e,t)=>tl(e,`minimum`,t.minimum),ll=(e,t)=>nl(e,`maximum`,t.maximum),ul=e=>(t,n)=>{sl(t,n.format);let[r,i]=e[n.format];tl(t,`minimum`,r),nl(t,`maximum`,i)},dl={greater_than:(e,t)=>tl(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>nl(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>il(e,t.value),number_format:ul(Or),bigint_format:ul(kr),min_length:cl,max_length:ll,length_equals:(e,t)=>rl(e,t.length),min_size:cl,max_size:ll,size_equals:(e,t)=>rl(e,t.size),string_format:(e,t)=>{sl(e,t.format),t.pattern&&al(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>ol(e,t.mime)};function fl(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)dl[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&tl(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&tl(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&nl(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&nl(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&il(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&ol(t,i.mime);for(let e of i.patterns??[])al(t,e);return t}var pl={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},ml=new Map([[Co,ca],[To,la]]),hl=e=>ml.get(e)??e,gl=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=fl(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=pl[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(hl);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},_l=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=fl(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):Uc(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},vl=(e,t,n,r)=>{n.type=`boolean`},yl=(e,t,n,r)=>{n.not={}},bl=(e,t,n,r)=>{let i=e._zod.def,a=tr(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},xl=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(Uc(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(Uc(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},Sl=(e,t,n,r)=>{Uc(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Cl=(e,t,n,r)=>{Uc(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},wl=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=fl(e);
vendor: 5,288 bytes, line 55
55typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=J(a.element,t,{...r,path:[...r.path,`items`]})};function Tl(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Tl(t.out):t.type===`catch`?Tl(t.innerType):e._zod.optin}var El=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&Uc(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)lr(i.properties,e,J(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?Tl(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=J(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Dl=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>J(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Ol=(e,t,n,r)=>{let i=e._zod.def,a=J(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=J(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},kl=(e,t,n,r)=>{let i=e._zod.def,a=J(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Al=(e,t,n,r)=>{let i=e._zod.def;J(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},jl=Symbol();function Ml(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(Uc(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),jl):JSON.parse(o)}var Nl=(e,t,n,r)=>{let i=e._zod.def;J(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=Ml(i.defaultValue,e,t,n,r);o!==jl&&(n.default=o)},Pl=(e,t,n,r)=>{let i=e._zod.def;J(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=Ml(i.defaultValue,e,t,n,r);o!==jl&&(n._prefault=o)},Fl=(e,t,n,r)=>{let i=e._zod.def;J(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{Uc(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Il=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;J(o,t,r);let s=t.seen.get(e);s.ref=o},Ll=(e,t,n,r)=>{let i=e._zod.def;J(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Rl=(e,t,n,r)=>{let i=e._zod.def;J(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},zl=new WeakSet([Object.prototype,Error.prototype]);function Bl(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var X=W(`ZodError`,(e,t)=>{Si.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);zl.has(n)||(zl.add(n),Bl(n,`format`,e=>t=>Ti(e,t)),Bl(n,`flatten`,e=>t=>wi(e,t)),Bl(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,rr,2)}),Bl(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,rr,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),Vl=Di(X),Hl=Oi(X),Ul=ki(X),Wl=ji(X),Gl=Li(X),Kl=Ri(X),ql=zi(X),Jl=Bi(X),Yl=Vi(X),Xl=Hi(X),Zl=Ui(X),Ql=Wi(X);function $l(){mi.localeError||hi(Ns())}function eu(){mi.memoizer||hi({memoizer:As()})}var Z=W(`ZodType`,(e,t)=>($l(),K.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(V(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Tr(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(gd(e,t))},superRefine(e,t){return this.check(_d(e,t))},overwrite(e){return this.check(jc(e))},optional(){return Qu(this)},exactOptional(){return ed(this)},nullable(){return nd(this)},nullish(){return Qu(nd(this))},nonoptional(e){return cd(this,e)},array(){return Ru(this)},or(e){return Hu([this,e])},and(e){return Wu(this,e)},transform(e){return fd(this,Xu(e))},default(e){return id(this,e)},prefault(e){return od(this,e)},catch(e){return ud(this,e)},pipe(e){return fd(this,e)},readonly(){return md(this)},describe(e){let t=this.clone();return Ls.add(t,{description:e}),t},meta(...e){if(e.length===0)return Ls.get(this);let t=this.clone();return Ls.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Qr(this,`~standard`,{...Wa(this),jsonSchema:{input:el(this,`input`),output:el(this,`output`)}})},set"~standard"(e){Zr(this,`~standard`,e)},parse:function e(t,n){return Vl(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await Hl(this,t,n,{callee:e})},safeParse(e,t){return Ul(this,e,t)},async safeParseAsync(e,t){return Wl(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Zr(this,`spa`,e)}
55,validate(e,t){return Pi(this,e,t)},validateAsync(e,t){return Ii(this,e,t)},encode:function e(t,n){return Gl(this,t,n,{callee:e})},decode:function e(t,n){return Kl(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await ql(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Jl(this,t,n,{callee:e})},safeEncode(e,t){return Yl(this,e,t)},safeDecode(e,t){return Xl(this,e,t)},async safeEncodeAsync(e,t){return Zl(this,e,t)},async safeDecodeAsync(e,t){return Ql(this,e,t)},toJSONSchema(e){return $c(this,{})(e)},get description(){return Ls.get(this)?.description},get _def(){return this._zod.def}}),tu=W(`_ZodString`,(e,t)=>{Ga.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gl(e,t,n,r)},$r({format:e=>fl(e).format??null,minLength:e=>fl(e).minimum??null,maxLength:e=>fl(e).maximum??null},{regex(...e){return this.check(Tc(...e))},includes(...e){return this.check(Oc(...e))},startsWith(...e){return this.check(kc(...e))},endsWith(...e){return this.check(Ac(...e))},min(...e){return this.check(Cc(...e))},max(...e){return this.check(Sc(...e))},length(...e){return this.check(wc(...e))},nonempty(...e){return this.check(Cc(1,...e))},lowercase(e){return this.check(Ec(e))},uppercase(e){return this.check(Dc(e))},trim(){return this.check(Nc())},normalize(...e){return this.check(Mc(...e))},toLowerCase(){return this.check(Pc())},toUpperCase(){return this.check(Fc())},slugify(){return this.check(Ic())}})),nu=W(`ZodString`,(e,t)=>{Ga.init(e,t),tu.init(e,t)},{email(e){return this.check(Bs(cu,e))},url(e){return this.check(Ks(du,e))},jwt(e){return this.check(sc(Eu,e))},emoji(e){return this.check(qs(fu,e))},guid(e){return this.check(Vs(lu,e))},uuid(e){return this.check(Hs(uu,e))},uuidv4(e){return this.check(Us(uu,e))},uuidv6(e){return this.check(Ws(uu,e))},uuidv7(e){return this.check(Gs(uu,e))},nanoid(e){return this.check(Js(pu,e))},cuid(e){return this.check(Ys(mu,e))},cuid2(e){return this.check(Xs(hu,e))},ulid(e){return this.check(Zs(gu,e))},base64(e){return this.check(ic(Cu,e))},base64url(e){return this.check(ac(wu,e))},xid(e){return this.check(Qs(_u,e))},ksuid(e){return this.check($s(vu,e))},ipv4(e){return this.check(ec(yu,e))},ipv6(e){return this.check(tc(bu,e))},cidrv4(e){return this.check(nc(xu,e))},cidrv6(e){return this.check(rc(Su,e))},e164(e){return this.check(oc(Tu,e))},datetime(e){return this.check(cc(iu,e))},date(e){return this.check(lc(au,e))},time(e){return this.check(uc(ou,e))},duration(e){return this.check(dc(su,e))}});function ru(e){return zs(nu,e)}var Q=W(`ZodStringFormat`,(e,t)=>{q.init(e,t),tu.init(e,t)}),iu=W(`ZodISODateTime`,(e,t)=>{uo.init(e,t),Q.init(e,t)}),au=W(`ZodISODate`,(e,t)=>{fo.init(e,t),Q.init(e,t)}),ou=W(`ZodISOTime`,(e,t)=>{po.init(e,t),Q.init(e,t)}),su=W(`ZodISODuration`,(e,t)=>{mo.init(e,t),Q.init(e,t)}),cu=W(`ZodEmail`,(e,t)=>{Ja.init(e,t),Q.init(e,t)}),lu=W(`ZodGUID`,(e,t)=>{Ka.init(e,t),Q.init(e,t)}),uu=W(`ZodUUID`,(e,t)=>{qa.init(e,t),Q.init(e,t)}),du=W(`ZodURL`,(e,t)=>{no.init(e,t),Q.init(e,t)}),fu=W(`ZodEmoji`,(e,t)=>{ro.init(e,t),Q.init(e,t)}),pu=W(`ZodNanoID`,(e,t)=>{io.init(e,t),Q.init(e,t)}),mu=W(`ZodCUID`,(e,t)=>{ao.init(e,t),Q.init(e,t)}),hu=W(`ZodCUID2`,(e,t)=>{oo.init(e,t),Q.init(e,t)}),gu=W(`ZodULID`,(e,t)=>{so.init(e,t),Q.init(e,t)}),_u=W(`ZodXID`,(e,t)=>{co.init(e,t),Q.init(e,t)}),vu=W(`ZodKSUID`,(e,t)=>{lo.init(e,t),Q.init(e,t)}),yu=W(`ZodIPv4`,(e,t)=>{ho.init(e,t),Q.init(e,t)}),bu=W(`ZodIPv6`,(e,t)=>{vo.init(e,t),Q.init(e,t)}),xu=W(`ZodCIDRv4`,(e,t)=>{yo.init(e,t),Q.init(e,t)}),Su=W(`ZodCIDRv6`,(e,t)=>{xo.init(e,t),Q.init(e,t)}),Cu=W(`ZodBase64`,(e,t)=>{wo.init(e,t),Q.init(e,t)}),wu=W(`ZodBase64URL`,(e,t)=>{Do.init(e,t),Q.init(e,t)}),Tu=W(`ZodE164`,(e,t)=>{Oo.init(e,t),Q.init(e,t)}),Eu=W(`ZodJWT`,(e,t)=>{Ao.init(e,t),Q.init(e,t)}),Du=W(`ZodNumber`,(e,t)=>{jo.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_l(e,t,n,r),e.isFinite=!0},$r({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=fl(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=fl(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=fl(e);
55return!!t||!!n?.some(Number.isSafeInteger)},format:e=>fl(e).format??null},{gt(e,t){return this.check(yc(e,t))},gte(e,t){return this.check(bc(e,t))},min(e,t){return this.check(bc(e,t))},lt(e,t){return this.check(_c(e,t))},lte(e,t){return this.check(vc(e,t))},max(e,t){return this.check(vc(e,t))},int(e){return this.check(Au(e))},safe(e){return this.check(Au(e))},positive(e){return this.check(yc(0,e))},nonnegative(e){return this.check(bc(0,e))},negative(e){return this.check(_c(0,e))},nonpositive(e){return this.check(vc(0,e))},multipleOf(e,t){return this.check(xc(e,t))},step(e,t){return this.check(xc(e,t))},finite(){return this}}));function Ou(e){return fc(Du,e)}var ku=W(`ZodNumberFormat`,(e,t)=>{Mo.init(e,t),Du.init(e,t)});function Au(e){return pc(ku,e)}var ju=W(`ZodBoolean`,(e,t)=>{No.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vl(e,t,n,r)});function Mu(e){return mc(ju,e)}var Nu=W(`ZodUnknown`,(e,t)=>{Po.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Pu(){return hc(Nu)}var Fu=W(`ZodNever`,(e,t)=>{Fo.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yl(e,t,n,r)});function Iu(e){return gc(Fu,e)}var Lu=W(`ZodArray`,(e,t)=>{eu(),Lo.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wl(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Cc(e,t))},nonempty(e){return this.check(Cc(1,e))},max(e,t){return this.check(Sc(e,t))},length(e,t){return this.check(wc(e,t))},unwrap(){return this.element}});function Ru(e,t){return Lc(Lu,e,t)}var zu=W(`ZodObject`,(e,t)=>{eu(),Uo.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>El(e,t,n,r),ai(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return Ku(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(V(this._zod.def,{catchall:e}))},passthrough(){return this.clone(V(this._zod.def,{catchall:Pu()}))},loose(){return this.clone(V(this._zod.def,{catchall:Pu()}))},strict(){return this.clone(V(this._zod.def,{catchall:Iu()}))},strip(){return this.clone(V(this._zod.def,{catchall:void 0}))},extend(e){return Nr(this,e)},safeExtend(e){return Fr(this,e)},merge(e){return Ir(this,e)},pick(e){return Ar(this,e)},omit(e){return Mr(this,e)},partial(...e){return Lr(Zu,this,e[0])},exactPartial(...e){return Lr($u,this,e[0],`exactPartial`)},required(...e){return Rr(sd,this,e[0])}});function Bu(e,t){return new zu({type:`object`,shape:e??{},...H(t)})}var Vu=W(`ZodUnion`,(e,t)=>{Go.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dl(e,t,n,r),e.options=t.options});function Hu(e,t){return new Vu({type:`union`,options:e,...H(t)})}var Uu=W(`ZodIntersection`,(e,t)=>{Ko.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ol(e,t,n,r)});function Wu(e,t){return new Uu({type:`intersection`,left:e,right:t})}var Gu=W(`ZodEnum`,(e,t)=>{Yo.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bl(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Gu({...t,checks:[],...H(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Gu({...t,checks:[],...H(r),entries:i})}});function Ku(e,t){return new Gu({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...H(t)})}var qu=W(`ZodLiteral`,(e,t)=>{Xo.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xl(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if
55(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Ju(e,t){return new qu({type:`literal`,values:Array.isArray(e)?e:[e],...H(t)})}var Yu=W(`ZodTransform`,(e,t)=>{eu(),Zo.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cl(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new pi(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Yr(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Yr(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Xu(e){return new Yu({type:`transform`,transform:e})}var Zu=W(`ZodOptional`,(e,t)=>{$o.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Qu(e){return new Zu({type:`optional`,innerType:e})}var $u=W(`ZodExactOptional`,(e,t)=>{es.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ed(e){return new $u({type:`optional`,innerType:e})}var td=W(`ZodNullable`,(e,t)=>{ts.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function nd(e){return new td({type:`nullable`,innerType:e})}var rd=W(`ZodDefault`,(e,t)=>{ns.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function id(e,t){return new rd({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Sr(t)}})}var ad=W(`ZodPrefault`,(e,t)=>{is.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function od(e,t){return new ad({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Sr(t)}})}var sd=W(`ZodNonOptional`,(e,t)=>{as.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Al(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cd(e,t){return new sd({type:`nonoptional`,innerType:e,...H(t)})}var ld=W(`ZodCatch`,(e,t)=>{cs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ud(e,t){return new ld({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:si(t)})}var dd=W(`ZodPipe`,(e,t)=>{ls.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Il(e,t,n,r),e.in=t.in,e.out=t.out});function fd(e,t){return new dd({type:`pipe`,in:e,out:t})}var pd=W(`ZodReadonly`,(e,t)=>{ds.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ll(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function md(e){return new pd({type:`readonly`,innerType:e})}var hd=W(`ZodCustom`,(e,t)=>{ps.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sl(e,t,n,r)});function gd(e,t={}){return Rc(hd,e,t)}function _d(e,t){return zc(e,t)}var vd={contract_version:`1.2.0`,endpoint:`/api/waitlist`,challenge_endpoint:`/api/challenge`,method:`POST`,content_type:`application/json`,body_max_bytes:65536,fields:{organization:{kind:`string`,required:!0,min_length:2,max_length:200,label:`Organization`},build:{kind:`string`,required:!0,min_length:10,max_length:2e3,label:`What you build`},scale:{kind:`integer`,required:!0,minimum:1,maximum:500,label:`Scale (people)`},email:{kind:`email`,required:!0,max_length:254,label:`Email`},code_access:{kind:`boolean`,required:!1,default:!1,label:`Wants source access`},intent:{kind:`enum`,required:!1,default:`waitlist`,values:[`waitlist`,`investor`,`cto-brief`,`services`],label:`Intent`},website:{kind:`honeypot`,required:!1,must_be_empty:!0,label:`Leave empty`}}},yd=vd,$=vd.fields,bd=/^[^@\s]+@[^@\s.]+(?:\.[^@\s.]+)+$/u,xd=/^\d+$/u,Sd=`services`,Cd=`: `;function wd(e,t){return`${e}${Cd}${t}`}function Td(e){return $.build.max_length-e.length-2}var Ed=Bu({organization:ru().min($.organization.min_length,`Give the organization a name.`).max($.organization.max_length,`Keep this under ${$.organization.max_length} characters.`),build:ru().min($.build.min_length,`Say a little more about what you need.`).max($.build.max_length,`Keep this under ${$.build.max_length} characters.`),scale:Ou({error:`Team size is a whole number of people.`}).int(`Team size is a whole number of people.`).min($.scale.minimum,`Team size starts at ${$.scale.minimum}.`).max($.scale.maximum,`Team size stops at ${$.scale.maximum}. Write to us above that.`),email:ru().max($.email.max_length,`Keep this under ${$.email.max_length} characters.`).regex(bd,`That email does not look right. Check it and try again.`),code_access:Mu(),intent:Ku($.intent.values).default($.intent.default),website:Ju(``,`Leave this field empty.`)});$.organization.min_length,$.organization.max_length,$.build.min_length,$.build.max_length,$.scale.minimum,$.scale.maximum,$.email.max_length;var Dd=`https://forms.xoxd.ai`;function Od(e=Dd){return`${e.replace(/\/+$/u,``)}${vd.endpoint}`}function kd(e=Dd){return`${e.replace(/\/+$/u,``)}${vd.challenge_endpoint}`}
55function Ad(){return{offer:``,organization:``,detail:``,scale:``,email:``,website:``}}function jd(e){return e.website.trim().length>0}function Md(e,t){return e.find(e=>e.slug===t)}function Nd(e,t){let n=e.scale.trim();return{organization:e.organization.trim(),build:wd(t,e.detail.trim()),scale:xd.test(n)?Number(n):NaN,email:e.email.trim(),code_access:!1,intent:Sd,website:e.website}}function Pd(e,t){let n={},r=Md(t,e.offer);r||(n.offer=`Choose the service you are asking about.`);let i=e.detail.trim(),a=r?.heading??``;i.length<$.build.min_length?n.detail=`Say a little more about what you need.`:i.length>Td(a)&&(n.detail=`Keep this under ${Td(a)} characters.`);let o=Ed.safeParse(Nd(e,a));if(o.success)return n;for(let e of o.error.issues){let t=e.path[0];if(typeof t!=`string`||t===`website`||t===`intent`)continue;let r=t===`build`?`detail`:t;r in n||(n[r]=e.message)}return n}function Fd(e){return Object.keys(e).length>0}function Id(e,t,n=``){let r=Nd(e,t.heading),i={organization:r.organization,build:r.build,scale:r.scale,email:r.email,code_access:!1,website:e.website,intent:Sd};return n&&(i.altcha=n),i}var Ld=c(`<div class="form-notice card preset-tonal-primary p-4" role="status" aria-live="polite"><h3 class="h4">Thanks, it is on its way.</h3> <p>It is delivered as one email to us. The reply comes to the address you gave.</p></div>`);c(`<p class="form-notice card preset-tonal p-4" role="status">The enquiry form opens with the next release of this site. Until then, write to us at the address in the <a class="anchor" href="#contact">footer</a>.</p>`);var Rd=c(`<div class="form-notice form-notice--error card preset-tonal-error p-4" role="alert" tabindex="-1"><p> <a class="anchor" href="#contact">footer</a>.</p> <button class="btn preset-outlined-error-500 mt-2" type="button">Try again</button></div>`),zd=c(`<option> </option>`),Bd=c(`<p class="field-error text-error-500 text-sm"> </p>`),Vd=c(`<p class="field-error text-error-500 text-sm"> </p>`),Hd=c(`<p class="field-error text-error-500 text-sm"> </p>`),Ud=c(`<li> </li>`),Wd=c(`<p> </p> <ul class="intake-prompts list-disc space-y-1 pl-5"></ul>`,1),Gd=c(`<p>Choose a service above and we will suggest what to tell us.</p>`),Kd=c(`<div class="form-help text-surface-600-400 text-sm"><!></div>`),qd=c(`<p class="field-error text-error-500 text-sm"> </p>`),Jd=c(`<p class="form-help text-surface-600-400 text-sm"> </p>`),Yd=c(`<p class="field-error text-error-500 text-sm"> </p>`),Xd=c(`<altcha-widget></altcha-widget> <p class="form-help text-surface-600-400 text-sm">A private, puzzle-free proof-of-work check accompanies the request. If it is unavailable, you can still send.</p>`,3),Zd=c(`<img alt="" aria-hidden="true" width="32" height="32" class="size-8 rounded-full" data-testid="sending-accent"/>`),Qd=c(`<form class="services-intake contact-form grid gap-4" method="post" novalidate=""><!> <label class="label"><span class="label-text">Which service is this about?</span> <select name="offer" class="select" required=""><option disabled="">Choose one</option><!></select></label> <!> <label class="label"><span class="label-text"> </span> <input name="organization" class="input" type="text" autocomplete="organization" required=""/></label> <!> <label class="label"><span class="label-text">What do you need?</span> <textarea name="detail" class="textarea" rows="5" required=""></textarea></label> <!> <label class="label"><span class="label-text">Team size (people)</span> <input name="scale" class="input" type="text" inputmode="numeric" autocomplete="off" required=""/></label> <!> <label class="label"><span class="label-text"> </span> <input name="email" class="input" type="email" autocomplete="email" required=""/></label> <!> <div class="honeypot" aria-hidden="true"><label> </label> <input name="website" tabindex="-1" autocomplete="off"/></div> <!> <div class="flex items-center gap-3"><button class="btn preset-filled-primary-500" type="submit"> </button> <!></div> <p class="form-help text-surface-600-400 text-sm">You can also write to us at the address in the <a class="anchor" href="#contact">footer</a>.</p> <noscript></noscript></form>`);function $d(e,t){T(t,!0);let r=_(t,`idPrefix`,3,`si`),i=e=>`${r()}-${e}`,a=Ie(`pia11141`),o=yd.fields,c=Od(),d=Fe.map(e=>({slug:e.slug,heading:e.heading,intakeQuestions:e.intakeQuestions}
55)),g=j(`idle`),w=ae(Ad()),A=j(ae({})),ie=j(``),N=j(``),oe=j(void 0),P=j(void 0),se=b(()=>Md(d,w.offer)),ue=b(()=>Td(p(se)?.heading??``));m(()=>{if(typeof document>`u`||document.querySelector(`script[data-altcha]`))return;let e=document.createElement(`script`);e.src=`/vendor/altcha/altcha.js`,e.defer=!0,e.dataset.altcha=``,document.head.appendChild(e)}),m(()=>{let e=p(oe);if(!e)return;let t=e=>{let t=e.detail;v(N,typeof t?.payload==`string`?t.payload:``,!0)},n=e=>{e.detail?.state!==`verified`&&v(N,``)};return e.addEventListener(`verified`,t),e.addEventListener(`statechange`,n),()=>{e.removeEventListener(`verified`,t),e.removeEventListener(`statechange`,n)}}),m(()=>{if(p(g)!==`error`)return;let e=p(P);e&&(e.scrollIntoView({block:`center`}),e.focus())});function de(){for(let e of[`offer`,`organization`,`detail`,`scale`,`email`])if(p(A)[e]){document.getElementById(i(e))?.focus();return}}async function fe(e){if(e.preventDefault(),v(ie,``),v(g,`idle`),jd(w)){v(g,`success`);return}v(A,Pd(w,d),!0);let t=Md(d,w.offer);if(Fd(p(A))||!t){de();return}v(g,`submitting`);let n=new AbortController,r=setTimeout(()=>n.abort(),15e3);try{let e=await fetch(c,{method:yd.method,headers:{"content-type":yd.content_type},body:JSON.stringify(Id(w,t,p(N))),signal:n.signal});if(!e.ok)throw Error(`The intake service answered ${e.status}.`);v(g,`success`)}catch(e){v(g,`error`),e instanceof DOMException&&e.name===`AbortError`?v(ie,`The intake service took too long to answer.`):e instanceof Error&&e.message.startsWith(`The intake service answered`)?v(ie,e.message,!0):v(ie,`We could not reach the intake service.`)}finally{clearTimeout(r)}}function pe(){v(g,`idle`),v(ie,``),v(N,``);let e=p(oe);e?.reset?.(),e?.solve?.()}var F=s(),I=M(F),me=e=>{var t=Ld();E(e,t)},he=e=>{var t=Qd(),r=S(t),s=e=>{var t=Rd(),n=S(t),r=S(n);ce(2),y(n);var i=k(n,2);y(t),ee(t,e=>v(P,e),()=>p(P)),h(()=>D(r,`${p(ie)??``} You can retry, or write to us at the address in the `)),u(`click`,i,pe),E(e,t)};n(r,e=>{p(g)===`error`&&e(s)});var m=k(r,2),_=k(S(m),2),b=S(_);b.value=b.__value=``;var T=k(b);f(T,17,()=>d,e=>e.slug,(e,t)=>{var n=zd(),r=S(n,!0);y(n);var i={};h(()=>{D(r,p(t).heading),i!==(i=p(t).slug)&&(n.value=(n.__value=p(t).slug)??``)}),E(e,n)}),y(_),y(m);var O=k(m,2),ae=e=>{var t=Bd(),n=S(t,!0);y(t),h(e=>{C(t,`id`,e),D(n,p(A).offer)},[()=>i(`offer-error`)]),E(e,t)};n(O,e=>{p(A).offer&&e(ae)});var j=k(O,2),N=S(j),de=S(N,!0);y(N);var F=k(N,2);x(F),y(j);var I=k(j,2),me=e=>{var t=Vd(),n=S(t,!0);y(t),h(e=>{C(t,`id`,e),D(n,p(A).organization)},[()=>i(`organization-error`)]),E(e,t)};n(I,e=>{p(A).organization&&e(me)});var he=k(I,2),ge=k(S(he),2);l(ge),y(he);var _e=k(he,2),ve=e=>{var t=Hd(),n=S(t,!0);y(t),h(e=>{C(t,`id`,e),D(n,p(A).detail)},[()=>i(`detail-error`)]),E(e,t)},L=e=>{var t=Kd(),r=S(t),a=e=>{var t=Wd(),n=M(t),r=S(n);y(n);var i=k(n,2);f(i,20,()=>p(se).intakeQuestions,e=>e,(e,t)=>{var n=Ud(),r=S(n,!0);y(n),h(()=>D(r,t)),E(e,n)}),y(i),h(()=>D(r,`A few things worth answering for ${p(se).heading??``}:`)),E(e,t)},o=e=>{var t=Gd();E(e,t)};n(r,e=>{p(se)?e(a):e(o,-1)}),y(t),h(e=>C(t,`id`,e),[()=>i(`detail-help`)]),E(e,t)};n(_e,e=>{p(A).detail?e(ve):e(L,-1)});var ye=k(_e,2),be=k(S(ye),2);x(be),y(ye);var xe=k(ye,2),Se=e=>{var t=qd(),n=S(t,!0);y(t),h(e=>{C(t,`id`,e),D(n,p(A).scale)},[()=>i(`scale-error`)]),E(e,t)},Ce=e=>{var t=Jd(),n=S(t);y(t),h(e=>{C(t,`id`,e),D(n,`${o.scale.minimum??``} to ${o.scale.maximum??``} people. Write to us above that.`)},[()=>i(`scale-help`)]),E(e,t)};n(xe,e=>{p(A).scale?e(Se):e(Ce,-1)});var we=k(xe,2),Te=S(we),Ee=S(Te,!0);y(Te);var De=k(Te,2);x(De),y(we);var Oe=k(we,2),ke=e=>{var t=Yd(),n=S(t,!0);y(t),h(e=>{C(t,`id`,e),D(n,p(A).email)},[()=>i(`email-error`)]),E(e,t)};n(Oe,e=>{p(A).email&&e(ke)});var Ae=k(Oe,2),je=S(Ae),Me=S(je,!0);y(je);var Ne=k(je,2);x(Ne),y(Ae);var Pe=k(Ae,2),Fe=e=>{var t=Xd(),n=M(t);h(()=>re(n,`challengeurl`,kd())),re(n,`name`,`altcha`),re(n,`auto`,`onload`),re(n,`label`,`Human verification`),ee(n,e=>v(oe,e),()=>p(oe)),ce(2),E(e,t)};n(Pe,e=>{e(Fe)});var Ie=k(Pe,2),Le=S(Ie),Re=S(Le,!0);y(Le);var ze=k(Le,2),Be=e=>{var t=Zd();h(()=>C(t,`src`,a.localPath)),E(e,t)};n(ze,e=>{p(g)===`submitting`&&e(Be)}
55),y(Ie),ce(4),y(t),h((e,n,r,i,a,s,l,u,d,f,h,v,y,ee,b,x,S,w)=>{C(t,`action`,c),C(m,`for`,e),C(_,`id`,n),C(_,`aria-invalid`,p(A).offer?`true`:void 0),C(_,`aria-describedby`,r),C(j,`for`,i),D(de,o.organization.label),C(F,`id`,a),C(F,`minlength`,o.organization.min_length),C(F,`maxlength`,o.organization.max_length),C(F,`aria-invalid`,p(A).organization?`true`:void 0),C(F,`aria-describedby`,s),C(he,`for`,l),C(ge,`id`,u),C(ge,`minlength`,o.build.min_length),C(ge,`maxlength`,p(ue)),C(ge,`aria-invalid`,p(A).detail?`true`:void 0),C(ge,`aria-describedby`,d),C(ye,`for`,f),C(be,`id`,h),C(be,`maxlength`,v),C(be,`aria-invalid`,p(A).scale?`true`:void 0),C(be,`aria-describedby`,y),C(we,`for`,ee),D(Ee,o.email.label),C(De,`id`,b),C(De,`maxlength`,o.email.max_length),C(De,`aria-invalid`,p(A).email?`true`:void 0),C(De,`aria-describedby`,x),C(je,`for`,S),D(Me,o.website.label),C(Ne,`id`,w),Le.disabled=p(g)===`submitting`,D(Re,p(g)===`submitting`?`Sending`:`Send the enquiry`)},[()=>i(`offer`),()=>i(`offer`),()=>p(A).offer?i(`offer-error`):void 0,()=>i(`organization`),()=>i(`organization`),()=>p(A).organization?i(`organization-error`):void 0,()=>i(`detail`),()=>i(`detail`),()=>p(A).detail?i(`detail-error`):i(`detail-help`),()=>i(`scale`),()=>i(`scale`),()=>String(o.scale.maximum).length,()=>p(A).scale?i(`scale-error`):i(`scale-help`),()=>i(`email`),()=>i(`email`),()=>p(A).email?i(`email-error`):void 0,()=>i(`website`),()=>i(`website`)]),le(`submit`,t,fe),ne(_,()=>w.offer,e=>w.offer=e),te(F,()=>w.organization,e=>w.organization=e),te(ge,()=>w.detail,e=>w.detail=e),te(be,()=>w.scale,e=>w.scale=e),te(De,()=>w.email,e=>w.email=e),te(Ne,()=>w.website,e=>w.website=e),E(e,t)};n(I,e=>{p(g)===`success`?e(me):e(he,-1)}),E(e,F),O()}o([`click`]);var ef=c(`<button type="button" aria-haspopup="dialog"> </button>`),tf=c(`<a href="#enquire"> </a>`),nf=c(`<!> <!> <!> <!>`,1),rf=c(`<h2 class="min-w-0 flex-1 text-sm font-semibold" tabindex="-1">Ask about a service</h2> <!> <!>`,1),af=c(`<p class="text-surface-700-300 mb-4 text-sm leading-relaxed"> </p> <!>`,1),of=c(`<!> <!> <!>`,1),sf=c(`<!> <!>`,1);function cf(e,r){T(r,!0);let o=_(r,`id`,3,`enquire-popout`),c=_(r,`label`,3,`Open enquiry form`),l=_(r,`buttonClass`,3,`btn preset-filled-primary-500`),f=j(!1),m=j(!1),x=j(ae({width:960,height:720})),te=j(void 0),ne=j(void 0),A=b(()=>({width:Math.max(280,Math.min(640,p(x).width-16)),height:Math.max(320,Math.min(760,p(x).height-16))}));function re(){p(f)&&(v(f,!1),i().then(()=>p(te)?.focus({preventScroll:!0})))}function N(){v(x,{width:window.innerWidth,height:window.innerHeight},!0),v(f,!0),i().then(()=>p(ne)?.focus({preventScroll:!0}))}function oe(e,t){let n=()=>{let e=t(),n=Math.min(e.size.width,window.innerWidth-16),r=Math.min(e.size.height,window.innerHeight-16);e.setPosition({x:Math.max(8,Math.min(e.position.x,window.innerWidth-n-8)),y:Math.max(8,Math.min(e.position.y,window.innerHeight-r-8))})};return window.addEventListener(`resize`,n),{destroy:()=>window.removeEventListener(`resize`,n)}}ie(()=>{v(m,!0);let e=()=>{v(x,{width:window.innerWidth,height:window.innerHeight},!0)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)});var P=sf(),le=M(P),de=e=>{var t=ef(),n=S(t,!0);y(t),ee(t,e=>v(te,e),()=>p(te)),h(()=>{w(t,1,g(l())),C(t,`aria-expanded`,p(f)),C(t,`aria-controls`,o()),D(n,c())}),u(`click`,t,N),E(e,t)},fe=e=>{var t=tf(),n=S(t,!0);y(t),h(()=>{w(t,1,g(l())),D(n,c())}),E(e,t)};n(le,e=>{p(m)?e(de):e(fe,-1)});var pe=k(le,2),F=e=>{Me(e,{children:(e,n)=>{{let n=b(()=>({content:o(),title:`${o()}-title`,header:`${o()}-header`})),r=b(()=>({x:Math.max(8,(p(x).width-p(A).width)/2),y:Math.max(8,(p(x).height-p(A).height)/2)}));B(e,{defaultOpen:!0,get ids(){return p(n)},get defaultPosition(){return p(r)},get defaultSize(){return p(A)},minSize:{width:280,height:320},maxSize:{width:800,height:1e3},closeOnEscape:!0,initialFocusEl:()=>p(ne)??null,onStageChange:e=>{i().then(()=>{p(f)&&(e.stage==="default"?p(ne):document.getElementById(`${o()}-restore`))?.focus({preventScroll:!0})})},onOpenChange:e=>{e.open||re()},children:(e,n)=>{var r=s(),i=M(r);{let e=(e,n=t)=>{var r=s(),i=M(r);d(i,()=>B.Positioner,(e,t)=>{t(e,{class:`fixed z-(--z-modal)`,children:(e,t)=>{var r=s(),i=M(r);{let e=b(()=>`${o()}-title`);d(i,()=>B.Content,(t,r)=>{r(t,{get id(){return o()},role:`dialog`,get"aria-labelledby"(){return p(e)},class:`border-surface-200-800 bg-surface-50-950 shadow-xl flex h-full max-h-[calc(100dvh-1rem)] w-full max-w-[calc(100vw-1rem)] flex-col overflow-hidden border`,children:(e,t)=>{var r=of(),i=M(r);d(i,()=>B.Header,(e,t)=>{t(e,{class:`border-surface-200-800 flex shrink-0 items-center gap-2 border-b px-3 py-2`,children:(e,t)=>{var r=rf(),i=M(r);ee(i,e=>v(ne,e),()=>p(ne)),se(i,(e,t)=>oe?.(e,t),n);var s=k(i,2);d(s,()=>B.DragTrigger,(e,t)=>{t(e,{class:`hidden cursor-move touch-none px-1 sm:block`,"aria-label":`Move enquiry form`,title:`Drag to move enquiry form`,children:(e,t)=>{ce();var n=a(`⠿`);E(e,n)},$$slots:{default:!0}})});var c=k(s,2);d(c,()=>B.Control,(e,t)=>{t(e,{class:`flex items-center gap-1`,children:(e,t)=>{var n=nf(),r=M(n);d(r,()=>B.StageTrigger,(e,t)=>{t(e,{class:`btn-icon preset-tonal-surface hidden sm:inline-flex`,stage:`minimized`,"aria-label":`Minimize enquiry form`,title:`Minimize`,children:(e,t)=>{ce();var n=a(`−`);E(e,n)},$$slots:{default:!0}})});var i=k(r,2);d(i,()=>B.StageTrigger,(e,t)=>{t(e,{class:`btn-icon preset-tonal-surface hidden sm:inline-flex`,stage:`maximized`,"aria-label":`Maximize enquiry form`,title:`Maximize`,children:(e,t)=>{ce();var n=a(`□`);E(e,n)},$$slots:{default:!0}})});var s=k(i,2);{let e=b(()=>`${o()}-restore`);d(s,()=>B.StageTrigger,(t,n)=>{n(t,{get id(){return p(e)},class:`btn-icon preset-tonal-surface`,stage:`default`,"aria-label":`Restore enquiry form`,title:`Restore`,children:(e,t)=>{ce();var n=a(`↺`);E(e,n)},$$slots:{default:!0}})})}var c=k(s,2);d(c,()=>B.CloseTrigger,(e,t)=>{t(e,{class:`btn-icon preset-tonal-surface`,"aria-label":`Close enquiry form`,title:`Close`,onclick:re,children:(e,t)=>{ce();var n=a(`×`);E(e,n)},$$slots:{default:!0}})}),E(e,n)},$$slots:{default:!0}})}),h(()=>C(i,`id`,`${o()}-title`)),E(e,r)},$$slots:{default:!0}})});var s=k(i,2);d(s,()=>B.Body,(e,t)=>{t(e,{class:`min-h-0 flex-1 overflow-auto p-4`,children:(e,t)=>{var n=af(),r=M(n),i=S(r,!0);y(r);var a=k(r,2);{let e=b(()=>`${o()}-si`);$d(a,{get idPrefix(){return p(e)}})}h(()=>D(i,ue[`contact-form`])),E(e,n)},$$slots:{default:!0}})});var c=k(s,2);d(c,()=>B.ResizeTrigger,(e,t)=>{t(e,{axis:`se`,class:`absolute right-0 bottom-0 hidden h-5 w-5 cursor-se-resize sm:block`,"aria-label":`Resize enquiry form`})}),E(e,r)},$$slots:{default:!0}})})}E(e,r)},$$slots:{default:!0}})}),E(e,r)};d(i,()=>B.Context,(t,n)=>{n(t,{children:e,$$slots:{default:!0}})})}E(e,r)},$$slots:{default:!0}})}},$$slots:{default:!0}})};n(pe,e=>{p(f)&&e(F)}),E(e,P),O()}o([`click`]);
55export{$d as n,B as r,cf as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.