denwa-web-shared 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/denwa-web-shared.cjs.js +39 -0
- package/dist/denwa-web-shared.es.js +5718 -0
- package/dist/denwa-web-shared.umd.js +39 -0
- package/dist/index.d.ts +6 -0
- package/dist/shared/constants/index.d.ts +39 -0
- package/dist/shared/hooks/index.d.ts +3 -0
- package/dist/shared/hooks/use-disable-scroll.d.ts +1 -0
- package/dist/shared/hooks/use-is-client.d.ts +1 -0
- package/dist/shared/hooks/use-view-port.d.ts +24 -0
- package/dist/shared/lib/css.d.ts +2 -0
- package/dist/shared/lib/images.d.ts +46 -0
- package/dist/shared/lib/index.d.ts +3 -0
- package/dist/shared/lib/utils.d.ts +108 -0
- package/dist/shared/schemas/index.d.ts +13 -0
- package/dist/shared/types/image.d.ts +24 -0
- package/dist/shared/types/index.d.ts +1 -0
- package/dist/shared/ui/image.d.ts +20 -0
- package/dist/shared/ui/index.d.ts +2 -0
- package/dist/shared/ui/infinity-list.d.ts +10 -0
- package/package.json +65 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
(function(x,V){typeof exports=="object"&&typeof module<"u"?V(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],V):(x=typeof globalThis<"u"?globalThis:x||self,V(x["denwa-web-shared"]={},x.React))})(this,(function(x,V){"use strict";const Tr={seconds:{minutes10:600},milliseconds:{milliseconds100:100,milliseconds200:200,milliseconds500:500,seconds1:1e3,seconds2:2e3,seconds5:5e3,minutes1:6e4}},U={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}},Pr=e=>{V.useEffect(()=>{if(!e)return;const t=window.scrollY;return()=>{window.scrollTo(0,t)}},[])},Rr=()=>{const[e,t]=V.useState(!1);return V.useEffect(()=>{t(!0)},[]),e};var Sr=typeof window<"u",Ar=function(e,t){var r=V.useState(null),n=r[0],o=r[1];return V.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},Or=function(e,t){return Sr?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)},B=function(e,t){var r=V.useState(Or(e)),n=r[0],o=r[1];return V.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 Cr=()=>{const e=B(`(min-width: ${U.VIEW_PORT.LAPTOP_BIG}px)`),t=B(`(max-width: ${U.VIEW_PORT.LAPTOP_BIG}px)`);return{isLaptopBigMinWidth:e,isLaptopBigMaxWidth:t}},jr=()=>{const e=B(`(min-width: ${U.VIEW_PORT.LAPTOP}px)`),t=B(`(max-width: ${U.VIEW_PORT.LAPTOP}px)`);return{isLaptopMinWidth:e,isLaptopMaxWidth:t}},Nr=()=>{const e=B(`(min-width: ${U.VIEW_PORT.TABLET}px)`),t=B(`(max-width: ${U.VIEW_PORT.TABLET}px)`);return{isTabletMinWidth:e,isTabletMaxWidth:t}},Mr=()=>{const e=B(`(min-width: ${U.VIEW_PORT.EXTRA_MEDIUM}px)`),t=B(`(max-width: ${U.VIEW_PORT.EXTRA_MEDIUM}px)`);return{isExtraMediumMinWidth:e,isExtraMediumMaxWidth:t}},Lr=()=>{const e=B(`(min-width: ${U.VIEW_PORT.MOBILE}px)`),t=B(`(max-width: ${U.VIEW_PORT.MOBILE}px)`);return{isMobileMinWidth:e,isMobileMaxWidth:t}},Dr=()=>{const e=B(`(min-width: ${U.VIEW_PORT.SMALL}px)`),t=B(`(max-width: ${U.VIEW_PORT.SMALL}px)`);return{isSmallMinWidth:e,isSmallMaxWidth:t}},Vr=e=>new Intl.NumberFormat(e),gt=(e,t)=>e[t],Fr=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},Ur=(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:d}=o,m=new RegExp(n.CITY,"g"),b=new RegExp(n.CITY_DECL,"g"),k=new RegExp(n.CITY_REGION,"g"),_=new RegExp(n.CITY_REGION_DECL,"g");return i=i.replace(m,s),i=i.replace(b,a),i=i.replace(k,c),i=i.replace(_,d),i},Wr=({subdomain:e,metaData:t,host:r,SUBDOMAIN_NAME:n,SUBDOMAIN_MASK:o,DEFAULT_SEO_TEXT:i})=>{const{title:s,description:a,keywords:c,canonical:d}=t,m=e==="main"?r:`${e}.${r}`;let b=s,k=a,_=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?k=ue({text:a,subdomain:e,SUBDOMAIN_MASK:o,SUBDOMAIN_NAME:n}):k=ue({text:i.description,subdomain:e,SUBDOMAIN_MASK:o,SUBDOMAIN_NAME:n}),c?_=ue({text:c,subdomain:e,SUBDOMAIN_MASK:o,SUBDOMAIN_NAME:n}):_=ue({text:i.keywords,subdomain:e,SUBDOMAIN_MASK:o,SUBDOMAIN_NAME:n}),d!==void 0&&(z.canonical=`https://${m}${d}`),{title:b,description:k,keywords:_,alternates:Object.keys(z).length?z:void 0}},Gr=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},Br=({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};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 Yr(){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="-",Jr=e=>{const t=qr(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)||Xr(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=/^\[(.+)\]$/,Xr=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}},qr=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(Kr(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},Kr=e=>e.isThemeGetter,Hr=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=":",Qr=Qe.length,en=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const i=[];let s=0,a=0,c=0,d;for(let z=0;z<o.length;z++){let P=o[z];if(s===0&&a===0){if(P===Qe){i.push(o.slice(c,z)),c=z+Qr;continue}if(P==="/"){d=z;continue}}P==="["?s++:P==="]"?s--:P==="("?a++:P===")"&&a--}const m=i.length===0?o:o.substring(c),b=tn(m),k=b!==m,_=d&&d>c?d-c:void 0;return{modifiers:i,hasImportantModifier:k,baseClassName:b,maybePostfixModifierPosition:_}};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},tn=e=>e.endsWith(He)?e.substring(0,e.length-1):e.startsWith(He)?e.substring(1):e,rn=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}},nn=e=>({cache:Hr(e.cacheSize),parseClassName:en(e),sortModifiers:rn(e),...Jr(e)}),on=/\s+/,sn=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(on);let c="";for(let d=a.length-1;d>=0;d-=1){const m=a[d],{isExternal:b,modifiers:k,hasImportantModifier:_,baseClassName:z,maybePostfixModifierPosition:P}=r(m);if(b){c=m+(c.length>0?" "+c:c);continue}let W=!!P,G=n(W?z.substring(0,P):z);if(!G){if(!W){c=m+(c.length>0?" "+c:c);continue}if(G=n(z),!G){c=m+(c.length>0?" "+c:c);continue}W=!1}const K=i(k).join(":"),N=_?K+He:K,O=N+G;if(s.includes(O))continue;s.push(O);const L=o(G,W);for(let ne=0;ne<L.length;++ne){const pe=L[ne];s.push(N+pe)}c=m+(c.length>0?" "+c:c)}return c};function an(){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 cn(e,...t){let r,n,o,i=s;function s(c){const d=t.reduce((m,b)=>b(m),e());return r=nn(d),n=r.cache.get,o=r.cache.set,i=a,a(c)}function a(c){const d=n(c);if(d)return d;const m=sn(c,r);return o(c,m),m}return function(){return i(an.apply(null,arguments))}}const j=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},yt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,un=/^\d+\/\d+$/,ln=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dn=/\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$/,fn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,pn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ge=e=>un.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=>ln.test(e),hn=()=>!0,gn=e=>dn.test(e)&&!fn.test(e),xt=()=>!1,bn=e=>pn.test(e),vn=e=>mn.test(e),_n=e=>!f(e)&&!p(e),wn=e=>be(e,Tt,xt),f=e=>yt.test(e),le=e=>be(e,Pt,gn),tt=e=>be(e,$n,y),$t=e=>be(e,It,xt),kn=e=>be(e,Zt,vn),Ae=e=>be(e,Rt,bn),p=e=>zt.test(e),xe=e=>ve(e,Pt),yn=e=>ve(e,En),Et=e=>ve(e,It),zn=e=>ve(e,Tt),xn=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",Tt=e=>e==="length"||e==="size"||e==="bg-size",Pt=e=>e==="length",$n=e=>e==="number",En=e=>e==="family-name",Rt=e=>e==="shadow",In=cn(()=>{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"),d=j("radius"),m=j("shadow"),b=j("inset-shadow"),k=j("text-shadow"),_=j("drop-shadow"),z=j("blur"),P=j("perspective"),W=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"],L=()=>[...O(),p,f],ne=()=>["auto","hidden","clip","visible","scroll"],pe=()=>["auto","contain","none"],v=()=>[p,f,c],X=()=>[ge,"full","auto",...v()],Ye=()=>[se,"none","subgrid",p,f],ye=()=>["auto",{span:["full",se,p,f]},se,p,f],me=()=>[se,"auto",p,f],Je=()=>["auto","min","max","fr",p,f],he=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],oe=()=>["start","end","center","stretch","center-safe","end-safe"],J=()=>["auto",...v()],H=()=>[ge,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...v()],g=()=>[e,p,f],Re=()=>[...O(),Et,$t,{position:[p,f]}],l=()=>["no-repeat",{repeat:["","x","y","space","round"]}],w=()=>["auto","cover","contain",zn,wn,{size:[p,f]}],E=()=>[et,xe,le],$=()=>["","none","full",d,p,f],R=()=>["",y,xe,le],D=()=>["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,p,f],q=()=>["none",y,p,f],ce=()=>["none",y,p,f],Se=()=>[y,p,f],Xe=()=>[ge,"full",...v()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Q],breakpoint:[Q],color:[hn],container:[Q],"drop-shadow":[Q],ease:["in","out","in-out"],font:[_n],"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,f,p,W]}],container:["container"],columns:[{columns:[y,f,p,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:L()}],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",p,f]}],basis:[{basis:[ge,"full","auto",a,...v()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[y,ge,"auto","initial","none",f]}],grow:[{grow:["",y,p,f]}],shrink:[{shrink:["",y,p,f]}],order:[{order:[se,"first","last","none",p,f]}],"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:v()}],"gap-x":[{"gap-x":v()}],"gap-y":[{"gap-y":v()}],"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:v()}],px:[{px:v()}],py:[{py:v()}],ps:[{ps:v()}],pe:[{pe:v()}],pt:[{pt:v()}],pr:[{pr:v()}],pb:[{pb:v()}],pl:[{pl:v()}],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":v()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":v()}],"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,p,tt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",et,f]}],"font-family":[{font:[yn,f,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,p,f]}],"line-clamp":[{"line-clamp":[y,"none",p,tt]}],leading:[{leading:[i,...v()]}],"list-image":[{"list-image":["none",p,f]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",p,f]}],"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:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:[y,"from-font","auto",p,le]}],"text-decoration-color":[{decoration:g()}],"underline-offset":[{"underline-offset":[y,"auto",p,f]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:v()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",p,f]}],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",p,f]}],"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:l()}],"bg-size":[{bg:w()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},se,p,f],radial:["",p,f],conic:[se,p,f]},xn,kn]}],"bg-color":[{bg:g()}],"gradient-from-pos":[{from:E()}],"gradient-via-pos":[{via:E()}],"gradient-to-pos":[{to:E()}],"gradient-from":[{from:g()}],"gradient-via":[{via:g()}],"gradient-to":[{to:g()}],rounded:[{rounded:$()}],"rounded-s":[{"rounded-s":$()}],"rounded-e":[{"rounded-e":$()}],"rounded-t":[{"rounded-t":$()}],"rounded-r":[{"rounded-r":$()}],"rounded-b":[{"rounded-b":$()}],"rounded-l":[{"rounded-l":$()}],"rounded-ss":[{"rounded-ss":$()}],"rounded-se":[{"rounded-se":$()}],"rounded-ee":[{"rounded-ee":$()}],"rounded-es":[{"rounded-es":$()}],"rounded-tl":[{"rounded-tl":$()}],"rounded-tr":[{"rounded-tr":$()}],"rounded-br":[{"rounded-br":$()}],"rounded-bl":[{"rounded-bl":$()}],"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:[...D(),"hidden","none"]}],"divide-style":[{divide:[...D(),"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:[...D(),"none","hidden"]}],"outline-offset":[{"outline-offset":[y,p,f]}],"outline-w":[{outline:["",y,xe,le]}],"outline-color":[{outline:g()}],shadow:[{shadow:["","none",m,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",k,Oe,Ae]}],"text-shadow-color":[{"text-shadow":g()}],opacity:[{opacity:[y,p,f]}],"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":[p,f]}],"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:l()}],"mask-size":[{mask:w()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",p,f]}],filter:[{filter:["","none",p,f]}],blur:[{blur:M()}],brightness:[{brightness:[y,p,f]}],contrast:[{contrast:[y,p,f]}],"drop-shadow":[{"drop-shadow":["","none",_,Oe,Ae]}],"drop-shadow-color":[{"drop-shadow":g()}],grayscale:[{grayscale:["",y,p,f]}],"hue-rotate":[{"hue-rotate":[y,p,f]}],invert:[{invert:["",y,p,f]}],saturate:[{saturate:[y,p,f]}],sepia:[{sepia:["",y,p,f]}],"backdrop-filter":[{"backdrop-filter":["","none",p,f]}],"backdrop-blur":[{"backdrop-blur":M()}],"backdrop-brightness":[{"backdrop-brightness":[y,p,f]}],"backdrop-contrast":[{"backdrop-contrast":[y,p,f]}],"backdrop-grayscale":[{"backdrop-grayscale":["",y,p,f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y,p,f]}],"backdrop-invert":[{"backdrop-invert":["",y,p,f]}],"backdrop-opacity":[{"backdrop-opacity":[y,p,f]}],"backdrop-saturate":[{"backdrop-saturate":[y,p,f]}],"backdrop-sepia":[{"backdrop-sepia":["",y,p,f]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":v()}],"border-spacing-x":[{"border-spacing-x":v()}],"border-spacing-y":[{"border-spacing-y":v()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",p,f]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[y,"initial",p,f]}],ease:[{ease:["linear","initial",G,p,f]}],delay:[{delay:[y,p,f]}],animate:[{animate:["none",K,p,f]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[P,p,f]}],"perspective-origin":[{"perspective-origin":L()}],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:[p,f,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"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",p,f]}],"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":v()}],"scroll-mx":[{"scroll-mx":v()}],"scroll-my":[{"scroll-my":v()}],"scroll-ms":[{"scroll-ms":v()}],"scroll-me":[{"scroll-me":v()}],"scroll-mt":[{"scroll-mt":v()}],"scroll-mr":[{"scroll-mr":v()}],"scroll-mb":[{"scroll-mb":v()}],"scroll-ml":[{"scroll-ml":v()}],"scroll-p":[{"scroll-p":v()}],"scroll-px":[{"scroll-px":v()}],"scroll-py":[{"scroll-py":v()}],"scroll-ps":[{"scroll-ps":v()}],"scroll-pe":[{"scroll-pe":v()}],"scroll-pt":[{"scroll-pt":v()}],"scroll-pr":[{"scroll-pr":v()}],"scroll-pb":[{"scroll-pb":v()}],"scroll-pl":[{"scroll-pl":v()}],"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",p,f]}],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 In(Yr(e))}function u(e,t,r){function n(a,c){var d;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(d=a._zod).traits??(d.traits=new Set),a._zod.traits.add(e),t(a,c);for(const m in s.prototype)m in a||Object.defineProperty(a,m,{value:s.prototype[m].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 d=r!=null&&r.Parent?new i:this;n(d,a),(c=d._zod).deferred??(c.deferred=[]);for(const m of d._zod.deferred)m();return d}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>{var c,d;return r!=null&&r.Parent&&a instanceof r.Parent?!0:(d=(c=a==null?void 0:a._zod)==null?void 0:c.traits)==null?void 0:d.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 Zn(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 Tn(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 I(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 Pn(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 Rn=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 Sn=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 An(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const On={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 Cn(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 jn(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 Nn(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 Mn(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 Ln(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 Dn(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 Vn(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,d;const n={...e,path:e.path??[]};if(!e.message){const m=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((d=r.localeError)==null?void 0:d.call(r,e))??"Invalid input";n.message=m}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 Fn(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 Un(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 d=s.path[c];c===s.path.length-1?(a[d]=a[d]||{_errors:[]},a[d]._errors.push(r(s))):a[d]=a[d]||{_errors:[]},a=a[d],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}},Wn=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}},Gn=Le(Vt),Bn=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ct(e)(t,r,o)},Yn=e=>(t,r,n)=>ct(e)(t,r,n),Jn=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ut(e)(t,r,o)},Xn=e=>async(t,r,n)=>ut(e)(t,r,n),qn=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Me(e)(t,r,o)},Kn=e=>(t,r,n)=>Me(e)(t,r,n),Hn=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Le(e)(t,r,o)},Qn=e=>async(t,r,n)=>Le(e)(t,r,n),eo=/^[cC][^\s-]{8,}$/,to=/^[0-9a-z]+$/,ro=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,no=/^[0-9a-vA-V]{20}$/,oo=/^[A-Za-z0-9]{27}$/,so=/^[a-zA-Z0-9_-]{21}$/,io=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ao=/^([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)$/,co=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,uo="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function lo(){return new RegExp(uo,"u")}const fo=/^(?:(?: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])$/,po=/^(([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})$/,mo=/^((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])$/,ho=/^(([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])$/,go=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ut=/^[A-Za-z0-9_-]*$/,bo=/^(?=.{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])?)*\.?$/,vo=/^\+(?:[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])))",_o=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 wo(e){return new RegExp(`^${Gt(e)}$`)}function ko(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 yo=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}$`)},zo=/^\d+$/,xo=/^-?\d+(?:\.\d+)?/i,$o=/^[^A-Z]*$/,Eo=/^[^a-z]*$/,F=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)=>{F.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)=>{F.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})}}),Io=u("$ZodCheckMultipleOf",(e,t)=>{F.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):Tn(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})}}),Zo=u("$ZodCheckNumberFormat",(e,t)=>{var s;F.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]=On[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=zo)}),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})}}),To=u("$ZodCheckMaxLength",(e,t)=>{var r;F.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})}}),Po=u("$ZodCheckMinLength",(e,t)=>{var r;F.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})}}),Ro=u("$ZodCheckLengthEquals",(e,t)=>{var r;F.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;F.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=()=>{})}),So=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})}}),Ao=u("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=$o),De.init(e,t)}),Oo=u("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Eo),De.init(e,t)}),Co=u("$ZodCheckIncludes",(e,t)=>{F.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})}}),jo=u("$ZodCheckStartsWith",(e,t)=>{F.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})}}),No=u("$ZodCheckEndsWith",(e,t)=>{F.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})}}),Mo=u("$ZodCheckOverwrite",(e,t)=>{F.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class Lo{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 Do={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=Do;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,d)=>{let m=ke(a),b;for(const k of c){if(k._zod.def.when){if(!k._zod.def.when(a))continue}else if(m)continue;const _=a.issues.length,z=k._zod.check(a);if(z instanceof Promise&&(d==null?void 0:d.async)===!1)throw new _e;if(b||z instanceof Promise)b=(b??Promise.resolve()).then(async()=>{await z,a.issues.length!==_&&(m||(m=ke(a,_)))});else{if(a.issues.length===_)continue;m||(m=ke(a,_))}}return b?b.then(()=>a):a},s=(a,c,d)=>{if(ke(a))return a.aborted=!0,a;const m=i(c,n,d);if(m instanceof Promise){if(d.async===!1)throw new _e;return m.then(b=>e._zod.parse(b,d))}return e._zod.parse(m,d)};e._zod.run=(a,c)=>{if(c.skipChecks)return e._zod.parse(a,c);if(c.direction==="backward"){const m=e._zod.parse({value:a.value,issues:[]},{...c,skipChecks:!0});return m instanceof Promise?m.then(b=>s(b,a,c)):s(m,a,c)}const d=e._zod.parse(a,c);if(d instanceof Promise){if(c.async===!1)throw new _e;return d.then(m=>i(m,n,c))}return i(d,n,c)}}e["~standard"]={validate:i=>{var s;try{const a=Wn(e,i);return a.success?{value:a.data}:{issues:(s=a.error)==null?void 0:s.issues}}catch{return Gn(e,i).then(c=>{var d;return c.success?{value:c.data}:{issues:(d=c.error)==null?void 0:d.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()??yo(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}}),Z=u("$ZodStringFormat",(e,t)=>{De.init(e,t),lt.init(e,t)}),Vo=u("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ao),Z.init(e,t)}),Fo=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());Z.init(e,t)}),Uo=u("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=co),Z.init(e,t)}),Wo=u("$ZodURL",(e,t)=>{Z.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:bo.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})}}}),Go=u("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=lo()),Z.init(e,t)}),Bo=u("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=so),Z.init(e,t)}),Yo=u("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=eo),Z.init(e,t)}),Jo=u("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=to),Z.init(e,t)}),Xo=u("$ZodULID",(e,t)=>{t.pattern??(t.pattern=ro),Z.init(e,t)}),qo=u("$ZodXID",(e,t)=>{t.pattern??(t.pattern=no),Z.init(e,t)}),Ko=u("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=oo),Z.init(e,t)}),Ho=u("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=ko(t)),Z.init(e,t)}),Qo=u("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=_o),Z.init(e,t)}),es=u("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=wo(t)),Z.init(e,t)}),ts=u("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=io),Z.init(e,t)}),rs=u("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=fo),Z.init(e,t),e._zod.onattach.push(r=>{const n=r._zod.bag;n.format="ipv4"})}),ns=u("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=po),Z.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})}}}),os=u("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=mo),Z.init(e,t)}),ss=u("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ho),Z.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 is=u("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=go),Z.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 as(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 cs=u("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ut),Z.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{as(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),us=u("$ZodE164",(e,t)=>{t.pattern??(t.pattern=vo),Z.init(e,t)});function ls(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 ds=u("$ZodJWT",(e,t)=>{Z.init(e,t),e._zod.check=r=>{ls(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??xo,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}}),fs=u("$ZodNumber",(e,t)=>{Zo.init(e,t),qt.init(e,t)}),ps=u("$ZodAny",(e,t)=>{A.init(e,t),e._zod.parse=r=>r}),ms=u("$ZodUnknown",(e,t)=>{A.init(e,t),e._zod.parse=r=>r}),hs=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 gs=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(d=>Kt(d,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=An(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,d=c.def.type;for(const m of Object.keys(t)){if(a.has(m))continue;if(d==="never"){s.push(m);continue}const b=c.run({value:t[m],issues:[]},n);b instanceof Promise?e.push(b.then(k=>Ve(k,r,m,t))):Ve(b,r,m,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 bs=u("$ZodObject",(e,t)=>{A.init(e,t);const r=ot(()=>Ht(t));I(e._zod,"propValues",()=>{const s=t.shape,a={};for(const c in s){const d=s[c]._zod;if(d.values){a[c]??(a[c]=new Set);for(const m of d.values)a[c].add(m)}}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 d=[],m=i.shape;for(const b of i.keys){const _=m[b]._zod.run({value:c[b],issues:[]},a);_ instanceof Promise?d.push(_.then(z=>Ve(z,s,b,c))):Ve(_,s,b,c)}return o?Qt(d,c,s,a,r.value,e):d.length?Promise.all(d).then(()=>s):s}}),vs=u("$ZodObjectJIT",(e,t)=>{bs.init(e,t);const r=e._zod.parse,n=ot(()=>Ht(t)),o=k=>{const _=new Lo(["shape","payload","ctx"]),z=n.value,P=N=>{const O=Ct(N);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};_.write("const input = payload.value;");const W=Object.create(null);let G=0;for(const N of z.keys)W[N]=`key_${G++}`;_.write("const newResult = {}");for(const N of z.keys){const O=W[N],L=Ct(N);_.write(`const ${O} = ${P(N)};`),_.write(`
|
|
4
|
+
if (${O}.issues.length) {
|
|
5
|
+
payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
|
|
6
|
+
...iss,
|
|
7
|
+
path: iss.path ? [${L}, ...iss.path] : [${L}]
|
|
8
|
+
})));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
if (${O}.value === undefined) {
|
|
12
|
+
if (${L} in input) {
|
|
13
|
+
newResult[${L}] = undefined;
|
|
14
|
+
}
|
|
15
|
+
} else {
|
|
16
|
+
newResult[${L}] = ${O}.value;
|
|
17
|
+
}
|
|
18
|
+
`)}_.write("payload.value = newResult;"),_.write("return payload;");const K=_.compile();return(N,O)=>K(k,N,O)};let i;const s=Ce,a=!At.jitless,d=a&&Rn.value,m=t.catchall;let b;e._zod.parse=(k,_)=>{b??(b=n.value);const z=k.value;return s(z)?a&&d&&(_==null?void 0:_.async)===!1&&_.jitless!==!0?(i||(i=o(t.shape)),k=i(k,_),m?Qt([],z,k,_,b,e):k):r(k,_):(k.issues.push({expected:"object",code:"invalid_type",input:z,inst:e}),k)}});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 _s=u("$ZodUnion",(e,t)=>{A.init(e,t),I(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),I(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),I(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),I(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 d=c._zod.run({value:o.value,issues:[]},i);if(d instanceof Promise)a.push(d),s=!0;else{if(d.issues.length===0)return d;a.push(d)}}return s?Promise.all(a).then(c=>er(c,o,e,i)):er(a,o,e,i)}}),ws=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,d])=>tr(r,c,d)):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 ks=u("$ZodEnum",(e,t)=>{A.init(e,t);const r=Zn(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>Sn.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}}),ys=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 zs=u("$ZodOptional",(e,t)=>{A.init(e,t),e._zod.optin="optional",e._zod.optout="optional",I(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),I(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)}}),xs=u("$ZodNullable",(e,t)=>{A.init(e,t),I(e._zod,"optin",()=>t.innerType._zod.optin),I(e._zod,"optout",()=>t.innerType._zod.optout),I(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${it(r.source)}|null)$`):void 0}),I(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)}),$s=u("$ZodDefault",(e,t)=>{A.init(e,t),e._zod.optin="optional",I(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 Es=u("$ZodPrefault",(e,t)=>{A.init(e,t),e._zod.optin="optional",I(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))}),Is=u("$ZodNonOptional",(e,t)=>{A.init(e,t),I(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 Zs=u("$ZodCatch",(e,t)=>{A.init(e,t),I(e._zod,"optin",()=>t.innerType._zod.optin),I(e._zod,"optout",()=>t.innerType._zod.optout),I(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)}}),Ts=u("$ZodPipe",(e,t)=>{A.init(e,t),I(e._zod,"values",()=>t.in._zod.values),I(e._zod,"optin",()=>t.in._zod.optin),I(e._zod,"optout",()=>t.out._zod.optout),I(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 Ps=u("$ZodReadonly",(e,t)=>{A.init(e,t),I(e._zod,"propValues",()=>t.innerType._zod.propValues),I(e._zod,"values",()=>t.innerType._zod.values),I(e._zod,"optin",()=>t.innerType._zod.optin),I(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 Rs=u("$ZodCustom",(e,t)=>{F.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 Ss{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 As(){return new Ss}const Ue=As();function Os(e,t){return new e({type:"string",...h(t)})}function Cs(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 js(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...h(t)})}function Ns(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...h(t)})}function Ms(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...h(t)})}function Ls(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...h(t)})}function Ds(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...h(t)})}function Vs(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...h(t)})}function Fs(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...h(t)})}function Us(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...h(t)})}function Ws(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...h(t)})}function Gs(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...h(t)})}function Bs(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...h(t)})}function Ys(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...h(t)})}function Js(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...h(t)})}function Xs(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...h(t)})}function qs(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...h(t)})}function Ks(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...h(t)})}function Hs(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...h(t)})}function Qs(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...h(t)})}function ei(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...h(t)})}function ti(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...h(t)})}function ri(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...h(t)})}function ni(e,t){return new e({type:"string",format:"date",check:"string_format",...h(t)})}function oi(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...h(t)})}function si(e,t){return new e({type:"string",format:"duration",check:"string_format",...h(t)})}function ii(e,t){return new e({type:"number",checks:[],...h(t)})}function ai(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...h(t)})}function ci(e){return new e({type:"any"})}function ui(e){return new e({type:"unknown"})}function li(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 Io({check:"multiple_of",...h(t),value:e})}function dr(e,t){return new To({check:"max_length",...h(t),maximum:e})}function We(e,t){return new Po({check:"min_length",...h(t),minimum:e})}function fr(e,t){return new Ro({check:"length_equals",...h(t),length:e})}function di(e,t){return new So({check:"string_format",format:"regex",...h(t),pattern:e})}function fi(e){return new Ao({check:"string_format",format:"lowercase",...h(e)})}function pi(e){return new Oo({check:"string_format",format:"uppercase",...h(e)})}function mi(e,t){return new Co({check:"string_format",format:"includes",...h(t),includes:e})}function hi(e,t){return new jo({check:"string_format",format:"starts_with",...h(t),prefix:e})}function gi(e,t){return new No({check:"string_format",format:"ends_with",...h(t),suffix:e})}function Ie(e){return new Mo({check:"overwrite",tx:e})}function bi(e){return Ie(t=>t.normalize(e))}function vi(){return Ie(e=>e.trim())}function _i(){return Ie(e=>e.toLowerCase())}function wi(){return Ie(e=>e.toUpperCase())}function ki(e,t,r){return new e({type:"array",element:t,...h(r)})}function yi(e,t,r){return new e({type:"custom",check:"custom",fn:t,...h(r)})}function zi(e){const t=xi(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 xi(e,t){const r=new F({check:"custom",...h(t)});return r._zod.check=e,r}const $i=u("ZodISODateTime",(e,t)=>{Ho.init(e,t),T.init(e,t)});function Ei(e){return ri($i,e)}const Ii=u("ZodISODate",(e,t)=>{Qo.init(e,t),T.init(e,t)});function Zi(e){return ni(Ii,e)}const Ti=u("ZodISOTime",(e,t)=>{es.init(e,t),T.init(e,t)});function Pi(e){return oi(Ti,e)}const Ri=u("ZodISODuration",(e,t)=>{ts.init(e,t),T.init(e,t)});function Si(e){return si(Ri,e)}const Y=u("ZodError",(e,t)=>{Dt.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Un(e,r)},flatten:{value:r=>Fn(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}),Ai=ct(Y),Oi=ut(Y),Ci=Me(Y),ji=Le(Y),Ni=Bn(Y),Mi=Yn(Y),Li=Jn(Y),Di=Xn(Y),Vi=qn(Y),Fi=Kn(Y),Ui=Hn(Y),Wi=Qn(Y),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)=>Ai(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Ci(e,r,n),e.parseAsync=async(r,n)=>Oi(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>ji(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>Ni(e,r,n),e.decode=(r,n)=>Mi(e,r,n),e.encodeAsync=async(r,n)=>Li(e,r,n),e.decodeAsync=async(r,n)=>Di(e,r,n),e.safeEncode=(r,n)=>Vi(e,r,n),e.safeDecode=(r,n)=>Fi(e,r,n),e.safeEncodeAsync=async(r,n)=>Ui(e,r,n),e.safeDecodeAsync=async(r,n)=>Wi(e,r,n),e.refine=(r,n)=>e.check(ja(r,n)),e.superRefine=r=>e.check(Na(r)),e.overwrite=r=>e.check(Ie(r)),e.optional=()=>kr(e),e.nullable=()=>yr(e),e.nullish=()=>kr(yr(e)),e.nonoptional=r=>Ta(e,r),e.array=()=>ha(e),e.or=r=>va([e,r]),e.and=r=>wa(e,r),e.transform=r=>xr(e,za(r)),e.default=r=>Ea(e,r),e.prefault=r=>Za(e,r),e.catch=r=>Ra(e,r),e.pipe=r=>xr(e,r),e.readonly=()=>Oa(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(di(...n)),e.includes=(...n)=>e.check(mi(...n)),e.startsWith=(...n)=>e.check(hi(...n)),e.endsWith=(...n)=>e.check(gi(...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(fi(n)),e.uppercase=n=>e.check(pi(n)),e.trim=()=>e.check(vi()),e.normalize=(...n)=>e.check(bi(...n)),e.toLowerCase=()=>e.check(_i()),e.toUpperCase=()=>e.check(wi())}),Gi=u("ZodString",(e,t)=>{lt.init(e,t),pr.init(e,t),e.email=r=>e.check(Cs(Bi,r)),e.url=r=>e.check(Ds(Yi,r)),e.jwt=r=>e.check(ti(ca,r)),e.emoji=r=>e.check(Vs(Ji,r)),e.guid=r=>e.check(ar(mr,r)),e.uuid=r=>e.check(js(Ge,r)),e.uuidv4=r=>e.check(Ns(Ge,r)),e.uuidv6=r=>e.check(Ms(Ge,r)),e.uuidv7=r=>e.check(Ls(Ge,r)),e.nanoid=r=>e.check(Fs(Xi,r)),e.guid=r=>e.check(ar(mr,r)),e.cuid=r=>e.check(Us(qi,r)),e.cuid2=r=>e.check(Ws(Ki,r)),e.ulid=r=>e.check(Gs(Hi,r)),e.base64=r=>e.check(Hs(sa,r)),e.base64url=r=>e.check(Qs(ia,r)),e.xid=r=>e.check(Bs(Qi,r)),e.ksuid=r=>e.check(Ys(ea,r)),e.ipv4=r=>e.check(Js(ta,r)),e.ipv6=r=>e.check(Xs(ra,r)),e.cidrv4=r=>e.check(qs(na,r)),e.cidrv6=r=>e.check(Ks(oa,r)),e.e164=r=>e.check(ei(aa,r)),e.datetime=r=>e.check(Ei(r)),e.date=r=>e.check(Zi(r)),e.time=r=>e.check(Pi(r)),e.duration=r=>e.check(Si(r))});function ee(e){return Os(Gi,e)}const T=u("ZodStringFormat",(e,t)=>{Z.init(e,t),pr.init(e,t)}),Bi=u("ZodEmail",(e,t)=>{Uo.init(e,t),T.init(e,t)}),mr=u("ZodGUID",(e,t)=>{Vo.init(e,t),T.init(e,t)}),Ge=u("ZodUUID",(e,t)=>{Fo.init(e,t),T.init(e,t)}),Yi=u("ZodURL",(e,t)=>{Wo.init(e,t),T.init(e,t)}),Ji=u("ZodEmoji",(e,t)=>{Go.init(e,t),T.init(e,t)}),Xi=u("ZodNanoID",(e,t)=>{Bo.init(e,t),T.init(e,t)}),qi=u("ZodCUID",(e,t)=>{Yo.init(e,t),T.init(e,t)}),Ki=u("ZodCUID2",(e,t)=>{Jo.init(e,t),T.init(e,t)}),Hi=u("ZodULID",(e,t)=>{Xo.init(e,t),T.init(e,t)}),Qi=u("ZodXID",(e,t)=>{qo.init(e,t),T.init(e,t)}),ea=u("ZodKSUID",(e,t)=>{Ko.init(e,t),T.init(e,t)}),ta=u("ZodIPv4",(e,t)=>{rs.init(e,t),T.init(e,t)}),ra=u("ZodIPv6",(e,t)=>{ns.init(e,t),T.init(e,t)}),na=u("ZodCIDRv4",(e,t)=>{os.init(e,t),T.init(e,t)}),oa=u("ZodCIDRv6",(e,t)=>{ss.init(e,t),T.init(e,t)}),sa=u("ZodBase64",(e,t)=>{is.init(e,t),T.init(e,t)}),ia=u("ZodBase64URL",(e,t)=>{cs.init(e,t),T.init(e,t)}),aa=u("ZodE164",(e,t)=>{us.init(e,t),T.init(e,t)}),ca=u("ZodJWT",(e,t)=>{ds.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 ii(hr,e)}const ua=u("ZodNumberFormat",(e,t)=>{fs.init(e,t),hr.init(e,t)});function br(e){return ai(ua,e)}const la=u("ZodAny",(e,t)=>{ps.init(e,t),C.init(e,t)});function vr(){return ci(la)}const da=u("ZodUnknown",(e,t)=>{ms.init(e,t),C.init(e,t)});function _r(){return ui(da)}const fa=u("ZodNever",(e,t)=>{hs.init(e,t),C.init(e,t)});function pa(e){return li(fa,e)}const ma=u("ZodArray",(e,t)=>{gs.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 ha(e,t){return ki(ma,e,t)}const ga=u("ZodObject",(e,t)=>{vs.init(e,t),C.init(e,t),I(e,"shape",()=>t.shape),e.keyof=()=>ka(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:pa()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Nn(e,r),e.safeExtend=r=>Mn(e,r),e.merge=r=>Ln(e,r),e.pick=r=>Cn(e,r),e.omit=r=>jn(e,r),e.partial=(...r)=>Dn(wr,e,r[0]),e.required=(...r)=>Vn(zr,e,r[0])});function mt(e,t){const r={type:"object",get shape(){return ie(this,"shape",e?Pn(e):{}),this.shape},...h(t)};return new ga(r)}const ba=u("ZodUnion",(e,t)=>{_s.init(e,t),C.init(e,t),e.options=t.options});function va(e,t){return new ba({type:"union",options:e,...h(t)})}const _a=u("ZodIntersection",(e,t)=>{ws.init(e,t),C.init(e,t)});function wa(e,t){return new _a({type:"intersection",left:e,right:t})}const ht=u("ZodEnum",(e,t)=>{ks.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 ka(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 ya=u("ZodTransform",(e,t)=>{ys.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 za(e){return new ya({type:"transform",transform:e})}const wr=u("ZodOptional",(e,t)=>{zs.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType});function kr(e){return new wr({type:"optional",innerType:e})}const xa=u("ZodNullable",(e,t)=>{xs.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType});function yr(e){return new xa({type:"nullable",innerType:e})}const $a=u("ZodDefault",(e,t)=>{$s.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ea(e,t){return new $a({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Nt(t)}})}const Ia=u("ZodPrefault",(e,t)=>{Es.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Za(e,t){return new Ia({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Nt(t)}})}const zr=u("ZodNonOptional",(e,t)=>{Is.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ta(e,t){return new zr({type:"nonoptional",innerType:e,...h(t)})}const Pa=u("ZodCatch",(e,t)=>{Zs.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ra(e,t){return new Pa({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Sa=u("ZodPipe",(e,t)=>{Ts.init(e,t),C.init(e,t),e.in=t.in,e.out=t.out});function xr(e,t){return new Sa({type:"pipe",in:e,out:t})}const Aa=u("ZodReadonly",(e,t)=>{Ps.init(e,t),C.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Oa(e){return new Aa({type:"readonly",innerType:e})}const Ca=u("ZodCustom",(e,t)=>{Rs.init(e,t),C.init(e,t)});function ja(e,t={}){return yi(Ca,e,t)}function Na(e){return zi(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}},Ma=({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],d=s.fileExtensions[1],m=Ze(s.prefixes,"1hd"),b=Ze(s.prefixes,"2hd"),k=Ze(s.prefixes,"0.5hd"),_=Ze(s.prefixes,"1hd"),z=te({name:s.name,extension:d,entityId:s.entityId,prefixe:m,bucketFolder:t,uploadUrl:r}),P=te({name:s.name,extension:c,entityId:s.entityId,prefixe:m,bucketFolder:t,uploadUrl:r}),W=te({name:s.name,extension:d,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:d,entityId:s.entityId,prefixe:k,bucketFolder:t,uploadUrl:r}),N=te({name:s.name,extension:c,entityId:s.entityId,prefixe:k,bucketFolder:t,uploadUrl:r}),O=te({name:s.name,extension:d,entityId:s.entityId,prefixe:_,bucketFolder:t,uploadUrl:r}),L=te({name:s.name,extension:c,entityId:s.entityId,prefixe:_,bucketFolder:t,uploadUrl:r});return{image1x:z,image2x:W,image1xWebp:P,image2xWebp:G,mobileImage1x:K,mobileImage2x:O,mobileImage1xWebp:N,mobileImage2xWebp:L,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]??""}},La=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:{}},Te={};/**
|
|
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 Da(){if(Er)return Te;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 Te.Fragment=t,Te.jsx=r,Te.jsxs=r,Te}var Pe={};/**
|
|
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 Va(){return Ir||(Ir=1,process.env.NODE_ENV!=="production"&&(function(){function e(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===Ye?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case P:return"Fragment";case G:return"Profiler";case W:return"StrictMode";case L:return"Suspense";case ne:return"SuspenseList";case X:return"Activity"}if(typeof l=="object")switch(typeof l.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),l.$$typeof){case z:return"Portal";case N:return(l.displayName||"Context")+".Provider";case K:return(l._context.displayName||"Context")+".Consumer";case O:var w=l.render;return l=l.displayName,l||(l=w.displayName||w.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case pe:return w=l.displayName||null,w!==null?w:e(l.type)||"Memo";case v:w=l._payload,l=l._init;try{return e(l(w))}catch{}}return null}function t(l){return""+l}function r(l){try{t(l);var w=!1}catch{w=!0}if(w){w=console;var E=w.error,$=typeof Symbol=="function"&&Symbol.toStringTag&&l[Symbol.toStringTag]||l.constructor.name||"Object";return E.call(w,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",$),t(l)}}function n(l){if(l===P)return"<>";if(typeof l=="object"&&l!==null&&l.$$typeof===v)return"<...>";try{var w=e(l);return w?"<"+w+">":"<...>"}catch{return"<...>"}}function o(){var l=ye.A;return l===null?null:l.getOwner()}function i(){return Error("react-stack-top-frame")}function s(l){if(me.call(l,"key")){var w=Object.getOwnPropertyDescriptor(l,"key").get;if(w&&w.isReactWarning)return!1}return l.key!==void 0}function a(l,w){function E(){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)",w))}E.isReactWarning=!0,Object.defineProperty(l,"key",{get:E,configurable:!0})}function c(){var l=e(this.type);return J[l]||(J[l]=!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.")),l=this.props.ref,l!==void 0?l:null}function d(l,w,E,$,R,D,ze,S){return E=D.ref,l={$$typeof:_,type:l,key:w,props:D,_owner:R},(E!==void 0?E:null)!==null?Object.defineProperty(l,"ref",{enumerable:!1,get:c}):Object.defineProperty(l,"ref",{enumerable:!1,value:null}),l._store={},Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(l,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(l,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ze}),Object.defineProperty(l,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:S}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l}function m(l,w,E,$,R,D,ze,S){var M=w.children;if(M!==void 0)if($)if(Je(M)){for($=0;$<M.length;$++)b(M[$]);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(w,"key")){M=e(l);var q=Object.keys(w).filter(function(Se){return Se!=="key"});$=0<q.length?"{key: someKey, "+q.join(": ..., ")+": ...}":"{key: someKey}",Re[M+$]||(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} />`,$,M,q,M),Re[M+$]=!0)}if(M=null,E!==void 0&&(r(E),M=""+E),s(w)&&(r(w.key),M=""+w.key),"key"in w){E={};for(var ce in w)ce!=="key"&&(E[ce]=w[ce])}else E=w;return M&&a(E,typeof l=="function"?l.displayName||l.name||"Unknown":l),d(l,M,D,R,o(),E,ze,S)}function b(l){typeof l=="object"&&l!==null&&l.$$typeof===_&&l._store&&(l._store.validated=1)}var k=V,_=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),W=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"),L=Symbol.for("react.suspense"),ne=Symbol.for("react.suspense_list"),pe=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),Ye=Symbol.for("react.client.reference"),ye=k.__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};k={react_stack_bottom_frame:function(l){return l()}};var oe,J={},H=k.react_stack_bottom_frame.bind(k,i)(),g=he(n(i)),Re={};Pe.Fragment=P,Pe.jsx=function(l,w,E,$,R){var D=1e4>ye.recentlyCreatedOwnerStacks++;return m(l,w,E,!1,$,R,D?Error("react-stack-top-frame"):H,D?he(n(l)):g)},Pe.jsxs=function(l,w,E,$,R){var D=1e4>ye.recentlyCreatedOwnerStacks++;return m(l,w,E,!0,$,R,D?Error("react-stack-top-frame"):H,D?he(n(l)):g)}})()),Pe}var Zr;function Fa(){return Zr||(Zr=1,process.env.NODE_ENV==="production"?Be.exports=Da():Be.exports=Va()),Be.exports}var re=Fa();const Ua=({children:e,intersectionElementClassName:t,isNext:r,intersectionElement:n,onIntersection:o})=>{const i=V.useRef({}),s=Ar(i,{root:null,rootMargin:"0px",threshold:1});return V.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()})]})},Wa=({imgProps:e,image1x:t,image2x:r,image1xWebp:n,image2xWebp:o,mobileImage1x:i,mobileImage2x:s,mobileImage1xWebp:a,mobileImage2xWebp:c,type:d,alt:m,bgColorClass:b,mobileMaxWidth:k=450,loading:_="lazy",...z})=>re.jsxs("picture",{...z,children:[i&&re.jsx("source",{srcSet:`${i} 1x${s?`, ${s} 2x`:""}`,media:`(max-width: ${k}px)`,type:d}),a&&re.jsx("source",{srcSet:`${a} 1x${c?`, ${c} 2x`:""}`,media:`(max-width: ${k}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:d}),re.jsx("img",{...e,className:rt(b,e==null?void 0:e.className),src:n||t,alt:m,loading:_})]});x.BasePicture=Wa,x.InfinityList=Ua,x.THEME=U,x.TIME=Tr,x.checkCorrectImageObject=$r,x.cn=rt,x.convertPhoneMask=Fr,x.getByKey=gt,x.getImagePrefix=Ze,x.getNumberFormatter=Vr,x.getSubdomain=Ur,x.getUploadImageUrl=te,x.parseStringToKeyValue=Gr,x.prepareColor=Br,x.prepareLocalMetaData=Wr,x.prepareServerImages=Ma,x.responseSchema=La,x.updateTextByTemplate=ue,x.useDisableScroll=Pr,x.useExtraMediumViewPort=Mr,x.useIsClient=Rr,x.useLaptopBigViewPort=Cr,x.useLaptopViewPort=jr,x.useMobileViewPort=Lr,x.useSmallViewPort=Dr,x.useTabletViewPort=Nr,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/index.d.ts
ADDED
|
@@ -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 @@
|
|
|
1
|
+
export declare const useDisableScroll: (isDisableScroll: boolean) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIsClient: () => boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const useLaptopBigViewPort: () => {
|
|
2
|
+
isLaptopBigMinWidth: boolean;
|
|
3
|
+
isLaptopBigMaxWidth: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const useLaptopViewPort: () => {
|
|
6
|
+
isLaptopMinWidth: boolean;
|
|
7
|
+
isLaptopMaxWidth: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const useTabletViewPort: () => {
|
|
10
|
+
isTabletMinWidth: boolean;
|
|
11
|
+
isTabletMaxWidth: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const useExtraMediumViewPort: () => {
|
|
14
|
+
isExtraMediumMinWidth: boolean;
|
|
15
|
+
isExtraMediumMaxWidth: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare const useMobileViewPort: () => {
|
|
18
|
+
isMobileMinWidth: boolean;
|
|
19
|
+
isMobileMaxWidth: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare const useSmallViewPort: () => {
|
|
22
|
+
isSmallMinWidth: boolean;
|
|
23
|
+
isSmallMaxWidth: boolean;
|
|
24
|
+
};
|
|
@@ -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,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Получить Intl для нужного языка
|
|
3
|
+
* @param local - Локаль
|
|
4
|
+
*/
|
|
5
|
+
export declare const getNumberFormatter: (local: string) => Intl.NumberFormat;
|
|
6
|
+
/**
|
|
7
|
+
* @description Получить значение по ключу
|
|
8
|
+
* @param obj - Объект
|
|
9
|
+
* @param key - Ключ
|
|
10
|
+
*/
|
|
11
|
+
export declare const getByKey: <T extends object, K extends keyof T>(obj: T, key: K) => T[K];
|
|
12
|
+
/**
|
|
13
|
+
* @description Преобразует value у инпута в поле маски телефона
|
|
14
|
+
* @param eventValue - исходное значение инпута
|
|
15
|
+
* @response Возвращает либо обработанную строку, либо пустую строку
|
|
16
|
+
* @example
|
|
17
|
+
* 79881234567 -> +79881234567
|
|
18
|
+
* 89881234567 -> +79881234567
|
|
19
|
+
* 19881234567 -> +19881234567
|
|
20
|
+
*/
|
|
21
|
+
export declare const convertPhoneMask: (eventValue: string) => string;
|
|
22
|
+
/**
|
|
23
|
+
* @description Получить корректный поддомен из адреса хоста
|
|
24
|
+
* @param host - url хоста
|
|
25
|
+
* @param SUB_DOMAIN - Объект ключ-значение со списком поддоменов
|
|
26
|
+
*/
|
|
27
|
+
export declare const getSubdomain: (host: string, SUB_DOMAIN: Record<string, string>) => string;
|
|
28
|
+
/**
|
|
29
|
+
* @description Заменяет текст по маске {{}}
|
|
30
|
+
* @param text - Исходный текст
|
|
31
|
+
* @param subdomain - Значение города, которое подставится
|
|
32
|
+
* @param SUBDOMAIN_NAME - Объект ключ-значение со списком поддоменов
|
|
33
|
+
* @param SUBDOMAIN_MASK - Объект ключ-значение со списком масок поддоменов
|
|
34
|
+
* @return Обновленная строка
|
|
35
|
+
*/
|
|
36
|
+
export declare const updateTextByTemplate: ({ text, subdomain, SUBDOMAIN_NAME, SUBDOMAIN_MASK, }: {
|
|
37
|
+
text: string;
|
|
38
|
+
subdomain: string;
|
|
39
|
+
SUBDOMAIN_NAME: Record<string, {
|
|
40
|
+
name: string;
|
|
41
|
+
declination: string;
|
|
42
|
+
region: string;
|
|
43
|
+
regionDeclination: string;
|
|
44
|
+
}>;
|
|
45
|
+
SUBDOMAIN_MASK: {
|
|
46
|
+
CITY: string;
|
|
47
|
+
CITY_DECL: string;
|
|
48
|
+
CITY_REGION: string;
|
|
49
|
+
CITY_REGION_DECL: string;
|
|
50
|
+
};
|
|
51
|
+
}) => string;
|
|
52
|
+
/**
|
|
53
|
+
* @description Заменят мета текст по маске, переданный напрямую
|
|
54
|
+
* @param subdomain - Поддомен
|
|
55
|
+
* @param metaData - Объект с title, descrption, keywords
|
|
56
|
+
* @param host - Хост сайта
|
|
57
|
+
* @param SUBDOMAIN_NAME - Объект ключ-значение со списком поддоменов
|
|
58
|
+
* @param SUBDOMAIN_MASK - Объект ключ-значение со списком масок поддоменов
|
|
59
|
+
* @param DEFAULT_SEO_TEXT - Объект ключ-значение со списком масок поддоменов
|
|
60
|
+
* @return Объект с мета тегами
|
|
61
|
+
*/
|
|
62
|
+
export declare const prepareLocalMetaData: <T extends object>({ subdomain, metaData, host, SUBDOMAIN_NAME, SUBDOMAIN_MASK, DEFAULT_SEO_TEXT, }: {
|
|
63
|
+
subdomain: string;
|
|
64
|
+
metaData: {
|
|
65
|
+
title: string;
|
|
66
|
+
description: string;
|
|
67
|
+
keywords: string;
|
|
68
|
+
canonical?: string;
|
|
69
|
+
};
|
|
70
|
+
host: string;
|
|
71
|
+
SUBDOMAIN_NAME: Record<string, {
|
|
72
|
+
name: string;
|
|
73
|
+
declination: string;
|
|
74
|
+
region: string;
|
|
75
|
+
regionDeclination: string;
|
|
76
|
+
}>;
|
|
77
|
+
SUBDOMAIN_MASK: {
|
|
78
|
+
CITY: string;
|
|
79
|
+
CITY_DECL: string;
|
|
80
|
+
CITY_REGION: string;
|
|
81
|
+
CITY_REGION_DECL: string;
|
|
82
|
+
};
|
|
83
|
+
DEFAULT_SEO_TEXT: {
|
|
84
|
+
title: string;
|
|
85
|
+
description: string;
|
|
86
|
+
keywords: string;
|
|
87
|
+
};
|
|
88
|
+
}) => T;
|
|
89
|
+
/**
|
|
90
|
+
* @description Превращает строку формата /catalog/price-from__1000--price-to__5000 в { price-from: '1000', price-to: '5000' }
|
|
91
|
+
* @param input - изначальная строка
|
|
92
|
+
* @return Объект с парами ключ-значение
|
|
93
|
+
*/
|
|
94
|
+
export declare const parseStringToKeyValue: <T extends object>(input: string) => T;
|
|
95
|
+
/**
|
|
96
|
+
* @description Конвентирует цвет из enum в строку
|
|
97
|
+
* @param color1 - цвет 1
|
|
98
|
+
* @param color2 - цвет 2
|
|
99
|
+
* @param notFoundText - текст при отсутствии цвета
|
|
100
|
+
* @param COLORS_NAMES - Объект ключ-значение со списком названий цветов
|
|
101
|
+
* @return Строка с названием цветов
|
|
102
|
+
*/
|
|
103
|
+
export declare const prepareColor: ({ color1, color2, notFoundText, COLORS_NAMES, }: {
|
|
104
|
+
color1: string;
|
|
105
|
+
color2?: string | null;
|
|
106
|
+
notFoundText: string;
|
|
107
|
+
COLORS_NAMES: Record<string, string>;
|
|
108
|
+
}) => string;
|
|
@@ -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,24 @@
|
|
|
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';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './image';
|
|
@@ -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,10 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
interface InfinityListProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
intersectionElementClassName?: string;
|
|
5
|
+
isNext: boolean;
|
|
6
|
+
onIntersection: () => void;
|
|
7
|
+
intersectionElement: () => ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const InfinityList: FC<InfinityListProps>;
|
|
10
|
+
export {};
|