extended-dynamic-forms 0.1.10 → 0.1.11
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/ExtendedForm.d.ts +4 -0
- package/dist/components/arrays/ArrayFieldItemTemplate.d.ts +3 -0
- package/dist/components/arrays/ArrayFieldTemplate.d.ts +3 -0
- package/dist/components/arrays/index.d.ts +2 -0
- package/dist/components/fields/AddressField.d.ts +4 -0
- package/dist/components/fields/CurrencyField.d.ts +4 -0
- package/dist/components/fields/PhoneField.d.ts +4 -0
- package/dist/components/index.d.ts +15 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/calendar.d.ts +8 -0
- package/dist/components/ui/card.d.ts +8 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/date-picker.d.ts +13 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/popover.d.ts +6 -0
- package/dist/components/ui/select.d.ts +13 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/textarea.d.ts +5 -0
- package/dist/events/FormEventContext.d.ts +20 -0
- package/dist/events/FormEventHub.d.ts +27 -0
- package/dist/events/FormEventManager.d.ts +10 -0
- package/dist/events/index.d.ts +4 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.es.js +11501 -0
- package/dist/index.umd.js +106 -0
- package/dist/layouts/grid/GridLayout.d.ts +11 -0
- package/dist/layouts/horizontal/HorizontalLayout.d.ts +10 -0
- package/dist/layouts/index.d.ts +3 -0
- package/dist/layouts/vertical/VerticalLayout.d.ts +9 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/style.css +1 -0
- package/dist/types/index.d.ts +47 -0
- package/dist/utils/formDataUtils.d.ts +22 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/schemaUtils.d.ts +24 -0
- package/dist/utils/validationUtils.d.ts +26 -0
- package/dist/vanilla-wrapper.d.ts +33 -0
- package/dist/widgets/date/DateWidget.d.ts +4 -0
- package/dist/widgets/enhanced/EnhancedWidgets.d.ts +36 -0
- package/dist/widgets/file/FileWidget.d.ts +4 -0
- package/dist/widgets/index.d.ts +33 -0
- package/dist/widgets/input/ColorWidget.d.ts +4 -0
- package/dist/widgets/input/RangeWidget.d.ts +4 -0
- package/dist/widgets/input/RatingWidget.d.ts +4 -0
- package/package.json +2 -2
- package/dist/extended-dynamic-forms-vanilla.js +0 -38
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
(function(T,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react/jsx-runtime"),require("react"),require("react-dom"),require("@rjsf/utils"),require("@rjsf/validator-ajv8"),require("@rjsf/shadcn"),require("@rjsf/core")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom","@rjsf/utils","@rjsf/validator-ajv8","@rjsf/shadcn","@rjsf/core"],m):(T=typeof globalThis<"u"?globalThis:T||self,m(T.ExtendedDynamicForms={},T.React.jsxRuntime,T.React,T.ReactDOM,T.RJSFUtils,T.RJSFValidatorAjv8,T.RJSFShadcn,T.RJSFCore))})(this,function(T,m,E,Ur,Kt,qr,oc,sc){"use strict";var ug=Object.defineProperty;var fg=(T,m,E)=>m in T?ug(T,m,{enumerable:!0,configurable:!0,writable:!0,value:E}):T[m]=E;var ot=(T,m,E)=>fg(T,typeof m!="symbol"?m+"":m,E);function Gr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const v=Gr(E),Xt=Gr(Ur);function Kr(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Kr(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Xr(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Kr(e))&&(r&&(r+=" "),r+=t);return r}const Dn="-",ac=e=>{const t=cc(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(Dn);return a[0]===""&&a.length!==1&&a.shift(),Qr(a,t)||ic(i)},getConflictingClassGroupIds:(i,a)=>{const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},Qr=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Qr(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Dn);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},Zr=/^\[(.+)\]$/,ic=e=>{if(Zr.test(e)){const t=Zr.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},cc=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return dc(Object.entries(e.classGroups),n).forEach(([s,i])=>{Tn(i,r,s,t)}),r},Tn=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Jr(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(lc(o)){Tn(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Tn(i,Jr(t,s),n,r)})})},Jr=(e,t)=>{let n=e;return t.split(Dn).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},lc=e=>e.isThemeGetter,dc=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e,uc=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},eo="!",fc=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,i=a=>{const c=[];let l=0,u=0,d;for(let b=0;b<a.length;b++){let p=a[b];if(l===0){if(p===o&&(r||a.slice(b,b+s)===t)){c.push(a.slice(u,b)),u=b+s;continue}if(p==="/"){d=b;continue}}p==="["?l++:p==="]"&&l--}const f=c.length===0?a:a.substring(u),g=f.startsWith(eo),x=g?f.substring(1):f,h=d&&d>u?d-u:void 0;return{modifiers:c,hasImportantModifier:g,baseClassName:x,maybePostfixModifierPosition:h}};return n?a=>n({className:a,parseClassName:i}):i},hc=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},mc=e=>({cache:uc(e.cacheSize),parseClassName:fc(e),...ac(e)}),pc=/\s+/,gc=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],i=e.trim().split(pc);let a="";for(let c=i.length-1;c>=0;c-=1){const l=i[c],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:g}=n(l);let x=!!g,h=r(x?f.substring(0,g):f);if(!h){if(!x){a=l+(a.length>0?" "+a:a);continue}if(h=r(f),!h){a=l+(a.length>0?" "+a:a);continue}x=!1}const b=hc(u).join(":"),p=d?b+eo:b,y=p+h;if(s.includes(y))continue;s.push(y);const w=o(h,x);for(let S=0;S<w.length;++S){const C=w[S];s.push(p+C)}a=l+(a.length>0?" "+a:a)}return a};function vc(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=to(t))&&(r&&(r+=" "),r+=n);return r}const to=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=to(e[r]))&&(n&&(n+=" "),n+=t);return n};function yc(e,...t){let n,r,o,s=i;function i(c){const l=t.reduce((u,d)=>d(u),e());return n=mc(l),r=n.cache.get,o=n.cache.set,s=a,a(c)}function a(c){const l=r(c);if(l)return l;const u=gc(c,n);return o(c,u),u}return function(){return s(vc.apply(null,arguments))}}const re=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},no=/^\[(?:([a-z-]+):)?(.+)\]$/i,bc=/^\d+\/\d+$/,wc=new Set(["px","full","screen"]),xc=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Cc=/\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$/,Sc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,kc=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ec=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Le=e=>ht(e)||wc.has(e)||bc.test(e),qe=e=>mt(e,"length",Wc),ht=e=>!!e&&!Number.isNaN(Number(e)),An=e=>mt(e,"number",ht),At=e=>!!e&&Number.isInteger(Number(e)),Mc=e=>e.endsWith("%")&&ht(e.slice(0,-1)),V=e=>no.test(e),Ge=e=>xc.test(e),Nc=new Set(["length","size","percentage"]),Oc=e=>mt(e,Nc,ro),Pc=e=>mt(e,"position",ro),Dc=new Set(["image","url"]),Tc=e=>mt(e,Dc,Fc),Ac=e=>mt(e,"",_c),Wt=()=>!0,mt=(e,t,n)=>{const r=no.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Wc=e=>Cc.test(e)&&!Sc.test(e),ro=()=>!1,_c=e=>kc.test(e),Fc=e=>Ec.test(e),Ic=yc(()=>{const e=re("colors"),t=re("spacing"),n=re("blur"),r=re("brightness"),o=re("borderColor"),s=re("borderRadius"),i=re("borderSpacing"),a=re("borderWidth"),c=re("contrast"),l=re("grayscale"),u=re("hueRotate"),d=re("invert"),f=re("gap"),g=re("gradientColorStops"),x=re("gradientColorStopPositions"),h=re("inset"),b=re("margin"),p=re("opacity"),y=re("padding"),w=re("saturate"),S=re("scale"),C=re("sepia"),M=re("skew"),k=re("space"),O=re("translate"),_=()=>["auto","contain","none"],W=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto",V,t],N=()=>[V,t],I=()=>["",Le,qe],z=()=>["auto",ht,V],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],D=()=>["start","end","center","between","around","evenly","stretch"],B=()=>["","0",V],R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>[ht,V];return{cacheSize:500,separator:":",theme:{colors:[Wt],spacing:[Le,qe],blur:["none","",Ge,V],brightness:oe(),borderColor:[e],borderRadius:["none","","full",Ge,V],borderSpacing:N(),borderWidth:I(),contrast:oe(),grayscale:B(),hueRotate:oe(),invert:B(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[Mc,qe],inset:P(),margin:P(),opacity:oe(),padding:N(),saturate:oe(),scale:oe(),sepia:B(),skew:oe(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",V]}],container:["container"],columns:[{columns:[Ge]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"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"],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:[...Y(),V]}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",At,V]}],basis:[{basis:P()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",V]}],grow:[{grow:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",At,V]}],"grid-cols":[{"grid-cols":[Wt]}],"col-start-end":[{col:["auto",{span:["full",At,V]},V]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[Wt]}],"row-start-end":[{row:["auto",{span:[At,V]},V]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",V]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",V]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...D()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...D(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...D(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",V,t]}],"min-w":[{"min-w":[V,t,"min","max","fit"]}],"max-w":[{"max-w":[V,t,"none","full","min","max","fit","prose",{screen:[Ge]},Ge]}],h:[{h:[V,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[V,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[V,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[V,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ge,qe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",An]}],"font-family":[{font:[Wt]}],"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:["tighter","tight","normal","wide","wider","widest",V]}],"line-clamp":[{"line-clamp":["none",ht,An]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Le,V]}],"list-image":[{"list-image":["none",V]}],"list-style-type":[{list:["none","disc","decimal",V]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[p]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Le,qe]}],"underline-offset":[{"underline-offset":["auto",Le,V]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",V]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",V]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[p]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),Pc]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Oc]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Tc]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[p]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[p]}],"divide-style":[{divide:L()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[Le,V]}],"outline-w":[{outline:[Le,qe]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[Le,qe]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ge,Ac]}],"shadow-color":[{shadow:[Wt]}],opacity:[{opacity:[p]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Ge,V]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[p]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",V]}],duration:[{duration:oe()}],ease:[{ease:["linear","in","out","in-out",V]}],delay:[{delay:oe()}],animate:[{animate:["none","spin","ping","pulse","bounce",V]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[At,V]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",V]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",V]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",V]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Le,qe,An]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}});function F(...e){return Ic(Xr(e))}const le=v.forwardRef(({className:e,type:t,...n},r)=>m.jsx("input",{type:t,className:F("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));le.displayName="Input";function oo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function so(...e){return t=>{let n=!1;const r=e.map(o=>{const s=oo(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():oo(e[o],null)}}}}function Z(...e){return v.useCallback(so(...e),e)}function pt(e){const t=Lc(e),n=v.forwardRef((r,o)=>{const{children:s,...i}=r,a=v.Children.toArray(s),c=a.find(Vc);if(c){const l=c.props.children,u=a.map(d=>d===c?v.Children.count(l)>1?v.Children.only(null):v.isValidElement(l)?l.props.children:null:d);return m.jsx(t,{...i,ref:o,children:v.isValidElement(l)?v.cloneElement(l,void 0,u):null})}return m.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var Bc=pt("Slot");function Lc(e){const t=v.forwardRef((n,r)=>{const{children:o,...s}=n;if(v.isValidElement(o)){const i=Yc(o),a=Hc(s,o.props);return o.type!==v.Fragment&&(a.ref=r?so(r,i):i),v.cloneElement(o,a)}return v.Children.count(o)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $c=Symbol("radix.slottable");function Vc(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$c}function Hc(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Yc(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var zc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],q=zc.reduce((e,t)=>{const n=pt(`Primitive.${t}`),r=v.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function jc(e,t){e&&Xt.flushSync(()=>e.dispatchEvent(t))}var Rc="Label",ao=v.forwardRef((e,t)=>m.jsx(q.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ao.displayName=Rc;var io=ao;const co=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,lo=Xr,Wn=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return lo(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(l=>{const u=n==null?void 0:n[l],d=s==null?void 0:s[l];if(u===null)return null;const f=co(u)||co(d);return o[l][f]}),a=n&&Object.entries(n).reduce((l,u)=>{let[d,f]=u;return f===void 0||(l[d]=f),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,u)=>{let{class:d,className:f,...g}=u;return Object.entries(g).every(x=>{let[h,b]=x;return Array.isArray(b)?b.includes({...s,...a}[h]):{...s,...a}[h]===b})?[...l,d,f]:l},[]);return lo(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},Uc=Wn("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),pe=v.forwardRef(({className:e,...t},n)=>m.jsx(io,{ref:n,className:F(Uc(),e),...t}));pe.displayName=io.displayName;const Qt=v.forwardRef(({className:e,...t},n)=>m.jsx("div",{ref:n,className:F("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Qt.displayName="Card";const _n=v.forwardRef(({className:e,...t},n)=>m.jsx("div",{ref:n,className:F("flex flex-col space-y-1.5 p-6",e),...t}));_n.displayName="CardHeader";const uo=v.forwardRef(({className:e,...t},n)=>m.jsx("h3",{ref:n,className:F("text-2xl font-semibold leading-none tracking-tight",e),...t}));uo.displayName="CardTitle";const qc=v.forwardRef(({className:e,...t},n)=>m.jsx("p",{ref:n,className:F("text-sm text-muted-foreground",e),...t}));qc.displayName="CardDescription";const Zt=v.forwardRef(({className:e,...t},n)=>m.jsx("div",{ref:n,className:F("p-6 pt-0",e),...t}));Zt.displayName="CardContent";const Gc=v.forwardRef(({className:e,...t},n)=>m.jsx("div",{ref:n,className:F("flex items-center p-6 pt-0",e),...t}));Gc.displayName="CardFooter";const fo=({formData:e,onChange:t,required:n,disabled:r,readonly:o,schema:s,idSchema:i})=>{const a=c=>l=>{t({...e,[c]:l.target.value})};return m.jsxs(Qt,{children:[m.jsx(_n,{className:"pb-4",children:m.jsx(uo,{className:"text-lg",children:s.title||"Address"})}),m.jsxs(Zt,{className:"space-y-4",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsxs(pe,{htmlFor:`${i.$id}_street`,children:["Street Address",n&&m.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),m.jsx(le,{id:`${i.$id}_street`,type:"text",value:(e==null?void 0:e.street)||"",onChange:a("street"),disabled:r||o,placeholder:"123 Main St"})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsxs(pe,{htmlFor:`${i.$id}_city`,children:["City",n&&m.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),m.jsx(le,{id:`${i.$id}_city`,type:"text",value:(e==null?void 0:e.city)||"",onChange:a("city"),disabled:r||o,placeholder:"New York"})]}),m.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsxs(pe,{htmlFor:`${i.$id}_state`,children:["State/Province",n&&m.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),m.jsx(le,{id:`${i.$id}_state`,type:"text",value:(e==null?void 0:e.state)||"",onChange:a("state"),disabled:r||o,placeholder:"NY"})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsxs(pe,{htmlFor:`${i.$id}_zip`,children:["ZIP/Postal Code",n&&m.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),m.jsx(le,{id:`${i.$id}_zip`,type:"text",value:(e==null?void 0:e.zip)||"",onChange:a("zip"),disabled:r||o,placeholder:"10001"})]})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(pe,{htmlFor:`${i.$id}_country`,children:"Country"}),m.jsx(le,{id:`${i.$id}_country`,type:"text",value:(e==null?void 0:e.country)||"",onChange:a("country"),disabled:r||o,placeholder:"United States"})]})]})]})},ho=E.createContext(null),mo=({eventHub:e,formData:t,children:n})=>m.jsx(ho.Provider,{value:{eventHub:e,formData:t},children:n}),po=()=>{const e=E.useContext(ho);if(!e)throw new Error("useFormEventHub must be used within a FormEventProvider");return e},ie=(e,t,n)=>{const{eventHub:r,formData:o}=po();return E.useMemo(()=>r.createFieldEventHandlers(e,t,o,n),[r,e,t,o,n])},go=({formData:e,onChange:t,required:n,disabled:r,readonly:o,schema:s,idSchema:i})=>{const a=ie(i.$id,s),c=u=>{const d=u.replace(/\D/g,""),f=d.length;return f<4?d:f<7?`(${d.slice(0,3)}) ${d.slice(3)}`:`(${d.slice(0,3)}) ${d.slice(3,6)}-${d.slice(6,10)}`},l=async u=>{const d=c(u.target.value);t(d),await a.onChange(d)};return m.jsxs("div",{className:"space-y-2",children:[m.jsxs(pe,{htmlFor:i.$id,children:[s.title||"Phone Number",n&&m.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),m.jsx(le,{id:i.$id,type:"tel",value:e||"",onChange:l,disabled:r||o,placeholder:"(555) 123-4567",maxLength:14})]})},vo=({formData:e,onChange:t,required:n,disabled:r,readonly:o,schema:s,uiSchema:i,idSchema:a})=>{var x,h;const c=((x=i==null?void 0:i["ui:options"])==null?void 0:x.currency)||"USD",l=((h=i==null?void 0:i["ui:options"])==null?void 0:h.symbol)||"$",u=ie(a.$id,s),d=b=>{const p=parseFloat(b.replace(/[^0-9.-]+/g,""));return isNaN(p)?"":p.toFixed(2)},f=async b=>{const p=b.target.value.replace(/[^0-9.-]+/g,""),y=p?parseFloat(p):void 0;t(y),await u.onChange(y)},g=async b=>{const p=d(b.target.value),y=p?parseFloat(p):void 0;t(y),await u.onBlur(y)};return m.jsxs("div",{className:"space-y-2",children:[m.jsxs(pe,{htmlFor:a.$id,children:[s.title||"Amount",n&&m.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),m.jsxs("div",{className:"relative",children:[m.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:String(l)}),m.jsx(le,{id:a.$id,type:"text",inputMode:"decimal",value:e||"",onChange:f,onBlur:g,disabled:r||o,placeholder:"0.00",className:"pl-8 pr-12"}),m.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:String(c)})]})]})},Fn=Wn("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),$e=v.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?Bc:"button";return m.jsx(i,{className:F(Fn({variant:t,size:n,className:e})),ref:s,...o})});$e.displayName="Button";/**
|
|
2
|
+
* @license lucide-react v0.303.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/var Kc={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
7
|
+
* @license lucide-react v0.303.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const Xc=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),Pe=(e,t)=>{const n=E.forwardRef(({color:r="currentColor",size:o=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:a="",children:c,...l},u)=>E.createElement("svg",{ref:u,...Kc,width:o,height:o,stroke:r,strokeWidth:i?Number(s)*24/Number(o):s,className:["lucide",`lucide-${Xc(e)}`,a].join(" "),...l},[...t.map(([d,f])=>E.createElement(d,f)),...Array.isArray(c)?c:[c]]));return n.displayName=`${e}`,n};/**
|
|
12
|
+
* @license lucide-react v0.303.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const Qc=Pe("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]);/**
|
|
17
|
+
* @license lucide-react v0.303.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const yo=Pe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
22
|
+
* @license lucide-react v0.303.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const In=Pe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
27
|
+
* @license lucide-react v0.303.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const Zc=Pe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
32
|
+
* @license lucide-react v0.303.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const Jc=Pe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
37
|
+
* @license lucide-react v0.303.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/const bo=Pe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
42
|
+
* @license lucide-react v0.303.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const el=Pe("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
47
|
+
* @license lucide-react v0.303.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/const tl=Pe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
52
|
+
* @license lucide-react v0.303.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const nl=Pe("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
|
|
57
|
+
* @license lucide-react v0.303.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/const Bn=Pe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),wo=e=>{const{canAdd:t,disabled:n,idSchema:r,uiSchema:o,items:s,onAddClick:i,readonly:a,registry:c,required:l,schema:u,title:d}=e,f=Kt.getUiOptions(o),g=Kt.getTemplate("ArrayFieldDescriptionTemplate",c,f),x=Kt.getTemplate("ArrayFieldItemTemplate",c,f),h=Kt.getTemplate("ArrayFieldTitleTemplate",c,f);return m.jsx("div",{className:F("rjsf-array-field",f.classNames),children:m.jsxs(Qt,{className:"border-slate-200",children:[(d||f.title)&&m.jsxs(_n,{className:"pb-3",children:[m.jsx(h,{idSchema:r,title:f.title||d,required:l,schema:u,uiSchema:o,registry:c}),(f.description||u.description)&&m.jsx(g,{idSchema:r,description:f.description||u.description,schema:u,uiSchema:o,registry:c})]}),m.jsxs(Zt,{className:"space-y-3",children:[s&&s.map(({key:b,...p})=>m.jsx(x,{...p},b)),t&&m.jsxs($e,{type:"button",onClick:i,disabled:n||a,size:"sm",variant:"outline",className:"w-full border-dashed",children:[m.jsx(tl,{className:"h-4 w-4 mr-2"}),"Add ",d||"Item"]})]})]})})},xo=e=>{const{children:t,disabled:n,hasToolbar:r,buttonsProps:o,readonly:s}=e,{hasMoveDown:i,hasMoveUp:a,hasRemove:c,index:l,onDropIndexClick:u,onReorderClick:d}=o;return m.jsx(Qt,{className:"relative border-slate-200",children:m.jsxs(Zt,{className:"p-4",children:[r&&m.jsxs("div",{className:"absolute right-2 top-2 flex items-center gap-1",children:[(a||i)&&m.jsx("div",{className:"flex items-center mr-2",children:m.jsx(el,{className:"h-4 w-4 text-slate-400"})}),a&&m.jsx($e,{type:"button",size:"sm",variant:"ghost",disabled:n||s,onClick:d(l,l-1),className:"h-8 w-8 p-0",title:"Move up",children:m.jsx(bo,{className:"h-4 w-4"})}),i&&m.jsx($e,{type:"button",size:"sm",variant:"ghost",disabled:n||s,onClick:d(l,l+1),className:"h-8 w-8 p-0",title:"Move down",children:m.jsx(In,{className:"h-4 w-4"})}),c&&m.jsx($e,{type:"button",size:"sm",variant:"ghost",disabled:n||s,onClick:u(l),className:"h-8 w-8 p-0 text-destructive hover:text-destructive",title:"Remove",children:m.jsx(Bn,{className:"h-4 w-4"})})]}),m.jsx("div",{className:F(r&&"pr-24"),children:t})]})})},Co={address:fo,phone:go,currency:vo},So={ArrayFieldTemplate:wo,ArrayFieldItemTemplate:xo},ko=({id:e,value:t,required:n,disabled:r,readonly:o,label:s,onChange:i,onBlur:a,onFocus:c,schema:l})=>{const u=ie(e,l),d=async x=>{const h=x.target.value;i(h),await u.onChange(h)},f=async x=>{const h=x.target.value;a&&a(e,h),await u.onBlur(h)},g=async x=>{const h=x.target.value;c&&c(e,h),await u.onFocus(h)};return m.jsxs("div",{className:"space-y-2",children:[m.jsxs(pe,{htmlFor:e,children:[s||l.title,n&&m.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),m.jsx(le,{id:e,type:"color",value:t||"#000000",required:n,disabled:r||o,onChange:d,onBlur:f,onFocus:g,className:"h-10 w-full cursor-pointer"})]})},rl=({id:e,value:t,required:n,disabled:r,readonly:o,label:s,onChange:i,onBlur:a,onFocus:c,options:l,schema:u})=>{const d=l.inputType||"date",f=ie(e,u),g=async b=>{const p=b.target.value;i(p),await f.onChange(p)},x=async b=>{const p=b.target.value;a&&a(e,p),await f.onBlur(p)},h=async b=>{const p=b.target.value;c&&c(e,p),await f.onFocus(p)};return m.jsxs("div",{className:"space-y-2",children:[m.jsxs(pe,{htmlFor:e,children:[s||u.title,n&&m.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),m.jsx(le,{id:e,type:d,value:t||"",required:n,disabled:r||o,onChange:g,onBlur:x,onFocus:h,min:typeof l.minDate=="string"||typeof l.minDate=="number"?l.minDate:void 0,max:typeof l.maxDate=="string"||typeof l.maxDate=="number"?l.maxDate:void 0,className:"w-full"})]})},ol=Wn("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Eo({className:e,variant:t,...n}){return m.jsx("div",{className:F(ol({variant:t}),e),...n})}const Mo=({id:e,value:t,required:n,disabled:r,readonly:o,label:s,onChange:i,options:a,schema:c})=>{const l=E.useRef(null),u=a.accept||"*/*",d=a.multiple||!1,f=ie(e,c),g=async b=>{const p=b.target.files;if(!p)return;let y;if(d){const w=Array.from(p).map(S=>({name:S.name,size:S.size,type:S.type,lastModified:S.lastModified}));y=w,i(w)}else{const w=p[0];w&&(y={name:w.name,size:w.size,type:w.type,lastModified:w.lastModified},i(y))}y&&await f.onChange(y)},x=async()=>{l.current&&(l.current.value=""),i(null),await f.onChange(null)},h=b=>b<1024?b+" B":b<1024*1024?(b/1024).toFixed(1)+" KB":(b/(1024*1024)).toFixed(1)+" MB";return m.jsxs("div",{className:"space-y-2",children:[m.jsxs(pe,{htmlFor:e,children:[s||c.title,n&&m.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),m.jsx(le,{ref:l,id:e,type:"file",accept:u,multiple:d,required:n,disabled:r||o,onChange:g,className:"cursor-pointer"}),t&&m.jsx("div",{className:"space-y-2",children:d&&Array.isArray(t)?m.jsx("div",{className:"flex flex-wrap gap-2",children:t.map((b,p)=>m.jsxs(Eo,{variant:"secondary",className:"flex items-center gap-1 pr-1",children:[m.jsxs("span",{className:"text-xs",children:[b.name," (",h(b.size),")"]}),!r&&!o&&m.jsx($e,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-transparent",onClick:x,children:m.jsx(Bn,{className:"h-3 w-3"})})]},p))}):t&&typeof t=="object"&&"name"in t?m.jsxs(Eo,{variant:"secondary",className:"inline-flex items-center gap-1 pr-1",children:[m.jsxs("span",{className:"text-xs",children:[t.name," (",h(t.size),")"]}),!r&&!o&&m.jsx($e,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-transparent",onClick:x,children:m.jsx(Bn,{className:"h-3 w-3"})})]}):null})]})};function Jt(e,[t,n]){return Math.min(n,Math.max(t,e))}function U(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function gt(e,t=[]){let n=[];function r(s,i){const a=v.createContext(i),c=n.length;n=[...n,i];const l=d=>{var p;const{scope:f,children:g,...x}=d,h=((p=f==null?void 0:f[e])==null?void 0:p[c])||a,b=v.useMemo(()=>x,Object.values(x));return m.jsx(h.Provider,{value:b,children:g})};l.displayName=s+"Provider";function u(d,f){var h;const g=((h=f==null?void 0:f[e])==null?void 0:h[c])||a,x=v.useContext(g);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[l,u]}const o=()=>{const s=n.map(i=>v.createContext(i));return function(a){const c=(a==null?void 0:a[e])||s;return v.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,sl(o,...t)]}function sl(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:c,scopeName:l})=>{const d=c(s)[`__scope${l}`];return{...a,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var ue=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},al=v[" useInsertionEffect ".trim().toString()]||ue;function _t({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=il({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:o;{const u=v.useRef(e!==void 0);v.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}const l=v.useCallback(u=>{var d;if(a){const f=cl(u)?u(e):u;f!==e&&((d=i.current)==null||d.call(i,f))}else s(u)},[a,e,s,i]);return[c,l]}function il({defaultProp:e,onChange:t}){const[n,r]=v.useState(e),o=v.useRef(n),s=v.useRef(t);return al(()=>{s.current=t},[t]),v.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function cl(e){return typeof e=="function"}var ll=v.createContext(void 0);function No(e){const t=v.useContext(ll);return e||t||"ltr"}function Ln(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function $n(e){const[t,n]=v.useState(void 0);return ue(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,a=l.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Oo(e){const t=e+"CollectionProvider",[n,r]=gt(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:b,children:p}=h,y=E.useRef(null),w=E.useRef(new Map).current;return m.jsx(o,{scope:b,itemMap:w,collectionRef:y,children:p})};i.displayName=t;const a=e+"CollectionSlot",c=pt(a),l=E.forwardRef((h,b)=>{const{scope:p,children:y}=h,w=s(a,p),S=Z(b,w.collectionRef);return m.jsx(c,{ref:S,children:y})});l.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=pt(u),g=E.forwardRef((h,b)=>{const{scope:p,children:y,...w}=h,S=E.useRef(null),C=Z(b,S),M=s(u,p);return E.useEffect(()=>(M.itemMap.set(S,{ref:S,...w}),()=>void M.itemMap.delete(S))),m.jsx(f,{[d]:"",ref:C,children:y})});g.displayName=u;function x(h){const b=s(e+"CollectionConsumer",h);return E.useCallback(()=>{const y=b.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((M,k)=>w.indexOf(M.ref.current)-w.indexOf(k.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:l,ItemSlot:g},x,r]}var Po=["PageUp","PageDown"],Do=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],To={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},vt="Slider",[Vn,dl,ul]=Oo(vt),[Ao,mg]=gt(vt,[ul]),[fl,en]=Ao(vt),Wo=v.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:s=1,orientation:i="horizontal",disabled:a=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:g=!1,form:x,...h}=e,b=v.useRef(new Set),p=v.useRef(0),w=i==="horizontal"?hl:ml,[S=[],C]=_t({prop:u,defaultProp:l,onChange:P=>{var I;(I=[...b.current][p.current])==null||I.focus(),d(P)}}),M=v.useRef(S);function k(P){const N=bl(S,P);W(P,N)}function O(P){W(P,p.current)}function _(){const P=M.current[p.current];S[p.current]!==P&&f(S)}function W(P,N,{commit:I}={commit:!1}){const z=Sl(s),Y=kl(Math.round((P-r)/s)*s+r,z),L=Jt(Y,[r,o]);C((H=[])=>{const D=vl(H,L,N);if(Cl(D,c*s)){p.current=D.indexOf(L);const B=String(D)!==String(H);return B&&I&&f(D),B?D:H}else return H})}return m.jsx(fl,{scope:e.__scopeSlider,name:n,disabled:a,min:r,max:o,valueIndexToChangeRef:p,thumbs:b.current,values:S,orientation:i,form:x,children:m.jsx(Vn.Provider,{scope:e.__scopeSlider,children:m.jsx(Vn.Slot,{scope:e.__scopeSlider,children:m.jsx(w,{"aria-disabled":a,"data-disabled":a?"":void 0,...h,ref:t,onPointerDown:U(h.onPointerDown,()=>{a||(M.current=S)}),min:r,max:o,inverted:g,onSlideStart:a?void 0:k,onSlideMove:a?void 0:O,onSlideEnd:a?void 0:_,onHomeKeyDown:()=>!a&&W(r,0,{commit:!0}),onEndKeyDown:()=>!a&&W(o,S.length-1,{commit:!0}),onStepKeyDown:({event:P,direction:N})=>{if(!a){const Y=Po.includes(P.key)||P.shiftKey&&Do.includes(P.key)?10:1,L=p.current,H=S[L],D=s*Y*N;W(H+D,L,{commit:!0})}}})})})})});Wo.displayName=vt;var[_o,Fo]=Ao(vt,{startEdge:"left",endEdge:"right",size:"width",direction:1}),hl=v.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:s,onSlideStart:i,onSlideMove:a,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=v.useState(null),g=Z(t,w=>f(w)),x=v.useRef(void 0),h=No(o),b=h==="ltr",p=b&&!s||!b&&s;function y(w){const S=x.current||d.getBoundingClientRect(),C=[0,S.width],k=zn(C,p?[n,r]:[r,n]);return x.current=S,k(w-S.left)}return m.jsx(_o,{scope:e.__scopeSlider,startEdge:p?"left":"right",endEdge:p?"right":"left",direction:p?1:-1,size:"width",children:m.jsx(Io,{dir:h,"data-orientation":"horizontal",...u,ref:g,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const S=y(w.clientX);i==null||i(S)},onSlideMove:w=>{const S=y(w.clientX);a==null||a(S)},onSlideEnd:()=>{x.current=void 0,c==null||c()},onStepKeyDown:w=>{const C=To[p?"from-left":"from-right"].includes(w.key);l==null||l({event:w,direction:C?-1:1})}})})}),ml=v.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:s,onSlideMove:i,onSlideEnd:a,onStepKeyDown:c,...l}=e,u=v.useRef(null),d=Z(t,u),f=v.useRef(void 0),g=!o;function x(h){const b=f.current||u.current.getBoundingClientRect(),p=[0,b.height],w=zn(p,g?[r,n]:[n,r]);return f.current=b,w(h-b.top)}return m.jsx(_o,{scope:e.__scopeSlider,startEdge:g?"bottom":"top",endEdge:g?"top":"bottom",size:"height",direction:g?1:-1,children:m.jsx(Io,{"data-orientation":"vertical",...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:h=>{const b=x(h.clientY);s==null||s(b)},onSlideMove:h=>{const b=x(h.clientY);i==null||i(b)},onSlideEnd:()=>{f.current=void 0,a==null||a()},onStepKeyDown:h=>{const p=To[g?"from-bottom":"from-top"].includes(h.key);c==null||c({event:h,direction:p?-1:1})}})})}),Io=v.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:s,onHomeKeyDown:i,onEndKeyDown:a,onStepKeyDown:c,...l}=e,u=en(vt,n);return m.jsx(q.span,{...l,ref:t,onKeyDown:U(e.onKeyDown,d=>{d.key==="Home"?(i(d),d.preventDefault()):d.key==="End"?(a(d),d.preventDefault()):Po.concat(Do).includes(d.key)&&(c(d),d.preventDefault())}),onPointerDown:U(e.onPointerDown,d=>{const f=d.target;f.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(f)?f.focus():r(d)}),onPointerMove:U(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:U(e.onPointerUp,d=>{const f=d.target;f.hasPointerCapture(d.pointerId)&&(f.releasePointerCapture(d.pointerId),s(d))})})}),Bo="SliderTrack",Lo=v.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=en(Bo,n);return m.jsx(q.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});Lo.displayName=Bo;var Hn="SliderRange",$o=v.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=en(Hn,n),s=Fo(Hn,n),i=v.useRef(null),a=Z(t,i),c=o.values.length,l=o.values.map(f=>Yo(f,o.min,o.max)),u=c>1?Math.min(...l):0,d=100-Math.max(...l);return m.jsx(q.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:a,style:{...e.style,[s.startEdge]:u+"%",[s.endEdge]:d+"%"}})});$o.displayName=Hn;var Yn="SliderThumb",Vo=v.forwardRef((e,t)=>{const n=dl(e.__scopeSlider),[r,o]=v.useState(null),s=Z(t,a=>o(a)),i=v.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return m.jsx(pl,{...e,ref:s,index:i})}),pl=v.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...s}=e,i=en(Yn,n),a=Fo(Yn,n),[c,l]=v.useState(null),u=Z(t,y=>l(y)),d=c?i.form||!!c.closest("form"):!0,f=$n(c),g=i.values[r],x=g===void 0?0:Yo(g,i.min,i.max),h=yl(r,i.values.length),b=f==null?void 0:f[a.size],p=b?wl(b,x,a.direction):0;return v.useEffect(()=>{if(c)return i.thumbs.add(c),()=>{i.thumbs.delete(c)}},[c,i.thumbs]),m.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${x}% + ${p}px)`},children:[m.jsx(Vn.ItemSlot,{scope:e.__scopeSlider,children:m.jsx(q.span,{role:"slider","aria-label":e["aria-label"]||h,"aria-valuemin":i.min,"aria-valuenow":g,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...s,ref:u,style:g===void 0?{display:"none"}:e.style,onFocus:U(e.onFocus,()=>{i.valueIndexToChangeRef.current=r})})}),d&&m.jsx(Ho,{name:o??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:g},r)]})});Vo.displayName=Yn;var gl="RadioBubbleInput",Ho=v.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=v.useRef(null),s=Z(o,r),i=Ln(t);return v.useEffect(()=>{const a=o.current;if(!a)return;const c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&u){const d=new Event("input",{bubbles:!0});u.call(a,t),a.dispatchEvent(d)}},[i,t]),m.jsx(q.input,{style:{display:"none"},...n,ref:s,defaultValue:t})});Ho.displayName=gl;function vl(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,s)=>o-s)}function Yo(e,t,n){const s=100/(n-t)*(e-t);return Jt(s,[0,100])}function yl(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function bl(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function wl(e,t,n){const r=e/2,s=zn([0,50],[0,r]);return(r-s(t)*n)*n}function xl(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Cl(e,t){if(t>0){const n=xl(e);return Math.min(...n)>=t}return!0}function zn(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Sl(e){return(String(e).split(".")[1]||"").length}function kl(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var zo=Wo,El=Lo,Ml=$o,Nl=Vo;const jo=v.forwardRef(({className:e,...t},n)=>m.jsxs(zo,{ref:n,className:F("relative flex w-full touch-none select-none items-center",e),...t,children:[m.jsx(El,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:m.jsx(Ml,{className:"absolute h-full bg-primary"})}),m.jsx(Nl,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));jo.displayName=zo.displayName;const Ro=({id:e,value:t,required:n,disabled:r,readonly:o,label:s,onChange:i,onBlur:a,schema:c})=>{const l=c.minimum||0,u=c.maximum||100,d=c.multipleOf||1,f=ie(e,c),g=async x=>{const h=x[0];i(h),a&&a(e,h),await f.onChange(h)};return m.jsxs("div",{className:"space-y-2",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs(pe,{htmlFor:e,children:[s||c.title,n&&m.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),m.jsx("span",{className:"text-sm font-medium tabular-nums",children:t||l})]}),m.jsx(jo,{id:e,min:l,max:u,step:d,value:[t||l],onValueChange:g,disabled:r||o,className:"w-full"})]})},Uo=({id:e,value:t,required:n,disabled:r,readonly:o,label:s,onChange:i,options:a,schema:c})=>{const l=Number(a.max||c.maximum||5),u=Array.from({length:l},(g,x)=>x+1),d=ie(e,c),f=async g=>{!r&&!o&&(i(g),await d.onChange(g))};return m.jsxs("div",{className:"space-y-2",children:[m.jsxs(pe,{htmlFor:e,children:[s||c.title,n&&m.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),m.jsx("div",{className:"flex items-center gap-1",role:"radiogroup","aria-labelledby":e,children:u.map(g=>m.jsx($e,{type:"button",variant:"ghost",size:"icon",className:F("h-8 w-8 p-0 hover:bg-transparent",r||o?"cursor-not-allowed opacity-50":"cursor-pointer"),onClick:()=>f(g),disabled:r||o,"aria-label":`Rate ${g} out of ${l}`,role:"radio","aria-checked":g===t,children:m.jsx(nl,{className:F("h-5 w-5 transition-colors",g<=(t||0)?"fill-yellow-400 text-yellow-400":"text-muted-foreground")})},g))})]})},qo=v.forwardRef(({className:e,...t},n)=>m.jsx("textarea",{className:F("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));qo.displayName="Textarea";function st(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ol(e,t=globalThis==null?void 0:globalThis.document){const n=st(e);v.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Pl="DismissableLayer",jn="dismissableLayer.update",Dl="dismissableLayer.pointerDownOutside",Tl="dismissableLayer.focusOutside",Go,Ko=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rn=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,l=v.useContext(Ko),[u,d]=v.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=v.useState({}),x=Z(t,k=>d(k)),h=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),p=h.indexOf(b),y=u?h.indexOf(u):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,S=y>=p,C=_l(k=>{const O=k.target,_=[...l.branches].some(W=>W.contains(O));!S||_||(o==null||o(k),i==null||i(k),k.defaultPrevented||a==null||a())},f),M=Fl(k=>{const O=k.target;[...l.branches].some(W=>W.contains(O))||(s==null||s(k),i==null||i(k),k.defaultPrevented||a==null||a())},f);return Ol(k=>{y===l.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},f),v.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Go=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Xo(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Go)}},[u,f,n,l]),v.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Xo())},[u,l]),v.useEffect(()=>{const k=()=>g({});return document.addEventListener(jn,k),()=>document.removeEventListener(jn,k)},[]),m.jsx(q.div,{...c,ref:x,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,M.onFocusCapture),onBlurCapture:U(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,C.onPointerDownCapture)})});Rn.displayName=Pl;var Al="DismissableLayerBranch",Wl=v.forwardRef((e,t)=>{const n=v.useContext(Ko),r=v.useRef(null),o=Z(t,r);return v.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),m.jsx(q.div,{...e,ref:o})});Wl.displayName=Al;function _l(e,t=globalThis==null?void 0:globalThis.document){const n=st(e),r=v.useRef(!1),o=v.useRef(()=>{});return v.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){Qo(Dl,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Fl(e,t=globalThis==null?void 0:globalThis.document){const n=st(e),r=v.useRef(!1);return v.useEffect(()=>{const o=s=>{s.target&&!r.current&&Qo(Tl,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Xo(){const e=new CustomEvent(jn);document.dispatchEvent(e)}function Qo(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?jc(o,s):o.dispatchEvent(s)}var Un=0;function Zo(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Jo()),document.body.insertAdjacentElement("beforeend",e[1]??Jo()),Un++,()=>{Un===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Un--}},[])}function Jo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var qn="focusScope.autoFocusOnMount",Gn="focusScope.autoFocusOnUnmount",es={bubbles:!1,cancelable:!0},Il="FocusScope",Kn=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=v.useState(null),l=st(o),u=st(s),d=v.useRef(null),f=Z(t,h=>c(h)),g=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let h=function(w){if(g.paused||!a)return;const S=w.target;a.contains(S)?d.current=S:Ke(d.current,{select:!0})},b=function(w){if(g.paused||!a)return;const S=w.relatedTarget;S!==null&&(a.contains(S)||Ke(d.current,{select:!0}))},p=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&Ke(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",b);const y=new MutationObserver(p);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",b),y.disconnect()}}},[r,a,g.paused]),v.useEffect(()=>{if(a){rs.add(g);const h=document.activeElement;if(!a.contains(h)){const p=new CustomEvent(qn,es);a.addEventListener(qn,l),a.dispatchEvent(p),p.defaultPrevented||(Bl(Yl(ts(a)),{select:!0}),document.activeElement===h&&Ke(a))}return()=>{a.removeEventListener(qn,l),setTimeout(()=>{const p=new CustomEvent(Gn,es);a.addEventListener(Gn,u),a.dispatchEvent(p),p.defaultPrevented||Ke(h??document.body,{select:!0}),a.removeEventListener(Gn,u),rs.remove(g)},0)}}},[a,l,u,g]);const x=v.useCallback(h=>{if(!n&&!r||g.paused)return;const b=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,p=document.activeElement;if(b&&p){const y=h.currentTarget,[w,S]=Ll(y);w&&S?!h.shiftKey&&p===S?(h.preventDefault(),n&&Ke(w,{select:!0})):h.shiftKey&&p===w&&(h.preventDefault(),n&&Ke(S,{select:!0})):p===y&&h.preventDefault()}},[n,r,g.paused]);return m.jsx(q.div,{tabIndex:-1,...i,ref:f,onKeyDown:x})});Kn.displayName=Il;function Bl(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ke(r,{select:t}),document.activeElement!==n)return}function Ll(e){const t=ts(e),n=ns(t,e),r=ns(t.reverse(),e);return[n,r]}function ts(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ns(e,t){for(const n of e)if(!$l(n,{upTo:t}))return n}function $l(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Vl(e){return e instanceof HTMLInputElement&&"select"in e}function Ke(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Vl(e)&&t&&e.select()}}var rs=Hl();function Hl(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=os(e,t),e.unshift(t)},remove(t){var n;e=os(e,t),(n=e[0])==null||n.resume()}}}function os(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Yl(e){return e.filter(t=>t.tagName!=="A")}var zl=v[" useId ".trim().toString()]||(()=>{}),jl=0;function tn(e){const[t,n]=v.useState(zl());return ue(()=>{n(r=>r??String(jl++))},[e]),t?`radix-${t}`:""}const Rl=["top","right","bottom","left"],Xe=Math.min,ge=Math.max,nn=Math.round,rn=Math.floor,De=e=>({x:e,y:e}),Ul={left:"right",right:"left",bottom:"top",top:"bottom"},ql={start:"end",end:"start"};function Xn(e,t,n){return ge(e,Xe(t,n))}function Ve(e,t){return typeof e=="function"?e(t):e}function He(e){return e.split("-")[0]}function yt(e){return e.split("-")[1]}function Qn(e){return e==="x"?"y":"x"}function Zn(e){return e==="y"?"height":"width"}function Ye(e){return["top","bottom"].includes(He(e))?"y":"x"}function Jn(e){return Qn(Ye(e))}function Gl(e,t,n){n===void 0&&(n=!1);const r=yt(e),o=Jn(e),s=Zn(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=on(i)),[i,on(i)]}function Kl(e){const t=on(e);return[er(e),t,er(t)]}function er(e){return e.replace(/start|end/g,t=>ql[t])}function Xl(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function Ql(e,t,n,r){const o=yt(e);let s=Xl(He(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(er)))),s}function on(e){return e.replace(/left|right|bottom|top/g,t=>Ul[t])}function Zl(e){return{top:0,right:0,bottom:0,left:0,...e}}function ss(e){return typeof e!="number"?Zl(e):{top:e,right:e,bottom:e,left:e}}function sn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function as(e,t,n){let{reference:r,floating:o}=e;const s=Ye(t),i=Jn(t),a=Zn(i),c=He(t),l=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let g;switch(c){case"top":g={x:u,y:r.y-o.height};break;case"bottom":g={x:u,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:d};break;case"left":g={x:r.x-o.width,y:d};break;default:g={x:r.x,y:r.y}}switch(yt(t)){case"start":g[i]-=f*(n&&l?-1:1);break;case"end":g[i]+=f*(n&&l?-1:1);break}return g}const Jl=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=as(l,r,c),f=r,g={},x=0;for(let h=0;h<a.length;h++){const{name:b,fn:p}=a[h],{x:y,y:w,data:S,reset:C}=await p({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:g,rects:l,platform:i,elements:{reference:e,floating:t}});u=y??u,d=w??d,g={...g,[b]:{...g[b],...S}},C&&x<=50&&(x++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(l=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:u,y:d}=as(l,f,c)),h=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:g}};async function Ft(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:g=0}=Ve(t,e),x=ss(g),b=a[f?d==="floating"?"reference":"floating":d],p=sn(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:c})),y=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},C=sn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:c}):y);return{top:(p.top-C.top+x.top)/S.y,bottom:(C.bottom-p.bottom+x.bottom)/S.y,left:(p.left-C.left+x.left)/S.x,right:(C.right-p.right+x.right)/S.x}}const ed=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:u=0}=Ve(e,t)||{};if(l==null)return{};const d=ss(u),f={x:n,y:r},g=Jn(o),x=Zn(g),h=await i.getDimensions(l),b=g==="y",p=b?"top":"left",y=b?"bottom":"right",w=b?"clientHeight":"clientWidth",S=s.reference[x]+s.reference[g]-f[g]-s.floating[x],C=f[g]-s.reference[g],M=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let k=M?M[w]:0;(!k||!await(i.isElement==null?void 0:i.isElement(M)))&&(k=a.floating[w]||s.floating[x]);const O=S/2-C/2,_=k/2-h[x]/2-1,W=Xe(d[p],_),P=Xe(d[y],_),N=W,I=k-h[x]-P,z=k/2-h[x]/2+O,Y=Xn(N,z,I),L=!c.arrow&&yt(o)!=null&&z!==Y&&s.reference[x]/2-(z<N?W:P)-h[x]/2<0,H=L?z<N?z-N:z-I:0;return{[g]:f[g]+H,data:{[g]:Y,centerOffset:z-Y-H,...L&&{alignmentOffset:H}},reset:L}}}),td=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:h=!0,...b}=Ve(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const p=He(o),y=Ye(a),w=He(a)===a,S=await(c.isRTL==null?void 0:c.isRTL(l.floating)),C=f||(w||!h?[on(a)]:Kl(a)),M=x!=="none";!f&&M&&C.push(...Ql(a,h,x,S));const k=[a,...C],O=await Ft(t,b),_=[];let W=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&_.push(O[p]),d){const Y=Gl(o,i,S);_.push(O[Y[0]],O[Y[1]])}if(W=[...W,{placement:o,overflows:_}],!_.every(Y=>Y<=0)){var P,N;const Y=(((P=s.flip)==null?void 0:P.index)||0)+1,L=k[Y];if(L){var I;const D=d==="alignment"?y!==Ye(L):!1,B=((I=W[0])==null?void 0:I.overflows[0])>0;if(!D||B)return{data:{index:Y,overflows:W},reset:{placement:L}}}let H=(N=W.filter(D=>D.overflows[0]<=0).sort((D,B)=>D.overflows[1]-B.overflows[1])[0])==null?void 0:N.placement;if(!H)switch(g){case"bestFit":{var z;const D=(z=W.filter(B=>{if(M){const R=Ye(B.placement);return R===y||R==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(R=>R>0).reduce((R,oe)=>R+oe,0)]).sort((B,R)=>B[1]-R[1])[0])==null?void 0:z[0];D&&(H=D);break}case"initialPlacement":H=a;break}if(o!==H)return{reset:{placement:H}}}return{}}}};function is(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function cs(e){return Rl.some(t=>e[t]>=0)}const nd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ve(e,t);switch(r){case"referenceHidden":{const s=await Ft(t,{...o,elementContext:"reference"}),i=is(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:cs(i)}}}case"escaped":{const s=await Ft(t,{...o,altBoundary:!0}),i=is(s,n.floating);return{data:{escapedOffsets:i,escaped:cs(i)}}}default:return{}}}}};async function rd(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=He(n),a=yt(n),c=Ye(n)==="y",l=["left","top"].includes(i)?-1:1,u=s&&c?-1:1,d=Ve(t,e);let{mainAxis:f,crossAxis:g,alignmentAxis:x}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof x=="number"&&(g=a==="end"?x*-1:x),c?{x:g*u,y:f*l}:{x:f*l,y:g*u}}const od=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await rd(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},sd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:b=>{let{x:p,y}=b;return{x:p,y}}},...c}=Ve(e,t),l={x:n,y:r},u=await Ft(t,c),d=Ye(He(o)),f=Qn(d);let g=l[f],x=l[d];if(s){const b=f==="y"?"top":"left",p=f==="y"?"bottom":"right",y=g+u[b],w=g-u[p];g=Xn(y,g,w)}if(i){const b=d==="y"?"top":"left",p=d==="y"?"bottom":"right",y=x+u[b],w=x-u[p];x=Xn(y,x,w)}const h=a.fn({...t,[f]:g,[d]:x});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:s,[d]:i}}}}}},ad=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=Ve(e,t),u={x:n,y:r},d=Ye(o),f=Qn(d);let g=u[f],x=u[d];const h=Ve(a,t),b=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const w=f==="y"?"height":"width",S=s.reference[f]-s.floating[w]+b.mainAxis,C=s.reference[f]+s.reference[w]-b.mainAxis;g<S?g=S:g>C&&(g=C)}if(l){var p,y;const w=f==="y"?"width":"height",S=["top","left"].includes(He(o)),C=s.reference[d]-s.floating[w]+(S&&((p=i.offset)==null?void 0:p[d])||0)+(S?0:b.crossAxis),M=s.reference[d]+s.reference[w]+(S?0:((y=i.offset)==null?void 0:y[d])||0)-(S?b.crossAxis:0);x<C?x=C:x>M&&(x=M)}return{[f]:g,[d]:x}}}},id=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...l}=Ve(e,t),u=await Ft(t,l),d=He(o),f=yt(o),g=Ye(o)==="y",{width:x,height:h}=s.floating;let b,p;d==="top"||d==="bottom"?(b=d,p=f===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(p=d,b=f==="end"?"top":"bottom");const y=h-u.top-u.bottom,w=x-u.left-u.right,S=Xe(h-u[b],y),C=Xe(x-u[p],w),M=!t.middlewareData.shift;let k=S,O=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=y),M&&!f){const W=ge(u.left,0),P=ge(u.right,0),N=ge(u.top,0),I=ge(u.bottom,0);g?O=x-2*(W!==0||P!==0?W+P:ge(u.left,u.right)):k=h-2*(N!==0||I!==0?N+I:ge(u.top,u.bottom))}await c({...t,availableWidth:O,availableHeight:k});const _=await i.getDimensions(a.floating);return x!==_.width||h!==_.height?{reset:{rects:!0}}:{}}}};function an(){return typeof window<"u"}function bt(e){return ls(e)?(e.nodeName||"").toLowerCase():"#document"}function ve(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Te(e){var t;return(t=(ls(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ls(e){return an()?e instanceof Node||e instanceof ve(e).Node:!1}function Ce(e){return an()?e instanceof Element||e instanceof ve(e).Element:!1}function Ae(e){return an()?e instanceof HTMLElement||e instanceof ve(e).HTMLElement:!1}function ds(e){return!an()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ve(e).ShadowRoot}function It(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Se(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function cd(e){return["table","td","th"].includes(bt(e))}function cn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function tr(e){const t=nr(),n=Ce(e)?Se(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function ld(e){let t=Qe(e);for(;Ae(t)&&!wt(t);){if(tr(t))return t;if(cn(t))return null;t=Qe(t)}return null}function nr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function wt(e){return["html","body","#document"].includes(bt(e))}function Se(e){return ve(e).getComputedStyle(e)}function ln(e){return Ce(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qe(e){if(bt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ds(e)&&e.host||Te(e);return ds(t)?t.host:t}function us(e){const t=Qe(e);return wt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ae(t)&&It(t)?t:us(t)}function Bt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=us(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=ve(o);if(s){const a=rr(i);return t.concat(i,i.visualViewport||[],It(o)?o:[],a&&n?Bt(a):[])}return t.concat(o,Bt(o,[],n))}function rr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function fs(e){const t=Se(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ae(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=nn(n)!==s||nn(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function or(e){return Ce(e)?e:e.contextElement}function xt(e){const t=or(e);if(!Ae(t))return De(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=fs(t);let i=(s?nn(n.width):n.width)/r,a=(s?nn(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const dd=De(0);function hs(e){const t=ve(e);return!nr()||!t.visualViewport?dd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ud(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ve(e)?!1:t}function at(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=or(e);let i=De(1);t&&(r?Ce(r)&&(i=xt(r)):i=xt(e));const a=ud(s,n,r)?hs(s):De(0);let c=(o.left+a.x)/i.x,l=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const f=ve(s),g=r&&Ce(r)?ve(r):r;let x=f,h=rr(x);for(;h&&r&&g!==x;){const b=xt(h),p=h.getBoundingClientRect(),y=Se(h),w=p.left+(h.clientLeft+parseFloat(y.paddingLeft))*b.x,S=p.top+(h.clientTop+parseFloat(y.paddingTop))*b.y;c*=b.x,l*=b.y,u*=b.x,d*=b.y,c+=w,l+=S,x=ve(h),h=rr(x)}}return sn({width:u,height:d,x:c,y:l})}function sr(e,t){const n=ln(e).scrollLeft;return t?t.left+n:at(Te(e)).left+n}function ms(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:sr(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function fd(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Te(r),a=t?cn(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=De(1);const u=De(0),d=Ae(r);if((d||!d&&!s)&&((bt(r)!=="body"||It(i))&&(c=ln(r)),Ae(r))){const g=at(r);l=xt(r),u.x=g.x+r.clientLeft,u.y=g.y+r.clientTop}const f=i&&!d&&!s?ms(i,c,!0):De(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function hd(e){return Array.from(e.getClientRects())}function md(e){const t=Te(e),n=ln(e),r=e.ownerDocument.body,o=ge(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=ge(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+sr(e);const a=-n.scrollTop;return Se(r).direction==="rtl"&&(i+=ge(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function pd(e,t){const n=ve(e),r=Te(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const l=nr();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:a,y:c}}function gd(e,t){const n=at(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Ae(e)?xt(e):De(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,l=r*s.y;return{width:i,height:a,x:c,y:l}}function ps(e,t,n){let r;if(t==="viewport")r=pd(e,n);else if(t==="document")r=md(Te(e));else if(Ce(t))r=gd(t,n);else{const o=hs(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sn(r)}function gs(e,t){const n=Qe(e);return n===t||!Ce(n)||wt(n)?!1:Se(n).position==="fixed"||gs(n,t)}function vd(e,t){const n=t.get(e);if(n)return n;let r=Bt(e,[],!1).filter(a=>Ce(a)&&bt(a)!=="body"),o=null;const s=Se(e).position==="fixed";let i=s?Qe(e):e;for(;Ce(i)&&!wt(i);){const a=Se(i),c=tr(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||It(i)&&!c&&gs(e,i))?r=r.filter(u=>u!==i):o=a,i=Qe(i)}return t.set(e,r),r}function yd(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?cn(t)?[]:vd(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((l,u)=>{const d=ps(t,u,o);return l.top=ge(d.top,l.top),l.right=Xe(d.right,l.right),l.bottom=Xe(d.bottom,l.bottom),l.left=ge(d.left,l.left),l},ps(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function bd(e){const{width:t,height:n}=fs(e);return{width:t,height:n}}function wd(e,t,n){const r=Ae(t),o=Te(t),s=n==="fixed",i=at(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=De(0);function l(){c.x=sr(o)}if(r||!r&&!s)if((bt(t)!=="body"||It(o))&&(a=ln(t)),r){const g=at(t,!0,s,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else o&&l();s&&!r&&o&&l();const u=o&&!r&&!s?ms(o,a):De(0),d=i.left+a.scrollLeft-c.x-u.x,f=i.top+a.scrollTop-c.y-u.y;return{x:d,y:f,width:i.width,height:i.height}}function ar(e){return Se(e).position==="static"}function vs(e,t){if(!Ae(e)||Se(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Te(e)===n&&(n=n.ownerDocument.body),n}function ys(e,t){const n=ve(e);if(cn(e))return n;if(!Ae(e)){let o=Qe(e);for(;o&&!wt(o);){if(Ce(o)&&!ar(o))return o;o=Qe(o)}return n}let r=vs(e,t);for(;r&&cd(r)&&ar(r);)r=vs(r,t);return r&&wt(r)&&ar(r)&&!tr(r)?n:r||ld(e)||n}const xd=async function(e){const t=this.getOffsetParent||ys,n=this.getDimensions,r=await n(e.floating);return{reference:wd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Cd(e){return Se(e).direction==="rtl"}const Sd={convertOffsetParentRelativeRectToViewportRelativeRect:fd,getDocumentElement:Te,getClippingRect:yd,getOffsetParent:ys,getElementRects:xd,getClientRects:hd,getDimensions:bd,getScale:xt,isElement:Ce,isRTL:Cd};function bs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kd(e,t){let n=null,r;const o=Te(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:g}=l;if(a||t(),!f||!g)return;const x=rn(d),h=rn(o.clientWidth-(u+f)),b=rn(o.clientHeight-(d+g)),p=rn(u),w={rootMargin:-x+"px "+-h+"px "+-b+"px "+-p+"px",threshold:ge(0,Xe(1,c))||1};let S=!0;function C(M){const k=M[0].intersectionRatio;if(k!==c){if(!S)return i();k?i(!1,k):r=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!bs(l,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(C,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return i(!0),s}function Ed(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=or(e),u=o||s?[...l?Bt(l):[],...Bt(t)]:[];u.forEach(p=>{o&&p.addEventListener("scroll",n,{passive:!0}),s&&p.addEventListener("resize",n)});const d=l&&a?kd(l,n):null;let f=-1,g=null;i&&(g=new ResizeObserver(p=>{let[y]=p;y&&y.target===l&&g&&(g.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=g)==null||w.observe(t)})),n()}),l&&!c&&g.observe(l),g.observe(t));let x,h=c?at(e):null;c&&b();function b(){const p=at(e);h&&!bs(h,p)&&n(),h=p,x=requestAnimationFrame(b)}return n(),()=>{var p;u.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),d==null||d(),(p=g)==null||p.disconnect(),g=null,c&&cancelAnimationFrame(x)}}const Md=od,Nd=sd,Od=td,Pd=id,Dd=nd,ws=ed,Td=ad,Ad=(e,t,n)=>{const r=new Map,o={platform:Sd,...n},s={...o.platform,_c:r};return Jl(e,t,{...o,platform:s})};var dn=typeof document<"u"?E.useLayoutEffect:E.useEffect;function un(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!un(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!un(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function xs(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Cs(e,t){const n=xs(e);return Math.round(t*n)/n}function ir(e){const t=v.useRef(e);return dn(()=>{t.current=e}),t}function Wd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[u,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,g]=v.useState(r);un(f,r)||g(r);const[x,h]=v.useState(null),[b,p]=v.useState(null),y=v.useCallback(D=>{D!==M.current&&(M.current=D,h(D))},[]),w=v.useCallback(D=>{D!==k.current&&(k.current=D,p(D))},[]),S=s||x,C=i||b,M=v.useRef(null),k=v.useRef(null),O=v.useRef(u),_=c!=null,W=ir(c),P=ir(o),N=ir(l),I=v.useCallback(()=>{if(!M.current||!k.current)return;const D={placement:t,strategy:n,middleware:f};P.current&&(D.platform=P.current),Ad(M.current,k.current,D).then(B=>{const R={...B,isPositioned:N.current!==!1};z.current&&!un(O.current,R)&&(O.current=R,Xt.flushSync(()=>{d(R)}))})},[f,t,n,P,N]);dn(()=>{l===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(D=>({...D,isPositioned:!1})))},[l]);const z=v.useRef(!1);dn(()=>(z.current=!0,()=>{z.current=!1}),[]),dn(()=>{if(S&&(M.current=S),C&&(k.current=C),S&&C){if(W.current)return W.current(S,C,I);I()}},[S,C,I,W,_]);const Y=v.useMemo(()=>({reference:M,floating:k,setReference:y,setFloating:w}),[y,w]),L=v.useMemo(()=>({reference:S,floating:C}),[S,C]),H=v.useMemo(()=>{const D={position:n,left:0,top:0};if(!L.floating)return D;const B=Cs(L.floating,u.x),R=Cs(L.floating,u.y);return a?{...D,transform:"translate("+B+"px, "+R+"px)",...xs(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:R}},[n,a,L.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:I,refs:Y,elements:L,floatingStyles:H}),[u,I,Y,L,H])}const _d=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?ws({element:r.current,padding:o}).fn(n):{}:r?ws({element:r,padding:o}).fn(n):{}}}},Fd=(e,t)=>({...Md(e),options:[e,t]}),Id=(e,t)=>({...Nd(e),options:[e,t]}),Bd=(e,t)=>({...Td(e),options:[e,t]}),Ld=(e,t)=>({...Od(e),options:[e,t]}),$d=(e,t)=>({...Pd(e),options:[e,t]}),Vd=(e,t)=>({...Dd(e),options:[e,t]}),Hd=(e,t)=>({..._d(e),options:[e,t]});var Yd="Arrow",Ss=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return m.jsx(q.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ss.displayName=Yd;var zd=Ss,cr="Popper",[ks,fn]=gt(cr),[jd,Es]=ks(cr),Ms=e=>{const{__scopePopper:t,children:n}=e,[r,o]=v.useState(null);return m.jsx(jd,{scope:t,anchor:r,onAnchorChange:o,children:n})};Ms.displayName=cr;var Ns="PopperAnchor",Os=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Es(Ns,n),i=v.useRef(null),a=Z(t,i);return v.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:m.jsx(q.div,{...o,ref:a})});Os.displayName=Ns;var lr="PopperContent",[Rd,Ud]=ks(lr),Ps=v.forwardRef((e,t)=>{var $,ee,ce,te,G,K;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:g="optimized",onPlaced:x,...h}=e,b=Es(lr,n),[p,y]=v.useState(null),w=Z(t,me=>y(me)),[S,C]=v.useState(null),M=$n(S),k=(M==null?void 0:M.width)??0,O=(M==null?void 0:M.height)??0,_=r+(s!=="center"?"-"+s:""),W=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},P=Array.isArray(l)?l:[l],N=P.length>0,I={padding:W,boundary:P.filter(Gd),altBoundary:N},{refs:z,floatingStyles:Y,placement:L,isPositioned:H,middlewareData:D}=Wd({strategy:"fixed",placement:_,whileElementsMounted:(...me)=>Ed(...me,{animationFrame:g==="always"}),elements:{reference:b.anchor},middleware:[Fd({mainAxis:o+O,alignmentAxis:i}),c&&Id({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Bd():void 0,...I}),c&&Ld({...I}),$d({...I,apply:({elements:me,rects:we,availableWidth:dt,availableHeight:ut})=>{const{width:ft,height:Hr}=we.reference,Tt=me.floating.style;Tt.setProperty("--radix-popper-available-width",`${dt}px`),Tt.setProperty("--radix-popper-available-height",`${ut}px`),Tt.setProperty("--radix-popper-anchor-width",`${ft}px`),Tt.setProperty("--radix-popper-anchor-height",`${Hr}px`)}}),S&&Hd({element:S,padding:a}),Kd({arrowWidth:k,arrowHeight:O}),f&&Vd({strategy:"referenceHidden",...I})]}),[B,R]=As(L),oe=st(x);ue(()=>{H&&(oe==null||oe())},[H,oe]);const Me=($=D.arrow)==null?void 0:$.x,Ne=(ee=D.arrow)==null?void 0:ee.y,be=((ce=D.arrow)==null?void 0:ce.centerOffset)!==0,[Ue,xe]=v.useState();return ue(()=>{p&&xe(window.getComputedStyle(p).zIndex)},[p]),m.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:H?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ue,"--radix-popper-transform-origin":[(te=D.transformOrigin)==null?void 0:te.x,(G=D.transformOrigin)==null?void 0:G.y].join(" "),...((K=D.hide)==null?void 0:K.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(Rd,{scope:n,placedSide:B,onArrowChange:C,arrowX:Me,arrowY:Ne,shouldHideArrow:be,children:m.jsx(q.div,{"data-side":B,"data-align":R,...h,ref:w,style:{...h.style,animation:H?void 0:"none"}})})})});Ps.displayName=lr;var Ds="PopperArrow",qd={top:"bottom",right:"left",bottom:"top",left:"right"},Ts=v.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Ud(Ds,r),i=qd[s.placedSide];return m.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:m.jsx(zd,{...o,ref:n,style:{...o.style,display:"block"}})})});Ts.displayName=Ds;function Gd(e){return e!==null}var Kd=e=>({name:"transformOrigin",options:e,fn(t){var b,p,y;const{placement:n,rects:r,middlewareData:o}=t,i=((b=o.arrow)==null?void 0:b.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,u]=As(n),d={start:"0%",center:"50%",end:"100%"}[u],f=(((p=o.arrow)==null?void 0:p.x)??0)+a/2,g=(((y=o.arrow)==null?void 0:y.y)??0)+c/2;let x="",h="";return l==="bottom"?(x=i?d:`${f}px`,h=`${-c}px`):l==="top"?(x=i?d:`${f}px`,h=`${r.floating.height+c}px`):l==="right"?(x=`${-c}px`,h=i?d:`${g}px`):l==="left"&&(x=`${r.floating.width+c}px`,h=i?d:`${g}px`),{data:{x,y:h}}}});function As(e){const[t,n="center"]=e.split("-");return[t,n]}var Ws=Ms,dr=Os,_s=Ps,Fs=Ts,Xd="Portal",ur=v.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=v.useState(!1);ue(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Ur.createPortal(m.jsx(q.div,{...r,ref:t}),i):null});ur.displayName=Xd;var Is=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Qd="VisuallyHidden",Zd=v.forwardRef((e,t)=>m.jsx(q.span,{...e,ref:t,style:{...Is,...e.style}}));Zd.displayName=Qd;var Jd=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ct=new WeakMap,hn=new WeakMap,mn={},fr=0,Bs=function(e){return e&&(e.host||Bs(e.parentNode))},eu=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Bs(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},tu=function(e,t,n,r){var o=eu(t,Array.isArray(e)?e:[e]);mn[n]||(mn[n]=new WeakMap);var s=mn[n],i=[],a=new Set,c=new Set(o),l=function(d){!d||a.has(d)||(a.add(d),l(d.parentNode))};o.forEach(l);var u=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))u(f);else try{var g=f.getAttribute(r),x=g!==null&&g!=="false",h=(Ct.get(f)||0)+1,b=(s.get(f)||0)+1;Ct.set(f,h),s.set(f,b),i.push(f),h===1&&x&&hn.set(f,!0),b===1&&f.setAttribute(n,"true"),x||f.setAttribute(r,"true")}catch(p){console.error("aria-hidden: cannot operate on ",f,p)}})};return u(t),a.clear(),fr++,function(){i.forEach(function(d){var f=Ct.get(d)-1,g=s.get(d)-1;Ct.set(d,f),s.set(d,g),f||(hn.has(d)||d.removeAttribute(r),hn.delete(d)),g||d.removeAttribute(n)}),fr--,fr||(Ct=new WeakMap,Ct=new WeakMap,hn=new WeakMap,mn={})}},Ls=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Jd(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),tu(r,o,n,"aria-hidden")):function(){return null}},We=function(){return We=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},We.apply(this,arguments)};function $s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function nu(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var pn="right-scroll-bar-position",gn="width-before-scroll-bar",ru="with-scroll-bars-hidden",ou="--removed-body-scroll-bar-size";function hr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function su(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var au=typeof window<"u"?v.useLayoutEffect:v.useEffect,Vs=new WeakMap;function iu(e,t){var n=su(null,function(r){return e.forEach(function(o){return hr(o,r)})});return au(function(){var r=Vs.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||hr(a,null)}),s.forEach(function(a){o.has(a)||hr(a,i)})}Vs.set(n,e)},[e]),n}function cu(e){return e}function lu(e,t){t===void 0&&(t=cu);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var u=i;i=[],u.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){i.push(u),l()},filter:function(u){return i=i.filter(u),n}}}};return o}function du(e){e===void 0&&(e={});var t=lu(null);return t.options=We({async:!0,ssr:!1},e),t}var Hs=function(e){var t=e.sideCar,n=$s(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,We({},n))};Hs.isSideCarExport=!0;function uu(e,t){return e.useMedium(t),Hs}var Ys=du(),mr=function(){},vn=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:mr,onWheelCapture:mr,onTouchMoveCapture:mr}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,g=e.noRelative,x=e.noIsolation,h=e.inert,b=e.allowPinchZoom,p=e.as,y=p===void 0?"div":p,w=e.gapMode,S=$s(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,M=iu([n,t]),k=We(We({},S),o);return v.createElement(v.Fragment,null,u&&v.createElement(C,{sideCar:Ys,removeScrollBar:l,shards:d,noRelative:g,noIsolation:x,inert:h,setCallbacks:s,allowPinchZoom:!!b,lockRef:n,gapMode:w}),i?v.cloneElement(v.Children.only(a),We(We({},k),{ref:M})):v.createElement(y,We({},k,{className:c,ref:M}),a))});vn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},vn.classNames={fullWidth:gn,zeroRight:pn};var fu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=fu();return t&&e.setAttribute("nonce",t),e}function mu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function pu(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var gu=function(){var e=0,t=null;return{add:function(n){e==0&&(t=hu())&&(mu(t,n),pu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},vu=function(){var e=gu();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},zs=function(){var e=vu(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},yu={left:0,top:0,right:0,gap:0},pr=function(e){return parseInt(e||"",10)||0},bu=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[pr(n),pr(r),pr(o)]},wu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return yu;var t=bu(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},xu=zs(),St="data-scroll-locked",Cu=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
62
|
+
.`.concat(ru,` {
|
|
63
|
+
overflow: hidden `).concat(r,`;
|
|
64
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
65
|
+
}
|
|
66
|
+
body[`).concat(St,`] {
|
|
67
|
+
overflow: hidden `).concat(r,`;
|
|
68
|
+
overscroll-behavior: contain;
|
|
69
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
70
|
+
padding-left: `.concat(o,`px;
|
|
71
|
+
padding-top: `).concat(s,`px;
|
|
72
|
+
padding-right: `).concat(i,`px;
|
|
73
|
+
margin-left:0;
|
|
74
|
+
margin-top:0;
|
|
75
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
76
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.`).concat(pn,` {
|
|
80
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.`).concat(gn,` {
|
|
84
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.`).concat(pn," .").concat(pn,` {
|
|
88
|
+
right: 0 `).concat(r,`;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.`).concat(gn," .").concat(gn,` {
|
|
92
|
+
margin-right: 0 `).concat(r,`;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
body[`).concat(St,`] {
|
|
96
|
+
`).concat(ou,": ").concat(a,`px;
|
|
97
|
+
}
|
|
98
|
+
`)},js=function(){var e=parseInt(document.body.getAttribute(St)||"0",10);return isFinite(e)?e:0},Su=function(){v.useEffect(function(){return document.body.setAttribute(St,(js()+1).toString()),function(){var e=js()-1;e<=0?document.body.removeAttribute(St):document.body.setAttribute(St,e.toString())}},[])},ku=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Su();var s=v.useMemo(function(){return wu(o)},[o]);return v.createElement(xu,{styles:Cu(s,!t,o,n?"":"!important")})},gr=!1;if(typeof window<"u")try{var yn=Object.defineProperty({},"passive",{get:function(){return gr=!0,!0}});window.addEventListener("test",yn,yn),window.removeEventListener("test",yn,yn)}catch{gr=!1}var kt=gr?{passive:!1}:!1,Eu=function(e){return e.tagName==="TEXTAREA"},Rs=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Eu(e)&&n[t]==="visible")},Mu=function(e){return Rs(e,"overflowY")},Nu=function(e){return Rs(e,"overflowX")},Us=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=qs(e,r);if(o){var s=Gs(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ou=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Pu=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},qs=function(e,t){return e==="v"?Mu(t):Nu(t)},Gs=function(e,t){return e==="v"?Ou(t):Pu(t)},Du=function(e,t){return e==="h"&&t==="rtl"?-1:1},Tu=function(e,t,n,r,o){var s=Du(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,c=t.contains(a),l=!1,u=i>0,d=0,f=0;do{if(!a)break;var g=Gs(e,a),x=g[0],h=g[1],b=g[2],p=h-b-s*x;(x||p)&&qs(e,a)&&(d+=p,f+=x);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(u&&Math.abs(d)<1||!u&&Math.abs(f)<1)&&(l=!0),l},bn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ks=function(e){return[e.deltaX,e.deltaY]},Xs=function(e){return e&&"current"in e?e.current:e},Au=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Wu=function(e){return`
|
|
99
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
100
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
101
|
+
`)},_u=0,Et=[];function Fu(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),o=v.useState(_u++)[0],s=v.useState(zs)[0],i=v.useRef(e);v.useEffect(function(){i.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=nu([e.lockRef.current],(e.shards||[]).map(Xs),!0).filter(Boolean);return h.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=v.useCallback(function(h,b){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var p=bn(h),y=n.current,w="deltaX"in h?h.deltaX:y[0]-p[0],S="deltaY"in h?h.deltaY:y[1]-p[1],C,M=h.target,k=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in h&&k==="h"&&M.type==="range")return!1;var O=Us(k,M);if(!O)return!0;if(O?C=k:(C=k==="v"?"h":"v",O=Us(k,M)),!O)return!1;if(!r.current&&"changedTouches"in h&&(w||S)&&(r.current=C),!C)return!0;var _=r.current||C;return Tu(_,b,h,_==="h"?w:S)},[]),c=v.useCallback(function(h){var b=h;if(!(!Et.length||Et[Et.length-1]!==s)){var p="deltaY"in b?Ks(b):bn(b),y=t.current.filter(function(C){return C.name===b.type&&(C.target===b.target||b.target===C.shadowParent)&&Au(C.delta,p)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var w=(i.current.shards||[]).map(Xs).filter(Boolean).filter(function(C){return C.contains(b.target)}),S=w.length>0?a(b,w[0]):!i.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),l=v.useCallback(function(h,b,p,y){var w={name:h,delta:b,target:p,should:y,shadowParent:Iu(p)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),u=v.useCallback(function(h){n.current=bn(h),r.current=void 0},[]),d=v.useCallback(function(h){l(h.type,Ks(h),h.target,a(h,e.lockRef.current))},[]),f=v.useCallback(function(h){l(h.type,bn(h),h.target,a(h,e.lockRef.current))},[]);v.useEffect(function(){return Et.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",c,kt),document.addEventListener("touchmove",c,kt),document.addEventListener("touchstart",u,kt),function(){Et=Et.filter(function(h){return h!==s}),document.removeEventListener("wheel",c,kt),document.removeEventListener("touchmove",c,kt),document.removeEventListener("touchstart",u,kt)}},[]);var g=e.removeScrollBar,x=e.inert;return v.createElement(v.Fragment,null,x?v.createElement(s,{styles:Wu(o)}):null,g?v.createElement(ku,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Iu(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Bu=uu(Ys,Fu);var vr=v.forwardRef(function(e,t){return v.createElement(vn,We({},e,{ref:t,sideCar:Bu}))});vr.classNames=vn.classNames;var Lu=[" ","Enter","ArrowUp","ArrowDown"],$u=[" ","Enter"],it="Select",[wn,xn,Vu]=Oo(it),[Mt,pg]=gt(it,[Vu,fn]),Cn=fn(),[Hu,Ze]=Mt(it),[Yu,zu]=Mt(it),Qs=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:g,form:x}=e,h=Cn(t),[b,p]=v.useState(null),[y,w]=v.useState(null),[S,C]=v.useState(!1),M=No(l),[k,O]=_t({prop:r,defaultProp:o??!1,onChange:s,caller:it}),[_,W]=_t({prop:i,defaultProp:a,onChange:c,caller:it}),P=v.useRef(null),N=b?x||!!b.closest("form"):!0,[I,z]=v.useState(new Set),Y=Array.from(I).map(L=>L.props.value).join(";");return m.jsx(Ws,{...h,children:m.jsxs(Hu,{required:g,scope:t,trigger:b,onTriggerChange:p,valueNode:y,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:tn(),value:_,onValueChange:W,open:k,onOpenChange:O,dir:M,triggerPointerDownPosRef:P,disabled:f,children:[m.jsx(wn.Provider,{scope:t,children:m.jsx(Yu,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(L=>{z(H=>new Set(H).add(L))},[]),onNativeOptionRemove:v.useCallback(L=>{z(H=>{const D=new Set(H);return D.delete(L),D})},[]),children:n})}),N?m.jsxs(xa,{"aria-hidden":!0,required:g,tabIndex:-1,name:u,autoComplete:d,value:_,onChange:L=>W(L.target.value),disabled:f,form:x,children:[_===void 0?m.jsx("option",{value:""}):null,Array.from(I)]},Y):null]})})};Qs.displayName=it;var Zs="SelectTrigger",Js=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Cn(n),i=Ze(Zs,n),a=i.disabled||r,c=Z(t,i.onTriggerChange),l=xn(n),u=v.useRef("touch"),[d,f,g]=Sa(h=>{const b=l().filter(w=>!w.disabled),p=b.find(w=>w.value===i.value),y=ka(b,h,p);y!==void 0&&i.onValueChange(y.value)}),x=h=>{a||(i.onOpenChange(!0),g()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return m.jsx(dr,{asChild:!0,...s,children:m.jsx(q.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Ca(i.value)?"":void 0,...o,ref:c,onClick:U(o.onClick,h=>{h.currentTarget.focus(),u.current!=="mouse"&&x(h)}),onPointerDown:U(o.onPointerDown,h=>{u.current=h.pointerType;const b=h.target;b.hasPointerCapture(h.pointerId)&&b.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(x(h),h.preventDefault())}),onKeyDown:U(o.onKeyDown,h=>{const b=d.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&f(h.key),!(b&&h.key===" ")&&Lu.includes(h.key)&&(x(),h.preventDefault())})})})});Js.displayName=Zs;var ea="SelectValue",ta=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=Ze(ea,n),{onValueNodeHasChildrenChange:l}=c,u=s!==void 0,d=Z(t,c.onValueNodeChange);return ue(()=>{l(u)},[l,u]),m.jsx(q.span,{...a,ref:d,style:{pointerEvents:"none"},children:Ca(c.value)?m.jsx(m.Fragment,{children:i}):s})});ta.displayName=ea;var ju="SelectIcon",na=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return m.jsx(q.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});na.displayName=ju;var Ru="SelectPortal",ra=e=>m.jsx(ur,{asChild:!0,...e});ra.displayName=Ru;var ct="SelectContent",oa=v.forwardRef((e,t)=>{const n=Ze(ct,e.__scopeSelect),[r,o]=v.useState();if(ue(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Xt.createPortal(m.jsx(sa,{scope:e.__scopeSelect,children:m.jsx(wn.Slot,{scope:e.__scopeSelect,children:m.jsx("div",{children:e.children})})}),s):null}return m.jsx(aa,{...e,ref:t})});oa.displayName=ct;var ke=10,[sa,Je]=Mt(ct),Uu="SelectContentImpl",qu=pt("SelectContent.RemoveScroll"),aa=v.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:g,sticky:x,hideWhenDetached:h,avoidCollisions:b,...p}=e,y=Ze(ct,n),[w,S]=v.useState(null),[C,M]=v.useState(null),k=Z(t,$=>S($)),[O,_]=v.useState(null),[W,P]=v.useState(null),N=xn(n),[I,z]=v.useState(!1),Y=v.useRef(!1);v.useEffect(()=>{if(w)return Ls(w)},[w]),Zo();const L=v.useCallback($=>{const[ee,...ce]=N().map(K=>K.ref.current),[te]=ce.slice(-1),G=document.activeElement;for(const K of $)if(K===G||(K==null||K.scrollIntoView({block:"nearest"}),K===ee&&C&&(C.scrollTop=0),K===te&&C&&(C.scrollTop=C.scrollHeight),K==null||K.focus(),document.activeElement!==G))return},[N,C]),H=v.useCallback(()=>L([O,w]),[L,O,w]);v.useEffect(()=>{I&&H()},[I,H]);const{onOpenChange:D,triggerPointerDownPosRef:B}=y;v.useEffect(()=>{if(w){let $={x:0,y:0};const ee=te=>{var G,K;$={x:Math.abs(Math.round(te.pageX)-(((G=B.current)==null?void 0:G.x)??0)),y:Math.abs(Math.round(te.pageY)-(((K=B.current)==null?void 0:K.y)??0))}},ce=te=>{$.x<=10&&$.y<=10?te.preventDefault():w.contains(te.target)||D(!1),document.removeEventListener("pointermove",ee),B.current=null};return B.current!==null&&(document.addEventListener("pointermove",ee),document.addEventListener("pointerup",ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ee),document.removeEventListener("pointerup",ce,{capture:!0})}}},[w,D,B]),v.useEffect(()=>{const $=()=>D(!1);return window.addEventListener("blur",$),window.addEventListener("resize",$),()=>{window.removeEventListener("blur",$),window.removeEventListener("resize",$)}},[D]);const[R,oe]=Sa($=>{const ee=N().filter(G=>!G.disabled),ce=ee.find(G=>G.ref.current===document.activeElement),te=ka(ee,$,ce);te&&setTimeout(()=>te.ref.current.focus())}),Me=v.useCallback(($,ee,ce)=>{const te=!Y.current&&!ce;(y.value!==void 0&&y.value===ee||te)&&(_($),te&&(Y.current=!0))},[y.value]),Ne=v.useCallback(()=>w==null?void 0:w.focus(),[w]),be=v.useCallback(($,ee,ce)=>{const te=!Y.current&&!ce;(y.value!==void 0&&y.value===ee||te)&&P($)},[y.value]),Ue=r==="popper"?yr:ia,xe=Ue===yr?{side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:g,sticky:x,hideWhenDetached:h,avoidCollisions:b}:{};return m.jsx(sa,{scope:n,content:w,viewport:C,onViewportChange:M,itemRefCallback:Me,selectedItem:O,onItemLeave:Ne,itemTextRefCallback:be,focusSelectedItem:H,selectedItemText:W,position:r,isPositioned:I,searchRef:R,children:m.jsx(vr,{as:qu,allowPinchZoom:!0,children:m.jsx(Kn,{asChild:!0,trapped:y.open,onMountAutoFocus:$=>{$.preventDefault()},onUnmountAutoFocus:U(o,$=>{var ee;(ee=y.trigger)==null||ee.focus({preventScroll:!0}),$.preventDefault()}),children:m.jsx(Rn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:$=>$.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:m.jsx(Ue,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:$=>$.preventDefault(),...p,...xe,onPlaced:()=>z(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...p.style},onKeyDown:U(p.onKeyDown,$=>{const ee=$.ctrlKey||$.altKey||$.metaKey;if($.key==="Tab"&&$.preventDefault(),!ee&&$.key.length===1&&oe($.key),["ArrowUp","ArrowDown","Home","End"].includes($.key)){let te=N().filter(G=>!G.disabled).map(G=>G.ref.current);if(["ArrowUp","End"].includes($.key)&&(te=te.slice().reverse()),["ArrowUp","ArrowDown"].includes($.key)){const G=$.target,K=te.indexOf(G);te=te.slice(K+1)}setTimeout(()=>L(te)),$.preventDefault()}})})})})})})});aa.displayName=Uu;var Gu="SelectItemAlignedPosition",ia=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=Ze(ct,n),i=Je(ct,n),[a,c]=v.useState(null),[l,u]=v.useState(null),d=Z(t,k=>u(k)),f=xn(n),g=v.useRef(!1),x=v.useRef(!0),{viewport:h,selectedItem:b,selectedItemText:p,focusSelectedItem:y}=i,w=v.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&l&&h&&b&&p){const k=s.trigger.getBoundingClientRect(),O=l.getBoundingClientRect(),_=s.valueNode.getBoundingClientRect(),W=p.getBoundingClientRect();if(s.dir!=="rtl"){const G=W.left-O.left,K=_.left-G,me=k.left-K,we=k.width+me,dt=Math.max(we,O.width),ut=window.innerWidth-ke,ft=Jt(K,[ke,Math.max(ke,ut-dt)]);a.style.minWidth=we+"px",a.style.left=ft+"px"}else{const G=O.right-W.right,K=window.innerWidth-_.right-G,me=window.innerWidth-k.right-K,we=k.width+me,dt=Math.max(we,O.width),ut=window.innerWidth-ke,ft=Jt(K,[ke,Math.max(ke,ut-dt)]);a.style.minWidth=we+"px",a.style.right=ft+"px"}const P=f(),N=window.innerHeight-ke*2,I=h.scrollHeight,z=window.getComputedStyle(l),Y=parseInt(z.borderTopWidth,10),L=parseInt(z.paddingTop,10),H=parseInt(z.borderBottomWidth,10),D=parseInt(z.paddingBottom,10),B=Y+L+I+D+H,R=Math.min(b.offsetHeight*5,B),oe=window.getComputedStyle(h),Me=parseInt(oe.paddingTop,10),Ne=parseInt(oe.paddingBottom,10),be=k.top+k.height/2-ke,Ue=N-be,xe=b.offsetHeight/2,$=b.offsetTop+xe,ee=Y+L+$,ce=B-ee;if(ee<=be){const G=P.length>0&&b===P[P.length-1].ref.current;a.style.bottom="0px";const K=l.clientHeight-h.offsetTop-h.offsetHeight,me=Math.max(Ue,xe+(G?Ne:0)+K+H),we=ee+me;a.style.height=we+"px"}else{const G=P.length>0&&b===P[0].ref.current;a.style.top="0px";const me=Math.max(be,Y+h.offsetTop+(G?Me:0)+xe)+ce;a.style.height=me+"px",h.scrollTop=ee-be+h.offsetTop}a.style.margin=`${ke}px 0`,a.style.minHeight=R+"px",a.style.maxHeight=N+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[f,s.trigger,s.valueNode,a,l,h,b,p,s.dir,r]);ue(()=>w(),[w]);const[S,C]=v.useState();ue(()=>{l&&C(window.getComputedStyle(l).zIndex)},[l]);const M=v.useCallback(k=>{k&&x.current===!0&&(w(),y==null||y(),x.current=!1)},[w,y]);return m.jsx(Xu,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:g,onScrollButtonChange:M,children:m.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:m.jsx(q.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});ia.displayName=Gu;var Ku="SelectPopperPosition",yr=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ke,...s}=e,i=Cn(n);return m.jsx(_s,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});yr.displayName=Ku;var[Xu,br]=Mt(ct,{}),wr="SelectViewport",ca=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=Je(wr,n),i=br(wr,n),a=Z(t,s.onViewportChange),c=v.useRef(0);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),m.jsx(wn.Slot,{scope:n,children:m.jsx(q.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:U(o.onScroll,l=>{const u=l.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=i;if(f!=null&&f.current&&d){const g=Math.abs(c.current-u.scrollTop);if(g>0){const x=window.innerHeight-ke*2,h=parseFloat(d.style.minHeight),b=parseFloat(d.style.height),p=Math.max(h,b);if(p<x){const y=p+g,w=Math.min(x,y),S=y-w;d.style.height=w+"px",d.style.bottom==="0px"&&(u.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});ca.displayName=wr;var la="SelectGroup",[Qu,Zu]=Mt(la),Ju=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=tn();return m.jsx(Qu,{scope:n,id:o,children:m.jsx(q.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Ju.displayName=la;var da="SelectLabel",ua=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Zu(da,n);return m.jsx(q.div,{id:o.id,...r,ref:t})});ua.displayName=da;var Sn="SelectItem",[ef,fa]=Mt(Sn),ha=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=Ze(Sn,n),c=Je(Sn,n),l=a.value===r,[u,d]=v.useState(s??""),[f,g]=v.useState(!1),x=Z(t,y=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,y,r,o)}),h=tn(),b=v.useRef("touch"),p=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return m.jsx(ef,{scope:n,value:r,disabled:o,textId:h,isSelected:l,onItemTextChange:v.useCallback(y=>{d(w=>w||((y==null?void 0:y.textContent)??"").trim())},[]),children:m.jsx(wn.ItemSlot,{scope:n,value:r,disabled:o,textValue:u,children:m.jsx(q.div,{role:"option","aria-labelledby":h,"data-highlighted":f?"":void 0,"aria-selected":l&&f,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:x,onFocus:U(i.onFocus,()=>g(!0)),onBlur:U(i.onBlur,()=>g(!1)),onClick:U(i.onClick,()=>{b.current!=="mouse"&&p()}),onPointerUp:U(i.onPointerUp,()=>{b.current==="mouse"&&p()}),onPointerDown:U(i.onPointerDown,y=>{b.current=y.pointerType}),onPointerMove:U(i.onPointerMove,y=>{var w;b.current=y.pointerType,o?(w=c.onItemLeave)==null||w.call(c):b.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:U(i.onPointerLeave,y=>{var w;y.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:U(i.onKeyDown,y=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&y.key===" "||($u.includes(y.key)&&p(),y.key===" "&&y.preventDefault())})})})})});ha.displayName=Sn;var Lt="SelectItemText",ma=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=Ze(Lt,n),a=Je(Lt,n),c=fa(Lt,n),l=zu(Lt,n),[u,d]=v.useState(null),f=Z(t,p=>d(p),c.onItemTextChange,p=>{var y;return(y=a.itemTextRefCallback)==null?void 0:y.call(a,p,c.value,c.disabled)}),g=u==null?void 0:u.textContent,x=v.useMemo(()=>m.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:h,onNativeOptionRemove:b}=l;return ue(()=>(h(x),()=>b(x)),[h,b,x]),m.jsxs(m.Fragment,{children:[m.jsx(q.span,{id:c.textId,...s,ref:f}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Xt.createPortal(s.children,i.valueNode):null]})});ma.displayName=Lt;var pa="SelectItemIndicator",ga=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return fa(pa,n).isSelected?m.jsx(q.span,{"aria-hidden":!0,...r,ref:t}):null});ga.displayName=pa;var xr="SelectScrollUpButton",va=v.forwardRef((e,t)=>{const n=Je(xr,e.__scopeSelect),r=br(xr,e.__scopeSelect),[o,s]=v.useState(!1),i=Z(t,r.onScrollButtonChange);return ue(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollTop>0;s(l)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?m.jsx(ba,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});va.displayName=xr;var Cr="SelectScrollDownButton",ya=v.forwardRef((e,t)=>{const n=Je(Cr,e.__scopeSelect),r=br(Cr,e.__scopeSelect),[o,s]=v.useState(!1),i=Z(t,r.onScrollButtonChange);return ue(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<l;s(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?m.jsx(ba,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});ya.displayName=Cr;var ba=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Je("SelectScrollButton",n),i=v.useRef(null),a=xn(n),c=v.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),ue(()=>{var u;const l=a().find(d=>d.ref.current===document.activeElement);(u=l==null?void 0:l.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),m.jsx(q.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:U(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:U(o.onPointerMove,()=>{var l;(l=s.onItemLeave)==null||l.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:U(o.onPointerLeave,()=>{c()})})}),tf="SelectSeparator",wa=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m.jsx(q.div,{"aria-hidden":!0,...r,ref:t})});wa.displayName=tf;var Sr="SelectArrow",nf=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Cn(n),s=Ze(Sr,n),i=Je(Sr,n);return s.open&&i.position==="popper"?m.jsx(Fs,{...o,...r,ref:t}):null});nf.displayName=Sr;var rf="SelectBubbleInput",xa=v.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=v.useRef(null),s=Z(r,o),i=Ln(t);return v.useEffect(()=>{const a=o.current;if(!a)return;const c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&u){const d=new Event("change",{bubbles:!0});u.call(a,t),a.dispatchEvent(d)}},[i,t]),m.jsx(q.select,{...n,style:{...Is,...n.style},ref:s,defaultValue:t})});xa.displayName=rf;function Ca(e){return e===""||e===void 0}function Sa(e){const t=st(e),n=v.useRef(""),r=v.useRef(0),o=v.useCallback(i=>{const a=n.current+i;t(a),function c(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),s=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function ka(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=of(e,Math.max(s,0));o.length===1&&(i=i.filter(l=>l!==n));const c=i.find(l=>l.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function of(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var sf=Qs,Ea=Js,af=ta,cf=na,lf=ra,Ma=oa,df=ca,Na=ua,Oa=ha,uf=ma,ff=ga,Pa=va,Da=ya,Ta=wa;const hf=sf,mf=af,Aa=v.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(Ea,{ref:r,className:F("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,m.jsx(cf,{asChild:!0,children:m.jsx(In,{className:"h-4 w-4 opacity-50"})})]}));Aa.displayName=Ea.displayName;const Wa=v.forwardRef(({className:e,...t},n)=>m.jsx(Pa,{ref:n,className:F("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(bo,{className:"h-4 w-4"})}));Wa.displayName=Pa.displayName;const _a=v.forwardRef(({className:e,...t},n)=>m.jsx(Da,{ref:n,className:F("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(In,{className:"h-4 w-4"})}));_a.displayName=Da.displayName;const Fa=v.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>m.jsx(lf,{children:m.jsxs(Ma,{ref:o,className:F("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[m.jsx(Wa,{}),m.jsx(df,{className:F("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),m.jsx(_a,{})]})}));Fa.displayName=Ma.displayName;const pf=v.forwardRef(({className:e,...t},n)=>m.jsx(Na,{ref:n,className:F("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));pf.displayName=Na.displayName;const Ia=v.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(Oa,{ref:r,className:F("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(ff,{children:m.jsx(yo,{className:"h-4 w-4"})})}),m.jsx(uf,{children:t})]}));Ia.displayName=Oa.displayName;const gf=v.forwardRef(({className:e,...t},n)=>m.jsx(Ta,{ref:n,className:F("-mx-1 my-1 h-px bg-muted",e),...t}));gf.displayName=Ta.displayName;function vf(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var kn=e=>{const{present:t,children:n}=e,r=yf(t),o=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),s=Z(r.ref,bf(o));return typeof n=="function"||r.isPresent?v.cloneElement(o,{ref:s}):null};kn.displayName="Presence";function yf(e){const[t,n]=v.useState(),r=v.useRef(null),o=v.useRef(e),s=v.useRef("none"),i=e?"mounted":"unmounted",[a,c]=vf(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const l=En(r.current);s.current=a==="mounted"?l:"none"},[a]),ue(()=>{const l=r.current,u=o.current;if(u!==e){const f=s.current,g=En(l);e?c("MOUNT"):g==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&f!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),ue(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,d=g=>{const h=En(r.current).includes(g.animationName);if(g.target===t&&h&&(c("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},f=g=>{g.target===t&&(s.current=En(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:v.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function En(e){return(e==null?void 0:e.animationName)||"none"}function bf(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Mn="Checkbox",[wf,gg]=gt(Mn),[xf,kr]=wf(Mn);function Cf(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:c,required:l,value:u="on",internal_do_not_use_render:d}=e,[f,g]=_t({prop:n,defaultProp:o??!1,onChange:c,caller:Mn}),[x,h]=v.useState(null),[b,p]=v.useState(null),y=v.useRef(!1),w=x?!!i||!!x.closest("form"):!0,S={checked:f,disabled:s,setChecked:g,control:x,setControl:h,name:a,form:i,value:u,hasConsumerStoppedPropagationRef:y,required:l,defaultChecked:et(o)?!1:o,isFormControl:w,bubbleInput:b,setBubbleInput:p};return m.jsx(xf,{scope:t,...S,children:Sf(d)?d(S):r})}var Ba="CheckboxTrigger",La=v.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:i,disabled:a,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:g,bubbleInput:x}=kr(Ba,e),h=Z(o,u),b=v.useRef(c);return v.useEffect(()=>{const p=s==null?void 0:s.form;if(p){const y=()=>d(b.current);return p.addEventListener("reset",y),()=>p.removeEventListener("reset",y)}},[s,d]),m.jsx(q.button,{type:"button",role:"checkbox","aria-checked":et(c)?"mixed":c,"aria-required":l,"data-state":za(c),"data-disabled":a?"":void 0,disabled:a,value:i,...r,ref:h,onKeyDown:U(t,p=>{p.key==="Enter"&&p.preventDefault()}),onClick:U(n,p=>{d(y=>et(y)?!0:!y),x&&g&&(f.current=p.isPropagationStopped(),f.current||p.stopPropagation())})})});La.displayName=Ba;var Er=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:c,onCheckedChange:l,form:u,...d}=e;return m.jsx(Cf,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:f})=>m.jsxs(m.Fragment,{children:[m.jsx(La,{...d,ref:t,__scopeCheckbox:n}),f&&m.jsx(Ya,{__scopeCheckbox:n})]})})});Er.displayName=Mn;var $a="CheckboxIndicator",Va=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=kr($a,n);return m.jsx(kn,{present:r||et(s.checked)||s.checked===!0,children:m.jsx(q.span,{"data-state":za(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Va.displayName=$a;var Ha="CheckboxBubbleInput",Ya=v.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:g}=kr(Ha,e),x=Z(n,g),h=Ln(s),b=$n(r);v.useEffect(()=>{const y=f;if(!y)return;const w=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(w,"checked").set,M=!o.current;if(h!==s&&C){const k=new Event("click",{bubbles:M});y.indeterminate=et(s),C.call(y,et(s)?!1:s),y.dispatchEvent(k)}},[f,h,s,o]);const p=v.useRef(et(s)?!1:s);return m.jsx(q.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??p.current,required:a,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:x,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Ya.displayName=Ha;function Sf(e){return typeof e=="function"}function et(e){return e==="indeterminate"}function za(e){return et(e)?"indeterminate":e?"checked":"unchecked"}const ja=v.forwardRef(({className:e,...t},n)=>m.jsx(Er,{ref:n,className:F("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:m.jsx(Va,{className:F("flex items-center justify-center text-current"),children:m.jsx(yo,{className:"h-4 w-4"})})}));ja.displayName=Er.displayName;const Ra=6048e5,kf=864e5,Ua=Symbol.for("constructDateFrom");function de(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ua in e?e[Ua](t):e instanceof Date?new e.constructor(t):new Date(t)}function J(e,t){return de(t||e,e)}function qa(e,t,n){const r=J(e,n==null?void 0:n.in);return isNaN(t)?de(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Ga(e,t,n){const r=J(e,n==null?void 0:n.in);if(isNaN(t))return de(e,NaN);if(!t)return r;const o=r.getDate(),s=de(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const i=s.getDate();return o>=i?s:(r.setFullYear(s.getFullYear(),s.getMonth(),o),r)}let Ef={};function $t(){return Ef}function Nt(e,t){var a,c,l,u;const n=$t(),r=(t==null?void 0:t.weekStartsOn)??((c=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((u=(l=n.locale)==null?void 0:l.options)==null?void 0:u.weekStartsOn)??0,o=J(e,t==null?void 0:t.in),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Vt(e,t){return Nt(e,{...t,weekStartsOn:1})}function Ka(e,t){const n=J(e,t==null?void 0:t.in),r=n.getFullYear(),o=de(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const s=Vt(o),i=de(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const a=Vt(i);return n.getTime()>=s.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function Xa(e){const t=J(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Ot(e,...t){const n=de.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Ht(e,t){const n=J(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Qa(e,t,n){const[r,o]=Ot(n==null?void 0:n.in,e,t),s=Ht(r),i=Ht(o),a=+s-Xa(s),c=+i-Xa(i);return Math.round((a-c)/kf)}function Mf(e,t){const n=Ka(e,t),r=de(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Vt(r)}function Nf(e,t,n){return qa(e,t*7,n)}function Of(e,t,n){return Ga(e,t*12,n)}function Pf(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=de.bind(null,o));const s=J(o,r);(!n||n<s||isNaN(+s))&&(n=s)}),de(r,n||NaN)}function Df(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=de.bind(null,o));const s=J(o,r);(!n||n>s||isNaN(+s))&&(n=s)}),de(r,n||NaN)}function Tf(e,t,n){const[r,o]=Ot(n==null?void 0:n.in,e,t);return+Ht(r)==+Ht(o)}function Za(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Af(e){return!(!Za(e)&&typeof e!="number"||isNaN(+J(e)))}function Wf(e,t,n){const[r,o]=Ot(n==null?void 0:n.in,e,t),s=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return s*12+i}function _f(e,t){const n=J(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Ff(e,t){const[n,r]=Ot(e,t.start,t.end);return{start:n,end:r}}function If(e,t){const{start:n,end:r}=Ff(t==null?void 0:t.in,e);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);let a=1;const c=[];for(;+i<=s;)c.push(de(n,i)),i.setMonth(i.getMonth()+a);return o?c.reverse():c}function Bf(e,t){const n=J(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Lf(e,t){const n=J(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Ja(e,t){const n=J(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ei(e,t){var a,c,l,u;const n=$t(),r=(t==null?void 0:t.weekStartsOn)??((c=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((u=(l=n.locale)==null?void 0:l.options)==null?void 0:u.weekStartsOn)??0,o=J(e,t==null?void 0:t.in),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function $f(e,t){return ei(e,{...t,weekStartsOn:1})}const Vf={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Hf=(e,t,n)=>{let r;const o=Vf[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Mr(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Yf={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zf={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},jf={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Rf={date:Mr({formats:Yf,defaultWidth:"full"}),time:Mr({formats:zf,defaultWidth:"full"}),dateTime:Mr({formats:jf,defaultWidth:"full"})},Uf={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},qf=(e,t,n,r)=>Uf[e];function Yt(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const Gf={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Kf={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Xf={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Qf={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Zf={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Jf={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},eh={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Yt({values:Gf,defaultWidth:"wide"}),quarter:Yt({values:Kf,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Yt({values:Xf,defaultWidth:"wide"}),day:Yt({values:Qf,defaultWidth:"wide"}),dayPeriod:Yt({values:Zf,defaultWidth:"wide",formattingValues:Jf,defaultFormattingWidth:"wide"})};function zt(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?nh(a,d=>d.test(i)):th(a,d=>d.test(i));let l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;const u=t.slice(i.length);return{value:l,rest:u}}}function th(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function nh(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function rh(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const oh=/^(\d+)(th|st|nd|rd)?/i,sh=/\d+/i,ah={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ih={any:[/^b/i,/^(a|c)/i]},ch={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},lh={any:[/1/i,/2/i,/3/i,/4/i]},dh={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},uh={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},fh={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},hh={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},mh={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ph={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},gh={ordinalNumber:rh({matchPattern:oh,parsePattern:sh,valueCallback:e=>parseInt(e,10)}),era:zt({matchPatterns:ah,defaultMatchWidth:"wide",parsePatterns:ih,defaultParseWidth:"any"}),quarter:zt({matchPatterns:ch,defaultMatchWidth:"wide",parsePatterns:lh,defaultParseWidth:"any",valueCallback:e=>e+1}),month:zt({matchPatterns:dh,defaultMatchWidth:"wide",parsePatterns:uh,defaultParseWidth:"any"}),day:zt({matchPatterns:fh,defaultMatchWidth:"wide",parsePatterns:hh,defaultParseWidth:"any"}),dayPeriod:zt({matchPatterns:mh,defaultMatchWidth:"any",parsePatterns:ph,defaultParseWidth:"any"})},Nr={code:"en-US",formatDistance:Hf,formatLong:Rf,formatRelative:qf,localize:eh,match:gh,options:{weekStartsOn:0,firstWeekContainsDate:1}};function vh(e,t){const n=J(e,t==null?void 0:t.in);return Qa(n,Ja(n))+1}function ti(e,t){const n=J(e,t==null?void 0:t.in),r=+Vt(n)-+Mf(n);return Math.round(r/Ra)+1}function ni(e,t){var u,d,f,g;const n=J(e,t==null?void 0:t.in),r=n.getFullYear(),o=$t(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((g=(f=o.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,i=de((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=Nt(i,t),c=de((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,s),c.setHours(0,0,0,0);const l=Nt(c,t);return+n>=+a?r+1:+n>=+l?r:r-1}function yh(e,t){var a,c,l,u;const n=$t(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(l=n.locale)==null?void 0:l.options)==null?void 0:u.firstWeekContainsDate)??1,o=ni(e,t),s=de((t==null?void 0:t.in)||e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),Nt(s,t)}function ri(e,t){const n=J(e,t==null?void 0:t.in),r=+Nt(n,t)-+yh(n,t);return Math.round(r/Ra)+1}function X(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const tt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return X(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):X(n+1,2)},d(e,t){return X(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return X(e.getHours()%12||12,t.length)},H(e,t){return X(e.getHours(),t.length)},m(e,t){return X(e.getMinutes(),t.length)},s(e,t){return X(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return X(o,t.length)}},Pt={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},oi={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return tt.y(e,t)},Y:function(e,t,n,r){const o=ni(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return X(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):X(s,t.length)},R:function(e,t){const n=Ka(e);return X(n,t.length)},u:function(e,t){const n=e.getFullYear();return X(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return X(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return X(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return tt.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return X(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=ri(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):X(o,t.length)},I:function(e,t,n){const r=ti(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):X(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):tt.d(e,t)},D:function(e,t,n){const r=vh(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):X(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return X(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return X(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return X(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Pt.noon:r===0?o=Pt.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Pt.evening:r>=12?o=Pt.afternoon:r>=4?o=Pt.morning:o=Pt.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return tt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):tt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):X(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):X(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):tt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):tt.s(e,t)},S:function(e,t){return tt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ai(r);case"XXXX":case"XX":return lt(r);case"XXXXX":case"XXX":default:return lt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ai(r);case"xxxx":case"xx":return lt(r);case"xxxxx":case"xxx":default:return lt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+si(r,":");case"OOOO":default:return"GMT"+lt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+si(r,":");case"zzzz":default:return"GMT"+lt(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return X(r,t.length)},T:function(e,t,n){return X(+e,t.length)}};function si(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+X(s,2)}function ai(e,t){return e%60===0?(e>0?"-":"+")+X(Math.abs(e)/60,2):lt(e,t)}function lt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=X(Math.trunc(r/60),2),s=X(r%60,2);return n+o+t+s}const ii=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},ci=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},bh={p:ci,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return ii(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",ii(r,t)).replace("{{time}}",ci(o,t))}},wh=/^D+$/,xh=/^Y+$/,Ch=["D","DD","YY","YYYY"];function Sh(e){return wh.test(e)}function kh(e){return xh.test(e)}function Eh(e,t,n){const r=Mh(e,t,n);if(console.warn(r),Ch.includes(e))throw new RangeError(r)}function Mh(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Nh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Oh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ph=/^'([^]*?)'?$/,Dh=/''/g,Th=/[a-zA-Z]/;function Or(e,t,n){var u,d,f,g,x,h,b,p;const r=$t(),o=(n==null?void 0:n.locale)??r.locale??Nr,s=(n==null?void 0:n.firstWeekContainsDate)??((d=(u=n==null?void 0:n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((g=(f=r.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,i=(n==null?void 0:n.weekStartsOn)??((h=(x=n==null?void 0:n.locale)==null?void 0:x.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((p=(b=r.locale)==null?void 0:b.options)==null?void 0:p.weekStartsOn)??0,a=J(e,n==null?void 0:n.in);if(!Af(a))throw new RangeError("Invalid time value");let c=t.match(Oh).map(y=>{const w=y[0];if(w==="p"||w==="P"){const S=bh[w];return S(y,o.formatLong)}return y}).join("").match(Nh).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const w=y[0];if(w==="'")return{isToken:!1,value:Ah(y)};if(oi[w])return{isToken:!0,value:y};if(w.match(Th))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:y}});o.localize.preprocessor&&(c=o.localize.preprocessor(a,c));const l={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return c.map(y=>{if(!y.isToken)return y.value;const w=y.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&kh(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Sh(w))&&Eh(w,t,String(e));const S=oi[w[0]];return S(a,w,o.localize,l)}).join("")}function Ah(e){const t=e.match(Ph);return t?t[1].replace(Dh,"'"):e}function Wh(e,t){const n=J(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),s=de(n,0);return s.setFullYear(r,o+1,0),s.setHours(0,0,0,0),s.getDate()}function _h(e,t){return J(e,t==null?void 0:t.in).getMonth()}function Fh(e,t){return J(e,t==null?void 0:t.in).getFullYear()}function Ih(e,t){return+J(e)>+J(t)}function Bh(e,t){return+J(e)<+J(t)}function Lh(e,t,n){const[r,o]=Ot(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function $h(e,t,n){const[r,o]=Ot(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function Vh(e,t,n){const r=J(e,n==null?void 0:n.in),o=r.getFullYear(),s=r.getDate(),i=de(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const a=Wh(i);return r.setMonth(t,Math.min(s,a)),r}function Hh(e,t,n){const r=J(e,n==null?void 0:n.in);return isNaN(+r)?de(e,NaN):(r.setFullYear(t),r)}const Pr={},jt={};function Rt(e,t){try{const r=(Pr[e]||(Pr[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in jt?jt[r]:li(r,r.split(":"))}catch{if(e in jt)return jt[e];const n=e==null?void 0:e.match(Yh);return n?li(e,n.slice(1)):NaN}}const Yh=/([+-]\d\d):?(\d\d)?/;function li(e,t){const n=+t[0],r=+(t[1]||0);return jt[e]=n>0?n*60+r:n*60-r}class _e extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Rt(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),ui(this),Dr(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new _e(...n,t):new _e(Date.now(),t)}withTimeZone(t){return new _e(+this,t)}getTimezoneOffset(){return-Rt(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Dr(this),+this}[Symbol.for("constructDateFrom")](t){return new _e(+new Date(t),this.timeZone)}}const di=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!di.test(e))return;const t=e.replace(di,"$1UTC");_e.prototype[t]&&(e.startsWith("get")?_e.prototype[e]=function(){return this.internal[t]()}:(_e.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),zh(this),+this},_e.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Dr(this),+this}))});function Dr(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function zh(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),ui(e)}function ui(e){const t=Rt(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=-new Date(+n).getTimezoneOffset(),s=r-o,i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();s&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+s);const a=r-t;a&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+a);const c=Rt(e.timeZone,e),u=-new Date(+e).getTimezoneOffset()-c,d=c!==t,f=u-a;if(d&&f){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+f);const g=Rt(e.timeZone,e),x=c-g;x&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+x),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+x))}}class fe extends _e{static tz(t,...n){return n.length?new fe(...n,t):new fe(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${jh(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new fe(+this,t)}[Symbol.for("constructDateFrom")](t){return new fe(+new Date(t),this.timeZone)}}function jh(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var A;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(A||(A={}));var ae;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(ae||(ae={}));var Ee;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Ee||(Ee={}));var ye;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(ye||(ye={}));const fi=5,Rh=4;function Uh(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),s=t.addDays(o,fi*7-1);return t.getMonth(e)===t.getMonth(s)?fi:Rh}function hi(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-1*6):t.addDays(n,-1*(r-1))}function qh(e,t){const n=hi(e,t),r=Uh(e,t);return t.addDays(n,r*7-1)}class ze{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?fe.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,s)=>{var i;return(i=this.overrides)!=null&&i.newDate?this.overrides.newDate(r,o,s):this.options.timeZone?new fe(r,o,s,this.options.timeZone):new Date(r,o,s)},this.addDays=(r,o)=>{var s;return(s=this.overrides)!=null&&s.addDays?this.overrides.addDays(r,o):qa(r,o)},this.addMonths=(r,o)=>{var s;return(s=this.overrides)!=null&&s.addMonths?this.overrides.addMonths(r,o):Ga(r,o)},this.addWeeks=(r,o)=>{var s;return(s=this.overrides)!=null&&s.addWeeks?this.overrides.addWeeks(r,o):Nf(r,o)},this.addYears=(r,o)=>{var s;return(s=this.overrides)!=null&&s.addYears?this.overrides.addYears(r,o):Of(r,o)},this.differenceInCalendarDays=(r,o)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):Qa(r,o)},this.differenceInCalendarMonths=(r,o)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):Wf(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):If(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):qh(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):$f(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):_f(r)},this.endOfWeek=(r,o)=>{var s;return(s=this.overrides)!=null&&s.endOfWeek?this.overrides.endOfWeek(r,o):ei(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):Lf(r)},this.format=(r,o,s)=>{var a;const i=(a=this.overrides)!=null&&a.format?this.overrides.format(r,o,this.options):Or(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(i):i},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):ti(r)},this.getMonth=(r,o)=>{var s;return(s=this.overrides)!=null&&s.getMonth?this.overrides.getMonth(r,this.options):_h(r,this.options)},this.getYear=(r,o)=>{var s;return(s=this.overrides)!=null&&s.getYear?this.overrides.getYear(r,this.options):Fh(r,this.options)},this.getWeek=(r,o)=>{var s;return(s=this.overrides)!=null&&s.getWeek?this.overrides.getWeek(r,this.options):ri(r,this.options)},this.isAfter=(r,o)=>{var s;return(s=this.overrides)!=null&&s.isAfter?this.overrides.isAfter(r,o):Ih(r,o)},this.isBefore=(r,o)=>{var s;return(s=this.overrides)!=null&&s.isBefore?this.overrides.isBefore(r,o):Bh(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):Za(r)},this.isSameDay=(r,o)=>{var s;return(s=this.overrides)!=null&&s.isSameDay?this.overrides.isSameDay(r,o):Tf(r,o)},this.isSameMonth=(r,o)=>{var s;return(s=this.overrides)!=null&&s.isSameMonth?this.overrides.isSameMonth(r,o):Lh(r,o)},this.isSameYear=(r,o)=>{var s;return(s=this.overrides)!=null&&s.isSameYear?this.overrides.isSameYear(r,o):$h(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):Pf(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):Df(r)},this.setMonth=(r,o)=>{var s;return(s=this.overrides)!=null&&s.setMonth?this.overrides.setMonth(r,o):Vh(r,o)},this.setYear=(r,o)=>{var s;return(s=this.overrides)!=null&&s.setYear?this.overrides.setYear(r,o):Hh(r,o)},this.startOfBroadcastWeek=(r,o)=>{var s;return(s=this.overrides)!=null&&s.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):hi(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):Ht(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):Vt(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):Bf(r)},this.startOfWeek=(r,o)=>{var s;return(s=this.overrides)!=null&&s.startOfWeek?this.overrides.startOfWeek(r,this.options):Nt(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):Ja(r)},this.options={locale:Nr,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}}const Fe=new ze;class mi{constructor(t,n,r=Fe){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Gh{constructor(t,n){this.date=t,this.weeks=n}}class Kh{constructor(t,n){this.days=n,this.weekNumber=t}}function je(e,t,n=!1,r=Fe){let{from:o,to:s}=e;const{differenceInCalendarDays:i,isSameDay:a}=r;return o&&s?(i(s,o)<0&&([o,s]=[s,o]),i(t,o)>=(n?1:0)&&i(s,t)>=(n?1:0)):!n&&s?a(s,t):!n&&o?a(o,t):!1}function pi(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Tr(e){return!!(e&&typeof e=="object"&&"from"in e)}function gi(e){return!!(e&&typeof e=="object"&&"after"in e)}function vi(e){return!!(e&&typeof e=="object"&&"before"in e)}function yi(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function bi(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Re(e,t,n=Fe){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:s,isAfter:i}=n;return r.some(a=>{if(typeof a=="boolean")return a;if(n.isDate(a))return o(e,a);if(bi(a,n))return a.includes(e);if(Tr(a))return je(a,e,!1,n);if(yi(a))return Array.isArray(a.dayOfWeek)?a.dayOfWeek.includes(e.getDay()):a.dayOfWeek===e.getDay();if(pi(a)){const c=s(a.before,e),l=s(a.after,e),u=c>0,d=l<0;return i(a.before,a.after)?d&&u:u||d}return gi(a)?s(e,a.after)>0:vi(a)?s(a.before,e)>0:typeof a=="function"?a(e):!1})}function Xh(e,t,n){const{disabled:r,hidden:o,modifiers:s,showOutsideDays:i,broadcastCalendar:a,today:c}=t,{isSameDay:l,isSameMonth:u,startOfMonth:d,isBefore:f,endOfMonth:g,isAfter:x}=n,h=t.startMonth&&d(t.startMonth),b=t.endMonth&&g(t.endMonth),p={[ae.focused]:[],[ae.outside]:[],[ae.disabled]:[],[ae.hidden]:[],[ae.today]:[]},y={};for(const w of e){const{date:S,displayMonth:C}=w,M=!!(C&&!u(S,C)),k=!!(h&&f(S,h)),O=!!(b&&x(S,b)),_=!!(r&&Re(S,r,n)),W=!!(o&&Re(S,o,n))||k||O||!a&&!i&&M||a&&i===!1&&M,P=l(S,c??n.today());M&&p.outside.push(w),_&&p.disabled.push(w),W&&p.hidden.push(w),P&&p.today.push(w),s&&Object.keys(s).forEach(N=>{const I=s==null?void 0:s[N];I&&Re(S,I,n)&&(y[N]?y[N].push(w):y[N]=[w])})}return w=>{const S={[ae.focused]:!1,[ae.disabled]:!1,[ae.hidden]:!1,[ae.outside]:!1,[ae.today]:!1},C={};for(const M in p){const k=p[M];S[M]=k.some(O=>O===w)}for(const M in y)C[M]=y[M].some(k=>k===w);return{...S,...C}}}function Qh(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[s])=>(n[s]?o.push(n[s]):t[ae[s]]?o.push(t[ae[s]]):t[Ee[s]]&&o.push(t[Ee[s]]),o),[t[A.Day]])}function Zh(e){return E.createElement("button",{...e})}function Jh(e){return E.createElement("span",{...e})}function em(e){const{size:t=24,orientation:n="left",className:r}=e;return E.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&E.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&E.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&E.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&E.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function tm(e){const{day:t,modifiers:n,...r}=e;return E.createElement("td",{...r})}function nm(e){const{day:t,modifiers:n,...r}=e,o=E.useRef(null);return E.useEffect(()=>{var s;n.focused&&((s=o.current)==null||s.focus())},[n.focused]),E.createElement("button",{ref:o,...r})}function rm(e){const{options:t,className:n,components:r,classNames:o,...s}=e,i=[o[A.Dropdown],n].join(" "),a=t==null?void 0:t.find(({value:c})=>c===s.value);return E.createElement("span",{"data-disabled":s.disabled,className:o[A.DropdownRoot]},E.createElement(r.Select,{className:i,...s},t==null?void 0:t.map(({value:c,label:l,disabled:u})=>E.createElement(r.Option,{key:c,value:c,disabled:u},l))),E.createElement("span",{className:o[A.CaptionLabel],"aria-hidden":!0},a==null?void 0:a.label,E.createElement(r.Chevron,{orientation:"down",size:18,className:o[A.Chevron]})))}function om(e){return E.createElement("div",{...e})}function sm(e){return E.createElement("div",{...e})}function am(e){const{calendarMonth:t,displayIndex:n,...r}=e;return E.createElement("div",{...r},e.children)}function im(e){const{calendarMonth:t,displayIndex:n,...r}=e;return E.createElement("div",{...r})}function cm(e){return E.createElement("table",{...e})}function lm(e){return E.createElement("div",{...e})}const wi=E.createContext(void 0);function Ut(){const e=E.useContext(wi);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function dm(e){const{components:t}=Ut();return E.createElement(t.Dropdown,{...e})}function um(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...s}=e,{components:i,classNames:a,labels:{labelPrevious:c,labelNext:l}}=Ut(),u=E.useCallback(f=>{o&&(n==null||n(f))},[o,n]),d=E.useCallback(f=>{r&&(t==null||t(f))},[r,t]);return E.createElement("nav",{...s},E.createElement(i.PreviousMonthButton,{type:"button",className:a[A.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:d},E.createElement(i.Chevron,{disabled:r?void 0:!0,className:a[A.Chevron],orientation:"left"})),E.createElement(i.NextMonthButton,{type:"button",className:a[A.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":l(o),onClick:u},E.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:a[A.Chevron]})))}function fm(e){const{components:t}=Ut();return E.createElement(t.Button,{...e})}function hm(e){return E.createElement("option",{...e})}function mm(e){const{components:t}=Ut();return E.createElement(t.Button,{...e})}function pm(e){const{rootRef:t,...n}=e;return E.createElement("div",{...n,ref:t})}function gm(e){return E.createElement("select",{...e})}function vm(e){const{week:t,...n}=e;return E.createElement("tr",{...n})}function ym(e){return E.createElement("th",{...e})}function bm(e){return E.createElement("thead",{"aria-hidden":!0},E.createElement("tr",{...e}))}function wm(e){const{week:t,...n}=e;return E.createElement("th",{...n})}function xm(e){return E.createElement("th",{...e})}function Cm(e){return E.createElement("tbody",{...e})}function Sm(e){const{components:t}=Ut();return E.createElement(t.Dropdown,{...e})}const km=Object.freeze(Object.defineProperty({__proto__:null,Button:Zh,CaptionLabel:Jh,Chevron:em,Day:tm,DayButton:nm,Dropdown:rm,DropdownNav:om,Footer:sm,Month:am,MonthCaption:im,MonthGrid:cm,Months:lm,MonthsDropdown:dm,Nav:um,NextMonthButton:fm,Option:hm,PreviousMonthButton:mm,Root:pm,Select:gm,Week:vm,WeekNumber:wm,WeekNumberHeader:xm,Weekday:ym,Weekdays:bm,Weeks:Cm,YearsDropdown:Sm},Symbol.toStringTag,{value:"Module"}));function Em(e){return{...km,...e}}function Mm(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function Nm(){const e={};for(const t in A)e[A[t]]=`rdp-${A[t]}`;for(const t in ae)e[ae[t]]=`rdp-${ae[t]}`;for(const t in Ee)e[Ee[t]]=`rdp-${Ee[t]}`;for(const t in ye)e[ye[t]]=`rdp-${ye[t]}`;return e}function xi(e,t,n){return(n??new ze(t)).format(e,"LLLL y")}const Om=xi;function Pm(e,t,n){return(n??new ze(t)).format(e,"d")}function Dm(e,t=Fe){return t.format(e,"LLLL")}function Tm(e,t=Fe){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Am(){return""}function Wm(e,t,n){return(n??new ze(t)).format(e,"cccccc")}function Ci(e,t=Fe){return t.format(e,"yyyy")}const _m=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:xi,formatDay:Pm,formatMonthCaption:Om,formatMonthDropdown:Dm,formatWeekNumber:Tm,formatWeekNumberHeader:Am,formatWeekdayName:Wm,formatYearCaption:Ci,formatYearDropdown:Ci},Symbol.toStringTag,{value:"Module"}));function Fm(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{..._m,...e}}function Im(e,t,n,r,o){const{startOfMonth:s,startOfYear:i,endOfYear:a,eachMonthOfInterval:c,getMonth:l}=o;return c({start:i(e),end:a(e)}).map(f=>{const g=r.formatMonthDropdown(f,o),x=l(f),h=t&&f<s(t)||n&&f>s(n)||!1;return{value:x,label:g,disabled:h}})}function Bm(e,t={},n={}){let r={...t==null?void 0:t[A.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function Lm(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),s=[];for(let i=0;i<7;i++){const a=e.addDays(o,i);s.push(a)}return s}function $m(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:s,addYears:i,getYear:a,isBefore:c,isSameYear:l}=r,u=o(e),d=s(t),f=[];let g=u;for(;c(g,d)||l(g,d);)f.push(g),g=i(g,1);return f.map(x=>{const h=n.formatYearDropdown(x,r);return{value:a(x),label:h,disabled:!1}})}function Si(e,t,n){return(n??new ze(t)).format(e,"LLLL y")}const Vm=Si;function Hm(e,t,n,r){let o=(r??new ze(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function ki(e,t,n,r){let o=(r??new ze(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const Ym=ki;function zm(){return""}function jm(e){return"Choose the Month"}function Rm(e){return"Go to the Next Month"}function Um(e){return"Go to the Previous Month"}function qm(e,t,n){return(n??new ze(t)).format(e,"cccc")}function Gm(e,t){return`Week ${e}`}function Km(e){return"Week Number"}function Xm(e){return"Choose the Year"}const Qm=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Vm,labelDay:Ym,labelDayButton:ki,labelGrid:Si,labelGridcell:Hm,labelMonthDropdown:jm,labelNav:zm,labelNext:Rm,labelPrevious:Um,labelWeekNumber:Gm,labelWeekNumberHeader:Km,labelWeekday:qm,labelYearDropdown:Xm},Symbol.toStringTag,{value:"Module"})),qt=e=>e instanceof HTMLElement?e:null,Ar=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Zm=e=>qt(e.querySelector("[data-animated-month]")),Wr=e=>qt(e.querySelector("[data-animated-caption]")),_r=e=>qt(e.querySelector("[data-animated-weeks]")),Jm=e=>qt(e.querySelector("[data-animated-nav]")),ep=e=>qt(e.querySelector("[data-animated-weekdays]"));function tp(e,t,{classNames:n,months:r,focused:o,dateLib:s}){const i=E.useRef(null),a=E.useRef(r),c=E.useRef(!1);E.useLayoutEffect(()=>{const l=a.current;if(a.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||l.length===0||r.length!==l.length)return;const u=s.isSameMonth(r[0].date,l[0].date),d=s.isAfter(r[0].date,l[0].date),f=d?n[ye.caption_after_enter]:n[ye.caption_before_enter],g=d?n[ye.weeks_after_enter]:n[ye.weeks_before_enter],x=i.current,h=e.current.cloneNode(!0);if(h instanceof HTMLElement?(Ar(h).forEach(w=>{if(!(w instanceof HTMLElement))return;const S=Zm(w);S&&w.contains(S)&&w.removeChild(S);const C=Wr(w);C&&C.classList.remove(f);const M=_r(w);M&&M.classList.remove(g)}),i.current=h):i.current=null,c.current||u||o)return;const b=x instanceof HTMLElement?Ar(x):[],p=Ar(e.current);if(p&&p.every(y=>y instanceof HTMLElement)&&b&&b.every(y=>y instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const y=Jm(e.current);y&&(y.style.zIndex="1"),p.forEach((w,S)=>{const C=b[S];if(!C)return;w.style.position="relative",w.style.overflow="hidden";const M=Wr(w);M&&M.classList.add(f);const k=_r(w);k&&k.classList.add(g);const O=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),y&&(y.style.zIndex=""),M&&M.classList.remove(f),k&&k.classList.remove(g),w.style.position="",w.style.overflow="",w.contains(C)&&w.removeChild(C)};C.style.pointerEvents="none",C.style.position="absolute",C.style.overflow="hidden",C.setAttribute("aria-hidden","true");const _=ep(C);_&&(_.style.opacity="0");const W=Wr(C);W&&(W.classList.add(d?n[ye.caption_before_exit]:n[ye.caption_after_exit]),W.addEventListener("animationend",O));const P=_r(C);P&&P.classList.add(d?n[ye.weeks_before_exit]:n[ye.weeks_after_exit]),w.insertBefore(C,w.firstChild)})}})}function np(e,t,n,r){const o=e[0],s=e[e.length-1],{ISOWeek:i,fixedWeeks:a,broadcastCalendar:c}=n??{},{addDays:l,differenceInCalendarDays:u,differenceInCalendarMonths:d,endOfBroadcastWeek:f,endOfISOWeek:g,endOfMonth:x,endOfWeek:h,isAfter:b,startOfBroadcastWeek:p,startOfISOWeek:y,startOfWeek:w}=r,S=c?p(o,r):i?y(o):w(o),C=c?f(s):i?g(x(s)):h(x(s)),M=u(C,S),k=d(s,o)+1,O=[];for(let P=0;P<=M;P++){const N=l(S,P);if(t&&b(N,t))break;O.push(N)}const W=(c?35:42)*k;if(a&&O.length<W){const P=W-O.length;for(let N=0;N<P;N++){const I=l(O[O.length-1],1);O.push(I)}}return O}function rp(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((s,i)=>[...s,...i.days],t);return[...n,...o]},t)}function op(e,t,n,r){const{numberOfMonths:o=1}=n,s=[];for(let i=0;i<o;i++){const a=r.addMonths(e,i);if(t&&a>t)break;s.push(a)}return s}function Ei(e,t){const{month:n,defaultMonth:r,today:o=t.today(),numberOfMonths:s=1,endMonth:i,startMonth:a}=e;let c=n||r||o;const{differenceInCalendarMonths:l,addMonths:u,startOfMonth:d}=t;if(i&&l(i,c)<0){const f=-1*(s-1);c=u(i,f)}return a&&l(c,a)<0&&(c=a),d(c)}function sp(e,t,n,r){const{addDays:o,endOfBroadcastWeek:s,endOfISOWeek:i,endOfMonth:a,endOfWeek:c,getISOWeek:l,getWeek:u,startOfBroadcastWeek:d,startOfISOWeek:f,startOfWeek:g}=r,x=e.reduce((h,b)=>{const p=n.broadcastCalendar?d(b,r):n.ISOWeek?f(b):g(b),y=n.broadcastCalendar?s(b):n.ISOWeek?i(a(b)):c(a(b)),w=t.filter(k=>k>=p&&k<=y),S=n.broadcastCalendar?35:42;if(n.fixedWeeks&&w.length<S){const k=t.filter(O=>{const _=S-w.length;return O>y&&O<=o(y,_)});w.push(...k)}const C=w.reduce((k,O)=>{const _=n.ISOWeek?l(O):u(O),W=k.find(N=>N.weekNumber===_),P=new mi(O,b,r);return W?W.days.push(P):k.push(new Kh(_,[P])),k},[]),M=new Gh(b,C);return h.push(M),h},[]);return n.reverseMonths?x.reverse():x}function ap(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:s,startOfMonth:i,endOfMonth:a,addYears:c,endOfYear:l,newDate:u,today:d}=t,{fromYear:f,toYear:g,fromMonth:x,toMonth:h}=e;!n&&x&&(n=x),!n&&f&&(n=t.newDate(f,0,1)),!r&&h&&(r=h),!r&&g&&(r=u(g,11,31));const b=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=i(n):f?n=u(f,0,1):!n&&b&&(n=o(c(e.today??d(),-100))),r?r=a(r):g?r=u(g,11,31):!r&&b&&(r=l(e.today??d())),[n&&s(n),r&&s(r)]}function ip(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s=1}=n,{startOfMonth:i,addMonths:a,differenceInCalendarMonths:c}=r,l=o?s:1,u=i(e);if(!t)return a(u,l);if(!(c(t,e)<s))return a(u,l)}function cp(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s}=n,{startOfMonth:i,addMonths:a,differenceInCalendarMonths:c}=r,l=o?s??1:1,u=i(e);if(!t)return a(u,-l);if(!(c(u,t)<=0))return a(u,-l)}function lp(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function Nn(e,t){const[n,r]=E.useState(e);return[t===void 0?n:t,r]}function dp(e,t){const[n,r]=ap(e,t),{startOfMonth:o,endOfMonth:s}=t,i=Ei(e,t),[a,c]=Nn(i,e.month?i:void 0);E.useEffect(()=>{const M=Ei(e,t);c(M)},[e.timeZone]);const l=op(a,r,e,t),u=np(l,e.endMonth?s(e.endMonth):void 0,e,t),d=sp(l,u,e,t),f=lp(d),g=rp(d),x=cp(a,n,e,t),h=ip(a,r,e,t),{disableNavigation:b,onMonthChange:p}=e,y=M=>f.some(k=>k.days.some(O=>O.isEqualTo(M))),w=M=>{if(b)return;let k=o(M);n&&k<o(n)&&(k=o(n)),r&&k>o(r)&&(k=o(r)),c(k),p==null||p(k)};return{months:d,weeks:f,days:g,navStart:n,navEnd:r,previousMonth:x,nextMonth:h,goToMonth:w,goToDay:M=>{y(M)||w(M.date)}}}var Ie;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Ie||(Ie={}));function Mi(e){return!e[ae.disabled]&&!e[ae.hidden]&&!e[ae.outside]}function up(e,t,n,r){let o,s=-1;for(const i of e){const a=t(i);Mi(a)&&(a[ae.focused]&&s<Ie.FocusedModifier?(o=i,s=Ie.FocusedModifier):r!=null&&r.isEqualTo(i)&&s<Ie.LastFocused?(o=i,s=Ie.LastFocused):n(i.date)&&s<Ie.Selected?(o=i,s=Ie.Selected):a[ae.today]&&s<Ie.Today&&(o=i,s=Ie.Today))}return o||(o=e.find(i=>Mi(t(i)))),o}function fp(e,t,n,r,o,s,i){const{ISOWeek:a,broadcastCalendar:c}=s,{addDays:l,addMonths:u,addWeeks:d,addYears:f,endOfBroadcastWeek:g,endOfISOWeek:x,endOfWeek:h,max:b,min:p,startOfBroadcastWeek:y,startOfISOWeek:w,startOfWeek:S}=i;let M={day:l,week:d,month:u,year:f,startOfWeek:k=>c?y(k,i):a?w(k):S(k),endOfWeek:k=>c?g(k):a?x(k):h(k)}[e](n,t==="after"?1:-1);return t==="before"&&r?M=b([r,M]):t==="after"&&o&&(M=p([o,M])),M}function Ni(e,t,n,r,o,s,i,a=0){if(a>365)return;const c=fp(e,t,n.date,r,o,s,i),l=!!(s.disabled&&Re(c,s.disabled,i)),u=!!(s.hidden&&Re(c,s.hidden,i)),d=c,f=new mi(c,d,i);return!l&&!u?f:Ni(e,t,f,r,o,s,i,a+1)}function hp(e,t,n,r,o){const{autoFocus:s}=e,[i,a]=E.useState(),c=up(t.days,n,r||(()=>!1),i),[l,u]=E.useState(s?c:void 0);return{isFocusTarget:h=>!!(c!=null&&c.isEqualTo(h)),setFocused:u,focused:l,blur:()=>{a(l),u(void 0)},moveFocus:(h,b)=>{if(!l)return;const p=Ni(h,b,l,t.navStart,t.navEnd,e,o);p&&(t.goToDay(p),u(p))}}}function mp(e,t){const{selected:n,required:r,onSelect:o}=e,[s,i]=Nn(n,o?n:void 0),a=o?n:s,{isSameDay:c}=t,l=g=>(a==null?void 0:a.some(x=>c(x,g)))??!1,{min:u,max:d}=e;return{selected:a,select:(g,x,h)=>{let b=[...a??[]];if(l(g)){if((a==null?void 0:a.length)===u||r&&(a==null?void 0:a.length)===1)return;b=a==null?void 0:a.filter(p=>!c(p,g))}else(a==null?void 0:a.length)===d?b=[g]:b=[...b,g];return o||i(b),o==null||o(b,g,x,h),b},isSelected:l}}function pp(e,t,n=0,r=0,o=!1,s=Fe){const{from:i,to:a}=t||{},{isSameDay:c,isAfter:l,isBefore:u}=s;let d;if(!i&&!a)d={from:e,to:n>0?void 0:e};else if(i&&!a)c(i,e)?o?d={from:i,to:void 0}:d=void 0:u(e,i)?d={from:e,to:i}:d={from:i,to:e};else if(i&&a)if(c(i,e)&&c(a,e))o?d={from:i,to:a}:d=void 0;else if(c(i,e))d={from:i,to:n>0?void 0:e};else if(c(a,e))d={from:e,to:n>0?void 0:e};else if(u(e,i))d={from:e,to:a};else if(l(e,i))d={from:i,to:e};else if(l(e,a))d={from:i,to:e};else throw new Error("Invalid range");if(d!=null&&d.from&&(d!=null&&d.to)){const f=s.differenceInCalendarDays(d.to,d.from);r>0&&f>r?d={from:e,to:void 0}:n>1&&f<n&&(d={from:e,to:void 0})}return d}function gp(e,t,n=Fe){const r=Array.isArray(t)?t:[t];let o=e.from;const s=n.differenceInCalendarDays(e.to,e.from),i=Math.min(s,6);for(let a=0;a<=i;a++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function Oi(e,t,n=Fe){return je(e,t.from,!1,n)||je(e,t.to,!1,n)||je(t,e.from,!1,n)||je(t,e.to,!1,n)}function vp(e,t,n=Fe){const r=Array.isArray(t)?t:[t];if(r.filter(a=>typeof a!="function").some(a=>typeof a=="boolean"?a:n.isDate(a)?je(e,a,!1,n):bi(a,n)?a.some(c=>je(e,c,!1,n)):Tr(a)?a.from&&a.to?Oi(e,{from:a.from,to:a.to},n):!1:yi(a)?gp(e,a.dayOfWeek,n):pi(a)?n.isAfter(a.before,a.after)?Oi(e,{from:n.addDays(a.after,1),to:n.addDays(a.before,-1)},n):Re(e.from,a,n)||Re(e.to,a,n):gi(a)||vi(a)?Re(e.from,a,n)||Re(e.to,a,n):!1))return!0;const i=r.filter(a=>typeof a=="function");if(i.length){let a=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let l=0;l<=c;l++){if(i.some(u=>u(a)))return!0;a=n.addDays(a,1)}}return!1}function yp(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:s,onSelect:i}=e,[a,c]=Nn(o,i?o:void 0),l=i?o:a;return{selected:l,select:(f,g,x)=>{const{min:h,max:b}=e,p=f?pp(f,l,h,b,s,t):void 0;return r&&n&&(p!=null&&p.from)&&p.to&&vp({from:p.from,to:p.to},n,t)&&(p.from=f,p.to=void 0),i||c(p),i==null||i(p,f,g,x),p},isSelected:f=>l&&je(l,f,!1,t)}}function bp(e,t){const{selected:n,required:r,onSelect:o}=e,[s,i]=Nn(n,o?n:void 0),a=o?n:s,{isSameDay:c}=t;return{selected:a,select:(d,f,g)=>{let x=d;return!r&&a&&a&&c(d,a)&&(x=void 0),o||i(x),o==null||o(x,d,f,g),x},isSelected:d=>a?c(a,d):!1}}function wp(e,t){const n=bp(e,t),r=mp(e,t),o=yp(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function xp(e){var rc;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new fe(t.today,t.timeZone)),t.month&&(t.month=new fe(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new fe(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new fe(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new fe(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new fe(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(rc=t.selected)==null?void 0:rc.map(j=>new fe(j,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new fe(t.selected.from,t.timeZone):void 0,to:t.selected.to?new fe(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:s,locale:i,classNames:a}=E.useMemo(()=>{const j={...Nr,...t.locale};return{dateLib:new ze({locale:j,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:Em(t.components),formatters:Fm(t.formatters),labels:{...Qm,...t.labels},locale:j,classNames:{...Nm(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:c,mode:l,navLayout:u,numberOfMonths:d=1,onDayBlur:f,onDayClick:g,onDayFocus:x,onDayKeyDown:h,onDayMouseEnter:b,onDayMouseLeave:p,onNextClick:y,onPrevClick:w,showWeekNumber:S,styles:C}=t,{formatCaption:M,formatDay:k,formatMonthDropdown:O,formatWeekNumber:_,formatWeekNumberHeader:W,formatWeekdayName:P,formatYearDropdown:N}=r,I=dp(t,s),{days:z,months:Y,navStart:L,navEnd:H,previousMonth:D,nextMonth:B,goToMonth:R}=I,oe=Xh(z,t,s),{isSelected:Me,select:Ne,selected:be}=wp(t,s)??{},{blur:Ue,focused:xe,isFocusTarget:$,moveFocus:ee,setFocused:ce}=hp(t,I,oe,Me??(()=>!1),s),{labelDayButton:te,labelGridcell:G,labelGrid:K,labelMonthDropdown:me,labelNav:we,labelPrevious:dt,labelNext:ut,labelWeekday:ft,labelWeekNumber:Hr,labelWeekNumberHeader:Tt,labelYearDropdown:Gp}=o,Kp=E.useMemo(()=>Lm(s,t.ISOWeek),[s,t.ISOWeek]),tc=l!==void 0||g!==void 0,Yr=E.useCallback(()=>{D&&(R(D),w==null||w(D))},[D,R,w]),zr=E.useCallback(()=>{B&&(R(B),y==null||y(B))},[R,B,y]),Xp=E.useCallback((j,se)=>ne=>{ne.preventDefault(),ne.stopPropagation(),ce(j),Ne==null||Ne(j.date,se,ne),g==null||g(j.date,se,ne)},[Ne,g,ce]),Qp=E.useCallback((j,se)=>ne=>{ce(j),x==null||x(j.date,se,ne)},[x,ce]),Zp=E.useCallback((j,se)=>ne=>{Ue(),f==null||f(j.date,se,ne)},[Ue,f]),Jp=E.useCallback((j,se)=>ne=>{const rt={ArrowLeft:["day",t.dir==="rtl"?"after":"before"],ArrowRight:["day",t.dir==="rtl"?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[ne.shiftKey?"year":"month","before"],PageDown:[ne.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(rt[ne.key]){ne.preventDefault(),ne.stopPropagation();const[Oe,Pn]=rt[ne.key];ee(Oe,Pn)}h==null||h(j.date,se,ne)},[ee,h,t.dir]),eg=E.useCallback((j,se)=>ne=>{b==null||b(j.date,se,ne)},[b]),tg=E.useCallback((j,se)=>ne=>{p==null||p(j.date,se,ne)},[p]),ng=E.useCallback(j=>se=>{const ne=Number(se.target.value),rt=s.setMonth(s.startOfMonth(j),ne);R(rt)},[s,R]),rg=E.useCallback(j=>se=>{const ne=Number(se.target.value),rt=s.setYear(s.startOfMonth(j),ne);R(rt)},[s,R]),{className:og,style:sg}=E.useMemo(()=>({className:[a[A.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[A.Root],...t.style}}),[a,t.className,t.style,C]),ag=Mm(t),nc=E.useRef(null);tp(nc,!!t.animate,{classNames:a,months:Y,focused:xe,dateLib:s});const ig={dayPickerProps:t,selected:be,select:Ne,isSelected:Me,months:Y,nextMonth:B,previousMonth:D,goToMonth:R,getModifiers:oe,components:n,classNames:a,styles:C,labels:o,formatters:r};return E.createElement(wi.Provider,{value:ig},E.createElement(n.Root,{rootRef:t.animate?nc:void 0,className:og,style:sg,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...ag},E.createElement(n.Months,{className:a[A.Months],style:C==null?void 0:C[A.Months]},!t.hideNavigation&&!u&&E.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:a[A.Nav],style:C==null?void 0:C[A.Nav],"aria-label":we(),onPreviousClick:Yr,onNextClick:zr,previousMonth:D,nextMonth:B}),Y.map((j,se)=>{const ne=Im(j.date,L,H,r,s),rt=$m(L,H,r,s);return E.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:a[A.Month],style:C==null?void 0:C[A.Month],key:se,displayIndex:se,calendarMonth:j},u==="around"&&!t.hideNavigation&&se===0&&E.createElement(n.PreviousMonthButton,{type:"button",className:a[A.PreviousMonthButton],tabIndex:D?void 0:-1,"aria-disabled":D?void 0:!0,"aria-label":dt(D),onClick:Yr,"data-animated-button":t.animate?"true":void 0},E.createElement(n.Chevron,{disabled:D?void 0:!0,className:a[A.Chevron],orientation:t.dir==="rtl"?"right":"left"})),E.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:a[A.MonthCaption],style:C==null?void 0:C[A.MonthCaption],calendarMonth:j,displayIndex:se},c!=null&&c.startsWith("dropdown")?E.createElement(n.DropdownNav,{className:a[A.Dropdowns],style:C==null?void 0:C[A.Dropdowns]},c==="dropdown"||c==="dropdown-months"?E.createElement(n.MonthsDropdown,{className:a[A.MonthsDropdown],"aria-label":me(),classNames:a,components:n,disabled:!!t.disableNavigation,onChange:ng(j.date),options:ne,style:C==null?void 0:C[A.Dropdown],value:s.getMonth(j.date)}):E.createElement("span",null,O(j.date,s)),c==="dropdown"||c==="dropdown-years"?E.createElement(n.YearsDropdown,{className:a[A.YearsDropdown],"aria-label":Gp(s.options),classNames:a,components:n,disabled:!!t.disableNavigation,onChange:rg(j.date),options:rt,style:C==null?void 0:C[A.Dropdown],value:s.getYear(j.date)}):E.createElement("span",null,N(j.date,s)),E.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},M(j.date,s.options,s))):E.createElement(n.CaptionLabel,{className:a[A.CaptionLabel],role:"status","aria-live":"polite"},M(j.date,s.options,s))),u==="around"&&!t.hideNavigation&&se===d-1&&E.createElement(n.NextMonthButton,{type:"button",className:a[A.NextMonthButton],tabIndex:B?void 0:-1,"aria-disabled":B?void 0:!0,"aria-label":ut(B),onClick:zr,"data-animated-button":t.animate?"true":void 0},E.createElement(n.Chevron,{disabled:B?void 0:!0,className:a[A.Chevron],orientation:t.dir==="rtl"?"left":"right"})),se===d-1&&u==="after"&&!t.hideNavigation&&E.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:a[A.Nav],style:C==null?void 0:C[A.Nav],"aria-label":we(),onPreviousClick:Yr,onNextClick:zr,previousMonth:D,nextMonth:B}),E.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":l==="multiple"||l==="range","aria-label":K(j.date,s.options,s)||void 0,className:a[A.MonthGrid],style:C==null?void 0:C[A.MonthGrid]},!t.hideWeekdays&&E.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:a[A.Weekdays],style:C==null?void 0:C[A.Weekdays]},S&&E.createElement(n.WeekNumberHeader,{"aria-label":Tt(s.options),className:a[A.WeekNumberHeader],style:C==null?void 0:C[A.WeekNumberHeader],scope:"col"},W()),Kp.map((Oe,Pn)=>E.createElement(n.Weekday,{"aria-label":ft(Oe,s.options,s),className:a[A.Weekday],key:Pn,style:C==null?void 0:C[A.Weekday],scope:"col"},P(Oe,s.options,s)))),E.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:a[A.Weeks],style:C==null?void 0:C[A.Weeks]},j.weeks.map((Oe,Pn)=>E.createElement(n.Week,{className:a[A.Week],key:Oe.weekNumber,style:C==null?void 0:C[A.Week],week:Oe},S&&E.createElement(n.WeekNumber,{week:Oe,style:C==null?void 0:C[A.WeekNumber],"aria-label":Hr(Oe.weekNumber,{locale:i}),className:a[A.WeekNumber],scope:"row",role:"rowheader"},_(Oe.weekNumber,s)),Oe.days.map(he=>{const{date:Be}=he,Q=oe(he);if(Q[ae.focused]=!Q.hidden&&!!(xe!=null&&xe.isEqualTo(he)),Q[Ee.selected]=(Me==null?void 0:Me(Be))||Q.selected,Tr(be)){const{from:jr,to:Rr}=be;Q[Ee.range_start]=!!(jr&&Rr&&s.isSameDay(Be,jr)),Q[Ee.range_end]=!!(jr&&Rr&&s.isSameDay(Be,Rr)),Q[Ee.range_middle]=je(be,Be,!0,s)}const cg=Bm(Q,C,t.modifiersStyles),lg=Qh(Q,a,t.modifiersClassNames),dg=!tc&&!Q.hidden?G(Be,Q,s.options,s):void 0;return E.createElement(n.Day,{key:`${s.format(Be,"yyyy-MM-dd")}_${s.format(he.displayMonth,"yyyy-MM")}`,day:he,modifiers:Q,className:lg.join(" "),style:cg,role:"gridcell","aria-selected":Q.selected||void 0,"aria-label":dg,"data-day":s.format(Be,"yyyy-MM-dd"),"data-month":he.outside?s.format(Be,"yyyy-MM"):void 0,"data-selected":Q.selected||void 0,"data-disabled":Q.disabled||void 0,"data-hidden":Q.hidden||void 0,"data-outside":he.outside||void 0,"data-focused":Q.focused||void 0,"data-today":Q.today||void 0},!Q.hidden&&tc?E.createElement(n.DayButton,{className:a[A.DayButton],style:C==null?void 0:C[A.DayButton],type:"button",day:he,modifiers:Q,disabled:Q.disabled||void 0,tabIndex:$(he)?0:-1,"aria-label":te(Be,Q,s.options,s),onClick:Xp(he,Q),onBlur:Zp(he,Q),onFocus:Qp(he,Q),onKeyDown:Jp(he,Q),onMouseEnter:eg(he,Q),onMouseLeave:tg(he,Q)},k(Be,s.options,s)):!Q.hidden&&k(he.date,s.options,s))}))))))})),t.footer&&E.createElement(n.Footer,{className:a[A.Footer],style:C==null?void 0:C[A.Footer],role:"status","aria-live":"polite"},t.footer)))}function Pi({className:e,classNames:t,showOutsideDays:n=!0,...r}){return m.jsx(xp,{showOutsideDays:n,className:F("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:F(Fn({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:F(Fn({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{Chevron:({orientation:o})=>o==="left"?m.jsx(Zc,{className:"h-4 w-4"}):m.jsx(Jc,{className:"h-4 w-4"})},...r})}Pi.displayName="Calendar";var On="Popover",[Di,wg]=gt(On,[fn]),Gt=fn(),[Cp,nt]=Di(On),Ti=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=Gt(t),c=v.useRef(null),[l,u]=v.useState(!1),[d,f]=_t({prop:r,defaultProp:o??!1,onChange:s,caller:On});return m.jsx(Ws,{...a,children:m.jsx(Cp,{scope:t,contentId:tn(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(g=>!g),[f]),hasCustomAnchor:l,onCustomAnchorAdd:v.useCallback(()=>u(!0),[]),onCustomAnchorRemove:v.useCallback(()=>u(!1),[]),modal:i,children:n})})};Ti.displayName=On;var Ai="PopoverAnchor",Sp=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=nt(Ai,n),s=Gt(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return v.useEffect(()=>(i(),()=>a()),[i,a]),m.jsx(dr,{...s,...r,ref:t})});Sp.displayName=Ai;var Wi="PopoverTrigger",_i=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=nt(Wi,n),s=Gt(n),i=Z(t,o.triggerRef),a=m.jsx(q.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":$i(o.open),...r,ref:i,onClick:U(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:m.jsx(dr,{asChild:!0,...s,children:a})});_i.displayName=Wi;var Fr="PopoverPortal",[kp,Ep]=Di(Fr,{forceMount:void 0}),Fi=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=nt(Fr,t);return m.jsx(kp,{scope:t,forceMount:n,children:m.jsx(kn,{present:n||s.open,children:m.jsx(ur,{asChild:!0,container:o,children:r})})})};Fi.displayName=Fr;var Dt="PopoverContent",Ii=v.forwardRef((e,t)=>{const n=Ep(Dt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=nt(Dt,e.__scopePopover);return m.jsx(kn,{present:r||s.open,children:s.modal?m.jsx(Np,{...o,ref:t}):m.jsx(Op,{...o,ref:t})})});Ii.displayName=Dt;var Mp=pt("PopoverContent.RemoveScroll"),Np=v.forwardRef((e,t)=>{const n=nt(Dt,e.__scopePopover),r=v.useRef(null),o=Z(t,r),s=v.useRef(!1);return v.useEffect(()=>{const i=r.current;if(i)return Ls(i)},[]),m.jsx(vr,{as:Mp,allowPinchZoom:!0,children:m.jsx(Bi,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:U(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:U(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:U(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Op=v.forwardRef((e,t)=>{const n=nt(Dt,e.__scopePopover),r=v.useRef(!1),o=v.useRef(!1);return m.jsx(Bi,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((l=n.triggerRef.current)==null?void 0:l.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Bi=v.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=nt(Dt,n),g=Gt(n);return Zo(),m.jsx(Kn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:m.jsx(Rn,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:m.jsx(_s,{"data-state":$i(f.open),role:"dialog",id:f.contentId,...g,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Li="PopoverClose",Pp=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=nt(Li,n);return m.jsx(q.button,{type:"button",...r,ref:t,onClick:U(e.onClick,()=>o.onOpenChange(!1))})});Pp.displayName=Li;var Dp="PopoverArrow",Tp=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Gt(n);return m.jsx(Fs,{...o,...r,ref:t})});Tp.displayName=Dp;function $i(e){return e?"open":"closed"}var Ap=Ti,Wp=_i,_p=Fi,Vi=Ii;const Fp=Ap,Ip=Wp,Hi=v.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>m.jsx(_p,{children:m.jsx(Vi,{ref:o,align:t,sideOffset:n,className:F("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Hi.displayName=Vi.displayName;function Bp({id:e,value:t,placeholder:n,disabled:r,onChange:o,onBlur:s,onFocus:i,className:a,"aria-invalid":c}){const[l,u]=v.useState();v.useEffect(()=>{t&&u(new Date(t))},[t]);const d=f=>{u(f),f&&o&&o(Or(f,"yyyy-MM-dd"))};return m.jsxs(Fp,{children:[m.jsx(Ip,{asChild:!0,children:m.jsxs($e,{id:e,variant:"outline",className:F("w-full justify-start text-left font-normal",!l&&"text-muted-foreground",a),disabled:r,onBlur:s,onFocus:i,"aria-invalid":c,children:[m.jsx(Qc,{className:"mr-2 h-4 w-4"}),l?Or(l,"PPP"):m.jsx("span",{children:n})]})}),m.jsx(Hi,{className:"w-auto p-0",children:m.jsx(Pi,{mode:"single",selected:l,onSelect:d,initialFocus:!0})})]})}function Yi(e){const{id:t,value:n,required:r,disabled:o,readonly:s,placeholder:i,onChange:a,onBlur:c,onFocus:l,options:u,rawErrors:d=[],schema:f}=e,g=ie(t,f),x=async y=>{const w=y.target.value===""?u.emptyValue:y.target.value;a(w),await g.onChange(w)},h=async y=>{const w=y.target.value;c&&c(t,w),await g.onBlur(w)},b=async y=>{const w=y.target.value;l&&l(t,w),await g.onFocus(w)},p=d.length>0;return m.jsx(le,{id:t,type:"text",value:n||"",placeholder:i,required:r,disabled:o,readOnly:s,onChange:x,onBlur:h,onFocus:b,"aria-invalid":p,className:F(p&&"border-destructive focus-visible:ring-destructive/20")})}function zi(e){const{id:t,value:n,required:r,disabled:o,readonly:s,placeholder:i,onChange:a,onBlur:c,onFocus:l,options:u,rawErrors:d=[],schema:f}=e,g=ie(t,f),x=async w=>{const S=w.target.value===""?u.emptyValue:w.target.value;a(S),await g.onChange(S)},h=async w=>{const S=w.target.value;c&&c(t,S),await g.onBlur(S)},b=async w=>{const S=w.target.value;l&&l(t,S),await g.onFocus(S)},p=d.length>0,y=u.rows||4;return m.jsx(qo,{id:t,value:n||"",placeholder:i,required:r,disabled:o,readOnly:s,rows:y,onChange:x,onBlur:h,onFocus:b,"aria-invalid":p,className:F("resize-y",p&&"border-destructive focus-visible:ring-destructive/20")})}function ji(e){const{id:t,value:n,required:r,disabled:o,onChange:s,onBlur:i,onFocus:a,options:c,rawErrors:l=[],schema:u}=e,d=ie(t,u),f=async p=>{const y=p===""?c.emptyValue:p;s(y),await d.onChange(y)},g=async()=>{i&&i(t,n),await d.onBlur(n)},x=async()=>{a&&a(t,n),await d.onFocus(n)},h=l.length>0,{enumOptions:b=[]}=c;return m.jsxs(hf,{value:n||"",onValueChange:f,disabled:o,required:r,children:[m.jsx(Aa,{id:t,"aria-invalid":h,className:F("w-full",h&&"border-destructive focus-visible:ring-destructive/20"),onBlur:g,onFocus:x,children:m.jsx(mf,{placeholder:"Select an option..."})}),m.jsx(Fa,{children:b.map(p=>m.jsx(Ia,{value:p.value,children:p.label},p.value))})]})}function Ri(e){const{id:t,value:n,disabled:r,readonly:o,onChange:s,onBlur:i,onFocus:a,label:c,rawErrors:l=[],schema:u}=e,d=ie(t,u),f=async b=>{s(b),await d.onChange(b)},g=async()=>{i&&i(t,n),await d.onBlur(n)},x=async()=>{a&&a(t,n),await d.onFocus(n)},h=l.length>0;return m.jsxs("div",{className:"flex items-start space-x-2",children:[m.jsx(ja,{id:t,checked:n||!1,disabled:r||o,onCheckedChange:f,onBlur:g,onFocus:x,"aria-invalid":h,className:F("mt-0.5",h&&"border-destructive focus-visible:ring-destructive/20")}),c&&m.jsx(pe,{htmlFor:t,className:F("text-sm leading-none",r&&"opacity-50",!o&&!r&&"cursor-pointer"),children:c})]})}function Ui(e){const{id:t,value:n,disabled:r,readonly:o,onChange:s,onBlur:i,onFocus:a,options:c,rawErrors:l=[],schema:u}=e,d=ie(t,u),f=async p=>{s(p),await d.onChange(p)},g=async()=>{i&&i(t,n),await d.onBlur(n)},x=async()=>{a&&a(t,n),await d.onFocus(n)},h=l.length>0,{enumOptions:b=[]}=c;return m.jsx("div",{className:"space-y-2",children:b.map((p,y)=>m.jsxs("div",{className:"flex items-center",children:[m.jsx("input",{id:`${t}_${y}`,type:"radio",name:t,value:p.value,checked:n===p.value,disabled:r,readOnly:o,onChange:()=>f(p.value),onBlur:g,onFocus:x,className:`
|
|
102
|
+
h-4 w-4 border-gray-300 text-blue-600 mr-3
|
|
103
|
+
focus:ring-blue-500 transition-colors duration-200
|
|
104
|
+
${h?"border-red-300 focus:ring-red-500":""}
|
|
105
|
+
${r?"cursor-not-allowed opacity-50":"cursor-pointer"}
|
|
106
|
+
`}),m.jsx("label",{htmlFor:`${t}_${y}`,className:`text-sm text-gray-700 ${r?"opacity-50":""} ${o?"":"cursor-pointer"}`,children:p.label})]},p.value))})}function qi(e){const{id:t,value:n,required:r,disabled:o,readonly:s,placeholder:i,onChange:a,onBlur:c,onFocus:l,options:u,schema:d,rawErrors:f=[]}=e,g=ie(t,d),x=async y=>{const w=y.target.value,S=w===""?u.emptyValue:parseFloat(w);a(S),await g.onChange(S)},h=async y=>{const w=y.target.value;c&&c(t,w),await g.onBlur(w)},b=async y=>{const w=y.target.value;l&&l(t,w),await g.onFocus(w)},p=f.length>0;return m.jsx(le,{id:t,type:"number",value:n??"",placeholder:i,required:r,disabled:o,readOnly:s,min:d.minimum,max:d.maximum,step:d.multipleOf||"any",onChange:x,onBlur:h,onFocus:b,"aria-invalid":p,className:F(p&&"border-destructive focus-visible:ring-destructive/20")})}function Ir(e){const{id:t,value:n,required:r,disabled:o,readonly:s,placeholder:i,onChange:a,onBlur:c,onFocus:l,options:u,rawErrors:d=[],schema:f}=e,g=ie(t,f),x=async y=>{const w=y.target.value===""?u.emptyValue:y.target.value;a(w),await g.onChange(w)},h=async y=>{const w=y.target.value;c&&c(t,w),await g.onBlur(w)},b=async y=>{const w=y.target.value;l&&l(t,w),await g.onFocus(w)},p=d.length>0;return m.jsx(le,{id:t,type:"tel",value:n||"",placeholder:i||"Enter phone number",required:r,disabled:o,readOnly:s,onChange:x,onBlur:h,onFocus:b,"aria-invalid":p,className:F(p&&"border-destructive focus-visible:ring-destructive/20")})}function Br(e){const{id:t,value:n,required:r,disabled:o,readonly:s,placeholder:i,onChange:a,onBlur:c,onFocus:l,options:u,rawErrors:d=[],schema:f}=e,g=ie(t,f),x=async y=>{const w=y.target.value===""?u.emptyValue:y.target.value;a(w),await g.onChange(w)},h=async y=>{const w=y.target.value;c&&c(t,w),await g.onBlur(w)},b=async y=>{const w=y.target.value;l&&l(t,w),await g.onFocus(w)},p=d.length>0;return m.jsx(le,{id:t,type:"email",value:n||"",placeholder:i||"Enter email address",required:r,disabled:o,readOnly:s,onChange:x,onBlur:h,onFocus:b,"aria-invalid":p,className:F(p&&"border-destructive focus-visible:ring-destructive/20")})}function Lr(e){const{id:t,value:n,required:r,disabled:o,readonly:s,placeholder:i,onChange:a,onBlur:c,onFocus:l,options:u,rawErrors:d=[],schema:f}=e,g=ie(t,f),x=async y=>{const w=y.target.value===""?u.emptyValue:y.target.value;a(w),await g.onChange(w)},h=async y=>{const w=y.target.value;c&&c(t,w),await g.onBlur(w)},b=async y=>{const w=y.target.value;l&&l(t,w),await g.onFocus(w)},p=d.length>0;return m.jsx(le,{id:t,type:"url",value:n||"",placeholder:i||"Enter URL",required:r,disabled:o,readOnly:s,onChange:x,onBlur:h,onFocus:b,"aria-invalid":p,className:F(p&&"border-destructive focus-visible:ring-destructive/20")})}function $r(e){const{id:t,value:n,required:r,disabled:o,readonly:s,placeholder:i,onChange:a,onBlur:c,onFocus:l,options:u,rawErrors:d=[],schema:f}=e,g=ie(t,f),x=async y=>{const w=y.target.value===""?u.emptyValue:y.target.value;a(w),await g.onChange(w)},h=async y=>{const w=y.target.value;c&&c(t,w),await g.onBlur(w)},b=async y=>{const w=y.target.value;l&&l(t,w),await g.onFocus(w)},p=d.length>0;return m.jsx(le,{id:t,type:"password",value:n||"",placeholder:i||"Enter password",required:r,disabled:o,readOnly:s,onChange:x,onBlur:h,onFocus:b,"aria-invalid":p,className:F(p&&"border-destructive focus-visible:ring-destructive/20")})}function Gi(e){const{id:t,value:n,required:r,disabled:o,readonly:s,onChange:i,onBlur:a,onFocus:c,options:l,rawErrors:u=[],schema:d}=e,f=ie(t,d),g=async p=>{const y=p===""?l.emptyValue:p;i(y),await f.onChange(y)},x=async()=>{a&&a(t,n),await f.onBlur(n)},h=async()=>{c&&c(t,n),await f.onFocus(n)},b=u.length>0;return s?m.jsx(le,{id:t,type:"date",value:n||"",required:r,disabled:o,readOnly:s,"aria-invalid":b,className:F(b&&"border-destructive focus-visible:ring-destructive/20")}):m.jsx(Bp,{id:t,value:n||"",placeholder:"Select a date",disabled:o,onChange:g,onBlur:x,onFocus:h,"aria-invalid":b,className:F(b&&"border-destructive focus-visible:ring-destructive/20")})}function Vr(e){const{id:t,value:n,required:r,disabled:o,readonly:s,onChange:i,onBlur:a,onFocus:c,options:l,rawErrors:u=[],schema:d}=e,f=ie(t,d),g=async p=>{const y=p.target.value===""?l.emptyValue:p.target.value;i(y),await f.onChange(y)},x=async p=>{const y=p.target.value;a&&a(t,y),await f.onBlur(y)},h=async p=>{const y=p.target.value;c&&c(t,y),await f.onFocus(y)},b=u.length>0;return m.jsx(le,{id:t,type:"datetime-local",value:n||"",required:r,disabled:o,readOnly:s,onChange:g,onBlur:x,onFocus:h,"aria-invalid":b,className:F(b&&"border-destructive focus-visible:ring-destructive/20")})}function Ki(e){const{id:t,required:n,disabled:r,readonly:o,onChange:s,onBlur:i,onFocus:a,options:c,rawErrors:l=[],schema:u}=e,d=ie(t,u),f=async p=>{const y=p.target.files;if(y&&y.length>0){const w=y[0],S=new FileReader;S.onload=async()=>{const C=S.result;s(C),await d.onChange(C)},S.readAsDataURL(w)}},g=async p=>{const y=p.target.value;i&&i(t,y),await d.onBlur(y)},x=async p=>{const y=p.target.value;a&&a(t,y),await d.onFocus(y)},h=l.length>0,b=typeof c.accept=="string"?c.accept:"*/*";return m.jsx(le,{id:t,type:"file",required:n,disabled:r,readOnly:o,accept:b,onChange:f,onBlur:g,onFocus:x,"aria-invalid":h,className:F("file:mr-4 file:py-1 file:px-2 file:rounded file:border-0 file:text-sm file:font-medium file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100",h&&"border-destructive focus-visible:ring-destructive/20")})}const Xi={TextWidget:Yi,TextareaWidget:zi,SelectWidget:ji,CheckboxWidget:Ri,RadioWidget:Ui,UpDownWidget:qi,FileWidget:Ki,tel:Ir,email:Br,url:Lr,password:$r,date:Gi,"datetime-local":Vr,TelWidget:Ir,EmailWidget:Br,URLWidget:Lr,PasswordWidget:$r,DateWidget:Gi,DateTimeWidget:Vr},Qi={color:ko,file:Mo,range:Ro,rating:Uo,...Xi},Lp={small:"space-y-2",medium:"space-y-4",large:"space-y-6"},$p=({children:e,spacing:t="medium",className:n=""})=>m.jsx("div",{className:F("flex flex-col",Lp[t],n),children:e}),Vp={small:"space-x-2",medium:"space-x-4",large:"space-x-6"},Hp={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},Yp=({children:e,spacing:t="medium",align:n="center",className:r=""})=>m.jsx("div",{className:F("flex flex-row",Vp[t],Hp[n],r),children:e}),zp={small:"gap-2",medium:"gap-4",large:"gap-6"},jp=({children:e,columns:t="auto-fit",gap:n="medium",minItemWidth:r="250px",className:o=""})=>{const s={display:"grid"};return typeof t=="number"?s.gridTemplateColumns=`repeat(${t}, 1fr)`:s.gridTemplateColumns=`repeat(${t}, minmax(${r}, 1fr))`,m.jsx("div",{className:F("grid",zp[n],o),style:s,children:e})};class Rp{constructor(t){ot(this,"handlers");this.handlers=t}async handleBeforeSubmit(t){return this.handlers.beforeSubmit?await this.handlers.beforeSubmit(t):t}async handleAfterSubmit(t){this.handlers.afterSubmit&&await this.handlers.afterSubmit(t)}async handleBeforeValidation(t){return this.handlers.beforeValidation?await this.handlers.beforeValidation(t):t}async handleAfterValidation(t,n){this.handlers.afterValidation&&await this.handlers.afterValidation(t,n)}}class Zi{constructor(t,n={},r=[]){ot(this,"formHandlers");ot(this,"fieldHandlers");ot(this,"webhooks");ot(this,"debounceTimers",new Map);ot(this,"webhookQueue",[]);ot(this,"isProcessingQueue",!1);this.formHandlers=t,this.fieldHandlers=n,this.webhooks=r}async handleBeforeSubmit(t){return this.formHandlers.beforeSubmit?await this.formHandlers.beforeSubmit(t):t}async handleAfterSubmit(t){this.formHandlers.afterSubmit&&await this.formHandlers.afterSubmit(t)}async handleBeforeValidation(t){return this.formHandlers.beforeValidation?await this.formHandlers.beforeValidation(t):t}async handleAfterValidation(t,n){this.formHandlers.afterValidation&&await this.formHandlers.afterValidation(t,n)}async handleFieldEvent(t,n,r,o,s,i){const a={eventType:t,fieldId:n,fieldValue:r,schema:o,formData:s,timestamp:Date.now(),fieldPath:i};try{switch(t){case"focus":this.fieldHandlers.onFieldFocus&&await this.fieldHandlers.onFieldFocus(a);break;case"blur":this.fieldHandlers.onFieldBlur&&await this.fieldHandlers.onFieldBlur(a);break;case"change":this.fieldHandlers.onFieldChange&&await this.fieldHandlers.onFieldChange(a);break}}catch(c){console.error(`Error in field event handler (${t}):`,c)}this.processWebhooks(a)}processWebhooks(t){const n=this.webhooks.filter(r=>!r.events||r.events.includes(t.eventType));for(const r of n)r.debounceMs&&r.debounceMs>0?this.debounceWebhook(r,t):this.queueWebhook(r,t)}debounceWebhook(t,n){const r=`${t.url}-${n.fieldId}-${n.eventType}`;this.debounceTimers.has(r)&&clearTimeout(this.debounceTimers.get(r));const o=setTimeout(()=>{this.queueWebhook(t,n),this.debounceTimers.delete(r)},t.debounceMs);this.debounceTimers.set(r,o)}queueWebhook(t,n){this.webhookQueue.push({config:t,event:n,retryCount:0}),this.isProcessingQueue||this.processWebhookQueue()}async processWebhookQueue(){if(!(this.isProcessingQueue||this.webhookQueue.length===0)){for(this.isProcessingQueue=!0;this.webhookQueue.length>0;){const t=this.webhookQueue.shift();try{await this.callWebhook(t.config,t.event)}catch(n){const r=t.config.retries||3;t.retryCount<r?(t.retryCount++,setTimeout(()=>{this.webhookQueue.push(t)},Math.pow(2,t.retryCount)*1e3)):console.error(`Webhook failed after ${r} retries:`,n)}}this.isProcessingQueue=!1}}async callWebhook(t,n){const r={event:n,timestamp:Date.now(),source:"extended-dynamic-forms"},o={method:t.method||"POST",headers:{"Content-Type":"application/json",...t.headers},body:JSON.stringify(r)};t.timeout&&(o.signal=AbortSignal.timeout(t.timeout));const s=await fetch(t.url,o);if(!s.ok)throw new Error(`Webhook request failed: ${s.status} ${s.statusText}`)}createFieldEventHandlers(t,n,r,o){return{onFocus:s=>this.handleFieldEvent("focus",t,s,n,r,o),onBlur:s=>this.handleFieldEvent("blur",t,s,n,r,o),onChange:s=>this.handleFieldEvent("change",t,s,n,r,o)}}cleanup(){for(const t of this.debounceTimers.values())clearTimeout(t);this.debounceTimers.clear()}}const Ji={cloneFormData:e=>JSON.parse(JSON.stringify(e)),mergeFormData:(e,t)=>({...e,...t}),getNestedValue:(e,t)=>{const n=t.split(".");let r=e;for(const o of n)if(r&&typeof r=="object"&&o in r)r=r[o];else return;return r},setNestedValue:(e,t,n)=>{const r=t.split("."),o={...e};let s=o;for(let i=0;i<r.length-1;i++){const a=r[i];(!(a in s)||typeof s[a]!="object")&&(s[a]={}),s=s[a]}return s[r[r.length-1]]=n,o},removeEmptyValues:e=>{if(Array.isArray(e))return e.filter(t=>t!=null&&t!=="");if(e!==null&&typeof e=="object"){const t={};for(const[n,r]of Object.entries(e))r!=null&&r!==""&&(t[n]=Ji.removeEmptyValues(r));return t}return e}},ec={getRequiredFields:e=>e.required||[],isFieldRequired:(e,t)=>(e.required||[]).includes(t),getFieldSchema:(e,t)=>{const n=t.split(".");let r=e;for(const o of n)if(r.type==="object"&&r.properties)r=r.properties[o];else if(r.type==="array"&&r.items)r=r.items;else return;return r},mergeSchemas:(e,t)=>({...e,...t,properties:{...e.properties,...t.properties},required:[...new Set([...e.required||[],...t.required||[]])]}),getAllFieldPaths:(e,t="")=>{const n=[];if(e.type==="object"&&e.properties)for(const[r,o]of Object.entries(e.properties)){const s=t?`${t}.${r}`:r;n.push(s),n.push(...ec.getAllFieldPaths(o,s))}return n}},Up={isValidEmail:e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),isValidPhone:e=>/^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/.test(e),isValidUrl:e=>{try{return new URL(e),!0}catch{return!1}},isValidDate:e=>{const t=new Date(e);return t instanceof Date&&!isNaN(t.getTime())},isInRange:(e,t,n)=>!(t!==void 0&&e<t||n!==void 0&&e>n),getValidationMessage:(e,t)=>({required:"This field is required",email:"Please enter a valid email address",phone:"Please enter a valid phone number",url:"Please enter a valid URL",date:"Please enter a valid date",min:`Value must be at least ${t==null?void 0:t.min}`,max:`Value must be at most ${t==null?void 0:t.max}`,minLength:`Must be at least ${t==null?void 0:t.minLength} characters`,maxLength:`Must be at most ${t==null?void 0:t.maxLength} characters`})[e]||"Invalid value"},qp=({schema:e,uiSchema:t,formData:n,onSubmit:r,onChange:o,onError:s,onBlur:i,onFocus:a,beforeSubmit:c,afterSubmit:l,beforeValidation:u,afterValidation:d,onFieldFocus:f,onFieldBlur:g,onFieldChange:x,webhooks:h=[],widgets:b={},fields:p={},templates:y={},...w})=>{const S=E.useRef(null),C=E.useMemo(()=>{const P=new Zi({beforeSubmit:c,afterSubmit:l,beforeValidation:u,afterValidation:d},{onFieldFocus:f,onFieldBlur:g,onFieldChange:x},h);return S.current=P,P},[c,l,u,d,f,g,x,h]);E.useEffect(()=>()=>{S.current&&S.current.cleanup()},[]);const M=async(P,N)=>{const I=await C.handleBeforeSubmit(P);r&&await r(I,N),await C.handleAfterSubmit(I)},k=P=>{o&&o(P)},O={...Qi,...b},_={...Co,...p},W={...So,...y};return m.jsx(mo,{eventHub:C,formData:n,children:m.jsx(sc,{schema:e,uiSchema:t,formData:n,validator:qr,onSubmit:M,onChange:k,onError:s,onBlur:i,onFocus:a,widgets:O,fields:_,templates:W,...w})})};T.validator=qr,Object.defineProperty(T,"generateTheme",{enumerable:!0,get:()=>oc.generateTheme}),T.AddressField=fo,T.ArrayFieldItemTemplate=xo,T.ArrayFieldTemplate=wo,T.ColorWidget=ko,T.CurrencyField=vo,T.DateTimeWidget=Vr,T.DateWidget=rl,T.EmailWidget=Br,T.EnhancedCheckboxWidget=Ri,T.EnhancedNumberWidget=qi,T.EnhancedRadioWidget=Ui,T.EnhancedSelectWidget=ji,T.EnhancedTextWidget=Yi,T.EnhancedTextareaWidget=zi,T.ExtendedForm=qp,T.FileUploadWidget=Ki,T.FileWidget=Mo,T.FormEventHub=Zi,T.FormEventManager=Rp,T.FormEventProvider=mo,T.GridLayout=jp,T.HorizontalLayout=Yp,T.PasswordWidget=$r,T.PhoneField=go,T.RangeWidget=Ro,T.RatingWidget=Uo,T.TelephoneWidget=Ir,T.URLWidget=Lr,T.VerticalLayout=$p,T.cn=F,T.customFields=Co,T.customTemplates=So,T.customWidgets=Qi,T.enhancedWidgets=Xi,T.formDataUtils=Ji,T.schemaUtils=ec,T.useFieldEventHandlers=ie,T.useFormEventHub=po,T.validationUtils=Up,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
|