denwa-web-shared 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/client/hooks/index.d.ts +3 -0
  2. package/dist/client/hooks/use-disable-scroll.d.ts +1 -0
  3. package/dist/client/hooks/use-is-client.d.ts +1 -0
  4. package/dist/{client.d.ts → client/hooks/use-view-port.d.ts} +24 -48
  5. package/dist/client/index.d.ts +2 -0
  6. package/dist/client/ui/index.d.ts +1 -0
  7. package/dist/client/ui/infinity-list.d.ts +10 -0
  8. package/dist/denwa-web-shared.cjs.js +39 -1
  9. package/dist/denwa-web-shared.es.js +5747 -30
  10. package/dist/denwa-web-shared.umd.js +39 -0
  11. package/dist/index.d.ts +2 -0
  12. package/dist/server/constants/index.d.ts +39 -0
  13. package/dist/server/index.d.ts +5 -0
  14. package/dist/server/lib/css.d.ts +2 -0
  15. package/dist/server/lib/images.d.ts +46 -0
  16. package/dist/server/lib/index.d.ts +3 -0
  17. package/dist/server/lib/utils.d.ts +116 -0
  18. package/dist/server/schemas/index.d.ts +13 -0
  19. package/dist/server/types/index.d.ts +42 -0
  20. package/dist/server/ui/image.d.ts +20 -0
  21. package/dist/server/ui/index.d.ts +1 -0
  22. package/package.json +5 -12
  23. package/dist/client/denwa-web-shared.client.cjs.js +0 -1
  24. package/dist/client/denwa-web-shared.client.es.js +0 -12
  25. package/dist/image-CRxiqKd9.cjs +0 -18
  26. package/dist/image-CeUbwO13.js +0 -2575
  27. package/dist/infinity-list-BqhNmBDM.cjs +0 -1
  28. package/dist/infinity-list-ChtJSexP.js +0 -118
  29. package/dist/jsx-runtime-BgsXhnJy.js +0 -3065
  30. package/dist/jsx-runtime-Cgef3_fl.cjs +0 -22
  31. package/dist/main.d.ts +0 -349
  32. package/dist/server/denwa-web-shared.server.cjs.js +0 -1
  33. package/dist/server/denwa-web-shared.server.es.js +0 -22
  34. package/dist/server.d.ts +0 -304
@@ -0,0 +1,39 @@
1
+ (function(x,F){typeof exports=="object"&&typeof module<"u"?F(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],F):(x=typeof globalThis<"u"?globalThis:x||self,F(x["denwa-web-shared"]={},x.React))})(this,(function(x,F){"use strict";const Pr={seconds:{minutes10:600},milliseconds:{milliseconds100:100,milliseconds200:200,milliseconds500:500,seconds1:1e3,seconds2:2e3,seconds5:5e3,minutes1:6e4}},W={VIEW_PORT:{EXTRA_SMALL:280,SMALL:320,SMALL_MOBILE:380,MOBILE:450,MEDIUM:500,EXTRA_MEDIUM:600,TABLET:768,LAPTOP:1024,LAPTOP_BIG:1200,BIG:1440,VERY_BIG:1920},OFFSET:{1:8,2:16,3:24,4:32,5:40,6:48,7:56,8:64}},Tr=e=>new Intl.NumberFormat(e),gt=(e,t)=>e[t],Rr=e=>{let t=e;if(t!=="+"&&Number.isNaN(Number(t))||t.length>12)return"";const r=t.split(""),n=r[0],o=r[1];return n==="7"||n==="8"?r[0]="+7":`${n}${o}`=="+8"?r[1]="7":n&&n!=="+"&&(r[0]=`+${n}`),t=r.join("").trim(),t},Sr=(e,t)=>{if(!e)return t.main;const r=e.split(".")[0],n=t[r];return n||t.main},ue=({text:e,subdomain:t,SUBDOMAIN_NAME:r,SUBDOMAIN_MASK:n})=>{const o=gt(r,t);if(!t)return e;let i=e;const{name:s,declination:a,region:c,regionDeclination:l}=o,f=new RegExp(n.CITY,"g"),b=new RegExp(n.CITY_DECL,"g"),w=new RegExp(n.CITY_REGION,"g"),v=new RegExp(n.CITY_REGION_DECL,"g");return i=i.replace(f,s),i=i.replace(b,a),i=i.replace(w,c),i=i.replace(v,l),i},Ar=({subdomain:e,metaData:t,host:r,SUBDOMAIN_NAME:n,SUBDOMAIN_MASK:o,DEFAULT_SEO_TEXT:i})=>{const{title:s,description:a,keywords:c,canonical:l}=t,f=e==="main"?r:`${e}.${r}`;let b=s,w=a,v=c;const z={};return s?b=ue({text:s,subdomain:e,SUBDOMAIN_MASK:o,SUBDOMAIN_NAME:n}):b=ue({text:i.title,subdomain:e,SUBDOMAIN_MASK:o,SUBDOMAIN_NAME:n}),a?w=ue({text:a,subdomain:e,SUBDOMAIN_MASK:o,SUBDOMAIN_NAME:n}):w=ue({text:i.description,subdomain:e,SUBDOMAIN_MASK:o,SUBDOMAIN_NAME:n}),c?v=ue({text:c,subdomain:e,SUBDOMAIN_MASK:o,SUBDOMAIN_NAME:n}):v=ue({text:i.keywords,subdomain:e,SUBDOMAIN_MASK:o,SUBDOMAIN_NAME:n}),l!==void 0&&(z.canonical=`https://${f}${l}`),{title:b,description:w,keywords:v,alternates:Object.keys(z).length?z:void 0}},Or=e=>{const n=decodeURI(e).replace(/^\/[^\/]*\//,"").split("--"),o={};return n.forEach(i=>{const[s,a]=i.split("__");s&&a&&(o[s]=a.replace(/_/g," "))}),o},Cr=({color1:e,color2:t,notFoundText:r,COLORS_NAMES:n})=>{const o=n[e],i=t?n[t]:null;return o&&i?`${o}/${i}`:o||r},jr=(e,t,r)=>{if(!e)return{buttons:[]};const{page:n,pages:o}=e;if(!n||!o)return{buttons:[]};const i=new URLSearchParams(r),s=[],a=8,c=Math.floor(a/2);let l=Math.max(1,n-c),f=Math.min(o,n+c);f-l+1<a&&(l=Math.max(1,f-a+1),f=Math.min(o,l+a-1));for(let $=l;$<=f;$++){const L=new URLSearchParams(i);L.set("page",$.toString()),s.push({label:$.toString(),href:`${t}?${L.toString()}`,isActive:$===n})}const w=s.some($=>$.label==="1")?void 0:{label:"1",href:`${t}?${new URLSearchParams({...Object.fromEntries(i),page:"1"}).toString()}`,isActive:n===1},z=s.some($=>$.label===o.toString())?void 0:{label:o.toString(),href:`${t}?${new URLSearchParams({...Object.fromEntries(i),page:o.toString()}).toString()}`,isActive:n===o};return{buttons:s,firstPage:w,lastPage:z}};function bt(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=bt(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Nr(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=bt(e))&&(n&&(n+=" "),n+=t);return n}const qe="-",Mr=e=>{const t=Dr(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const a=s.split(qe);return a[0]===""&&a.length!==1&&a.shift(),vt(a,t)||Lr(s)},getConflictingClassGroupIds:(s,a)=>{const c=r[s]||[];return a&&n[s]?[...c,...n[s]]:c}}},vt=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?vt(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(qe);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId},_t=/^\[(.+)\]$/,Lr=e=>{if(_t.test(e)){const t=_t.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Dr=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const o in r)Ke(r[o],n,o,t);return n},Ke=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:wt(t,o);i.classGroupId=r;return}if(typeof o=="function"){if(Vr(o)){Ke(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([i,s])=>{Ke(s,wt(t,i),r,n)})})},wt=(e,t)=>{let r=e;return t.split(qe).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Vr=e=>e.isThemeGetter,Fr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(i,s)=>{r.set(i,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let s=r.get(i);if(s!==void 0)return s;if((s=n.get(i))!==void 0)return o(i,s),s},set(i,s){r.has(i)?r.set(i,s):o(i,s)}}},He="!",Qe=":",Ur=Qe.length,Wr=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const i=[];let s=0,a=0,c=0,l;for(let z=0;z<o.length;z++){let $=o[z];if(s===0&&a===0){if($===Qe){i.push(o.slice(c,z)),c=z+Ur;continue}if($==="/"){l=z;continue}}$==="["?s++:$==="]"?s--:$==="("?a++:$===")"&&a--}const f=i.length===0?o:o.substring(c),b=Gr(f),w=b!==f,v=l&&l>c?l-c:void 0;return{modifiers:i,hasImportantModifier:w,baseClassName:b,maybePostfixModifierPosition:v}};if(t){const o=t+Qe,i=n;n=s=>s.startsWith(o)?i(s.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(r){const o=n;n=i=>r({className:i,parseClassName:o})}return n},Gr=e=>e.endsWith(He)?e.substring(0,e.length-1):e.startsWith(He)?e.substring(1):e,Br=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const o=[];let i=[];return n.forEach(s=>{s[0]==="["||t[s]?(o.push(...i.sort(),s),i=[]):i.push(s)}),o.push(...i.sort()),o}},Yr=e=>({cache:Fr(e.cacheSize),parseClassName:Wr(e),sortModifiers:Br(e),...Mr(e)}),Jr=/\s+/,Xr=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(Jr);let c="";for(let l=a.length-1;l>=0;l-=1){const f=a[l],{isExternal:b,modifiers:w,hasImportantModifier:v,baseClassName:z,maybePostfixModifierPosition:$}=r(f);if(b){c=f+(c.length>0?" "+c:c);continue}let L=!!$,G=n(L?z.substring(0,$):z);if(!G){if(!L){c=f+(c.length>0?" "+c:c);continue}if(G=n(z),!G){c=f+(c.length>0?" "+c:c);continue}L=!1}const K=i(w).join(":"),N=v?K+He:K,O=N+G;if(s.includes(O))continue;s.push(O);const D=o(G,L);for(let ne=0;ne<D.length;++ne){const pe=D[ne];s.push(N+pe)}c=f+(c.length>0?" "+c:c)}return c};function qr(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=kt(t))&&(n&&(n+=" "),n+=r);return n}const kt=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=kt(e[n]))&&(r&&(r+=" "),r+=t);return r};function Kr(e,...t){let r,n,o,i=s;function s(c){const l=t.reduce((f,b)=>b(f),e());return r=Yr(l),n=r.cache.get,o=r.cache.set,i=a,a(c)}function a(c){const l=n(c);if(l)return l;const f=Xr(c,r);return o(c,f),f}return function(){return i(qr.apply(null,arguments))}}const j=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},yt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Hr=/^\d+\/\d+$/,Qr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,en=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,tn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,rn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ge=e=>Hr.test(e),y=e=>!!e&&!Number.isNaN(Number(e)),se=e=>!!e&&Number.isInteger(Number(e)),et=e=>e.endsWith("%")&&y(e.slice(0,-1)),Q=e=>Qr.test(e),on=()=>!0,sn=e=>en.test(e)&&!tn.test(e),xt=()=>!1,an=e=>rn.test(e),cn=e=>nn.test(e),un=e=>!p(e)&&!m(e),ln=e=>be(e,Pt,xt),p=e=>yt.test(e),le=e=>be(e,Tt,sn),tt=e=>be(e,hn,y),$t=e=>be(e,It,xt),dn=e=>be(e,Zt,cn),Ae=e=>be(e,Rt,an),m=e=>zt.test(e),xe=e=>ve(e,Tt),fn=e=>ve(e,gn),Et=e=>ve(e,It),pn=e=>ve(e,Pt),mn=e=>ve(e,Zt),Oe=e=>ve(e,Rt,!0),be=(e,t,r)=>{const n=yt.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ve=(e,t,r=!1)=>{const n=zt.exec(e);return n?n[1]?t(n[1]):r:!1},It=e=>e==="position"||e==="percentage",Zt=e=>e==="image"||e==="url",Pt=e=>e==="length"||e==="size"||e==="bg-size",Tt=e=>e==="length",hn=e=>e==="number",gn=e=>e==="family-name",Rt=e=>e==="shadow",bn=Kr(()=>{const e=j("color"),t=j("font"),r=j("text"),n=j("font-weight"),o=j("tracking"),i=j("leading"),s=j("breakpoint"),a=j("container"),c=j("spacing"),l=j("radius"),f=j("shadow"),b=j("inset-shadow"),w=j("text-shadow"),v=j("drop-shadow"),z=j("blur"),$=j("perspective"),L=j("aspect"),G=j("ease"),K=j("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...O(),m,p],ne=()=>["auto","hidden","clip","visible","scroll"],pe=()=>["auto","contain","none"],_=()=>[m,p,c],X=()=>[ge,"full","auto",..._()],Ye=()=>[se,"none","subgrid",m,p],ye=()=>["auto",{span:["full",se,m,p]},se,m,p],me=()=>[se,"auto",m,p],Je=()=>["auto","min","max","fr",m,p],he=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],oe=()=>["start","end","center","stretch","center-safe","end-safe"],J=()=>["auto",..._()],H=()=>[ge,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],g=()=>[e,m,p],Re=()=>[...O(),Et,$t,{position:[m,p]}],d=()=>["no-repeat",{repeat:["","x","y","space","round"]}],k=()=>["auto","cover","contain",pn,ln,{size:[m,p]}],I=()=>[et,xe,le],E=()=>["","none","full",l,m,p],R=()=>["",y,xe,le],V=()=>["solid","dashed","dotted","double"],ze=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],S=()=>[y,et,Et,$t],M=()=>["","none",z,m,p],q=()=>["none",y,m,p],ce=()=>["none",y,m,p],Se=()=>[y,m,p],Xe=()=>[ge,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Q],breakpoint:[Q],color:[on],container:[Q],"drop-shadow":[Q],ease:["in","out","in-out"],font:[un],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Q],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Q],shadow:[Q],spacing:["px",y],text:[Q],"text-shadow":[Q],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ge,p,m,L]}],container:["container"],columns:[{columns:[y,p,m,a]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:D()}],overflow:[{overflow:ne()}],"overflow-x":[{"overflow-x":ne()}],"overflow-y":[{"overflow-y":ne()}],overscroll:[{overscroll:pe()}],"overscroll-x":[{"overscroll-x":pe()}],"overscroll-y":[{"overscroll-y":pe()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:X()}],"inset-x":[{"inset-x":X()}],"inset-y":[{"inset-y":X()}],start:[{start:X()}],end:[{end:X()}],top:[{top:X()}],right:[{right:X()}],bottom:[{bottom:X()}],left:[{left:X()}],visibility:["visible","invisible","collapse"],z:[{z:[se,"auto",m,p]}],basis:[{basis:[ge,"full","auto",a,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[y,ge,"auto","initial","none",p]}],grow:[{grow:["",y,m,p]}],shrink:[{shrink:["",y,m,p]}],order:[{order:[se,"first","last","none",m,p]}],"grid-cols":[{"grid-cols":Ye()}],"col-start-end":[{col:ye()}],"col-start":[{"col-start":me()}],"col-end":[{"col-end":me()}],"grid-rows":[{"grid-rows":Ye()}],"row-start-end":[{row:ye()}],"row-start":[{"row-start":me()}],"row-end":[{"row-end":me()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Je()}],"auto-rows":[{"auto-rows":Je()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...he(),"normal"]}],"justify-items":[{"justify-items":[...oe(),"normal"]}],"justify-self":[{"justify-self":["auto",...oe()]}],"align-content":[{content:["normal",...he()]}],"align-items":[{items:[...oe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...oe(),{baseline:["","last"]}]}],"place-content":[{"place-content":he()}],"place-items":[{"place-items":[...oe(),"baseline"]}],"place-self":[{"place-self":["auto",...oe()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:J()}],mx:[{mx:J()}],my:[{my:J()}],ms:[{ms:J()}],me:[{me:J()}],mt:[{mt:J()}],mr:[{mr:J()}],mb:[{mb:J()}],ml:[{ml:J()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[a,"screen",...H()]}],"min-w":[{"min-w":[a,"screen","none",...H()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",r,xe,le]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,m,tt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",et,p]}],"font-family":[{font:[fn,p,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,m,p]}],"line-clamp":[{"line-clamp":[y,"none",m,tt]}],leading:[{leading:[i,..._()]}],"list-image":[{"list-image":["none",m,p]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",m,p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:g()}],"text-color":[{text:g()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:[y,"from-font","auto",m,le]}],"text-decoration-color":[{decoration:g()}],"underline-offset":[{"underline-offset":[y,"auto",m,p]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",m,p]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",m,p]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Re()}],"bg-repeat":[{bg:d()}],"bg-size":[{bg:k()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},se,m,p],radial:["",m,p],conic:[se,m,p]},mn,dn]}],"bg-color":[{bg:g()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:g()}],"gradient-via":[{via:g()}],"gradient-to":[{to:g()}],rounded:[{rounded:E()}],"rounded-s":[{"rounded-s":E()}],"rounded-e":[{"rounded-e":E()}],"rounded-t":[{"rounded-t":E()}],"rounded-r":[{"rounded-r":E()}],"rounded-b":[{"rounded-b":E()}],"rounded-l":[{"rounded-l":E()}],"rounded-ss":[{"rounded-ss":E()}],"rounded-se":[{"rounded-se":E()}],"rounded-ee":[{"rounded-ee":E()}],"rounded-es":[{"rounded-es":E()}],"rounded-tl":[{"rounded-tl":E()}],"rounded-tr":[{"rounded-tr":E()}],"rounded-br":[{"rounded-br":E()}],"rounded-bl":[{"rounded-bl":E()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":R()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...V(),"hidden","none"]}],"divide-style":[{divide:[...V(),"hidden","none"]}],"border-color":[{border:g()}],"border-color-x":[{"border-x":g()}],"border-color-y":[{"border-y":g()}],"border-color-s":[{"border-s":g()}],"border-color-e":[{"border-e":g()}],"border-color-t":[{"border-t":g()}],"border-color-r":[{"border-r":g()}],"border-color-b":[{"border-b":g()}],"border-color-l":[{"border-l":g()}],"divide-color":[{divide:g()}],"outline-style":[{outline:[...V(),"none","hidden"]}],"outline-offset":[{"outline-offset":[y,m,p]}],"outline-w":[{outline:["",y,xe,le]}],"outline-color":[{outline:g()}],shadow:[{shadow:["","none",f,Oe,Ae]}],"shadow-color":[{shadow:g()}],"inset-shadow":[{"inset-shadow":["none",b,Oe,Ae]}],"inset-shadow-color":[{"inset-shadow":g()}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:g()}],"ring-offset-w":[{"ring-offset":[y,le]}],"ring-offset-color":[{"ring-offset":g()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":g()}],"text-shadow":[{"text-shadow":["none",w,Oe,Ae]}],"text-shadow-color":[{"text-shadow":g()}],opacity:[{opacity:[y,m,p]}],"mix-blend":[{"mix-blend":[...ze(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ze()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[y]}],"mask-image-linear-from-pos":[{"mask-linear-from":S()}],"mask-image-linear-to-pos":[{"mask-linear-to":S()}],"mask-image-linear-from-color":[{"mask-linear-from":g()}],"mask-image-linear-to-color":[{"mask-linear-to":g()}],"mask-image-t-from-pos":[{"mask-t-from":S()}],"mask-image-t-to-pos":[{"mask-t-to":S()}],"mask-image-t-from-color":[{"mask-t-from":g()}],"mask-image-t-to-color":[{"mask-t-to":g()}],"mask-image-r-from-pos":[{"mask-r-from":S()}],"mask-image-r-to-pos":[{"mask-r-to":S()}],"mask-image-r-from-color":[{"mask-r-from":g()}],"mask-image-r-to-color":[{"mask-r-to":g()}],"mask-image-b-from-pos":[{"mask-b-from":S()}],"mask-image-b-to-pos":[{"mask-b-to":S()}],"mask-image-b-from-color":[{"mask-b-from":g()}],"mask-image-b-to-color":[{"mask-b-to":g()}],"mask-image-l-from-pos":[{"mask-l-from":S()}],"mask-image-l-to-pos":[{"mask-l-to":S()}],"mask-image-l-from-color":[{"mask-l-from":g()}],"mask-image-l-to-color":[{"mask-l-to":g()}],"mask-image-x-from-pos":[{"mask-x-from":S()}],"mask-image-x-to-pos":[{"mask-x-to":S()}],"mask-image-x-from-color":[{"mask-x-from":g()}],"mask-image-x-to-color":[{"mask-x-to":g()}],"mask-image-y-from-pos":[{"mask-y-from":S()}],"mask-image-y-to-pos":[{"mask-y-to":S()}],"mask-image-y-from-color":[{"mask-y-from":g()}],"mask-image-y-to-color":[{"mask-y-to":g()}],"mask-image-radial":[{"mask-radial":[m,p]}],"mask-image-radial-from-pos":[{"mask-radial-from":S()}],"mask-image-radial-to-pos":[{"mask-radial-to":S()}],"mask-image-radial-from-color":[{"mask-radial-from":g()}],"mask-image-radial-to-color":[{"mask-radial-to":g()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[y]}],"mask-image-conic-from-pos":[{"mask-conic-from":S()}],"mask-image-conic-to-pos":[{"mask-conic-to":S()}],"mask-image-conic-from-color":[{"mask-conic-from":g()}],"mask-image-conic-to-color":[{"mask-conic-to":g()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Re()}],"mask-repeat":[{mask:d()}],"mask-size":[{mask:k()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",m,p]}],filter:[{filter:["","none",m,p]}],blur:[{blur:M()}],brightness:[{brightness:[y,m,p]}],contrast:[{contrast:[y,m,p]}],"drop-shadow":[{"drop-shadow":["","none",v,Oe,Ae]}],"drop-shadow-color":[{"drop-shadow":g()}],grayscale:[{grayscale:["",y,m,p]}],"hue-rotate":[{"hue-rotate":[y,m,p]}],invert:[{invert:["",y,m,p]}],saturate:[{saturate:[y,m,p]}],sepia:[{sepia:["",y,m,p]}],"backdrop-filter":[{"backdrop-filter":["","none",m,p]}],"backdrop-blur":[{"backdrop-blur":M()}],"backdrop-brightness":[{"backdrop-brightness":[y,m,p]}],"backdrop-contrast":[{"backdrop-contrast":[y,m,p]}],"backdrop-grayscale":[{"backdrop-grayscale":["",y,m,p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y,m,p]}],"backdrop-invert":[{"backdrop-invert":["",y,m,p]}],"backdrop-opacity":[{"backdrop-opacity":[y,m,p]}],"backdrop-saturate":[{"backdrop-saturate":[y,m,p]}],"backdrop-sepia":[{"backdrop-sepia":["",y,m,p]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",m,p]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[y,"initial",m,p]}],ease:[{ease:["linear","initial",G,m,p]}],delay:[{delay:[y,m,p]}],animate:[{animate:["none",K,m,p]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[$,m,p]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:q()}],"rotate-x":[{"rotate-x":q()}],"rotate-y":[{"rotate-y":q()}],"rotate-z":[{"rotate-z":q()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":["scale-3d"],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[m,p,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Xe()}],"translate-x":[{"translate-x":Xe()}],"translate-y":[{"translate-y":Xe()}],"translate-z":[{"translate-z":Xe()}],"translate-none":["translate-none"],accent:[{accent:g()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:g()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",m,p]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",m,p]}],fill:[{fill:["none",...g()]}],"stroke-w":[{stroke:[y,xe,le,tt]}],stroke:[{stroke:["none",...g()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function rt(...e){return bn(Nr(e))}function u(e,t,r){function n(a,c){var l;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(l=a._zod).traits??(l.traits=new Set),a._zod.traits.add(e),t(a,c);for(const f in s.prototype)f in a||Object.defineProperty(a,f,{value:s.prototype[f].bind(a)});a._zod.constr=s,a._zod.def=c}const o=(r==null?void 0:r.Parent)??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(a){var c;const l=r!=null&&r.Parent?new i:this;n(l,a),(c=l._zod).deferred??(c.deferred=[]);for(const f of l._zod.deferred)f();return l}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>{var c,l;return r!=null&&r.Parent&&a instanceof r.Parent?!0:(l=(c=a==null?void 0:a._zod)==null?void 0:c.traits)==null?void 0:l.has(e)}}),Object.defineProperty(s,"name",{value:e}),s}class _e extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class St extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const At={};function de(e){return At}function vn(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function nt(e,t){return typeof t=="bigint"?t.toString():t}function ot(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function st(e){return e==null}function it(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function _n(e,t){const r=(e.toString().split(".")[1]||"").length,n=t.toString();let o=(n.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(n)){const c=n.match(/\d?e-(\d?)/);c!=null&&c[1]&&(o=Number.parseInt(c[1]))}const i=r>o?r:o,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}const Ot=Symbol("evaluating");function Z(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Ot)return n===void 0&&(n=Ot,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function wn(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function ie(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function we(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function Ct(e){return JSON.stringify(e)}const jt="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ce(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const kn=ot(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function $e(e){if(Ce(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(Ce(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Nt(e){return $e(e)?{...e}:e}const yn=new Set(["string","number","symbol"]);function je(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ae(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r!=null&&r.parent)&&(n._zod.parent=e),n}function h(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function zn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const xn={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function $n(e,t){const r=e._zod.def,n=we(e._zod.def,{get shape(){const o={};for(const i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(o[i]=r.shape[i])}return ie(this,"shape",o),o},checks:[]});return ae(e,n)}function En(e,t){const r=e._zod.def,n=we(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&delete o[i]}return ie(this,"shape",o),o},checks:[]});return ae(e,n)}function In(e,t){if(!$e(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const o=we(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return ie(this,"shape",i),i},checks:[]});return ae(e,o)}function Zn(e,t){if(!$e(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return ie(this,"shape",n),n},checks:e._zod.def.checks};return ae(e,r)}function Pn(e,t){const r=we(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return ie(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return ae(e,r)}function Tn(e,t,r){const n=we(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(r)for(const s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=e?new e({type:"optional",innerType:o[s]}):o[s])}else for(const s in o)i[s]=e?new e({type:"optional",innerType:o[s]}):o[s];return ie(this,"shape",i),i},checks:[]});return ae(t,n)}function Rn(e,t,r){const n=we(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(r)for(const s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(const s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return ie(this,"shape",i),i},checks:[]});return ae(t,n)}function ke(e,t=0){var r;if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(((r=e.issues[n])==null?void 0:r.continue)!==!0)return!0;return!1}function Mt(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Ne(e){return typeof e=="string"?e:e==null?void 0:e.message}function fe(e,t,r){var o,i,s,a,c,l;const n={...e,path:e.path??[]};if(!e.message){const f=Ne((s=(i=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:i.error)==null?void 0:s.call(i,e))??Ne((a=t==null?void 0:t.error)==null?void 0:a.call(t,e))??Ne((c=r.customError)==null?void 0:c.call(r,e))??Ne((l=r.localeError)==null?void 0:l.call(r,e))??"Invalid input";n.message=f}return delete n.inst,delete n.continue,t!=null&&t.reportInput||delete n.input,n}function at(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ee(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const Lt=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,nt,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Dt=u("$ZodError",Lt),Vt=u("$ZodError",Lt,{Parent:Error});function Sn(e,t=r=>r.message){const r={},n=[];for(const o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function An(e,t){const r=t||function(i){return i.message},n={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>o({issues:a}));else if(s.code==="invalid_key")o({issues:s.issues});else if(s.code==="invalid_element")o({issues:s.issues});else if(s.path.length===0)n._errors.push(r(s));else{let a=n,c=0;for(;c<s.path.length;){const l=s.path[c];c===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(s))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return o(e),n}const ct=e=>(t,r,n,o)=>{const i=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new _e;if(s.issues.length){const a=new((o==null?void 0:o.Err)??e)(s.issues.map(c=>fe(c,i,de())));throw jt(a,o==null?void 0:o.callee),a}return s.value},ut=e=>async(t,r,n,o)=>{const i=n?Object.assign(n,{async:!0}):{async:!0};let s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const a=new((o==null?void 0:o.Err)??e)(s.issues.map(c=>fe(c,i,de())));throw jt(a,o==null?void 0:o.callee),a}return s.value},Me=e=>(t,r,n)=>{const o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new _e;return i.issues.length?{success:!1,error:new(e??Dt)(i.issues.map(s=>fe(s,o,de())))}:{success:!0,data:i.value}},On=Me(Vt),Le=e=>async(t,r,n)=>{const o=n?Object.assign(n,{async:!0}):{async:!0};let i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>fe(s,o,de())))}:{success:!0,data:i.value}},Cn=Le(Vt),jn=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ct(e)(t,r,o)},Nn=e=>(t,r,n)=>ct(e)(t,r,n),Mn=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ut(e)(t,r,o)},Ln=e=>async(t,r,n)=>ut(e)(t,r,n),Dn=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Me(e)(t,r,o)},Vn=e=>(t,r,n)=>Me(e)(t,r,n),Fn=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Le(e)(t,r,o)},Un=e=>async(t,r,n)=>Le(e)(t,r,n),Wn=/^[cC][^\s-]{8,}$/,Gn=/^[0-9a-z]+$/,Bn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Yn=/^[0-9a-vA-V]{20}$/,Jn=/^[A-Za-z0-9]{27}$/,Xn=/^[a-zA-Z0-9_-]{21}$/,qn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Kn=/^([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})$/,Ft=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Hn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Qn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function eo(){return new RegExp(Qn,"u")}const to=/^(?:(?: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])$/,ro=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,no=/^((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])$/,oo=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,so=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ut=/^[A-Za-z0-9_-]*$/,io=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,ao=/^\+(?:[0-9]){6,14}[0-9]$/,Wt="(?:(?:\\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])))",co=new RegExp(`^${Wt}$`);function Gt(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function uo(e){return new RegExp(`^${Gt(e)}$`)}function lo(e){const t=Gt({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Wt}T(?:${n})$`)}const fo=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},po=/^\d+$/,mo=/^-?\d+(?:\.\d+)?/i,ho=/^[^A-Z]*$/,go=/^[^a-z]*$/,U=u("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Bt={number:"number",bigint:"bigint",object:"date"},Yt=u("$ZodCheckLessThan",(e,t)=>{U.init(e,t);const r=Bt[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Jt=u("$ZodCheckGreaterThan",(e,t)=>{U.init(e,t);const r=Bt[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),bo=u("$ZodCheckMultipleOf",(e,t)=>{U.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):_n(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),vo=u("$ZodCheckNumberFormat",(e,t)=>{var s;U.init(e,t),t.format=t.format||"float64";const r=(s=t.format)==null?void 0:s.includes("int"),n=r?"int":"number",[o,i]=xn[t.format];e._zod.onattach.push(a=>{const c=a._zod.bag;c.format=t.format,c.minimum=o,c.maximum=i,r&&(c.pattern=po)}),e._zod.check=a=>{const c=a.value;if(r){if(!Number.isInteger(c)){a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort});return}}c<o&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>i&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inst:e})}}),_o=u("$ZodCheckMaxLength",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!st(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;if(o.length<=t.maximum)return;const s=at(o);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),wo=u("$ZodCheckMinLength",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!st(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;if(o.length>=t.minimum)return;const s=at(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),ko=u("$ZodCheckLengthEquals",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!st(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{const o=n.value,i=o.length;if(i===t.length)return;const s=at(o),a=i>t.length;n.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),De=u("$ZodCheckStringFormat",(e,t)=>{var r,n;U.init(e,t),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),yo=u("$ZodCheckRegex",(e,t)=>{De.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),zo=u("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ho),De.init(e,t)}),xo=u("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=go),De.init(e,t)}),$o=u("$ZodCheckIncludes",(e,t)=>{U.init(e,t);const r=je(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Eo=u("$ZodCheckStartsWith",(e,t)=>{U.init(e,t);const r=new RegExp(`^${je(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),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})}}),Io=u("$ZodCheckEndsWith",(e,t)=>{U.init(e,t);const r=new RegExp(`.*${je(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),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})}}),Zo=u("$ZodCheckOverwrite",(e,t)=>{U.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class Po{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
2
+ `).filter(s=>s),o=Math.min(...n.map(s=>s.length-s.trimStart().length)),i=n.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(const s of i)this.content.push(s)}compile(){const t=Function,r=this==null?void 0:this.args,o=[...((this==null?void 0:this.content)??[""]).map(i=>` ${i}`)];return new t(...r,o.join(`
3
+ `))}}const To={major:4,minor:1,patch:5},A=u("$ZodType",(e,t)=>{var o;var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=To;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const i of n)for(const s of i._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),(o=e._zod.deferred)==null||o.push(()=>{e._zod.run=e._zod.parse});else{const i=(a,c,l)=>{let f=ke(a),b;for(const w of c){if(w._zod.def.when){if(!w._zod.def.when(a))continue}else if(f)continue;const v=a.issues.length,z=w._zod.check(a);if(z instanceof Promise&&(l==null?void 0:l.async)===!1)throw new _e;if(b||z instanceof Promise)b=(b??Promise.resolve()).then(async()=>{await z,a.issues.length!==v&&(f||(f=ke(a,v)))});else{if(a.issues.length===v)continue;f||(f=ke(a,v))}}return b?b.then(()=>a):a},s=(a,c,l)=>{if(ke(a))return a.aborted=!0,a;const f=i(c,n,l);if(f instanceof Promise){if(l.async===!1)throw new _e;return f.then(b=>e._zod.parse(b,l))}return e._zod.parse(f,l)};e._zod.run=(a,c)=>{if(c.skipChecks)return e._zod.parse(a,c);if(c.direction==="backward"){const f=e._zod.parse({value:a.value,issues:[]},{...c,skipChecks:!0});return f instanceof Promise?f.then(b=>s(b,a,c)):s(f,a,c)}const l=e._zod.parse(a,c);if(l instanceof Promise){if(c.async===!1)throw new _e;return l.then(f=>i(f,n,c))}return i(l,n,c)}}e["~standard"]={validate:i=>{var s;try{const a=On(e,i);return a.success?{value:a.data}:{issues:(s=a.error)==null?void 0:s.issues}}catch{return Cn(e,i).then(c=>{var l;return c.success?{value:c.data}:{issues:(l=c.error)==null?void 0:l.issues}})}},vendor:"zod",version:1}}),lt=u("$ZodString",(e,t)=>{var r;A.init(e,t),e._zod.pattern=[...((r=e==null?void 0:e._zod.bag)==null?void 0:r.patterns)??[]].pop()??fo(e._zod.bag),e._zod.parse=(n,o)=>{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}}),P=u("$ZodStringFormat",(e,t)=>{De.init(e,t),lt.init(e,t)}),Ro=u("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Kn),P.init(e,t)}),So=u("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ft(n))}else t.pattern??(t.pattern=Ft());P.init(e,t)}),Ao=u("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Hn),P.init(e,t)}),Oo=u("$ZodURL",(e,t)=>{P.init(e,t),e._zod.check=r=>{try{const n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:io.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Co=u("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=eo()),P.init(e,t)}),jo=u("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Xn),P.init(e,t)}),No=u("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Wn),P.init(e,t)}),Mo=u("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Gn),P.init(e,t)}),Lo=u("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Bn),P.init(e,t)}),Do=u("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Yn),P.init(e,t)}),Vo=u("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Jn),P.init(e,t)}),Fo=u("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=lo(t)),P.init(e,t)}),Uo=u("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=co),P.init(e,t)}),Wo=u("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=uo(t)),P.init(e,t)}),Go=u("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=qn),P.init(e,t)}),Bo=u("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=to),P.init(e,t),e._zod.onattach.push(r=>{const n=r._zod.bag;n.format="ipv4"})}),Yo=u("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=ro),P.init(e,t),e._zod.onattach.push(r=>{const n=r._zod.bag;n.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Jo=u("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=no),P.init(e,t)}),Xo=u("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=oo),P.init(e,t),e._zod.check=r=>{const[n,o]=r.value.split("/");try{if(!o)throw new Error;const i=Number(o);if(`${i}`!==o)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Xt(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const qo=u("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=so),P.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{Xt(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Ko(e){if(!Ut.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Xt(r)}const Ho=u("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ut),P.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{Ko(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Qo=u("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ao),P.init(e,t)});function es(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const o=JSON.parse(atob(n));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const ts=u("$ZodJWT",(e,t)=>{P.init(e,t),e._zod.check=r=>{es(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),qt=u("$ZodNumber",(e,t)=>{A.init(e,t),e._zod.pattern=e._zod.bag.pattern??mo,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;const i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),rs=u("$ZodNumber",(e,t)=>{vo.init(e,t),qt.init(e,t)}),ns=u("$ZodAny",(e,t)=>{A.init(e,t),e._zod.parse=r=>r}),os=u("$ZodUnknown",(e,t)=>{A.init(e,t),e._zod.parse=r=>r}),ss=u("$ZodNever",(e,t)=>{A.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function Kt(e,t,r){e.issues.length&&t.issues.push(...Mt(r,e.issues)),t.value[r]=e.value}const is=u("$ZodArray",(e,t)=>{A.init(e,t),e._zod.parse=(r,n)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);const i=[];for(let s=0;s<o.length;s++){const a=o[s],c=t.element._zod.run({value:a,issues:[]},n);c instanceof Promise?i.push(c.then(l=>Kt(l,r,s))):Kt(c,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function Ve(e,t,r,n){e.issues.length&&t.issues.push(...Mt(r,e.issues)),e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function Ht(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape[n]._zod.traits.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=zn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Qt(e,t,r,n,o,i){const s=[],a=o.keySet,c=o.catchall._zod,l=c.def.type;for(const f of Object.keys(t)){if(a.has(f))continue;if(l==="never"){s.push(f);continue}const b=c.run({value:t[f],issues:[]},n);b instanceof Promise?e.push(b.then(w=>Ve(w,r,f,t))):Ve(b,r,f,t)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}const as=u("$ZodObject",(e,t)=>{A.init(e,t);const r=ot(()=>Ht(t));Z(e._zod,"propValues",()=>{const s=t.shape,a={};for(const c in s){const l=s[c]._zod;if(l.values){a[c]??(a[c]=new Set);for(const f of l.values)a[c].add(f)}}return a});const n=Ce,o=t.catchall;let i;e._zod.parse=(s,a)=>{i??(i=r.value);const c=s.value;if(!n(c))return s.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),s;s.value={};const l=[],f=i.shape;for(const b of i.keys){const v=f[b]._zod.run({value:c[b],issues:[]},a);v instanceof Promise?l.push(v.then(z=>Ve(z,s,b,c))):Ve(v,s,b,c)}return o?Qt(l,c,s,a,r.value,e):l.length?Promise.all(l).then(()=>s):s}}),cs=u("$ZodObjectJIT",(e,t)=>{as.init(e,t);const r=e._zod.parse,n=ot(()=>Ht(t)),o=w=>{const v=new Po(["shape","payload","ctx"]),z=n.value,$=N=>{const O=Ct(N);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};v.write("const input = payload.value;");const L=Object.create(null);let G=0;for(const N of z.keys)L[N]=`key_${G++}`;v.write("const newResult = {}");for(const N of z.keys){const O=L[N],D=Ct(N);v.write(`const ${O} = ${$(N)};`),v.write(`
4
+ if (${O}.issues.length) {
5
+ payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
6
+ ...iss,
7
+ path: iss.path ? [${D}, ...iss.path] : [${D}]
8
+ })));
9
+ }
10
+
11
+ if (${O}.value === undefined) {
12
+ if (${D} in input) {
13
+ newResult[${D}] = undefined;
14
+ }
15
+ } else {
16
+ newResult[${D}] = ${O}.value;
17
+ }
18
+ `)}v.write("payload.value = newResult;"),v.write("return payload;");const K=v.compile();return(N,O)=>K(w,N,O)};let i;const s=Ce,a=!At.jitless,l=a&&kn.value,f=t.catchall;let b;e._zod.parse=(w,v)=>{b??(b=n.value);const z=w.value;return s(z)?a&&l&&(v==null?void 0:v.async)===!1&&v.jitless!==!0?(i||(i=o(t.shape)),w=i(w,v),f?Qt([],z,w,v,b,e):w):r(w,v):(w.issues.push({expected:"object",code:"invalid_type",input:z,inst:e}),w)}});function er(e,t,r,n){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!ke(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>fe(s,n,de())))}),t)}const us=u("$ZodUnion",(e,t)=>{A.init(e,t),Z(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Z(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Z(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),Z(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>it(i.source)).join("|")})$`)}});const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(r)return n(o,i);let s=!1;const a=[];for(const c of t.options){const l=c._zod.run({value:o.value,issues:[]},i);if(l instanceof Promise)a.push(l),s=!0;else{if(l.issues.length===0)return l;a.push(l)}}return s?Promise.all(a).then(c=>er(c,o,e,i)):er(a,o,e,i)}}),ls=u("$ZodIntersection",(e,t)=>{A.init(e,t),e._zod.parse=(r,n)=>{const o=r.value,i=t.left._zod.run({value:o,issues:[]},n),s=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,l])=>tr(r,c,l)):tr(r,i,s)}});function dt(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if($e(e)&&$e(t)){const r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};for(const i of n){const s=dt(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const o=e[n],i=t[n],s=dt(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function tr(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),ke(e))return e;const n=dt(t.value,r.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}const ds=u("$ZodEnum",(e,t)=>{A.init(e,t);const r=vn(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>yn.has(typeof o)).map(o=>typeof o=="string"?je(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const s=o.value;return n.has(s)||o.issues.push({code:"invalid_value",values:r,input:s,inst:e}),o}}),fs=u("$ZodTransform",(e,t)=>{A.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new St(e.constructor.name);const o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(r.value=s,r));if(o instanceof Promise)throw new _e;return r.value=o,r}});function rr(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const ps=u("$ZodOptional",(e,t)=>{A.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Z(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Z(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${it(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>rr(i,r.value)):rr(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),ms=u("$ZodNullable",(e,t)=>{A.init(e,t),Z(e._zod,"optin",()=>t.innerType._zod.optin),Z(e._zod,"optout",()=>t.innerType._zod.optout),Z(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${it(r.source)}|null)$`):void 0}),Z(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),hs=u("$ZodDefault",(e,t)=>{A.init(e,t),e._zod.optin="optional",Z(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>nr(i,t)):nr(o,t)}});function nr(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const gs=u("$ZodPrefault",(e,t)=>{A.init(e,t),e._zod.optin="optional",Z(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),bs=u("$ZodNonOptional",(e,t)=>{A.init(e,t),Z(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>or(i,e)):or(o,e)}});function or(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const vs=u("$ZodCatch",(e,t)=>{A.init(e,t),Z(e._zod,"optin",()=>t.innerType._zod.optin),Z(e._zod,"optout",()=>t.innerType._zod.optout),Z(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>fe(s,n,de()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(i=>fe(i,n,de()))},input:r.value}),r.issues=[]),r)}}),_s=u("$ZodPipe",(e,t)=>{A.init(e,t),Z(e._zod,"values",()=>t.in._zod.values),Z(e._zod,"optin",()=>t.in._zod.optin),Z(e._zod,"optout",()=>t.out._zod.optout),Z(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const i=t.out._zod.run(r,n);return i instanceof Promise?i.then(s=>Fe(s,t.in,n)):Fe(i,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>Fe(i,t.out,n)):Fe(o,t.out,n)}});function Fe(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const ws=u("$ZodReadonly",(e,t)=>{A.init(e,t),Z(e._zod,"propValues",()=>t.innerType._zod.propValues),Z(e._zod,"values",()=>t.innerType._zod.values),Z(e._zod,"optin",()=>t.innerType._zod.optin),Z(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(sr):sr(o)}});function sr(e){return e.value=Object.freeze(e.value),e}const ks=u("$ZodCustom",(e,t)=>{U.init(e,t),A.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>ir(i,r,n,e));ir(o,r,n,e)}});function ir(e,t,r,n){if(!e){const o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(Ee(o))}}class ys{constructor(){this._map=new Map,this._idmap=new Map}add(t,...r){const n=r[0];if(this._map.set(t,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function zs(){return new ys}const Ue=zs();function xs(e,t){return new e({type:"string",...h(t)})}function $s(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...h(t)})}function ar(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...h(t)})}function Es(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...h(t)})}function Is(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...h(t)})}function Zs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...h(t)})}function Ps(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...h(t)})}function Ts(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...h(t)})}function Rs(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...h(t)})}function Ss(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...h(t)})}function As(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...h(t)})}function Os(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...h(t)})}function Cs(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...h(t)})}function js(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...h(t)})}function Ns(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...h(t)})}function Ms(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...h(t)})}function Ls(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...h(t)})}function Ds(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...h(t)})}function Vs(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...h(t)})}function Fs(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...h(t)})}function Us(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...h(t)})}function Ws(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...h(t)})}function Gs(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...h(t)})}function Bs(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...h(t)})}function Ys(e,t){return new e({type:"string",format:"date",check:"string_format",...h(t)})}function Js(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...h(t)})}function Xs(e,t){return new e({type:"string",format:"duration",check:"string_format",...h(t)})}function qs(e,t){return new e({type:"number",checks:[],...h(t)})}function Ks(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...h(t)})}function Hs(e){return new e({type:"any"})}function Qs(e){return new e({type:"unknown"})}function ei(e,t){return new e({type:"never",...h(t)})}function cr(e,t){return new Yt({check:"less_than",...h(t),value:e,inclusive:!1})}function ft(e,t){return new Yt({check:"less_than",...h(t),value:e,inclusive:!0})}function ur(e,t){return new Jt({check:"greater_than",...h(t),value:e,inclusive:!1})}function pt(e,t){return new Jt({check:"greater_than",...h(t),value:e,inclusive:!0})}function lr(e,t){return new bo({check:"multiple_of",...h(t),value:e})}function dr(e,t){return new _o({check:"max_length",...h(t),maximum:e})}function We(e,t){return new wo({check:"min_length",...h(t),minimum:e})}function fr(e,t){return new ko({check:"length_equals",...h(t),length:e})}function ti(e,t){return new yo({check:"string_format",format:"regex",...h(t),pattern:e})}function ri(e){return new zo({check:"string_format",format:"lowercase",...h(e)})}function ni(e){return new xo({check:"string_format",format:"uppercase",...h(e)})}function oi(e,t){return new $o({check:"string_format",format:"includes",...h(t),includes:e})}function si(e,t){return new Eo({check:"string_format",format:"starts_with",...h(t),prefix:e})}function ii(e,t){return new Io({check:"string_format",format:"ends_with",...h(t),suffix:e})}function Ie(e){return new Zo({check:"overwrite",tx:e})}function ai(e){return Ie(t=>t.normalize(e))}function ci(){return Ie(e=>e.trim())}function ui(){return Ie(e=>e.toLowerCase())}function li(){return Ie(e=>e.toUpperCase())}function di(e,t,r){return new e({type:"array",element:t,...h(r)})}function fi(e,t,r){return new e({type:"custom",check:"custom",fn:t,...h(r)})}function pi(e){const t=mi(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Ee(n,r.value,t._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(Ee(o))}},e(r.value,r)));return t}function mi(e,t){const r=new U({check:"custom",...h(t)});return r._zod.check=e,r}const hi=u("ZodISODateTime",(e,t)=>{Fo.init(e,t),T.init(e,t)});function gi(e){return Bs(hi,e)}const bi=u("ZodISODate",(e,t)=>{Uo.init(e,t),T.init(e,t)});function vi(e){return Ys(bi,e)}const _i=u("ZodISOTime",(e,t)=>{Wo.init(e,t),T.init(e,t)});function wi(e){return Js(_i,e)}const ki=u("ZodISODuration",(e,t)=>{Go.init(e,t),T.init(e,t)});function yi(e){return Xs(ki,e)}const B=u("ZodError",(e,t)=>{Dt.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>An(e,r)},flatten:{value:r=>Sn(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,nt,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,nt,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),zi=ct(B),xi=ut(B),$i=Me(B),Ei=Le(B),Ii=jn(B),Zi=Nn(B),Pi=Mn(B),Ti=Ln(B),Ri=Dn(B),Si=Vn(B),Ai=Fn(B),Oi=Un(B),C=u("ZodType",(e,t)=>(A.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(r,n)=>ae(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>zi(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>$i(e,r,n),e.parseAsync=async(r,n)=>xi(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Ei(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>Ii(e,r,n),e.decode=(r,n)=>Zi(e,r,n),e.encodeAsync=async(r,n)=>Pi(e,r,n),e.decodeAsync=async(r,n)=>Ti(e,r,n),e.safeEncode=(r,n)=>Ri(e,r,n),e.safeDecode=(r,n)=>Si(e,r,n),e.safeEncodeAsync=async(r,n)=>Ai(e,r,n),e.safeDecodeAsync=async(r,n)=>Oi(e,r,n),e.refine=(r,n)=>e.check(Ea(r,n)),e.superRefine=r=>e.check(Ia(r)),e.overwrite=r=>e.check(Ie(r)),e.optional=()=>kr(e),e.nullable=()=>yr(e),e.nullish=()=>kr(yr(e)),e.nonoptional=r=>_a(e,r),e.array=()=>sa(e),e.or=r=>ca([e,r]),e.and=r=>la(e,r),e.transform=r=>xr(e,pa(r)),e.default=r=>ga(e,r),e.prefault=r=>va(e,r),e.catch=r=>ka(e,r),e.pipe=r=>xr(e,r),e.readonly=()=>xa(e),e.describe=r=>{const n=e.clone();return Ue.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){var r;return(r=Ue.get(e))==null?void 0:r.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Ue.get(e);const n=e.clone();return Ue.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),pr=u("_ZodString",(e,t)=>{lt.init(e,t),C.init(e,t);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(ti(...n)),e.includes=(...n)=>e.check(oi(...n)),e.startsWith=(...n)=>e.check(si(...n)),e.endsWith=(...n)=>e.check(ii(...n)),e.min=(...n)=>e.check(We(...n)),e.max=(...n)=>e.check(dr(...n)),e.length=(...n)=>e.check(fr(...n)),e.nonempty=(...n)=>e.check(We(1,...n)),e.lowercase=n=>e.check(ri(n)),e.uppercase=n=>e.check(ni(n)),e.trim=()=>e.check(ci()),e.normalize=(...n)=>e.check(ai(...n)),e.toLowerCase=()=>e.check(ui()),e.toUpperCase=()=>e.check(li())}),Ci=u("ZodString",(e,t)=>{lt.init(e,t),pr.init(e,t),e.email=r=>e.check($s(ji,r)),e.url=r=>e.check(Ts(Ni,r)),e.jwt=r=>e.check(Gs(Hi,r)),e.emoji=r=>e.check(Rs(Mi,r)),e.guid=r=>e.check(ar(mr,r)),e.uuid=r=>e.check(Es(Ge,r)),e.uuidv4=r=>e.check(Is(Ge,r)),e.uuidv6=r=>e.check(Zs(Ge,r)),e.uuidv7=r=>e.check(Ps(Ge,r)),e.nanoid=r=>e.check(Ss(Li,r)),e.guid=r=>e.check(ar(mr,r)),e.cuid=r=>e.check(As(Di,r)),e.cuid2=r=>e.check(Os(Vi,r)),e.ulid=r=>e.check(Cs(Fi,r)),e.base64=r=>e.check(Fs(Xi,r)),e.base64url=r=>e.check(Us(qi,r)),e.xid=r=>e.check(js(Ui,r)),e.ksuid=r=>e.check(Ns(Wi,r)),e.ipv4=r=>e.check(Ms(Gi,r)),e.ipv6=r=>e.check(Ls(Bi,r)),e.cidrv4=r=>e.check(Ds(Yi,r)),e.cidrv6=r=>e.check(Vs(Ji,r)),e.e164=r=>e.check(Ws(Ki,r)),e.datetime=r=>e.check(gi(r)),e.date=r=>e.check(vi(r)),e.time=r=>e.check(wi(r)),e.duration=r=>e.check(yi(r))});function ee(e){return xs(Ci,e)}const T=u("ZodStringFormat",(e,t)=>{P.init(e,t),pr.init(e,t)}),ji=u("ZodEmail",(e,t)=>{Ao.init(e,t),T.init(e,t)}),mr=u("ZodGUID",(e,t)=>{Ro.init(e,t),T.init(e,t)}),Ge=u("ZodUUID",(e,t)=>{So.init(e,t),T.init(e,t)}),Ni=u("ZodURL",(e,t)=>{Oo.init(e,t),T.init(e,t)}),Mi=u("ZodEmoji",(e,t)=>{Co.init(e,t),T.init(e,t)}),Li=u("ZodNanoID",(e,t)=>{jo.init(e,t),T.init(e,t)}),Di=u("ZodCUID",(e,t)=>{No.init(e,t),T.init(e,t)}),Vi=u("ZodCUID2",(e,t)=>{Mo.init(e,t),T.init(e,t)}),Fi=u("ZodULID",(e,t)=>{Lo.init(e,t),T.init(e,t)}),Ui=u("ZodXID",(e,t)=>{Do.init(e,t),T.init(e,t)}),Wi=u("ZodKSUID",(e,t)=>{Vo.init(e,t),T.init(e,t)}),Gi=u("ZodIPv4",(e,t)=>{Bo.init(e,t),T.init(e,t)}),Bi=u("ZodIPv6",(e,t)=>{Yo.init(e,t),T.init(e,t)}),Yi=u("ZodCIDRv4",(e,t)=>{Jo.init(e,t),T.init(e,t)}),Ji=u("ZodCIDRv6",(e,t)=>{Xo.init(e,t),T.init(e,t)}),Xi=u("ZodBase64",(e,t)=>{qo.init(e,t),T.init(e,t)}),qi=u("ZodBase64URL",(e,t)=>{Ho.init(e,t),T.init(e,t)}),Ki=u("ZodE164",(e,t)=>{Qo.init(e,t),T.init(e,t)}),Hi=u("ZodJWT",(e,t)=>{ts.init(e,t),T.init(e,t)}),hr=u("ZodNumber",(e,t)=>{qt.init(e,t),C.init(e,t),e.gt=(n,o)=>e.check(ur(n,o)),e.gte=(n,o)=>e.check(pt(n,o)),e.min=(n,o)=>e.check(pt(n,o)),e.lt=(n,o)=>e.check(cr(n,o)),e.lte=(n,o)=>e.check(ft(n,o)),e.max=(n,o)=>e.check(ft(n,o)),e.int=n=>e.check(br(n)),e.safe=n=>e.check(br(n)),e.positive=n=>e.check(ur(0,n)),e.nonnegative=n=>e.check(pt(0,n)),e.negative=n=>e.check(cr(0,n)),e.nonpositive=n=>e.check(ft(0,n)),e.multipleOf=(n,o)=>e.check(lr(n,o)),e.step=(n,o)=>e.check(lr(n,o)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function gr(e){return qs(hr,e)}const Qi=u("ZodNumberFormat",(e,t)=>{rs.init(e,t),hr.init(e,t)});function br(e){return Ks(Qi,e)}const ea=u("ZodAny",(e,t)=>{ns.init(e,t),C.init(e,t)});function vr(){return Hs(ea)}const ta=u("ZodUnknown",(e,t)=>{os.init(e,t),C.init(e,t)});function _r(){return Qs(ta)}const ra=u("ZodNever",(e,t)=>{ss.init(e,t),C.init(e,t)});function na(e){return ei(ra,e)}const oa=u("ZodArray",(e,t)=>{is.init(e,t),C.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(We(r,n)),e.nonempty=r=>e.check(We(1,r)),e.max=(r,n)=>e.check(dr(r,n)),e.length=(r,n)=>e.check(fr(r,n)),e.unwrap=()=>e.element});function sa(e,t){return di(oa,e,t)}const ia=u("ZodObject",(e,t)=>{cs.init(e,t),C.init(e,t),Z(e,"shape",()=>t.shape),e.keyof=()=>da(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:_r()}),e.loose=()=>e.clone({...e._zod.def,catchall:_r()}),e.strict=()=>e.clone({...e._zod.def,catchall:na()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>In(e,r),e.safeExtend=r=>Zn(e,r),e.merge=r=>Pn(e,r),e.pick=r=>$n(e,r),e.omit=r=>En(e,r),e.partial=(...r)=>Tn(wr,e,r[0]),e.required=(...r)=>Rn(zr,e,r[0])});function mt(e,t){const r={type:"object",get shape(){return ie(this,"shape",e?wn(e):{}),this.shape},...h(t)};return new ia(r)}const aa=u("ZodUnion",(e,t)=>{us.init(e,t),C.init(e,t),e.options=t.options});function ca(e,t){return new aa({type:"union",options:e,...h(t)})}const ua=u("ZodIntersection",(e,t)=>{ls.init(e,t),C.init(e,t)});function la(e,t){return new ua({type:"intersection",left:e,right:t})}const ht=u("ZodEnum",(e,t)=>{ds.init(e,t),C.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const i={};for(const s of n)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new ht({...t,checks:[],...h(o),entries:i})},e.exclude=(n,o)=>{const i={...t.entries};for(const s of n)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new ht({...t,checks:[],...h(o),entries:i})}});function da(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new ht({type:"enum",entries:r,...h(t)})}const fa=u("ZodTransform",(e,t)=>{fs.init(e,t),C.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new St(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(Ee(i,r.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(Ee(s))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function pa(e){return new fa({type:"transform",transform:e})}const wr=u("ZodOptional",(e,t)=>{ps.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType});function kr(e){return new wr({type:"optional",innerType:e})}const ma=u("ZodNullable",(e,t)=>{ms.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType});function yr(e){return new ma({type:"nullable",innerType:e})}const ha=u("ZodDefault",(e,t)=>{hs.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ga(e,t){return new ha({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Nt(t)}})}const ba=u("ZodPrefault",(e,t)=>{gs.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType});function va(e,t){return new ba({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Nt(t)}})}const zr=u("ZodNonOptional",(e,t)=>{bs.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType});function _a(e,t){return new zr({type:"nonoptional",innerType:e,...h(t)})}const wa=u("ZodCatch",(e,t)=>{vs.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ka(e,t){return new wa({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const ya=u("ZodPipe",(e,t)=>{_s.init(e,t),C.init(e,t),e.in=t.in,e.out=t.out});function xr(e,t){return new ya({type:"pipe",in:e,out:t})}const za=u("ZodReadonly",(e,t)=>{ws.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType});function xa(e){return new za({type:"readonly",innerType:e})}const $a=u("ZodCustom",(e,t)=>{ks.init(e,t),C.init(e,t)});function Ea(e,t={}){return fi($a,e,t)}function Ia(e){return pi(e)}const te=({name:e,extension:t,entityId:r,prefixe:n,bucketFolder:o,uploadUrl:i})=>`${i}/${o}/${r}/${e}-${n}.${t}`,$r=(e,t)=>{try{return mt({altRU:ee().optional().nullable(),altEN:ee().optional().nullable(),name:ee(),originalFileExtension:ee(),fileExtensions:ee().array()}).parse(e),!0}catch(r){return t({error:r}),!1}},Za=({images:e,bucketFolder:t,uploadUrl:r,getError:n})=>{if(!e)return[];try{const o=JSON.parse(e);return Array.isArray(o)?o.map(s=>{if(!$r(s,n))return null;const a=s.originalFileExtension==="png"?"image/png":"image/jpeg",c=s.fileExtensions[0],l=s.fileExtensions[1],f=Ze(s.prefixes,"1hd"),b=Ze(s.prefixes,"2hd"),w=Ze(s.prefixes,"0.5hd"),v=Ze(s.prefixes,"1hd"),z=te({name:s.name,extension:l,entityId:s.entityId,prefixe:f,bucketFolder:t,uploadUrl:r}),$=te({name:s.name,extension:c,entityId:s.entityId,prefixe:f,bucketFolder:t,uploadUrl:r}),L=te({name:s.name,extension:l,entityId:s.entityId,prefixe:b,bucketFolder:t,uploadUrl:r}),G=te({name:s.name,extension:c,entityId:s.entityId,prefixe:b,bucketFolder:t,uploadUrl:r}),K=te({name:s.name,extension:l,entityId:s.entityId,prefixe:w,bucketFolder:t,uploadUrl:r}),N=te({name:s.name,extension:c,entityId:s.entityId,prefixe:w,bucketFolder:t,uploadUrl:r}),O=te({name:s.name,extension:l,entityId:s.entityId,prefixe:v,bucketFolder:t,uploadUrl:r}),D=te({name:s.name,extension:c,entityId:s.entityId,prefixe:v,bucketFolder:t,uploadUrl:r});return{image1x:z,image2x:L,image1xWebp:$,image2xWebp:G,mobileImage1x:K,mobileImage2x:O,mobileImage1xWebp:N,mobileImage2xWebp:D,altRU:s.altRU,altEN:s.altEN,type:a}}).filter(s=>!!s):[]}catch(o){return n({error:o}),[]}},Ze=(e,t)=>{switch(t){case"original":return e[0]??"";case"0.25hd":return e[1]??"";case"0.5hd":return e[2]??"";case"1hd":return e[3]??"";case"2hd":return e[4]??"";case"4hd":return e[5]??""}},Pa=mt({statusCode:gr().optional(),message:ee().optional().nullable(),messages:ee().array().optional().nullable(),data:vr().optional().nullable(),error:mt({statusCode:gr(),message:ee().optional().nullable(),messages:ee().array().optional().nullable()}).optional().nullable(),response:vr().optional().nullable()});var Be={exports:{}},Pe={};/**
19
+ * @license React
20
+ * react-jsx-runtime.production.js
21
+ *
22
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var Er;function Ta(){if(Er)return Pe;Er=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,o,i){var s=null;if(i!==void 0&&(s=""+i),o.key!==void 0&&(s=""+o.key),"key"in o){i={};for(var a in o)a!=="key"&&(i[a]=o[a])}else i=o;return o=i.ref,{$$typeof:e,type:n,key:s,ref:o!==void 0?o:null,props:i}}return Pe.Fragment=t,Pe.jsx=r,Pe.jsxs=r,Pe}var Te={};/**
27
+ * @license React
28
+ * react-jsx-runtime.development.js
29
+ *
30
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var Ir;function Ra(){return Ir||(Ir=1,process.env.NODE_ENV!=="production"&&(function(){function e(d){if(d==null)return null;if(typeof d=="function")return d.$$typeof===Ye?null:d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case $:return"Fragment";case G:return"Profiler";case L:return"StrictMode";case D:return"Suspense";case ne:return"SuspenseList";case X:return"Activity"}if(typeof d=="object")switch(typeof d.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),d.$$typeof){case z:return"Portal";case N:return(d.displayName||"Context")+".Provider";case K:return(d._context.displayName||"Context")+".Consumer";case O:var k=d.render;return d=d.displayName,d||(d=k.displayName||k.name||"",d=d!==""?"ForwardRef("+d+")":"ForwardRef"),d;case pe:return k=d.displayName||null,k!==null?k:e(d.type)||"Memo";case _:k=d._payload,d=d._init;try{return e(d(k))}catch{}}return null}function t(d){return""+d}function r(d){try{t(d);var k=!1}catch{k=!0}if(k){k=console;var I=k.error,E=typeof Symbol=="function"&&Symbol.toStringTag&&d[Symbol.toStringTag]||d.constructor.name||"Object";return I.call(k,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",E),t(d)}}function n(d){if(d===$)return"<>";if(typeof d=="object"&&d!==null&&d.$$typeof===_)return"<...>";try{var k=e(d);return k?"<"+k+">":"<...>"}catch{return"<...>"}}function o(){var d=ye.A;return d===null?null:d.getOwner()}function i(){return Error("react-stack-top-frame")}function s(d){if(me.call(d,"key")){var k=Object.getOwnPropertyDescriptor(d,"key").get;if(k&&k.isReactWarning)return!1}return d.key!==void 0}function a(d,k){function I(){oe||(oe=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",k))}I.isReactWarning=!0,Object.defineProperty(d,"key",{get:I,configurable:!0})}function c(){var d=e(this.type);return J[d]||(J[d]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),d=this.props.ref,d!==void 0?d:null}function l(d,k,I,E,R,V,ze,S){return I=V.ref,d={$$typeof:v,type:d,key:k,props:V,_owner:R},(I!==void 0?I:null)!==null?Object.defineProperty(d,"ref",{enumerable:!1,get:c}):Object.defineProperty(d,"ref",{enumerable:!1,value:null}),d._store={},Object.defineProperty(d._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(d,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(d,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ze}),Object.defineProperty(d,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:S}),Object.freeze&&(Object.freeze(d.props),Object.freeze(d)),d}function f(d,k,I,E,R,V,ze,S){var M=k.children;if(M!==void 0)if(E)if(Je(M)){for(E=0;E<M.length;E++)b(M[E]);Object.freeze&&Object.freeze(M)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else b(M);if(me.call(k,"key")){M=e(d);var q=Object.keys(k).filter(function(Se){return Se!=="key"});E=0<q.length?"{key: someKey, "+q.join(": ..., ")+": ...}":"{key: someKey}",Re[M+E]||(q=0<q.length?"{"+q.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
35
+ let props = %s;
36
+ <%s {...props} />
37
+ React keys must be passed directly to JSX without using spread:
38
+ let props = %s;
39
+ <%s key={someKey} {...props} />`,E,M,q,M),Re[M+E]=!0)}if(M=null,I!==void 0&&(r(I),M=""+I),s(k)&&(r(k.key),M=""+k.key),"key"in k){I={};for(var ce in k)ce!=="key"&&(I[ce]=k[ce])}else I=k;return M&&a(I,typeof d=="function"?d.displayName||d.name||"Unknown":d),l(d,M,V,R,o(),I,ze,S)}function b(d){typeof d=="object"&&d!==null&&d.$$typeof===v&&d._store&&(d._store.validated=1)}var w=F,v=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),N=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),ne=Symbol.for("react.suspense_list"),pe=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),Ye=Symbol.for("react.client.reference"),ye=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me=Object.prototype.hasOwnProperty,Je=Array.isArray,he=console.createTask?console.createTask:function(){return null};w={react_stack_bottom_frame:function(d){return d()}};var oe,J={},H=w.react_stack_bottom_frame.bind(w,i)(),g=he(n(i)),Re={};Te.Fragment=$,Te.jsx=function(d,k,I,E,R){var V=1e4>ye.recentlyCreatedOwnerStacks++;return f(d,k,I,!1,E,R,V?Error("react-stack-top-frame"):H,V?he(n(d)):g)},Te.jsxs=function(d,k,I,E,R){var V=1e4>ye.recentlyCreatedOwnerStacks++;return f(d,k,I,!0,E,R,V?Error("react-stack-top-frame"):H,V?he(n(d)):g)}})()),Te}var Zr;function Sa(){return Zr||(Zr=1,process.env.NODE_ENV==="production"?Be.exports=Ta():Be.exports=Ra()),Be.exports}var re=Sa();const Aa=({imgProps:e,image1x:t,image2x:r,image1xWebp:n,image2xWebp:o,mobileImage1x:i,mobileImage2x:s,mobileImage1xWebp:a,mobileImage2xWebp:c,type:l,alt:f,bgColorClass:b,mobileMaxWidth:w=450,loading:v="lazy",...z})=>re.jsxs("picture",{...z,children:[i&&re.jsx("source",{srcSet:`${i} 1x${s?`, ${s} 2x`:""}`,media:`(max-width: ${w}px)`,type:l}),a&&re.jsx("source",{srcSet:`${a} 1x${c?`, ${c} 2x`:""}`,media:`(max-width: ${w}px)`,type:"image/webp"}),n&&re.jsx("source",{srcSet:`${n} 1x${o?`, ${o} 2x`:""}`,type:"image/webp"}),re.jsx("source",{srcSet:`${t} 1x${r?`, ${r} 2x`:""}`,type:l}),re.jsx("img",{...e,className:rt(b,e==null?void 0:e.className),src:n||t,alt:f,loading:v})]}),Oa=e=>{F.useEffect(()=>{if(!e)return;const t=window.scrollY;return()=>{window.scrollTo(0,t)}},[])},Ca=()=>{const[e,t]=F.useState(!1);return F.useEffect(()=>{t(!0)},[]),e};var ja=typeof window<"u",Na=function(e,t){var r=F.useState(null),n=r[0],o=r[1];return F.useEffect(function(){if(e.current&&typeof IntersectionObserver=="function"){var i=function(a){o(a[0])},s=new IntersectionObserver(i,t);return s.observe(e.current),function(){o(null),s.disconnect()}}return function(){}},[e.current,t.threshold,t.root,t.rootMargin]),n},Ma=function(e,t){return ja?window.matchMedia(e).matches:(process.env.NODE_ENV!=="production"&&console.warn("`useMedia` When server side rendering, defaultState should be defined to prevent a hydration mismatches."),!1)},Y=function(e,t){var r=F.useState(Ma(e)),n=r[0],o=r[1];return F.useEffect(function(){var i=!0,s=window.matchMedia(e),a=function(){i&&o(!!s.matches)};return s.addEventListener("change",a),o(s.matches),function(){i=!1,s.removeEventListener("change",a)}},[e]),n};const La=()=>{const e=Y(`(min-width: ${W.VIEW_PORT.LAPTOP_BIG}px)`),t=Y(`(max-width: ${W.VIEW_PORT.LAPTOP_BIG}px)`);return{isLaptopBigMinWidth:e,isLaptopBigMaxWidth:t}},Da=()=>{const e=Y(`(min-width: ${W.VIEW_PORT.LAPTOP}px)`),t=Y(`(max-width: ${W.VIEW_PORT.LAPTOP}px)`);return{isLaptopMinWidth:e,isLaptopMaxWidth:t}},Va=()=>{const e=Y(`(min-width: ${W.VIEW_PORT.TABLET}px)`),t=Y(`(max-width: ${W.VIEW_PORT.TABLET}px)`);return{isTabletMinWidth:e,isTabletMaxWidth:t}},Fa=()=>{const e=Y(`(min-width: ${W.VIEW_PORT.EXTRA_MEDIUM}px)`),t=Y(`(max-width: ${W.VIEW_PORT.EXTRA_MEDIUM}px)`);return{isExtraMediumMinWidth:e,isExtraMediumMaxWidth:t}},Ua=()=>{const e=Y(`(min-width: ${W.VIEW_PORT.MOBILE}px)`),t=Y(`(max-width: ${W.VIEW_PORT.MOBILE}px)`);return{isMobileMinWidth:e,isMobileMaxWidth:t}},Wa=()=>{const e=Y(`(min-width: ${W.VIEW_PORT.SMALL}px)`),t=Y(`(max-width: ${W.VIEW_PORT.SMALL}px)`);return{isSmallMinWidth:e,isSmallMaxWidth:t}},Ga=({children:e,intersectionElementClassName:t,isNext:r,intersectionElement:n,onIntersection:o})=>{const i=F.useRef({}),s=Na(i,{root:null,rootMargin:"0px",threshold:1});return F.useEffect(()=>{s!=null&&s.isIntersecting&&o()},[s==null?void 0:s.isIntersecting]),re.jsxs("div",{children:[re.jsx("div",{children:e}),re.jsx("div",{className:rt(t,{hidden:!r}),ref:i,children:n()})]})};x.BasePicture=Aa,x.InfinityList=Ga,x.THEME=W,x.TIME=Pr,x.checkCorrectImageObject=$r,x.cn=rt,x.convertPhoneMask=Rr,x.generatePaginationArray=jr,x.getByKey=gt,x.getImagePrefix=Ze,x.getNumberFormatter=Tr,x.getSubdomain=Sr,x.getUploadImageUrl=te,x.parseStringToKeyValue=Or,x.prepareColor=Cr,x.prepareLocalMetaData=Ar,x.prepareServerImages=Za,x.responseSchema=Pa,x.updateTextByTemplate=ue,x.useDisableScroll=Oa,x.useExtraMediumViewPort=Fa,x.useIsClient=Ca,x.useLaptopBigViewPort=La,x.useLaptopViewPort=Da,x.useMobileViewPort=Ua,x.useSmallViewPort=Wa,x.useTabletViewPort=Va,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})}));
@@ -0,0 +1,2 @@
1
+ export * from './server';
2
+ export * from './client';
@@ -0,0 +1,39 @@
1
+ export declare const TIME: {
2
+ seconds: {
3
+ minutes10: number;
4
+ };
5
+ milliseconds: {
6
+ milliseconds100: number;
7
+ milliseconds200: number;
8
+ milliseconds500: number;
9
+ seconds1: number;
10
+ seconds2: number;
11
+ seconds5: number;
12
+ minutes1: number;
13
+ };
14
+ };
15
+ export declare const THEME: {
16
+ VIEW_PORT: {
17
+ EXTRA_SMALL: number;
18
+ SMALL: number;
19
+ SMALL_MOBILE: number;
20
+ MOBILE: number;
21
+ MEDIUM: number;
22
+ EXTRA_MEDIUM: number;
23
+ TABLET: number;
24
+ LAPTOP: number;
25
+ LAPTOP_BIG: number;
26
+ BIG: number;
27
+ VERY_BIG: number;
28
+ };
29
+ OFFSET: {
30
+ 1: number;
31
+ 2: number;
32
+ 3: number;
33
+ 4: number;
34
+ 5: number;
35
+ 6: number;
36
+ 7: number;
37
+ 8: number;
38
+ };
39
+ };
@@ -0,0 +1,5 @@
1
+ export * from './constants';
2
+ export * from './lib';
3
+ export * from './schemas';
4
+ export * from './types';
5
+ export * from './ui';
@@ -0,0 +1,2 @@
1
+ import { ClassValue } from 'clsx';
2
+ export declare function cn(...inputs: ClassValue[]): string;
@@ -0,0 +1,46 @@
1
+ import { IPreparedServerImage, IServerImage } from '../types';
2
+ /**
3
+ * @description Создает url картинки
4
+ * @param {string} name - название картинки
5
+ * @param {string} extension - расширение картинки
6
+ * @param {string} entityId - id сущности
7
+ * @param {string} bucketName - название бакета картинки
8
+ * @param {string} prefixe - префикс файла
9
+ * @param {string} uploadUrl - url бакета
10
+ * @param bucketFolder - enum с папкой бакета
11
+ * @response Возвращает url
12
+ */
13
+ export declare const getUploadImageUrl: <T>({ name, extension, entityId, prefixe, bucketFolder, uploadUrl, }: {
14
+ name: string;
15
+ extension: string;
16
+ entityId: string;
17
+ prefixe: string;
18
+ uploadUrl: string;
19
+ bucketFolder: T;
20
+ }) => string;
21
+ /**
22
+ * @description Проверяет валидность объекта картинки по схеме
23
+ * @param {object} object - объект с информацией о картинке
24
+ * @param getError - функция обработки ошибок
25
+ * @response Возвращает true/false
26
+ */
27
+ export declare const checkCorrectImageObject: (object: IServerImage, getError: ({ error }: {
28
+ error: unknown;
29
+ }) => void) => boolean;
30
+ /**
31
+ * @description Преобразует фотографии с сервера в формат для работы
32
+ * @param {string | undefined | null} images - json stringify строка с информацией
33
+ * @param bucketFolder - название папки в бакете
34
+ * @param uploadUrl - url бакета
35
+ * @param getError - функция обработки ошибок
36
+ * @response Возвращает массив с подготовленными картинками
37
+ */
38
+ export declare const prepareServerImages: <T>({ images, bucketFolder, uploadUrl, getError, }: {
39
+ images: string | undefined | null;
40
+ bucketFolder: T;
41
+ uploadUrl: string;
42
+ getError: ({ error }: {
43
+ error: unknown;
44
+ }) => void;
45
+ }) => IPreparedServerImage[];
46
+ export declare const getImagePrefix: (prefixes: string[], type: "original" | "0.25hd" | "0.5hd" | "1hd" | "2hd" | "4hd") => string;
@@ -0,0 +1,3 @@
1
+ export * from './utils';
2
+ export * from './css';
3
+ export * from './images';
@@ -0,0 +1,116 @@
1
+ import { IPaginate, PaginationResult } from '../types';
2
+ /**
3
+ * @description Получить Intl для нужного языка
4
+ * @param local - Локаль
5
+ */
6
+ export declare const getNumberFormatter: (local: string) => Intl.NumberFormat;
7
+ /**
8
+ * @description Получить значение по ключу
9
+ * @param obj - Объект
10
+ * @param key - Ключ
11
+ */
12
+ export declare const getByKey: <T extends object, K extends keyof T>(obj: T, key: K) => T[K];
13
+ /**
14
+ * @description Преобразует value у инпута в поле маски телефона
15
+ * @param eventValue - исходное значение инпута
16
+ * @response Возвращает либо обработанную строку, либо пустую строку
17
+ * @example
18
+ * 79881234567 -> +79881234567
19
+ * 89881234567 -> +79881234567
20
+ * 19881234567 -> +19881234567
21
+ */
22
+ export declare const convertPhoneMask: (eventValue: string) => string;
23
+ /**
24
+ * @description Получить корректный поддомен из адреса хоста
25
+ * @param host - url хоста
26
+ * @param SUB_DOMAIN - Объект ключ-значение со списком поддоменов
27
+ */
28
+ export declare const getSubdomain: (host: string, SUB_DOMAIN: Record<string, string>) => string;
29
+ /**
30
+ * @description Заменяет текст по маске {{}}
31
+ * @param text - Исходный текст
32
+ * @param subdomain - Значение города, которое подставится
33
+ * @param SUBDOMAIN_NAME - Объект ключ-значение со списком поддоменов
34
+ * @param SUBDOMAIN_MASK - Объект ключ-значение со списком масок поддоменов
35
+ * @return Обновленная строка
36
+ */
37
+ export declare const updateTextByTemplate: ({ text, subdomain, SUBDOMAIN_NAME, SUBDOMAIN_MASK, }: {
38
+ text: string;
39
+ subdomain: string;
40
+ SUBDOMAIN_NAME: Record<string, {
41
+ name: string;
42
+ declination: string;
43
+ region: string;
44
+ regionDeclination: string;
45
+ }>;
46
+ SUBDOMAIN_MASK: {
47
+ CITY: string;
48
+ CITY_DECL: string;
49
+ CITY_REGION: string;
50
+ CITY_REGION_DECL: string;
51
+ };
52
+ }) => string;
53
+ /**
54
+ * @description Заменят мета текст по маске, переданный напрямую
55
+ * @param subdomain - Поддомен
56
+ * @param metaData - Объект с title, descrption, keywords
57
+ * @param host - Хост сайта
58
+ * @param SUBDOMAIN_NAME - Объект ключ-значение со списком поддоменов
59
+ * @param SUBDOMAIN_MASK - Объект ключ-значение со списком масок поддоменов
60
+ * @param DEFAULT_SEO_TEXT - Объект ключ-значение со списком масок поддоменов
61
+ * @return Объект с мета тегами
62
+ */
63
+ export declare const prepareLocalMetaData: <T extends object>({ subdomain, metaData, host, SUBDOMAIN_NAME, SUBDOMAIN_MASK, DEFAULT_SEO_TEXT, }: {
64
+ subdomain: string;
65
+ metaData: {
66
+ title: string;
67
+ description: string;
68
+ keywords: string;
69
+ canonical?: string;
70
+ };
71
+ host: string;
72
+ SUBDOMAIN_NAME: Record<string, {
73
+ name: string;
74
+ declination: string;
75
+ region: string;
76
+ regionDeclination: string;
77
+ }>;
78
+ SUBDOMAIN_MASK: {
79
+ CITY: string;
80
+ CITY_DECL: string;
81
+ CITY_REGION: string;
82
+ CITY_REGION_DECL: string;
83
+ };
84
+ DEFAULT_SEO_TEXT: {
85
+ title: string;
86
+ description: string;
87
+ keywords: string;
88
+ };
89
+ }) => T;
90
+ /**
91
+ * @description Превращает строку формата /catalog/price-from__1000--price-to__5000 в { price-from: '1000', price-to: '5000' }
92
+ * @param input - изначальная строка
93
+ * @return Объект с парами ключ-значение
94
+ */
95
+ export declare const parseStringToKeyValue: <T extends object>(input: string) => T;
96
+ /**
97
+ * @description Конвентирует цвет из enum в строку
98
+ * @param color1 - цвет 1
99
+ * @param color2 - цвет 2
100
+ * @param notFoundText - текст при отсутствии цвета
101
+ * @param COLORS_NAMES - Объект ключ-значение со списком названий цветов
102
+ * @return Строка с названием цветов
103
+ */
104
+ export declare const prepareColor: ({ color1, color2, notFoundText, COLORS_NAMES, }: {
105
+ color1: string;
106
+ color2?: string | null;
107
+ notFoundText: string;
108
+ COLORS_NAMES: Record<string, string>;
109
+ }) => string;
110
+ /**
111
+ * @description Подготавливает серверную пагинацию для клиента
112
+ * @param pagination - Серверная пагинация
113
+ * @param baseUrl - Url страницы
114
+ * @param initialParams - Параметры url
115
+ */
116
+ export declare const generatePaginationArray: (pagination: IPaginate | null, baseUrl: string, initialParams: Record<string, string>) => PaginationResult;
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ export declare const responseSchema: z.ZodObject<{
3
+ statusCode: z.ZodOptional<z.ZodNumber>;
4
+ message: z.ZodNullable<z.ZodOptional<z.ZodString>>;
5
+ messages: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString>>>;
6
+ data: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
7
+ error: z.ZodNullable<z.ZodOptional<z.ZodObject<{
8
+ statusCode: z.ZodNumber;
9
+ message: z.ZodNullable<z.ZodOptional<z.ZodString>>;
10
+ messages: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString>>>;
11
+ }, z.core.$strip>>>;
12
+ response: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
13
+ }, z.core.$strip>;
@@ -0,0 +1,42 @@
1
+ export interface IServerImage {
2
+ altRU?: string;
3
+ altEN?: string;
4
+ name: string;
5
+ originalFileExtension: string;
6
+ entityId: string;
7
+ fullPathExample: string;
8
+ prefixes: string[];
9
+ fileExtensions: string[];
10
+ }
11
+ export interface IPreparedServerImage {
12
+ image1x: string;
13
+ image2x: string;
14
+ image1xWebp: string;
15
+ image2xWebp: string;
16
+ mobileImage1x?: string;
17
+ mobileImage2x?: string;
18
+ mobileImage1xWebp?: string;
19
+ mobileImage2xWebp?: string;
20
+ altRU?: string;
21
+ altEN?: string;
22
+ type: ImageType;
23
+ }
24
+ export type ImageType = 'image/png' | 'image/jpeg';
25
+ export interface IPaginate {
26
+ page: number;
27
+ pages: number;
28
+ previous?: number;
29
+ next?: number;
30
+ count: number;
31
+ limit: number;
32
+ }
33
+ export interface PaginationButton {
34
+ label: string;
35
+ href: string;
36
+ isActive: boolean;
37
+ }
38
+ export interface PaginationResult {
39
+ buttons: PaginationButton[];
40
+ firstPage?: PaginationButton;
41
+ lastPage?: PaginationButton;
42
+ }
@@ -0,0 +1,20 @@
1
+ import { DetailedHTMLProps, FC, HTMLAttributes, ImgHTMLAttributes } from 'react';
2
+ import { ImageType } from '../types';
3
+ interface BasePictureProps extends DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement> {
4
+ imgProps?: DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
5
+ image1x: string;
6
+ image2x?: string;
7
+ image1xWebp?: string;
8
+ image2xWebp?: string;
9
+ mobileImage1x?: string;
10
+ mobileImage2x?: string;
11
+ mobileImage1xWebp?: string;
12
+ mobileImage2xWebp?: string;
13
+ type: ImageType;
14
+ alt: string;
15
+ bgColorClass: string;
16
+ mobileMaxWidth?: number;
17
+ loading?: 'eager' | 'lazy';
18
+ }
19
+ export declare const BasePicture: FC<BasePictureProps>;
20
+ export {};
@@ -0,0 +1 @@
1
+ export * from './image';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "denwa-web-shared",
3
3
  "private": false,
4
- "version": "1.0.8",
4
+ "version": "1.0.9",
5
5
  "type": "module",
6
6
  "author": "Denwa",
7
7
  "main": "dist/denwa-web-shared.umd.js",
@@ -12,19 +12,12 @@
12
12
  "types": "dist/index.d.ts",
13
13
  "exports": {
14
14
  ".": {
15
- "types": "./dist/index.d.ts",
15
+ "types": {
16
+ "import": "./dist/index.d.ts",
17
+ "require": "./dist/index.d.ts"
18
+ },
16
19
  "import": "./dist/denwa-web-shared.es.js",
17
20
  "require": "./dist/denwa-web-shared.cjs.js"
18
- },
19
- "./client": {
20
- "types": "./dist/client/denwa-web-shared.client.d.ts",
21
- "import": "./dist/client/denwa-web-shared.client.es.js",
22
- "require": "./dist/client/denwa-web-shared.client.cjs.js"
23
- },
24
- "./server": {
25
- "types": "./dist/server/denwa-web-shared.server.d.ts",
26
- "import": "./dist/server/denwa-web-shared.server.es.js",
27
- "require": "./dist/server/denwa-web-shared.server.cjs.js"
28
21
  }
29
22
  },
30
23
  "scripts": {
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../infinity-list-BqhNmBDM.cjs");exports.InfinityList=e.InfinityList;exports.useDisableScroll=e.useDisableScroll;exports.useExtraMediumViewPort=e.useExtraMediumViewPort;exports.useIsClient=e.useIsClient;exports.useLaptopBigViewPort=e.useLaptopBigViewPort;exports.useLaptopViewPort=e.useLaptopViewPort;exports.useMobileViewPort=e.useMobileViewPort;exports.useSmallViewPort=e.useSmallViewPort;exports.useTabletViewPort=e.useTabletViewPort;