iq-line-form-builder-renderer 1.1.94 → 1.1.96

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.
@@ -5148,34 +5148,36 @@ const Lt = ({
5148
5148
  isRequired: a,
5149
5149
  className: c
5150
5150
  }) => {
5151
- const u = e.properties, l = J(
5152
- (d) => {
5153
- const p = d.target.value;
5154
- if (p === "")
5151
+ const u = e.properties, l = u?.precision != null || u?.step != null && !Number.isInteger(u.step), d = J(
5152
+ (m) => {
5153
+ const g = u?.allowNegative !== !1, h = m.target.value, y = l ? h.replace(g ? /[^\d.-]/g : /[^\d.]/g, "") : h.replace(g ? /[^\d-]/g : /\D/g, "");
5154
+ if (y === "") {
5155
5155
  n(null);
5156
- else {
5157
- const m = parseFloat(p);
5158
- isNaN(m) || n(m);
5156
+ return;
5159
5157
  }
5158
+ const v = parseFloat(y);
5159
+ isNaN(v) || n(v);
5160
5160
  },
5161
- [n]
5162
- );
5161
+ [n, u?.allowNegative, l]
5162
+ ), p = J((m) => {
5163
+ (m.key === "ArrowUp" || m.key === "ArrowDown" || m.key === "PageUp" || m.key === "PageDown") && m.preventDefault();
5164
+ }, []);
5163
5165
  return /* @__PURE__ */ f(Lt, { field: e, error: o, isRequired: a, className: c, children: /* @__PURE__ */ j("div", { className: "relative", children: [
5164
5166
  u?.prefix && /* @__PURE__ */ f("span", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground text-sm", children: u.prefix }),
5165
5167
  /* @__PURE__ */ f(
5166
5168
  Ro,
5167
5169
  {
5168
5170
  id: wt(e),
5169
- type: "number",
5171
+ type: "text",
5172
+ inputMode: l ? "decimal" : "numeric",
5173
+ autoComplete: "off",
5170
5174
  value: t ?? "",
5171
- onChange: l,
5175
+ onChange: d,
5176
+ onKeyDown: p,
5172
5177
  onBlur: r,
5173
5178
  placeholder: e.placeholder,
5174
5179
  disabled: i || e.disabled,
5175
5180
  readOnly: s || e.readOnly,
5176
- min: u?.min,
5177
- max: u?.max,
5178
- step: u?.step || 1,
5179
5181
  "aria-describedby": Qt(e, !!o),
5180
5182
  "aria-invalid": dn(!!o),
5181
5183
  "aria-required": a,
@@ -1,4 +1,4 @@
1
- (function(me,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react/jsx-runtime"),require("react-router-dom"),require("react-dom"),require("sonner"),require("@tanstack/react-query")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-router-dom","react-dom","sonner","@tanstack/react-query"],S):(me=typeof globalThis<"u"?globalThis:me||self,S(me.FormBuilderRenderer={},me.React,me.jsxRuntime,me.ReactRouterDOM,me.ReactDOM,me.Sonner,me.ReactQuery))})(this,(function(me,S,c,ca,Lc,$t,mn){"use strict";function Dc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const b=Dc(S),Ss=Dc(Lc),da="iq-fbr",Fn="95px";function xs(e){return!e||typeof e.columns!="number"?null:{rows:e.rows??8,columns:e.columns,verticalSpacing:e.verticalSpacing||e.spacing||"16px",horizontalSpacing:e.horizontalSpacing||e.spacing||"16px",rowHeight:Fn}}function As(e,t){if(t!=null&&t!==void 0)return t;const r=e.config;if(r?.grid&&typeof r.grid.rows=="number"&&typeof r.grid.columns=="number")return{rows:r.grid.rows,columns:r.grid.columns,verticalSpacing:r.grid.verticalSpacing??r.grid.spacing,horizontalSpacing:r.grid.horizontalSpacing??r.grid.spacing,rowHeight:r.grid.rowHeight,spacing:r.grid.spacing};const n=r?.layout!=null&&typeof r.layout=="object"?r.layout:null;if(n&&typeof n.rows=="number"&&typeof n.columns=="number")return{rows:n.rows,columns:n.columns,verticalSpacing:n.verticalSpacing??n.spacing,horizontalSpacing:n.horizontalSpacing??n.spacing,rowHeight:n.rowHeight,spacing:n.spacing};const o=e.layout;if(o!=null&&typeof o=="object"&&typeof o.rows=="number"&&typeof o.columns=="number"){const s=o;return{rows:s.rows,columns:s.columns,verticalSpacing:s.verticalSpacing??s.spacing,horizontalSpacing:s.horizontalSpacing??s.spacing,rowHeight:s.rowHeight,spacing:s.spacing}}return null}function Bc(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Bc(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function $c(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Bc(e))&&(n&&(n+=" "),n+=t);return n}const cy=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},dy=(e,t)=>({classGroupId:e,validator:t}),jc=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Cs="-",zc=[],uy="arbitrary..",fy=e=>{const t=my(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return py(i);const a=i.split(Cs),d=a[0]===""&&a.length>1?1:0;return Uc(a,d,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const d=n[i],u=r[i];return d?u?cy(u,d):d:u||zc}return r[i]||zc}}},Uc=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],s=r.nextPart.get(o);if(s){const u=Uc(e,t+1,s);if(u)return u}const i=r.validators;if(i===null)return;const a=t===0?e.join(Cs):e.slice(t).join(Cs),d=i.length;for(let u=0;u<d;u++){const l=i[u];if(l.validator(a))return l.classGroupId}},py=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?uy+n:void 0})(),my=e=>{const{theme:t,classGroups:r}=e;return hy(r,t)},hy=(e,t)=>{const r=jc();for(const n in e){const o=e[n];ua(o,r,n,t)}return r},ua=(e,t,r,n)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];gy(i,t,r,n)}},gy=(e,t,r,n)=>{if(typeof e=="string"){yy(e,t,r);return}if(typeof e=="function"){by(e,t,r,n);return}vy(e,t,r,n)},yy=(e,t,r)=>{const n=e===""?t:Vc(t,e);n.classGroupId=r},by=(e,t,r,n)=>{if(wy(e)){ua(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(dy(r,e))},vy=(e,t,r,n)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[a,d]=o[i];ua(d,Vc(t,a),r,n)}},Vc=(e,t)=>{let r=e;const n=t.split(Cs),o=n.length;for(let s=0;s<o;s++){const i=n[s];let a=r.nextPart.get(i);a||(a=jc(),r.nextPart.set(i,a)),r=a}return r},wy=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Sy=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(s,i)=>{r[s]=i,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(s){let i=r[s];if(i!==void 0)return i;if((i=n[s])!==void 0)return o(s,i),i},set(s,i){s in r?r[s]=i:o(s,i)}}},fa="!",Hc=":",xy=[],Wc=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),Ay=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let i=0,a=0,d=0,u;const l=o.length;for(let h=0;h<l;h++){const y=o[h];if(i===0&&a===0){if(y===Hc){s.push(o.slice(d,h)),d=h+1;continue}if(y==="/"){u=h;continue}}y==="["?i++:y==="]"?i--:y==="("?a++:y===")"&&a--}const f=s.length===0?o:o.slice(d);let p=f,m=!1;f.endsWith(fa)?(p=f.slice(0,-1),m=!0):f.startsWith(fa)&&(p=f.slice(1),m=!0);const g=u&&u>d?u-d:void 0;return Wc(s,m,p,g)};if(t){const o=t+Hc,s=n;n=i=>i.startsWith(o)?s(i.slice(o.length)):Wc(xy,!1,i,void 0,!0)}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},Cy=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let s=0;s<r.length;s++){const i=r[s],a=i[0]==="[",d=t.has(i);a||d?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(i)):o.push(i)}return o.length>0&&(o.sort(),n.push(...o)),n}},Ey=e=>({cache:Sy(e.cacheSize),parseClassName:Ay(e),sortModifiers:Cy(e),...fy(e)}),Ny=/\s+/,Ty=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(Ny);let d="";for(let u=a.length-1;u>=0;u-=1){const l=a[u],{isExternal:f,modifiers:p,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:h}=r(l);if(f){d=l+(d.length>0?" "+d:d);continue}let y=!!h,v=n(y?g.substring(0,h):g);if(!v){if(!y){d=l+(d.length>0?" "+d:d);continue}if(v=n(g),!v){d=l+(d.length>0?" "+d:d);continue}y=!1}const w=p.length===0?"":p.length===1?p[0]:s(p).join(":"),x=m?w+fa:w,C=x+v;if(i.indexOf(C)>-1)continue;i.push(C);const O=o(v,y);for(let E=0;E<O.length;++E){const _=O[E];i.push(x+_)}d=l+(d.length>0?" "+d:d)}return d},_y=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=Rc(r))&&(o&&(o+=" "),o+=n);return o},Rc=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Rc(e[n]))&&(r&&(r+=" "),r+=t);return r},ky=(e,...t)=>{let r,n,o,s;const i=d=>{const u=t.reduce((l,f)=>f(l),e());return r=Ey(u),n=r.cache.get,o=r.cache.set,s=a,a(d)},a=d=>{const u=n(d);if(u)return u;const l=Ty(d,r);return o(d,l),l};return s=i,(...d)=>s(_y(...d))},Fy=[],Ht=e=>{const t=r=>r[e]||Fy;return t.isThemeGetter=!0,t},Gc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Py=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Oy=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Iy=/\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$/,My=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ly=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Dy=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,hn=e=>Py.test(e),ot=e=>!!e&&!Number.isNaN(Number(e)),gn=e=>!!e&&Number.isInteger(Number(e)),pa=e=>e.endsWith("%")&&ot(e.slice(0,-1)),tn=e=>Oy.test(e),Kc=()=>!0,By=e=>Iy.test(e)&&!My.test(e),ma=()=>!1,$y=e=>Ly.test(e),jy=e=>Dy.test(e),zy=e=>!Ne(e)&&!_e(e),Uy=e=>yn(e,ed,ma),Ne=e=>Gc.test(e),Pn=e=>yn(e,td,By),Yc=e=>yn(e,Yy,ot),Vy=e=>yn(e,nd,Kc),Hy=e=>yn(e,rd,ma),Xc=e=>yn(e,Qc,ma),Wy=e=>yn(e,Zc,jy),Es=e=>yn(e,od,$y),_e=e=>qc.test(e),Oo=e=>On(e,td),Ry=e=>On(e,rd),Jc=e=>On(e,Qc),Gy=e=>On(e,ed),qy=e=>On(e,Zc),Ns=e=>On(e,od,!0),Ky=e=>On(e,nd,!0),yn=(e,t,r)=>{const n=Gc.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},On=(e,t,r=!1)=>{const n=qc.exec(e);return n?n[1]?t(n[1]):r:!1},Qc=e=>e==="position"||e==="percentage",Zc=e=>e==="image"||e==="url",ed=e=>e==="length"||e==="size"||e==="bg-size",td=e=>e==="length",Yy=e=>e==="number",rd=e=>e==="family-name",nd=e=>e==="number"||e==="weight",od=e=>e==="shadow",Xy=ky(()=>{const e=Ht("color"),t=Ht("font"),r=Ht("text"),n=Ht("font-weight"),o=Ht("tracking"),s=Ht("leading"),i=Ht("breakpoint"),a=Ht("container"),d=Ht("spacing"),u=Ht("radius"),l=Ht("shadow"),f=Ht("inset-shadow"),p=Ht("text-shadow"),m=Ht("drop-shadow"),g=Ht("blur"),h=Ht("perspective"),y=Ht("aspect"),v=Ht("ease"),w=Ht("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...C(),_e,Ne],E=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],T=()=>[_e,Ne,d],A=()=>[hn,"full","auto",...T()],P=()=>[gn,"none","subgrid",_e,Ne],k=()=>["auto",{span:["full",gn,_e,Ne]},gn,_e,Ne],U=()=>[gn,"auto",_e,Ne],R=()=>["auto","min","max","fr",_e,Ne],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],q=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...T()],j=()=>[hn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],B=()=>[hn,"screen","full","dvw","lvw","svw","min","max","fit",...T()],G=()=>[hn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],D=()=>[e,_e,Ne],he=()=>[...C(),Jc,Xc,{position:[_e,Ne]}],I=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",Gy,Uy,{size:[_e,Ne]}],Q=()=>[pa,Oo,Pn],le=()=>["","none","full",u,_e,Ne],re=()=>["",ot,Oo,Pn],se=()=>["solid","dashed","dotted","double"],ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Fe=()=>[ot,pa,Jc,Xc],te=()=>["","none",g,_e,Ne],ee=()=>["none",ot,_e,Ne],ge=()=>["none",ot,_e,Ne],ce=()=>[ot,_e,Ne],rt=()=>[hn,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[tn],breakpoint:[tn],color:[Kc],container:[tn],"drop-shadow":[tn],ease:["in","out","in-out"],font:[zy],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[tn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[tn],shadow:[tn],spacing:["px",ot],text:[tn],"text-shadow":[tn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",hn,Ne,_e,y]}],container:["container"],columns:[{columns:[ot,Ne,_e,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{"inset-s":A(),start:A()}],end:[{"inset-e":A(),end:A()}],"inset-bs":[{"inset-bs":A()}],"inset-be":[{"inset-be":A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[gn,"auto",_e,Ne]}],basis:[{basis:[hn,"full","auto",a,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ot,hn,"auto","initial","none",Ne]}],grow:[{grow:["",ot,_e,Ne]}],shrink:[{shrink:["",ot,_e,Ne]}],order:[{order:[gn,"first","last","none",_e,Ne]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:k()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:k()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...q(),"normal"]}],"justify-self":[{"justify-self":["auto",...q()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...q(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...q(),"baseline"]}],"place-self":[{"place-self":["auto",...q()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pbs:[{pbs:T()}],pbe:[{pbe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],"inline-size":[{inline:["auto",...B()]}],"min-inline-size":[{"min-inline":["auto",...B()]}],"max-inline-size":[{"max-inline":["none",...B()]}],"block-size":[{block:["auto",...G()]}],"min-block-size":[{"min-block":["auto",...G()]}],"max-block-size":[{"max-block":["none",...G()]}],w:[{w:[a,"screen",...j()]}],"min-w":[{"min-w":[a,"screen","none",...j()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...j()]}],h:[{h:["screen","lh",...j()]}],"min-h":[{"min-h":["screen","lh","none",...j()]}],"max-h":[{"max-h":["screen","lh",...j()]}],"font-size":[{text:["base",r,Oo,Pn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Ky,Vy]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pa,Ne]}],"font-family":[{font:[Ry,Hy,t]}],"font-features":[{"font-features":[Ne]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,_e,Ne]}],"line-clamp":[{"line-clamp":[ot,"none",_e,Yc]}],leading:[{leading:[s,...T()]}],"list-image":[{"list-image":["none",_e,Ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",_e,Ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[ot,"from-font","auto",_e,Pn]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[ot,"auto",_e,Ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",_e,Ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",_e,Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:he()}],"bg-repeat":[{bg:I()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},gn,_e,Ne],radial:["",_e,Ne],conic:[gn,_e,Ne]},qy,Wy]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-bs":[{"border-bs":re()}],"border-w-be":[{"border-be":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-bs":[{"border-bs":D()}],"border-color-be":[{"border-be":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ot,_e,Ne]}],"outline-w":[{outline:["",ot,Oo,Pn]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",l,Ns,Es]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",f,Ns,Es]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[ot,Pn]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",p,Ns,Es]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[ot,_e,Ne]}],"mix-blend":[{"mix-blend":[...ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ae()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ot]}],"mask-image-linear-from-pos":[{"mask-linear-from":Fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":Fe()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":Fe()}],"mask-image-t-to-pos":[{"mask-t-to":Fe()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":Fe()}],"mask-image-r-to-pos":[{"mask-r-to":Fe()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":Fe()}],"mask-image-b-to-pos":[{"mask-b-to":Fe()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":Fe()}],"mask-image-l-to-pos":[{"mask-l-to":Fe()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":Fe()}],"mask-image-x-to-pos":[{"mask-x-to":Fe()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":Fe()}],"mask-image-y-to-pos":[{"mask-y-to":Fe()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[_e,Ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":Fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":Fe()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[ot]}],"mask-image-conic-from-pos":[{"mask-conic-from":Fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":Fe()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:he()}],"mask-repeat":[{mask:I()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",_e,Ne]}],filter:[{filter:["","none",_e,Ne]}],blur:[{blur:te()}],brightness:[{brightness:[ot,_e,Ne]}],contrast:[{contrast:[ot,_e,Ne]}],"drop-shadow":[{"drop-shadow":["","none",m,Ns,Es]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",ot,_e,Ne]}],"hue-rotate":[{"hue-rotate":[ot,_e,Ne]}],invert:[{invert:["",ot,_e,Ne]}],saturate:[{saturate:[ot,_e,Ne]}],sepia:[{sepia:["",ot,_e,Ne]}],"backdrop-filter":[{"backdrop-filter":["","none",_e,Ne]}],"backdrop-blur":[{"backdrop-blur":te()}],"backdrop-brightness":[{"backdrop-brightness":[ot,_e,Ne]}],"backdrop-contrast":[{"backdrop-contrast":[ot,_e,Ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ot,_e,Ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ot,_e,Ne]}],"backdrop-invert":[{"backdrop-invert":["",ot,_e,Ne]}],"backdrop-opacity":[{"backdrop-opacity":[ot,_e,Ne]}],"backdrop-saturate":[{"backdrop-saturate":[ot,_e,Ne]}],"backdrop-sepia":[{"backdrop-sepia":["",ot,_e,Ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",_e,Ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ot,"initial",_e,Ne]}],ease:[{ease:["linear","initial",v,_e,Ne]}],delay:[{delay:[ot,_e,Ne]}],animate:[{animate:["none",w,_e,Ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,_e,Ne]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[_e,Ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:rt()}],"translate-x":[{"translate-x":rt()}],"translate-y":[{"translate-y":rt()}],"translate-z":[{"translate-z":rt()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",_e,Ne]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mbs":[{"scroll-mbs":T()}],"scroll-mbe":[{"scroll-mbe":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pbs":[{"scroll-pbs":T()}],"scroll-pbe":[{"scroll-pbe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",_e,Ne]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[ot,Oo,Pn,Yc]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function $(...e){return Xy($c(e))}const Jy=["richtext","multiselect","radio","checkboxgroup","signature"],Qy=3;function Io(e){const t=e.position.rowSpan??1;if(e.type==="file"||e.type==="camera"||e.type==="photoChoice"||e.type==="textarea")return Math.max(t,1);if(e.type==="status")return Math.max(t,4);if(e.type==="selectablelist")return Math.max(Qy,t);if(e.type==="radio"||e.type==="checkboxgroup"){const r=e.properties?.options;return(Array.isArray(r)?r.length:0)<=2?1:Math.max(t,2)}return Jy.includes(e.type)?Math.max(t,2):t}function sd(e,t){if(e.type==="table"&&t!=null)return t;if(e.type!=="radio"&&e.type!=="checkboxgroup"){const s=e.position.columnSpan??1;return t!=null?Math.min(s,t):s}const r=e.properties?.options,n=Array.isArray(r)?r.length:0,o=Math.max(1,Math.ceil(n/2));return t!=null?Math.min(o,t):o}function Mo(e){const t=e?.size??"md",r=e?.variant??"default";return $(t==="sm"?"h-8 text-sm":t==="lg"?"min-h-12 text-lg py-2":"h-10 md:text-sm",r==="filled"?"border-transparent bg-muted shadow-none":r==="outlined"?"border-2 bg-transparent":"")}function id(e){const t=e?.size??"md",r=e?.variant??"default";return $(t==="sm"?"min-h-[48px] text-sm":t==="lg"?"min-h-[72px] text-lg":"min-h-[56px]",r==="filled"?"border-transparent bg-muted shadow-none":r==="outlined"?"border-2 bg-transparent":"")}function Zy(e){switch(e){case"left":return"flex flex-row items-start gap-4";case"right":return"flex flex-row-reverse items-start gap-4";case"center":return"flex flex-col items-center text-center w-full";case"floating":return"relative flex flex-col gap-2 w-full min-w-0";default:return"flex flex-col gap-2 w-full min-w-0"}}function eb(e,t){const r=t?"text-destructive":"";switch(e){case"left":return`shrink-0 w-32 pt-2 text-right text-sm font-medium ${r}`;case"right":return`shrink-0 w-32 pt-2 text-left text-sm font-medium ${r}`;case"center":return`w-full text-center text-sm font-medium ${r}`;case"floating":return`absolute left-3 top-2 z-[1] origin-[0] -translate-y-4 scale-75 bg-background px-1 text-sm ${r}`;default:return`text-sm font-medium ${r}`}}function tb(e){switch(e){case"left":case"right":return"flex-1 min-w-0 min-h-0 flex flex-col";case"center":return"w-full max-w-full flex flex-col flex-1 min-h-0";case"floating":return"flex flex-col flex-1 min-h-0 w-full pt-4";default:return"flex flex-col flex-1 min-h-0 w-full min-w-0"}}function Ts(e){return!e||e.widthMode==="full"?100:typeof e.widthPercent=="number"&&!Number.isNaN(e.widthPercent)?Math.min(100,Math.max(1,Math.round(e.widthPercent))):(e.widthMode==="percent",100)}function ha(e){const t=Ts(e);return{width:t>=100?"100%":`${t}%`,maxWidth:"100%"}}function rb(e){return ha(e)}function ga(e){if(typeof e!="string")return null;const t=e.trim().toLowerCase();return t==="start"||t==="center"||t==="end"||t==="stretch"?t:null}function ya(e){if(typeof e!="string")return null;const t=e.trim().toLowerCase();return t==="start"||t==="center"||t==="end"?t:null}function kr(e){if(!e)return"start";const t=ga(e.horizontalAlign);if(t)return t;const r=ga(e.contentAlign);if(r)return r;const n=ga(e.cellAlign);return n||"start"}function Lo(e){if(e?.verticalAlign!=null)return e.verticalAlign;const t=e?.cellJustify;return t==="center"?"center":t==="end"?"end":t==="stretch"?"stretch":t==="start"?"start":"stretch"}function _s(e){switch(e){case"center":return"items-center";case"end":return"items-end";case"stretch":return"items-stretch";default:return"items-start"}}function ba(e){switch(e){case"center":return"justify-center";case"end":return"justify-end";case"stretch":return"justify-stretch";default:return"justify-start"}}function Do(e){const t=ya(e.appearance?.contentVerticalAlign);if(t!==null)switch(t){case"center":return"justify-center";case"end":return"justify-end";default:return"justify-start"}return ba(va(e))}const nb=Do;function ks(e){if(Io(e)>1)return!0;const t=ya(e.appearance?.contentVerticalAlign);if(t==="center"||t==="end")return!1;if(t==="start")return!0;const r=va(e);return r!=="center"&&r!=="end"}function ad(e){const t=e[0];if(!t)return wa(void 0);if(e.length===1)return wa(t);const r=kr(t.appearance);return $("flex flex-col min-h-0 h-full w-full",_s(r),"justify-start")}function ld(e){const t=kr(e),r=Lo(e);return $("flex flex-col min-h-0 h-full w-full",_s(t),ba(r))}function cd(e){if(Ts(e)>=100)return"";const r=kr(e);return r==="center"?"mx-auto":r==="end"?"ml-auto":""}function dd(e){if(Ts(e)>=100)return"w-full";const r=kr(e);return r==="center"||r==="end"?"min-w-0":r==="stretch"?"min-w-0 self-stretch":"min-w-0 self-start"}function ud(e){return e?e.widthMode==="full"||e.widthMode==="percent"||typeof e.widthPercent=="number"&&!Number.isNaN(e.widthPercent):!1}function Qn(e){return(e.type==="button"||e.type==="editButton")&&!ud(e.appearance)}function fd(e){return Qn(e)?kr(e.appearance)==="stretch"?{width:"100%",maxWidth:"100%",minWidth:0}:{width:"auto",maxWidth:"100%"}:ha(e.appearance)}function pd(e){return fd(e)}function md(e){if(Qn(e))switch(kr(e.appearance)){case"center":return"self-center";case"end":return"self-end";case"stretch":return"self-stretch";default:return"self-start"}return dd(e.appearance)}function hd(e){return e?e.verticalAlign!=null||e.cellJustify!=null:!1}function va(e){return e.type!=="button"&&e.type!=="editButton"||hd(e.appearance)?Lo(e.appearance):"start"}function wa(e){if(!e)return ld(void 0);const t=kr(e.appearance);return $("flex flex-col min-h-0 h-full w-full",_s(t),Do(e))}function ob(e,t){const r={};e!==void 0&&(r.cellAlign=e),t!==void 0&&(r.cellJustify=t);const o=e===void 0&&t===void 0?void 0:r;return $(_s(kr(o)),ba(Lo(o)))}const Sa=S.createContext({gridStretch:!1});function Bo(){return S.useContext(Sa)}const gd=e=>{let t;const r=new Set,n=(u,l)=>{const f=typeof u=="function"?u(t):u;if(!Object.is(f,t)){const p=t;t=l??(typeof f!="object"||f===null)?f:Object.assign({},t,f),r.forEach(m=>m(t,p))}},o=()=>t,a={setState:n,getState:o,getInitialState:()=>d,subscribe:u=>(r.add(u),()=>r.delete(u))},d=t=e(n,o,a);return a},sb=(e=>e?gd(e):gd),ib=e=>e;function ab(e,t=ib){const r=S.useSyncExternalStore(e.subscribe,S.useCallback(()=>t(e.getState()),[e,t]),S.useCallback(()=>t(e.getInitialState()),[e,t]));return S.useDebugValue(r),r}const yd=e=>{const t=sb(e),r=n=>ab(t,n);return Object.assign(r,t),r},bd=(e=>e?yd(e):yd),lb=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,cb=/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/,db=/^\+?[\d\s-()]{10,}$/,ub={required:e=>e==null?!1:typeof e=="string"?e.trim().length>0:Array.isArray(e)?e.length>0:typeof e=="boolean"?e===!0:!0,minLength:(e,t)=>{if(typeof e!="string")return!0;const r=t.value;return e.length>=r},maxLength:(e,t)=>{if(typeof e!="string")return!0;const r=t.value;return e.length<=r},min:(e,t)=>{if(typeof e!="number")return!0;const r=t.value;return e>=r},max:(e,t)=>{if(typeof e!="number")return!0;const r=t.value;return e<=r},pattern:(e,t)=>{if(typeof e!="string")return!0;const r=t.value,n=t.params?.flags||"";return new RegExp(r,n).test(e)},email:e=>typeof e!="string"||!e?!0:lb.test(e),url:e=>typeof e!="string"||!e?!0:cb.test(e),phone:e=>typeof e!="string"||!e?!0:db.test(e),date:e=>{if(!e)return!0;const t=new Date(e);return!isNaN(t.getTime())},dateRange:(e,t)=>{if(!e)return!0;const r=new Date(e);if(isNaN(r.getTime()))return!1;const n=t.value,o=new Date;if(o.setHours(0,0,0,0),n.min){const s=n.min==="today"?o:new Date(n.min);if(r<s)return!1}if(n.max){const s=n.max==="today"?o:new Date(n.max);if(r>s)return!1}return!0},fileSize:(e,t)=>{if(!e)return!0;const r=t.value;return e instanceof File?e.size<=r:Array.isArray(e)?e.every(n=>n.size<=r):!0},fileType:(e,t)=>{if(!e)return!0;const r=t.value,n={"text/csv":[".csv"],"application/vnd.ms-excel":[".xls"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":[".xlsx"],"application/pdf":[".pdf"],"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"image/gif":[".gif"],"image/webp":[".webp"]},o=s=>r.some(i=>{if(i.endsWith("/*")){const u=i.replace("/*","");if(s.type.startsWith(u))return!0}else if(s.type===i)return!0;const a=s.name.toLowerCase(),d=n[i];return d?d.some(u=>a.endsWith(u)):i.startsWith(".")?a.endsWith(i.toLowerCase()):!1});return e instanceof File?o(e):Array.isArray(e)?e.every(s=>o(s)):!0},allowLetters:(e,t)=>typeof e!="string"||!e||t.value?!0:!/[a-zA-Z]/.test(e),allowNumbers:(e,t)=>typeof e!="string"||!e||t.value?!0:!/[0-9]/.test(e),allowSpecialChars:(e,t)=>typeof e!="string"||!e||t.value?!0:!/[^a-zA-Z0-9\s]/.test(e),minLetters:(e,t)=>{if(typeof e!="string"||!e)return!0;const r=t.value;return(e.match(/[a-zA-Z]/g)||[]).length>=r},maxLetters:(e,t)=>{if(typeof e!="string"||!e)return!0;const r=t.value;return(e.match(/[a-zA-Z]/g)||[]).length<=r},minNumbers:(e,t)=>{if(typeof e!="string"||!e)return!0;const r=t.value;return(e.match(/[0-9]/g)||[]).length>=r},maxNumbers:(e,t)=>{if(typeof e!="string"||!e)return!0;const r=t.value;return(e.match(/[0-9]/g)||[]).length<=r},minSpecialChars:(e,t)=>{if(typeof e!="string"||!e)return!0;const r=t.value;return(e.match(/[^a-zA-Z0-9\s]/g)||[]).length>=r},maxSpecialChars:(e,t)=>{if(typeof e!="string"||!e)return!0;const r=t.value;return(e.match(/[^a-zA-Z0-9\s]/g)||[]).length<=r},custom:(e,t,r)=>!0,async:()=>!0};function qr(e,t,r={}){const n=ub[t.type];if(!n)return!0;const o=n(e,t,r);return o===!1?t.message||fb(t):typeof o=="string"?o:!0}function fb(e){return{required:"This field is required",minLength:`Must be at least ${e.value} characters`,maxLength:`Must be at most ${e.value} characters`,min:`Must be at least ${e.value}`,max:`Must be at most ${e.value}`,pattern:"Invalid format",email:"Please enter a valid email address",url:"Please enter a valid URL",phone:"Please enter a valid phone number",date:"Please enter a valid date",dateRange:"Date is out of allowed range",fileSize:`File size must be less than ${pb(e.value)}`,fileType:"File type is not allowed",allowLetters:"Letters are not allowed in this field",allowNumbers:"Numbers are not allowed in this field",allowSpecialChars:"Special characters are not allowed in this field",minLetters:`Must contain at least ${e.value} letters`,maxLetters:`Must contain at most ${e.value} letters`,minNumbers:`Must contain at least ${e.value} numbers`,maxNumbers:`Must contain at most ${e.value} numbers`,minSpecialChars:`Must contain at least ${e.value} special characters`,maxSpecialChars:`Must contain at most ${e.value} special characters`,custom:"Validation failed",async:"Validation failed"}[e.type]||"Invalid value"}function pb(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}const mb=10;function Fs(e){const t=e.properties;return t?.maxFiles!=null&&t.maxFiles>0?Math.floor(t.maxFiles):t?.multiple===!0?mb:1}function vd(e){return typeof e=="object"&&e!==null&&"url"in e&&typeof e.url=="string"&&e.url.length>0}function wd(e){try{return e.split("?")[0].split("/").filter(Boolean).pop()||e}catch{return e}}function Ps(e){if(e==null)return[];if(typeof e=="string")return e.startsWith("http")?[{url:e,name:wd(e)}]:[];if(e instanceof File)return[e];if(Array.isArray(e)){const t=[];for(const r of e)r instanceof File?t.push(r):typeof r=="string"&&r.startsWith("http")?t.push({url:r,name:wd(r)}):vd(r)&&t.push(r);return t}return vd(e)?[e]:[]}function hb(e,t){return e.slice(0,t)}function xa(e,t){const r=hb(e,t);return r.length===0?null:t===1?r[0]??null:r}function gb(e){return Ps(e).length}function yb(e){return e==="file"||e==="camera"||e==="photoChoice"}function Aa(e,t){if(!yb(e.type))return;const r=Fs(e);if(gb(t)>r)return`Maximum ${r} file(s) allowed`}class Ca{static functions={SUM:(...t)=>t.flat().filter(n=>typeof n=="number").reduce((n,o)=>n+o,0),AVG:(...t)=>{const r=t.flat().filter(n=>typeof n=="number");return r.length===0?0:r.reduce((n,o)=>n+o,0)/r.length},MIN:(...t)=>{const r=t.flat().filter(n=>typeof n=="number");return r.length>0?Math.min(...r):0},MAX:(...t)=>{const r=t.flat().filter(n=>typeof n=="number");return r.length>0?Math.max(...r):0},ROUND:(t,r=0)=>{const n=Number(t);if(isNaN(n))return 0;const o=Math.pow(10,Number(r));return Math.round(n*o)/o},FLOOR:t=>Math.floor(Number(t)||0),CEIL:t=>Math.ceil(Number(t)||0),ABS:t=>Math.abs(Number(t)||0),CONCAT:(...t)=>t.map(String).join(""),UPPER:t=>String(t).toUpperCase(),LOWER:t=>String(t).toLowerCase(),TRIM:t=>String(t).trim(),LEN:t=>String(t).length,SUBSTR:(t,r,n)=>{const o=String(t),s=Number(r),i=n!==void 0?Number(n):void 0;return o.substring(s,i!==void 0?s+i:void 0)},IF:(t,r,n)=>t?r:n,IFEMPTY:(t,r)=>t==null||t===""?r:t,ISNUMBER:t=>typeof t=="number"&&!isNaN(t),ISEMPTY:t=>t==null?!0:typeof t=="string"?t.trim()==="":Array.isArray(t)?t.length===0:!1,TODAY:()=>new Date().toISOString().split("T")[0],NOW:()=>new Date().toISOString(),YEAR:t=>{const r=new Date(t);return isNaN(r.getTime())?null:r.getFullYear()},MONTH:t=>{const r=new Date(t);return isNaN(r.getTime())?null:r.getMonth()+1},DAY:t=>{const r=new Date(t);return isNaN(r.getTime())?null:r.getDate()},DATEDIFF:(t,r,n="days")=>{const o=new Date(t),s=new Date(r);if(isNaN(o.getTime())||isNaN(s.getTime()))return null;const a=(s.getTime()-o.getTime())/(1e3*60*60*24);switch(n){case"years":return a/365;case"months":return a/30;case"weeks":return a/7;case"hours":return a*24;case"minutes":return a*24*60;default:return a}},COUNT:t=>Array.isArray(t)?t.length:t?1:0,FIRST:t=>Array.isArray(t)?t[0]:t,LAST:t=>Array.isArray(t)?t[t.length-1]:t,SUMFIELD:(...t)=>{const r=t[0],n=t[1];return!Array.isArray(r)||typeof n!="string"?0:r.reduce((o,s)=>{if(typeof s=="object"&&s!==null){const i=s[n];return o+(Number(i)||0)}return o},0)}};calculate(t,r){try{const{fields:n,currentValue:o,previousValue:s}=r,i={...n};for(const f in i){const p=i[f];(p==null||p==="")&&(i[f]="")}const a={fields:i,currentValue:o,previousValue:s,...Ca.functions},d=Object.keys(a),u=Object.values(a),l=new Function(...d,`return ${t}`)(...u);if(l==null)return"";if(typeof l=="string"){if(l.includes("undefined"))return"";const f=l.trim();return f===""||/^\s+$/.test(l)?"":f}return l}catch{return""}}calculateAll(t,r){const n={...r};for(const o of t){const s={fields:n,currentValue:n[o.field],previousValue:r[o.field]},i=this.calculate(o.formula,s);n[o.field]=i===null?"":i}return n}validateFormula(t){try{return new Function("fields",`return ${t}`),{valid:!0}}catch(r){return{valid:!1,error:r instanceof Error?r.message:"Invalid formula"}}}getAvailableFunctions(){return[{name:"SUM",description:"Sum of values"},{name:"AVG",description:"Average of values"},{name:"MIN",description:"Minimum value"},{name:"MAX",description:"Maximum value"},{name:"ROUND",description:"Round to decimal places"},{name:"IF",description:"Conditional value"},{name:"CONCAT",description:"Concatenate strings"},{name:"TODAY",description:"Current date"},{name:"DATEDIFF",description:"Difference between dates"},{name:"COUNT",description:"Count of items"},{name:"SUMFIELD",description:"Sum field in array"}]}}const Sd=new Ca;function xd(e){if(e==null||e==="")return null;if(e instanceof Date)return Number.isNaN(e.getTime())?null:Os(e);if(typeof e=="string"){const t=e.trim();if(!t)return null;const r=t.match(/^(\d{4})-(\d{2})-(\d{2})/);if(r){const o=new Date(Number(r[1]),Number(r[2])-1,Number(r[3]));return Number.isNaN(o.getTime())?null:o}const n=new Date(t);return Number.isNaN(n.getTime())?null:Os(n)}return null}function Os(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function bb(e,t=new Date){const r=Os(e),n=Os(t);if(n<r)return{years:0,months:0,days:0};let o=n.getFullYear()-r.getFullYear(),s=n.getMonth()-r.getMonth(),i=n.getDate()-r.getDate();if(i<0){s-=1;const a=new Date(n.getFullYear(),n.getMonth(),0).getDate();i+=a}return s<0&&(o-=1,s+=12),{years:Math.max(0,o),months:Math.max(0,s),days:Math.max(0,i)}}function Ea(e){if(e.type!=="number")return;const t=e.properties?.deriveFromDate;if(!(!t?.sourceFieldName||!t.part))return t}function Fr(e){const t=e.indexOf("__addmore__");return t>=0?e.slice(0,t):e}function Na(e){const t=e.indexOf("__addmore__");return t>=0?e.slice(t):null}function vb(e,t){const r=Na(e);return r?`${t.sourceFieldName}${r}`:t.sourceFieldName}function Ad(e,t,r){const n=Na(t);if(n)return[`${e}${n}`];const o=new Set([e]),s=`${e}__addmore__`;for(const i of Object.keys(r))(i===e||i.startsWith(s))&&o.add(i);return[...o]}function wb(e,t,r){const n=r?vb(r,e):e.sourceFieldName,o=xd(t[n]);if(!o)return null;const s=e.referenceDate==="today"||e.referenceDate==null?new Date:xd(t[e.referenceDate])??new Date;return bb(o,s)[e.part]}function Cd(e,t){const r=Ea(e);return r?Fr(r.sourceFieldName)===Fr(t):!1}function Ta(e,t,r,n){const o={...t},s=n?Fr(n):void 0;for(const i of e){if(i.type!=="number")continue;const a=Ea(i);if(!a||!i.name||s&&Fr(a.sourceFieldName)!==s)continue;const d=n??a.sourceFieldName,u=Ad(i.name,d,o);for(const l of u){if(r.has(l))continue;const f=wb(a,o,l);o[l]=f}}return o}function Sb(e,t,r,n){const o={...t},s=Fr(n);for(const i of e){if(!Cd(i,s)||!i.name)continue;const a=Ad(i.name,n,o);for(const d of a)r.delete(d),o[d]=null}return o}function Ed(e,t){const r=Fr(t);return e.some(n=>Cd(n,r))}function Nd(e){if(e.apidata&&typeof e.apidata=="object")return e.apidata;if(e.metadata)try{const t=typeof e.metadata=="string"?JSON.parse(e.metadata):e.metadata;if(t.apiEndpoint||t.apiKey||t.valueSource==="api")return{apiKey:t.apiKey,valueSource:t.valueSource,apiEndpoint:t.apiEndpoint,apiAutoDetect:t.apiAutoDetect,apiLabelField:t.apiLabelField,apiValueField:t.apiValueField,apiMethod:t.apiMethod,apiRealtime:t.apiRealtime,apiQueryParams:t.apiQueryParams,apiClientFilter:t.apiClientFilter}}catch{}return null}function xb(e,t,r,n){let o=_a(e,r);return n&&(o=In(o,t,r)),o}function _a(e,t){return e.replace(/\{(?:ctx:|\@)(\w+)\}/g,(r,n)=>t?.[n]!==void 0&&t[n]!==null?String(t[n]):r)}function In(e,t,r){let n=e.replace(/\{(?:ctx:|\@)(\w+)\}/g,(o,s)=>r?.[s]!==void 0&&r[s]!==null?String(r[s]):o);return n=n.replace(/\{(\w+)\}/g,(o,s)=>{if(o.includes("ctx:")||o.includes("@"))return o;let i=t[s];if(i==null||i===""){const a=Object.keys(t).find(d=>d.toLowerCase()===s.toLowerCase());a&&(i=t[a])}return i!=null&&i!==""?String(i):o}),n}function Is(e,t){const r=e.match(/\{(\w+)\}/g)||[],n=[];t?.custom&&t.custom.forEach(({value:s})=>{if(s){const i=s.match(/\{(\w+)\}/g)||[];n.push(...i.filter(a=>!a.includes("ctx:")&&!a.includes("@")))}});const o=r.filter(s=>!s.includes("ctx:")&&!s.includes("@"));return new Set([...o.map(s=>s.replace(/[{}]/g,"")),...n.map(s=>s.replace(/[{}]/g,""))])}function Ab(e,t){const r=e[t];return r==null||r===""}function Td(e){const{apiEndpoint:t,apiMethod:r="GET",apiQueryParams:n={},formValues:o,submissionContext:s,apiRealtime:i,additionalRequiredFieldNames:a=[],excludeFormFieldNames:d=[]}=e,u=(r||"GET").toLowerCase(),l=Is(t,n),f=new Set((d||[]).filter(w=>typeof w=="string"&&w.length>0)),p=new Set((a||[]).filter(w=>typeof w=="string"&&w.length>0)),m=new Set([...l,...p]);let g=!1;for(const w of m){const x=!!(i&&l.has(w)),C=p.has(w);if((x||C)&&Ab(o,w)){g=!0;break}}if(g)return{blocked:!0,url:t,postBodyBase:null};let h=t;const y=t.match(/\{(\w+)\}/g)||[];if(h=_a(h,s),i&&(h=In(h,o,s)),n&&Object.keys(n).length>0){const w=n,x=[];if(w.limit){let C=w.limit;i&&(C=In(C,o,s)),x.push(`_limit=${encodeURIComponent(C)}`)}if(w.page){let C=w.page;i&&(C=In(C,o,s)),x.push(`page=${encodeURIComponent(C)}`)}if(w.sort){let C=w.sort;i&&(C=In(C,o,s)),x.push(`sort=${encodeURIComponent(C)}`)}if(w.orderBy){let C=w.orderBy;i&&(C=In(C,o,s)),x.push(`orderBy=${encodeURIComponent(C)}`)}if(w.custom?.length&&w.custom.forEach(({key:C,value:O})=>{if(!C||!O)return;let E=_a(O,s);i&&(E=In(E,o,s)),E.match(/\{[^}]+\}/)?E.match(/\{(?!ctx:|\@)(\w+)\}/g)||x.push(`${encodeURIComponent(C)}=`):x.push(`${encodeURIComponent(C)}=${encodeURIComponent(E)}`)}),x.length>0){const C=h.includes("?")?"&":"?";h=`${h}${C}${x.join("&")}`}}if(i&&Object.keys(o).length>0&&u==="get"){const w=E=>E.replace(/\{/g,"").replace(/\}/g,""),x=[];for(const E of n.custom||[])if(E.value){const _=E.value.match(/\{(\w+)\}/g)||[];x.push(..._.map(w))}const C=new Set([...y.map(w),...x]),O={};Object.keys(o).forEach(E=>{!C.has(E)&&!f.has(E)&&(O[E]=o[E])}),Object.keys(O).length>0&&(h=`${h}${h.includes("?")?"&":"?"}${new URLSearchParams(O).toString()}`)}let v=null;if(["post","put","patch"].includes(u))if(i&&Object.keys(o).length>0){v={...o};for(const w of f)delete v[w]}else{v={...o||{}};for(const w of f)delete v[w]}return{blocked:!1,url:h,postBodyBase:v}}const Cb=new Set(["select","multiselect","asyncsearch"]);function Eb(e){return e?.type==="multiselect"?[]:""}function _d(e){if(!Cb.has(e.type))return[];const t=e.properties??{},r=Nd(e),n=new Set,o=r?.apiClientFilter?.matchField?.trim()||t.apiClientFilter?.matchField?.trim();o&&n.add(o);const s=[...Array.isArray(t.dependentFields)?t.dependentFields:[],...Array.isArray(r?.dependentFields)?r.dependentFields:[]];for(const u of s)typeof u=="string"&&u.trim()&&n.add(u.trim());const i=r?.apiEndpoint||t.apiEndpoint,a=r?.apiRealtime??t.apiRealtime,d=r?.apiQueryParams||t.apiQueryParams;if(i&&a)for(const u of Is(i,d))n.add(u);return[...n]}function Nb(e,t){const r=Fr(t);return _d(e).some(n=>Fr(n)===r)}function Tb(e,t){const r=Fr(t);return e.some(n=>Nb(n,r))}function _b(e){const t=new Map;for(const r of e){const n=r.name;if(n)for(const o of _d(r)){const s=Fr(o),i=t.get(s)??new Set;i.add(n),t.set(s,i)}}return t}function kb(e,t,r){const n=Na(t);if(n)return[`${e}${n}`];const o=new Set([e]),s=`${e}__addmore__`;for(const i of Object.keys(r))(i===e||i.startsWith(s))&&o.add(i);return[...o]}function Fb(e,t){return e===t?!0:Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((r,n)=>r===t[n]):!1}function Pb(e,t,r){const n=_b(e),o=Fr(r),s=new Set,i=[o];for(;i.length>0;){const u=i.shift(),l=n.get(u);if(l)for(const f of l)s.has(f)||(s.add(f),i.push(f))}const a={...t},d=[];for(const u of s){const l=e.find(p=>p.name===u),f=Eb(l);for(const p of kb(u,r,a))Fb(a[p],f)||d.push(p),a[p]=f}return{values:a,clearedKeys:d}}function ka(e,t){const r=t instanceof Set?t:new Set(t);if(e.size!==r.size)return!1;for(const n of e)if(!r.has(n))return!1;return!0}const _t=bd((e,t)=>({schema:null,values:{},initialValues:{},errors:{},touched:{},isValidating:!1,isSubmitting:!1,submitCount:0,isValid:!0,currentStep:0,totalSteps:1,completedSteps:new Set,visibleFields:new Set,enabledFields:new Set,requiredFields:new Set,readOnlyFields:new Set,editableFields:new Set,formDisabled:!1,derivedFieldDirty:new Set,draftId:null,setSchema:(r,n)=>{const o=t(),s=o.schema!=null&&o.schema.id===r.id,i=n?.forceReset===!0,a={},d=new Set,u=new Set,l=new Set;r.fields.forEach(y=>{const v=y.name||y.key||y.id;v&&(y.defaultValue!==void 0&&(y.type==="multiselect"?a[v]=Array.isArray(y.defaultValue)?y.defaultValue:y.defaultValue!=null&&y.defaultValue!==""?[String(y.defaultValue)]:[]:a[v]=y.defaultValue),y.hidden||d.add(v),y.disabled||u.add(v),y.validation?.some(w=>w.type==="required")&&l.add(v))});const f=r.steps?.length||1,p=[];r.fields.forEach(y=>{const v=y.properties;v?.valueSource==="calculated"&&v?.formula&&p.push({field:y.name,formula:v.formula})});const m=p.length>0?Sd.calculateAll(p,a):{},g=Ta(r.fields,{...a,...m},new Set),h=s&&!i?{...g,...o.values}:g;e({schema:r,values:h,initialValues:g,errors:{},touched:{},currentStep:0,totalSteps:f,completedSteps:new Set,visibleFields:d,enabledFields:u,requiredFields:l,readOnlyFields:new Set,editableFields:new Set,formDisabled:!1,derivedFieldDirty:i||!s?new Set:o.derivedFieldDirty,isValid:!0,draftId:null})},setFieldValue:(r,n,o)=>{const s=t(),i=s.schema,a=o?.source??"user";let d=new Set(s.derivedFieldDirty);const u=s.values[r];let l={...s.values,[r]:n},f=[];if(i){const p=Fr(r),m=i.fields.find(v=>v.name===p);a==="user"&&m&&Ea(m)&&d.add(r);const g=n==null||n===""||Array.isArray(n)&&n.length===0;if(Ed(i.fields,r)&&g?l=Sb(i.fields,l,d,r):Ed(i.fields,r)&&(l=Ta(i.fields,l,d,r)),a==="user"&&u!==n&&!(Array.isArray(u)&&Array.isArray(n)&&u.length===n.length&&u.every((v,w)=>v===n[w]))&&Tb(i.fields,r)){const v=Pb(i.fields,l,r);l=v.values,f=v.clearedKeys}const y=[];if(i.fields.forEach(v=>{const w=v.properties;w?.valueSource==="calculated"&&w?.formula&&(w.formulaSteps||[]).some(O=>O.type==="field"&&O.fieldName===r)&&y.push({field:v.name,formula:w.formula})}),y.length>0){const v=Sd.calculateAll(y,l);l={...l,...v}}}e({values:l,derivedFieldDirty:d}),f.length>0&&e(p=>{const m={...p.errors};for(const g of f)delete m[g];return Object.keys(m).length===Object.keys(p.errors).length?p:{errors:m}}),i?.config.validateOnChange?t().validateField(r):e(p=>{const m={...p.errors};return delete m[r],{errors:m}})},setFieldTouched:(r,n=!0)=>{e(s=>({touched:{...s.touched,[r]:n}}));const o=t().schema;n&&o?.config.validateOnBlur&&t().validateField(r)},setFieldError:(r,n)=>{e(o=>{const s=!!o.errors[r];if(!n&&!s||n&&o.errors[r]===n)return o;const i={...o.errors};return n?i[r]=n:delete i[r],{errors:i,isValid:Object.keys(i).length===0}})},setValues:r=>{const n=t(),o=n.schema;if(!o){e({values:r});return}const s=Ta(o.fields,r,n.derivedFieldDirty);e({values:s})},setErrors:r=>{e({errors:r,isValid:Object.keys(r).length===0})},resetForm:()=>{const{initialValues:r}=t();e({values:{...r},errors:{},touched:{},currentStep:0,completedSteps:new Set,derivedFieldDirty:new Set,isValid:!0,submitCount:0})},clearForm:()=>{e({schema:null,values:{},initialValues:{},errors:{},touched:{},currentStep:0,totalSteps:1,completedSteps:new Set,visibleFields:new Set,enabledFields:new Set,requiredFields:new Set,readOnlyFields:new Set,editableFields:new Set,formDisabled:!1,derivedFieldDirty:new Set,isValid:!0,submitCount:0,draftId:null})},validateField:async r=>{const{schema:n,values:o}=t();if(!n)return;const s=n.fields.find(a=>a.name===r);if(!s)return;e({isValidating:!0});let i;if(s.validation)for(const a of s.validation){const d=qr(o[r],a,o);if(typeof d=="string"){i=d;break}}if(!i){const a=Aa(s,o[r]);a&&(i=a)}return e(a=>{const d={...a.errors};return i?d[r]=i:delete d[r],{errors:d,isValid:Object.keys(d).length===0,isValidating:!1}}),i},validateForm:async()=>{const{schema:r,values:n,visibleFields:o,requiredFields:s}=t();if(!r)return!1;e({isValidating:!0});const i={};for(const a of r.fields)if(o.has(a.name)){if(a.validation)for(const d of a.validation){if(d.type==="required"&&!s.has(a.name))continue;const u=qr(n[a.name],d,n);if(typeof u=="string"){i[a.name]=u;break}}if(!i[a.name]){const d=Aa(a,n[a.name]);d&&(i[a.name]=d)}}return e({errors:i,isValid:Object.keys(i).length===0,isValidating:!1}),Object.keys(i).length===0},validateStep:async r=>{const{schema:n,values:o,visibleFields:s}=t();if(!n||!n.steps)return!0;const i=n.steps[r];if(!i)return!0;e({isValidating:!0});const a={};for(const d of i.fields){const u=n.fields.find(l=>l.name===d);if(u&&s.has(u.name)){if(u.validation)for(const l of u.validation){const f=qr(o[u.name],l,o);if(typeof f=="string"){a[u.name]=f;break}}if(!a[u.name]){const l=Aa(u,o[u.name]);l&&(a[u.name]=l)}}}return e(d=>({errors:{...d.errors,...a},isValid:Object.keys(a).length===0,isValidating:!1})),Object.keys(a).length===0},nextStep:async()=>{const{currentStep:r,totalSteps:n,schema:o}=t();return o?.steps?.[r]?.validation==="onNext"&&!await t().validateStep(r)?!1:r<n-1?(e(i=>({currentStep:r+1,completedSteps:new Set([...i.completedSteps,r])})),!0):!1},prevStep:()=>{const{currentStep:r}=t();r>0&&e({currentStep:r-1})},goToStep:r=>{const{totalSteps:n,completedSteps:o,currentStep:s}=t();r>=0&&r<n&&(r<=s||o.has(r-1))&&e({currentStep:r})},setSubmitting:r=>e({isSubmitting:r}),incrementSubmitCount:()=>{e(r=>({submitCount:r.submitCount+1}))},updateVisibility:r=>{e(n=>{const o=new Set(r);return ka(n.visibleFields,o)?n:{visibleFields:o}})},updateEnabled:r=>{e(n=>{const o=new Set(r);return ka(n.enabledFields,o)?n:{enabledFields:o}})},updateRequired:r=>{e(n=>{const o=new Set(r);return ka(n.requiredFields,o)?n:{requiredFields:o}})},updateReadOnly:r=>{e({readOnlyFields:new Set(r)})},updateEditable:r=>{e({editableFields:new Set(r)})},updateFormDisabled:r=>{e({formDisabled:r})},saveDraft:()=>{const{schema:r,values:n}=t();if(!r)return;const o=`formsmith_draft_${r.id}`;try{localStorage.setItem(o,JSON.stringify({values:n,savedAt:new Date().toISOString()})),e({draftId:o})}catch{}},loadDraft:()=>{const{schema:r}=t();if(!r)return!1;const n=`formsmith_draft_${r.id}`;try{const o=localStorage.getItem(n);if(o){const{values:s}=JSON.parse(o);return e({values:s,draftId:n}),!0}}catch{}return!1},clearDraft:()=>{const{schema:r,draftId:n}=t();if(!r)return;const o=n||`formsmith_draft_${r.id}`;try{localStorage.removeItem(o),e({draftId:null})}catch{}}}));function Ob(){return _t.getState()}function kd({schema:e,initialValues:t,onSubmit:r,onChange:n,workflowStepId:o}){const{values:s,errors:i,touched:a,isValidating:d,isSubmitting:u,submitCount:l,isValid:f,currentStep:p,totalSteps:m,completedSteps:g,visibleFields:h,enabledFields:y,requiredFields:v,setSchema:w,setFieldValue:x,setFieldTouched:C,setFieldError:O,setValues:E,resetForm:_,validateField:T,validateForm:A,validateStep:P,nextStep:k,prevStep:U,goToStep:R,setSubmitting:L,incrementSubmitCount:q,saveDraft:M,loadDraft:j,clearDraft:B}=_t(),G=S.useRef(null);S.useLayoutEffect(()=>{if(w(e,{forceReset:!!o}),t&&Object.keys(t).length>0){const ce=_t.getState().values;E({...ce,...t});try{G.current=JSON.stringify(t)}catch{G.current=null}}else G.current=null},[e.id,o]),S.useLayoutEffect(()=>{if(!t||Object.keys(t).length===0)return;let ce;try{ce=JSON.stringify(t)}catch{return}if(ce===G.current)return;const rt=_t.getState().values;E({...rt,...t}),G.current=ce},[t,E]);const D=S.useCallback((ce,rt)=>{const ve={...s,[ce]:rt};x(ce,rt),n?.(ve,ce)},[x,n,s]),he=S.useCallback(async ce=>{if(ce?.preventDefault(),q(),!await A())return{success:!1,errors:Object.entries(i).map(([ve,we])=>({field:ve,rule:"validation",message:we}))};if(!r)return{success:!0};L(!0);try{const ve=await r(s);return ve.success&&B(),ve}catch(ve){return{success:!1,message:ve instanceof Error?ve.message:"Submission failed"}}finally{L(!1)}},[A,r,s,i,q,L,B]),I=S.useCallback(ce=>({value:s[ce],error:i[ce],touched:a[ce]||!1,isVisible:h.has(ce),isEnabled:y.has(ce),isRequired:v.has(ce)}),[s,i,a,h,y,v]),V=S.useMemo(()=>{if(!e.steps||e.steps.length===0)return e.fields;const ce=e.steps[p];return ce?e.fields.filter(rt=>ce.fields.includes(rt.name)):[]},[e,p]),Q=p===0,le=p===m-1,re=S.useCallback(ce=>g.has(ce),[g]),se=S.useMemo(()=>m<=1?100:Math.round(g.size/m*100),[g.size,m]),ae=S.useCallback(ce=>h.has(ce),[h]),Fe=S.useCallback(ce=>y.has(ce),[y]),te=S.useCallback(ce=>v.has(ce),[v]),ee=S.useMemo(()=>Object.entries(i).filter(([ce])=>h.has(ce)),[i,h]),ge=ee.length>0;return{values:s,errors:i,touched:a,isValidating:d,isSubmitting:u,submitCount:l,isValid:f,hasErrors:ge,visibleErrors:ee,currentStep:p,totalSteps:m,completedSteps:g,currentStepFields:V,isFirstStep:Q,isLastStep:le,isStepCompleted:re,progress:se,setFieldValue:D,setFieldTouched:C,setFieldError:O,setValues:E,validateField:T,getFieldState:I,shouldShowField:ae,isFieldEnabled:Fe,isFieldRequired:te,handleSubmit:he,resetForm:_,validateForm:A,validateStep:P,nextStep:k,prevStep:U,goToStep:R,saveDraft:M,loadDraft:j,clearDraft:B}}function Fd(e){return"logic"in e&&"conditions"in e}function $o(e){if(e==null||typeof e!="object")return!1;const t=e;if(t.status==="error")return!1;if(t.status==="success"||t.status==="COMPLETED")return!0;const r=t.code;return typeof r=="number"&&r>=200&&r<300||t.data!=null&&t.status!=="error"}function Pd(e,t){if(e==null||typeof t!="string"||t.trim()==="")return;const r=t.replace(/\[(\d+)\]/g,".$1").split(".").filter(Boolean);let n=e;for(const o of r){if(n==null||typeof n!="object")return;n=n[o]}return n}function st(e,t){if(e==null||typeof t!="string"||t.trim()==="")return;let r=Pd(e,t);if(r===void 0&&t.includes(".")){const n=t.split(".");if(n.length>=2){const o=n[0],s=n.slice(1).join("."),i=Pd(e,o);Array.isArray(i)&&i.length>0&&(r=st(i[0],s))}}return r}const Ib=new Set(["section","group","columns","divider","header","sectionHeading","spacer","textLabel","addmore","customizeSections"]);function Mb(e){return e===!0||e==="true"?!0:e===!1||e==="false"?!1:e}function Lb(e,t){if(e==null||typeof t.path!="string"||!t.path.trim())return!1;const r=st(e,t.path),n=Mb(t.value);switch(t.operator){case"equals":return r===n;case"notEquals":return r!==n;case"contains":return typeof r=="string"?r.includes(String(n)):Array.isArray(r)?r.includes(n):!1;case"notContains":return typeof r=="string"?!r.includes(String(n)):Array.isArray(r)?!r.includes(n):!0;case"startsWith":return typeof r=="string"&&r.startsWith(String(n));case"endsWith":return typeof r=="string"&&r.endsWith(String(n));case"greaterThan":return Number(r)>Number(n);case"lessThan":return Number(r)<Number(n);case"greaterThanOrEqual":return Number(r)>=Number(n);case"lessThanOrEqual":return Number(r)<=Number(n);case"isEmpty":return r==null?!0:typeof r=="string"?r.trim()==="":Array.isArray(r)?r.length===0:typeof r=="object"&&r!==null?Object.keys(r).length===0:!1;case"isNotEmpty":return r==null?!1:typeof r=="string"?r.trim()!=="":Array.isArray(r)?r.length>0:typeof r=="object"&&r!==null?Object.keys(r).length>0:!1;case"isTrue":return r===!0;case"isFalse":return r===!1;case"isNull":return r==null;case"isNotNull":return r!=null;case"in":return Array.isArray(n)?n.includes(r):!1;case"notIn":return Array.isArray(n)?!n.includes(r):!0;case"between":if(Array.isArray(n)&&n.length===2){const o=Number(r);return o>=Number(n[0])&&o<=Number(n[1])}return!1;case"regex":try{return new RegExp(String(n)).test(String(r??""))}catch{return!1}default:return!1}}function Db(e,t,r){return e?e==="__allFields__"?t.filter(n=>!Ib.has(n.type)).map(n=>r(n)).filter(Boolean):e==="__allButtons__"?t.filter(n=>n.type==="button"||n.type==="editButton").map(n=>r(n)).filter(Boolean):[e]:[]}const Od="__buttonResponse:";function Bb({fields:e,values:t,buttonResponses:r,prepopulateResponse:n=null,prepopulateResponseRules:o}){const{updateVisibility:s,updateEnabled:i,updateRequired:a,updateReadOnly:d,updateEditable:u,updateFormDisabled:l}=_t(),f=S.useCallback(E=>E.name||E.key||E.id,[]),p=S.useCallback((E,_)=>{if(!E)return f(_);const T=e.find(A=>A.id===E||A.name===E||A.key===E);return T?f(T):E},[e,f]),m=S.useCallback(E=>{const _=e.find(T=>T.id===E||T.name===E||T.key===E);return _?f(_):E},[e,f]),g=S.useCallback(E=>{const{field:_,operator:T,value:A}=E;if(typeof _=="string"&&_.startsWith(Od)){const U=_.slice(Od.length),R=r?.[U],L=$o(R);return A==="success"?L:A==="failure"?R!=null&&!L:!1}const P=m(_),k=t[P];switch(T){case"equals":return k===A;case"notEquals":return k!==A;case"contains":return typeof k=="string"?k.includes(String(A)):Array.isArray(k)?k.includes(A):!1;case"notContains":return typeof k=="string"?!k.includes(String(A)):Array.isArray(k)?!k.includes(A):!0;case"startsWith":return typeof k=="string"&&k.startsWith(String(A));case"endsWith":return typeof k=="string"&&k.endsWith(String(A));case"greaterThan":return Number(k)>Number(A);case"lessThan":return Number(k)<Number(A);case"greaterThanOrEqual":return Number(k)>=Number(A);case"lessThanOrEqual":return Number(k)<=Number(A);case"isEmpty":return k==null?!0:k instanceof File?!1:typeof k=="string"?k.trim()==="":Array.isArray(k)?(k.length>0&&k[0]instanceof File,k.length===0):typeof k=="object"&&k!==null?Object.keys(k).length===0:!1;case"isNotEmpty":return k==null?!1:k instanceof File?!0:typeof k=="string"?k.trim()!=="":Array.isArray(k)?(k.length>0&&k[0]instanceof File,k.length>0):typeof k=="object"&&k!==null?Object.keys(k).length>0:!1;case"isTrue":return k===!0;case"isFalse":return k===!1;case"isNull":return k==null;case"isNotNull":return k!=null;case"in":return Array.isArray(A)?A.includes(k):!1;case"notIn":return Array.isArray(A)?!A.includes(k):!0;case"between":if(Array.isArray(A)&&A.length===2){const U=Number(k);return U>=Number(A[0])&&U<=Number(A[1])}return!1;case"regex":try{return new RegExp(String(A)).test(String(k))}catch{return!1}default:return!0}},[t,m,r]),h=S.useCallback(E=>{const _=E.conditions.map(T=>Fd(T)?h(T):g(T));return E.logic==="and"?_.every(Boolean):_.some(Boolean)},[g]),y=S.useCallback(E=>Fd(E)?h(E):g(E),[g,h]),v=S.useCallback(()=>{const E=new Set,_=new Set,T=new Set,A=new Set,P=new Set;e.forEach(L=>{const q=f(L);L.hidden||E.add(q),L.disabled||_.add(q),L.validation?.some(M=>M.type==="required")&&T.add(q)});let k=!1;if(n!=null&&o?.length)for(const L of o){if(!Lb(n,L.when))continue;const{action:q,target:M}=L.then;if(q==="disableForm")k=!0;else if(q==="enableForm")k=!1;else{const j=Db(M,e,f);for(const B of j)switch(q){case"disable":_.delete(B);break;case"enable":_.add(B);break;case"hide":E.delete(B);break;case"show":E.add(B);break;case"readOnly":A.add(B),P.delete(B);break;case"editable":P.add(B),A.delete(B);break}}}e.forEach(L=>{L.conditions&&L.conditions.forEach(q=>{(y(q.when)?q.then:q.else||[]).forEach(B=>{switch(B.action){case"disableForm":k=!0;break;case"enableForm":k=!1;break;default:{const G=p(B.target,L);switch(B.action){case"show":E.add(G);break;case"hide":E.delete(G);break;case"enable":_.add(G);break;case"disable":_.delete(G);break;case"require":T.add(G);break;case"unrequire":T.delete(G);break}break}}})})});const U=L=>e.filter(q=>q.type!=="editButton"&&(q.name||q.key||q.id)).map(q=>f(q)),R=()=>e.filter(L=>L.type==="button").map(L=>f(L));return e.forEach(L=>{if(L.type!=="editButton")return;const q=f(L);if(!$o(r?.[q]))return;const M=L.properties;M?.rules&&M.rules.length>0?M.rules.forEach(j=>{const B=[];j.allFields&&B.push(...U(L.id)),j.allButtons&&B.push(...R()),j.fieldNames?.length&&j.fieldNames.forEach(G=>{const D=e.find(he=>f(he)===G||he.id===G||he.name===G);B.push(D?f(D):G)}),j.buttonNames?.length&&B.push(...j.buttonNames),B.forEach(G=>{switch(j.action){case"enable":_.add(G),A.delete(G);break;case"disable":_.delete(G);break;case"show":E.add(G);break;case"hide":E.delete(G);break;case"readOnly":A.add(G);break;case"editable":P.add(G);break}})}):((M?.enableFieldNames??[]).forEach(j=>_.add(j)),(M?.disableFieldNames??[]).forEach(j=>_.delete(j)),(M?.showFieldNames??[]).forEach(j=>E.add(j)),(M?.hideFieldNames??[]).forEach(j=>E.delete(j)))}),{visible:Array.from(E),enabled:Array.from(_),required:Array.from(T),readOnly:Array.from(A),editable:Array.from(P),formDisabled:k}},[e,y,f,p,t,r,n,o]),w=S.useMemo(()=>v(),[v]);S.useEffect(()=>{s(w.visible),i(w.enabled),a(w.required),d(w.readOnly??[]),u(w.editable??[]),l(w.formDisabled??!1)},[w,s,i,a,d,u,l]);const x=S.useCallback(E=>w.visible.includes(E),[w.visible]),C=S.useCallback(E=>w.enabled.includes(E),[w.enabled]),O=S.useCallback(E=>w.required.includes(E),[w.required]);return{evaluateCondition:y,evaluateExpression:g,evaluateGroup:h,isFieldVisible:x,isFieldEnabled:C,isFieldRequired:O,visibleFields:w.visible,enabledFields:w.enabled,requiredFields:w.required}}function Zn({className:e,type:t,...r}){return c.jsx("input",{type:t,"data-slot":"input",className:$("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground text-foreground dark:bg-secondary dark:border-input border-input flex h-9 w-full min-w-0 rounded-md border bg-background px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}function Id(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Mn(...e){return t=>{let r=!1;const n=e.map(o=>{const s=Id(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():Id(e[o],null)}}}}function Qe(...e){return b.useCallback(Mn(...e),e)}var $b=Symbol.for("react.lazy"),Ms=b[" use ".trim().toString()];function jb(e){return typeof e=="object"&&e!==null&&"then"in e}function Md(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===$b&&"_payload"in e&&jb(e._payload)}function Fa(e){const t=zb(e),r=b.forwardRef((n,o)=>{let{children:s,...i}=n;Md(s)&&typeof Ms=="function"&&(s=Ms(s._payload));const a=b.Children.toArray(s),d=a.find(Vb);if(d){const u=d.props.children,l=a.map(f=>f===d?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return c.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}var Ld=Fa("Slot");function zb(e){const t=b.forwardRef((r,n)=>{let{children:o,...s}=r;if(Md(o)&&typeof Ms=="function"&&(o=Ms(o._payload)),b.isValidElement(o)){const i=Wb(o),a=Hb(s,o.props);return o.type!==b.Fragment&&(a.ref=n?Mn(n,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ub=Symbol("radix.slottable");function Vb(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ub}function Hb(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const d=s(...a);return o(...a),d}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function Wb(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Rb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Gb=Rb.reduce((e,t)=>{const r=Fa(`Primitive.${t}`),n=b.forwardRef((o,s)=>{const{asChild:i,...a}=o,d=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(d,{...a,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),qb="Label",Dd=b.forwardRef((e,t)=>c.jsx(Gb.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Dd.displayName=qb;var Kb=Dd;function bn({className:e,...t}){return c.jsx(Kb,{"data-slot":"label",className:$("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50 mb-2",e),...t})}function gt(e){return`formsmith-field-${e.id}`}function Ls(e){return`formsmith-label-${e.id}`}function jo(e){return`formsmith-desc-${e.id}`}function zo(e){return`formsmith-error-${e.id}`}function Wt(e,t){const r=[];return e.description&&r.push(jo(e)),t&&r.push(zo(e)),r.length>0?r.join(" "):void 0}function er(e){return e?!0:void 0}const Yb={body:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:400},heading:{fontSize:"1.125rem",lineHeight:"1.5rem",fontWeight:600},label:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:500},caption:{fontSize:"0.75rem",lineHeight:"1rem",fontWeight:400,color:"var(--muted-foreground)"}};function vn(e){return e.ui?.cellStyle}function Xb(e){const t=e.ui;if(!t)return;const r=t.fontToken?Yb[t.fontToken]:void 0;if(!(!r&&!t.wrapperStyle))return{...r,...t.wrapperStyle}}function Jb(e){return e.type==="button"||e.type==="editButton"}const kt=({field:e,error:t,isRequired:r,children:n,className:o,hideLabel:s})=>{const{gridStretch:i}=Bo(),a=i&&ks(e),d=!(s??e.appearance?.hideLabel)&&e.label,u=e.appearance?.labelPlacement||"top",l=Xb(e),f=e.appearance?.minWidth!=null||e.appearance?.minHeight!=null?{...e.appearance.minWidth!=null?{minWidth:e.appearance.minWidth}:{},...e.appearance.minHeight!=null?{minHeight:e.appearance.minHeight}:{}}:void 0,p=e.appearance?.className,m=pd(e),g=Qn(e),h=Jb(e),y=kr(e.appearance);return c.jsx("div",{className:$(Zy(u),u!=="floating"&&"space-y-2",a&&!h&&"flex-1 min-h-0 h-full",i&&h&&"w-full shrink-0 self-start",p,o),style:l,"data-field-appearance":u,children:c.jsxs("div",{className:$("flex flex-col min-w-0",cd(e.appearance),md(e),a&&!h&&"flex-1 min-h-0",i&&h&&"shrink-0"),style:m,children:[d&&c.jsxs(bn,{id:Ls(e),htmlFor:gt(e),style:e.ui?.labelStyle,className:$(eb(u,!!t)),children:[e.label,r&&c.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),c.jsxs("div",{className:$(tb(u),h&&i&&"min-h-min !grow-0 !shrink-0 basis-auto",g&&y!=="stretch"&&"items-start",h&&y==="stretch"&&"items-start w-full [&_button]:w-full",!h&&y==="stretch"&&"items-stretch",a&&!h&&"flex-1 min-h-0",o?.includes("flex")&&u==="top"&&"flex flex-col min-h-0"),style:f,children:[n,c.jsxs("div",{className:$("mt-1.5 min-h-[18px]",u==="center"&&"text-center",o?.includes("flex")&&"shrink-0"),children:[e.description&&!t&&c.jsx("p",{id:jo(e),className:"text-xs text-muted-foreground",style:e.ui?.descriptionStyle,children:e.description}),t&&c.jsx("p",{id:zo(e),className:"text-xs text-destructive",role:"alert",children:typeof t=="string"?t:String(t||"An error occurred")})]})]})]})})},Pa=({field:e,value:t,onChange:r,onBlur:n,error:o,disabled:s,readOnly:i,isRequired:a,className:d})=>{const u=e.properties,l=S.useCallback(f=>{r(f.target.value)},[r]);return c.jsx(kt,{field:e,error:o,isRequired:a,className:d,children:c.jsx(Zn,{id:gt(e),type:"text",value:t||"",onChange:l,onBlur:n,placeholder:e.placeholder,disabled:s||e.disabled,readOnly:i||e.readOnly,minLength:u?.minLength,maxLength:u?.maxLength,pattern:u?.pattern,autoComplete:u?.autoComplete,inputMode:u?.inputMode,"aria-describedby":Wt(e,!!o),"aria-invalid":er(!!o),"aria-required":a,className:$(Mo(e.appearance),o&&"border-destructive focus-visible:ring-destructive",e.appearance?.className)})})},Bd=({field:e,value:t,onChange:r,onBlur:n,error:o,disabled:s,readOnly:i,isRequired:a,className:d})=>{const u=e.properties,l=S.useCallback(f=>{const p=f.target.value;if(p==="")r(null);else{const m=parseFloat(p);isNaN(m)||r(m)}},[r]);return c.jsx(kt,{field:e,error:o,isRequired:a,className:d,children:c.jsxs("div",{className:"relative",children:[u?.prefix&&c.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground text-sm",children:u.prefix}),c.jsx(Zn,{id:gt(e),type:"number",value:t??"",onChange:l,onBlur:n,placeholder:e.placeholder,disabled:s||e.disabled,readOnly:i||e.readOnly,min:u?.min,max:u?.max,step:u?.step||1,"aria-describedby":Wt(e,!!o),"aria-invalid":er(!!o),"aria-required":a,className:$(Mo(e.appearance),o&&"border-destructive focus-visible:ring-destructive",u?.prefix&&"pl-8",u?.suffix&&"pr-8",e.appearance?.className)}),u?.suffix&&c.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground text-sm",children:u.suffix})]})})};const Qb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Zb=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),$d=e=>{const t=Zb(e);return t.charAt(0).toUpperCase()+t.slice(1)},jd=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),ev=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var tv={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"};const rv=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:i,...a},d)=>S.createElement("svg",{ref:d,...tv,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:jd("lucide",o),...!s&&!ev(a)&&{"aria-hidden":"true"},...a},[...i.map(([u,l])=>S.createElement(u,l)),...Array.isArray(s)?s:[s]]));const Rt=(e,t)=>{const r=S.forwardRef(({className:n,...o},s)=>S.createElement(rv,{ref:s,iconNode:t,className:jd(`lucide-${Qb($d(e))}`,`lucide-${e}`,n),...o}));return r.displayName=$d(e),r};const nv=Rt("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const Ds=Rt("camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);const Bs=Rt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Uo=Rt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const zd=Rt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const ov=Rt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const sv=Rt("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const Ud=Rt("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const Vd=Rt("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const Hd=Rt("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Vo=Rt("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const iv=Rt("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);const av=Rt("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);const Wd=Rt("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const lv=Rt("sliders-horizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);const Rd=Rt("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);const Ho=Rt("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const $s=Rt("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);const Wo=Rt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Gd=({field:e,value:t,onChange:r,onBlur:n,error:o,disabled:s,readOnly:i,isRequired:a,className:d})=>{const u=S.useCallback(l=>{r(l.target.value)},[r]);return c.jsx(kt,{field:e,error:o,isRequired:a,className:d,children:c.jsxs("div",{className:"relative",children:[c.jsx(iv,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),c.jsx(Zn,{id:gt(e),type:"email",value:t||"",onChange:u,onBlur:n,placeholder:e.placeholder||"email@example.com",disabled:s||e.disabled,readOnly:i||e.readOnly,autoComplete:"email",inputMode:"email","aria-describedby":Wt(e,!!o),"aria-invalid":er(!!o),"aria-required":a,className:$(Mo(e.appearance),"pl-10",o&&"border-destructive focus-visible:ring-destructive",e.appearance?.className)})]})})},qd=({field:e,value:t,onChange:r,onBlur:n,error:o,disabled:s,readOnly:i,isRequired:a,className:d})=>{const u=S.useCallback(l=>{const f=l.target.value.replace(/[^\d\s+\-()]/g,"");r(f)},[r]);return c.jsx(kt,{field:e,error:o,isRequired:a,className:d,children:c.jsxs("div",{className:"relative",children:[c.jsx(av,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),c.jsx(Zn,{id:gt(e),type:"tel",value:t||"",onChange:u,onBlur:n,placeholder:e.placeholder||"+91 12345 67890",disabled:s||e.disabled,readOnly:i||e.readOnly,autoComplete:"tel",inputMode:"tel","aria-describedby":Wt(e,!!o),"aria-invalid":er(!!o),"aria-required":a,className:$(Mo(e.appearance),"pl-10",o&&"border-destructive focus-visible:ring-destructive",e.appearance?.className)})]})})};function cv({className:e,maxLength:t,showCharacterCount:r=!1,autoResize:n=!1,onChange:o,value:s,...i}){const a=b.useRef(null),[d,u]=b.useState(0),l=f=>{const p=f.target.value;u(p.length),n&&a.current&&(a.current.style.height="auto",a.current.style.height=`${a.current.scrollHeight}px`),o&&o(f)};return b.useEffect(()=>{s&&u(String(s).length)},[s]),c.jsxs("div",{className:"space-y-1",children:[c.jsx("textarea",{ref:a,"data-slot":"textarea",className:$("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n&&"resize-none",e),maxLength:t,onChange:l,value:s,...i}),r&&c.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[c.jsxs("span",{children:[d," characters"]}),t&&c.jsxs("span",{children:[t-d," remaining"]})]})]})}const Kd=({field:e,value:t,onChange:r,onBlur:n,error:o,disabled:s,readOnly:i,isRequired:a,className:d})=>{const{gridStretch:u}=Bo(),l=u&&ks(e),f=e.properties,p=S.useCallback(y=>{r(y.target.value)},[r]),m=(t||"").length,g=f?.maxLength,h=g&&g>0;return c.jsx(kt,{field:e,error:o,isRequired:a,className:d,children:c.jsxs("div",{className:$("relative flex flex-col",l&&"flex-1 min-h-0"),children:[c.jsx(cv,{id:gt(e),value:t||"",onChange:p,onBlur:n,placeholder:e.placeholder,disabled:s||e.disabled,readOnly:i||e.readOnly,minLength:f?.minLength,maxLength:f?.maxLength,rows:2,"aria-describedby":Wt(e,!!o),"aria-invalid":er(!!o),"aria-required":a,className:$(id(e.appearance),"resize-y",l&&"min-h-[120px] flex-1 flex-shrink-0",o&&"border-destructive focus-visible:ring-destructive",e.appearance?.className)}),h&&c.jsxs("span",{className:"absolute bottom-2 right-2 text-xs text-muted-foreground",children:[m,"/",g]})]})})};function Ro(e,[t,r]){return Math.min(r,Math.max(t,e))}function Me(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}function dv(e,t){const r=b.createContext(t),n=s=>{const{children:i,...a}=s,d=b.useMemo(()=>a,Object.values(a));return c.jsx(r.Provider,{value:d,children:i})};n.displayName=e+"Provider";function o(s){const i=b.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,o]}function br(e,t=[]){let r=[];function n(s,i){const a=b.createContext(i),d=r.length;r=[...r,i];const u=f=>{const{scope:p,children:m,...g}=f,h=p?.[e]?.[d]||a,y=b.useMemo(()=>g,Object.values(g));return c.jsx(h.Provider,{value:y,children:m})};u.displayName=s+"Provider";function l(f,p){const m=p?.[e]?.[d]||a,g=b.useContext(m);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,l]}const o=()=>{const s=r.map(i=>b.createContext(i));return function(a){const d=a?.[e]||s;return b.useMemo(()=>({[`__scope${e}`]:{...a,[e]:d}}),[a,d])}};return o.scopeName=e,[n,uv(o,...t)]}function uv(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=n.reduce((a,{useScope:d,scopeName:u})=>{const f=d(s)[`__scope${u}`];return{...a,...f}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function Yd(e){const t=fv(e),r=b.forwardRef((n,o)=>{const{children:s,...i}=n,a=b.Children.toArray(s),d=a.find(mv);if(d){const u=d.props.children,l=a.map(f=>f===d?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return c.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function fv(e){const t=b.forwardRef((r,n)=>{const{children:o,...s}=r;if(b.isValidElement(o)){const i=gv(o),a=hv(s,o.props);return o.type!==b.Fragment&&(a.ref=n?Mn(n,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pv=Symbol("radix.slottable");function mv(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pv}function hv(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const d=s(...a);return o(...a),d}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function gv(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Oa(e){const t=e+"CollectionProvider",[r,n]=br(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:y,children:v}=h,w=S.useRef(null),x=S.useRef(new Map).current;return c.jsx(o,{scope:y,itemMap:x,collectionRef:w,children:v})};i.displayName=t;const a=e+"CollectionSlot",d=Yd(a),u=S.forwardRef((h,y)=>{const{scope:v,children:w}=h,x=s(a,v),C=Qe(y,x.collectionRef);return c.jsx(d,{ref:C,children:w})});u.displayName=a;const l=e+"CollectionItemSlot",f="data-radix-collection-item",p=Yd(l),m=S.forwardRef((h,y)=>{const{scope:v,children:w,...x}=h,C=S.useRef(null),O=Qe(y,C),E=s(l,v);return S.useEffect(()=>(E.itemMap.set(C,{ref:C,...x}),()=>{E.itemMap.delete(C)})),c.jsx(p,{[f]:"",ref:O,children:w})});m.displayName=l;function g(h){const y=s(e+"CollectionConsumer",h);return S.useCallback(()=>{const w=y.collectionRef.current;if(!w)return[];const x=Array.from(w.querySelectorAll(`[${f}]`));return Array.from(y.itemMap.values()).sort((E,_)=>x.indexOf(E.ref.current)-x.indexOf(_.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:i,Slot:u,ItemSlot:m},g,n]}var yv=b.createContext(void 0);function eo(e){const t=b.useContext(yv);return e||t||"ltr"}function bv(e){const t=vv(e),r=b.forwardRef((n,o)=>{const{children:s,...i}=n,a=b.Children.toArray(s),d=a.find(Sv);if(d){const u=d.props.children,l=a.map(f=>f===d?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return c.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function vv(e){const t=b.forwardRef((r,n)=>{const{children:o,...s}=r;if(b.isValidElement(o)){const i=Av(o),a=xv(s,o.props);return o.type!==b.Fragment&&(a.ref=n?Mn(n,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var wv=Symbol("radix.slottable");function Sv(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===wv}function xv(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const d=s(...a);return o(...a),d}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function Av(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Cv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Be=Cv.reduce((e,t)=>{const r=bv(`Primitive.${t}`),n=b.forwardRef((o,s)=>{const{asChild:i,...a}=o,d=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(d,{...a,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Ev(e,t){e&&Ss.flushSync(()=>e.dispatchEvent(t))}function sr(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...r)=>t.current?.(...r),[])}function Nv(e,t=globalThis?.document){const r=sr(e);b.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Tv="DismissableLayer",Ia="dismissableLayer.update",_v="dismissableLayer.pointerDownOutside",kv="dismissableLayer.focusOutside",Xd,Jd=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),js=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...d}=e,u=b.useContext(Jd),[l,f]=b.useState(null),p=l?.ownerDocument??globalThis?.document,[,m]=b.useState({}),g=Qe(t,_=>f(_)),h=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(y),w=l?h.indexOf(l):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,C=w>=v,O=Ov(_=>{const T=_.target,A=[...u.branches].some(P=>P.contains(T));!C||A||(o?.(_),i?.(_),_.defaultPrevented||a?.())},p),E=Iv(_=>{const T=_.target;[...u.branches].some(P=>P.contains(T))||(s?.(_),i?.(_),_.defaultPrevented||a?.())},p);return Nv(_=>{w===u.layers.size-1&&(n?.(_),!_.defaultPrevented&&a&&(_.preventDefault(),a()))},p),b.useEffect(()=>{if(l)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Xd=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(l)),u.layers.add(l),Qd(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Xd)}},[l,p,r,u]),b.useEffect(()=>()=>{l&&(u.layers.delete(l),u.layersWithOutsidePointerEventsDisabled.delete(l),Qd())},[l,u]),b.useEffect(()=>{const _=()=>m({});return document.addEventListener(Ia,_),()=>document.removeEventListener(Ia,_)},[]),c.jsx(Be.div,{...d,ref:g,style:{pointerEvents:x?C?"auto":"none":void 0,...e.style},onFocusCapture:Me(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Me(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Me(e.onPointerDownCapture,O.onPointerDownCapture)})});js.displayName=Tv;var Fv="DismissableLayerBranch",Pv=b.forwardRef((e,t)=>{const r=b.useContext(Jd),n=b.useRef(null),o=Qe(t,n);return b.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),c.jsx(Be.div,{...e,ref:o})});Pv.displayName=Fv;function Ov(e,t=globalThis?.document){const r=sr(e),n=b.useRef(!1),o=b.useRef(()=>{});return b.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let d=function(){Zd(_v,r,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Iv(e,t=globalThis?.document){const r=sr(e),n=b.useRef(!1);return b.useEffect(()=>{const o=s=>{s.target&&!n.current&&Zd(kv,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Qd(){const e=new CustomEvent(Ia);document.dispatchEvent(e)}function Zd(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Ev(o,s):o.dispatchEvent(s)}var Ma=0;function La(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??eu()),document.body.insertAdjacentElement("beforeend",e[1]??eu()),Ma++,()=>{Ma===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ma--}},[])}function eu(){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 Da="focusScope.autoFocusOnMount",Ba="focusScope.autoFocusOnUnmount",tu={bubbles:!1,cancelable:!0},Mv="FocusScope",zs=b.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,d]=b.useState(null),u=sr(o),l=sr(s),f=b.useRef(null),p=Qe(t,h=>d(h)),m=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(n){let h=function(x){if(m.paused||!a)return;const C=x.target;a.contains(C)?f.current=C:wn(f.current,{select:!0})},y=function(x){if(m.paused||!a)return;const C=x.relatedTarget;C!==null&&(a.contains(C)||wn(f.current,{select:!0}))},v=function(x){if(document.activeElement===document.body)for(const O of x)O.removedNodes.length>0&&wn(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const w=new MutationObserver(v);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),w.disconnect()}}},[n,a,m.paused]),b.useEffect(()=>{if(a){ou.add(m);const h=document.activeElement;if(!a.contains(h)){const v=new CustomEvent(Da,tu);a.addEventListener(Da,u),a.dispatchEvent(v),v.defaultPrevented||(Lv(zv(ru(a)),{select:!0}),document.activeElement===h&&wn(a))}return()=>{a.removeEventListener(Da,u),setTimeout(()=>{const v=new CustomEvent(Ba,tu);a.addEventListener(Ba,l),a.dispatchEvent(v),v.defaultPrevented||wn(h??document.body,{select:!0}),a.removeEventListener(Ba,l),ou.remove(m)},0)}}},[a,u,l,m]);const g=b.useCallback(h=>{if(!r&&!n||m.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(y&&v){const w=h.currentTarget,[x,C]=Dv(w);x&&C?!h.shiftKey&&v===C?(h.preventDefault(),r&&wn(x,{select:!0})):h.shiftKey&&v===x&&(h.preventDefault(),r&&wn(C,{select:!0})):v===w&&h.preventDefault()}},[r,n,m.paused]);return c.jsx(Be.div,{tabIndex:-1,...i,ref:p,onKeyDown:g})});zs.displayName=Mv;function Lv(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(wn(n,{select:t}),document.activeElement!==r)return}function Dv(e){const t=ru(e),r=nu(t,e),n=nu(t.reverse(),e);return[r,n]}function ru(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function nu(e,t){for(const r of e)if(!Bv(r,{upTo:t}))return r}function Bv(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 $v(e){return e instanceof HTMLInputElement&&"select"in e}function wn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&$v(e)&&t&&e.select()}}var ou=jv();function jv(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=su(e,t),e.unshift(t)},remove(t){e=su(e,t),e[0]?.resume()}}}function su(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function zv(e){return e.filter(t=>t.tagName!=="A")}var Xt=globalThis?.document?b.useLayoutEffect:()=>{},Uv=b[" useId ".trim().toString()]||(()=>{}),Vv=0;function rn(e){const[t,r]=b.useState(Uv());return Xt(()=>{r(n=>n??String(Vv++))},[e]),e||(t?`radix-${t}`:"")}const Hv=["top","right","bottom","left"],Sn=Math.min,vr=Math.max,Us=Math.round,Vs=Math.floor,Kr=e=>({x:e,y:e}),Wv={left:"right",right:"left",bottom:"top",top:"bottom"};function $a(e,t,r){return vr(e,Sn(t,r))}function nn(e,t){return typeof e=="function"?e(t):e}function on(e){return e.split("-")[0]}function to(e){return e.split("-")[1]}function ja(e){return e==="x"?"y":"x"}function za(e){return e==="y"?"height":"width"}function Yr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ua(e){return ja(Yr(e))}function Rv(e,t,r){r===void 0&&(r=!1);const n=to(e),o=Ua(e),s=za(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Hs(i)),[i,Hs(i)]}function Gv(e){const t=Hs(e);return[Va(e),t,Va(t)]}function Va(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const iu=["left","right"],au=["right","left"],qv=["top","bottom"],Kv=["bottom","top"];function Yv(e,t,r){switch(e){case"top":case"bottom":return r?t?au:iu:t?iu:au;case"left":case"right":return t?qv:Kv;default:return[]}}function Xv(e,t,r,n){const o=to(e);let s=Yv(on(e),r==="start",n);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Va)))),s}function Hs(e){const t=on(e);return Wv[t]+e.slice(t.length)}function Jv(e){return{top:0,right:0,bottom:0,left:0,...e}}function lu(e){return typeof e!="number"?Jv(e):{top:e,right:e,bottom:e,left:e}}function Ws(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function cu(e,t,r){let{reference:n,floating:o}=e;const s=Yr(t),i=Ua(t),a=za(i),d=on(t),u=s==="y",l=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,p=n[a]/2-o[a]/2;let m;switch(d){case"top":m={x:l,y:n.y-o.height};break;case"bottom":m={x:l,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:f};break;case"left":m={x:n.x-o.width,y:f};break;default:m={x:n.x,y:n.y}}switch(to(t)){case"start":m[i]-=p*(r&&u?-1:1);break;case"end":m[i]+=p*(r&&u?-1:1);break}return m}async function Qv(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:i,elements:a,strategy:d}=e,{boundary:u="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=nn(t,e),g=lu(m),y=a[p?f==="floating"?"reference":"floating":f],v=Ws(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(y)))==null||r?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:l,strategy:d})),w=f==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},O=Ws(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:x,strategy:d}):w);return{top:(v.top-O.top+g.top)/C.y,bottom:(O.bottom-v.bottom+g.bottom)/C.y,left:(v.left-O.left+g.left)/C.x,right:(O.right-v.right+g.right)/C.x}}const Zv=50,ew=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:i}=r,a=i.detectOverflow?i:{...i,detectOverflow:Qv},d=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:f}=cu(u,n,d),p=n,m=0;const g={};for(let h=0;h<s.length;h++){const y=s[h];if(!y)continue;const{name:v,fn:w}=y,{x,y:C,data:O,reset:E}=await w({x:l,y:f,initialPlacement:n,placement:p,strategy:o,middlewareData:g,rects:u,platform:a,elements:{reference:e,floating:t}});l=x??l,f=C??f,g[v]={...g[v],...O},E&&m<Zv&&(m++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(u=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:l,y:f}=cu(u,p,d)),h=-1)}return{x:l,y:f,placement:p,strategy:o,middlewareData:g}},tw=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:i,elements:a,middlewareData:d}=t,{element:u,padding:l=0}=nn(e,t)||{};if(u==null)return{};const f=lu(l),p={x:r,y:n},m=Ua(o),g=za(m),h=await i.getDimensions(u),y=m==="y",v=y?"top":"left",w=y?"bottom":"right",x=y?"clientHeight":"clientWidth",C=s.reference[g]+s.reference[m]-p[m]-s.floating[g],O=p[m]-s.reference[m],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let _=E?E[x]:0;(!_||!await(i.isElement==null?void 0:i.isElement(E)))&&(_=a.floating[x]||s.floating[g]);const T=C/2-O/2,A=_/2-h[g]/2-1,P=Sn(f[v],A),k=Sn(f[w],A),U=P,R=_-h[g]-k,L=_/2-h[g]/2+T,q=$a(U,L,R),M=!d.arrow&&to(o)!=null&&L!==q&&s.reference[g]/2-(L<U?P:k)-h[g]/2<0,j=M?L<U?L-U:L-R:0;return{[m]:p[m]+j,data:{[m]:q,centerOffset:L-q-j,...M&&{alignmentOffset:j}},reset:M}}}),rw=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:d,elements:u}=t,{mainAxis:l=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...y}=nn(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const v=on(o),w=Yr(a),x=on(a)===a,C=await(d.isRTL==null?void 0:d.isRTL(u.floating)),O=p||(x||!h?[Hs(a)]:Gv(a)),E=g!=="none";!p&&E&&O.push(...Xv(a,h,g,C));const _=[a,...O],T=await d.detectOverflow(t,y),A=[];let P=((n=s.flip)==null?void 0:n.overflows)||[];if(l&&A.push(T[v]),f){const L=Rv(o,i,C);A.push(T[L[0]],T[L[1]])}if(P=[...P,{placement:o,overflows:A}],!A.every(L=>L<=0)){var k,U;const L=(((k=s.flip)==null?void 0:k.index)||0)+1,q=_[L];if(q&&(!(f==="alignment"?w!==Yr(q):!1)||P.every(B=>Yr(B.placement)===w?B.overflows[0]>0:!0)))return{data:{index:L,overflows:P},reset:{placement:q}};let M=(U=P.filter(j=>j.overflows[0]<=0).sort((j,B)=>j.overflows[1]-B.overflows[1])[0])==null?void 0:U.placement;if(!M)switch(m){case"bestFit":{var R;const j=(R=P.filter(B=>{if(E){const G=Yr(B.placement);return G===w||G==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(G=>G>0).reduce((G,D)=>G+D,0)]).sort((B,G)=>B[1]-G[1])[0])==null?void 0:R[0];j&&(M=j);break}case"initialPlacement":M=a;break}if(o!==M)return{reset:{placement:M}}}return{}}}};function du(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function uu(e){return Hv.some(t=>e[t]>=0)}const nw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:o="referenceHidden",...s}=nn(e,t);switch(o){case"referenceHidden":{const i=await n.detectOverflow(t,{...s,elementContext:"reference"}),a=du(i,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:uu(a)}}}case"escaped":{const i=await n.detectOverflow(t,{...s,altBoundary:!0}),a=du(i,r.floating);return{data:{escapedOffsets:a,escaped:uu(a)}}}default:return{}}}}},fu=new Set(["left","top"]);async function ow(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=on(r),a=to(r),d=Yr(r)==="y",u=fu.has(i)?-1:1,l=s&&d?-1:1,f=nn(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof g=="number"&&(m=a==="end"?g*-1:g),d?{x:m*l,y:p*u}:{x:p*u,y:m*l}}const sw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:i,middlewareData:a}=t,d=await ow(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+d.x,y:s+d.y,data:{...d,placement:i}}}}},iw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:d={fn:v=>{let{x:w,y:x}=v;return{x:w,y:x}}},...u}=nn(e,t),l={x:r,y:n},f=await s.detectOverflow(t,u),p=Yr(on(o)),m=ja(p);let g=l[m],h=l[p];if(i){const v=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=g+f[v],C=g-f[w];g=$a(x,g,C)}if(a){const v=p==="y"?"top":"left",w=p==="y"?"bottom":"right",x=h+f[v],C=h-f[w];h=$a(x,h,C)}const y=d.fn({...t,[m]:g,[p]:h});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[m]:i,[p]:a}}}}}},aw=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:d=!0,crossAxis:u=!0}=nn(e,t),l={x:r,y:n},f=Yr(o),p=ja(f);let m=l[p],g=l[f];const h=nn(a,t),y=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(d){const x=p==="y"?"height":"width",C=s.reference[p]-s.floating[x]+y.mainAxis,O=s.reference[p]+s.reference[x]-y.mainAxis;m<C?m=C:m>O&&(m=O)}if(u){var v,w;const x=p==="y"?"width":"height",C=fu.has(on(o)),O=s.reference[f]-s.floating[x]+(C&&((v=i.offset)==null?void 0:v[f])||0)+(C?0:y.crossAxis),E=s.reference[f]+s.reference[x]+(C?0:((w=i.offset)==null?void 0:w[f])||0)-(C?y.crossAxis:0);g<O?g=O:g>E&&(g=E)}return{[p]:m,[f]:g}}}},lw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:d=()=>{},...u}=nn(e,t),l=await i.detectOverflow(t,u),f=on(o),p=to(o),m=Yr(o)==="y",{width:g,height:h}=s.floating;let y,v;f==="top"||f==="bottom"?(y=f,v=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(v=f,y=p==="end"?"top":"bottom");const w=h-l.top-l.bottom,x=g-l.left-l.right,C=Sn(h-l[y],w),O=Sn(g-l[v],x),E=!t.middlewareData.shift;let _=C,T=O;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(T=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(_=w),E&&!p){const P=vr(l.left,0),k=vr(l.right,0),U=vr(l.top,0),R=vr(l.bottom,0);m?T=g-2*(P!==0||k!==0?P+k:vr(l.left,l.right)):_=h-2*(U!==0||R!==0?U+R:vr(l.top,l.bottom))}await d({...t,availableWidth:T,availableHeight:_});const A=await i.getDimensions(a.floating);return g!==A.width||h!==A.height?{reset:{rects:!0}}:{}}}};function Rs(){return typeof window<"u"}function ro(e){return pu(e)?(e.nodeName||"").toLowerCase():"#document"}function wr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xr(e){var t;return(t=(pu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pu(e){return Rs()?e instanceof Node||e instanceof wr(e).Node:!1}function jr(e){return Rs()?e instanceof Element||e instanceof wr(e).Element:!1}function sn(e){return Rs()?e instanceof HTMLElement||e instanceof wr(e).HTMLElement:!1}function mu(e){return!Rs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof wr(e).ShadowRoot}function Go(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=zr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&o!=="inline"&&o!=="contents"}function cw(e){return/^(table|td|th)$/.test(ro(e))}function Gs(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const dw=/transform|translate|scale|rotate|perspective|filter/,uw=/paint|layout|strict|content/,Ln=e=>!!e&&e!=="none";let Ha;function Wa(e){const t=jr(e)?zr(e):e;return Ln(t.transform)||Ln(t.translate)||Ln(t.scale)||Ln(t.rotate)||Ln(t.perspective)||!Ra()&&(Ln(t.backdropFilter)||Ln(t.filter))||dw.test(t.willChange||"")||uw.test(t.contain||"")}function fw(e){let t=xn(e);for(;sn(t)&&!no(t);){if(Wa(t))return t;if(Gs(t))return null;t=xn(t)}return null}function Ra(){return Ha==null&&(Ha=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ha}function no(e){return/^(html|body|#document)$/.test(ro(e))}function zr(e){return wr(e).getComputedStyle(e)}function qs(e){return jr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xn(e){if(ro(e)==="html")return e;const t=e.assignedSlot||e.parentNode||mu(e)&&e.host||Xr(e);return mu(t)?t.host:t}function hu(e){const t=xn(e);return no(t)?e.ownerDocument?e.ownerDocument.body:e.body:sn(t)&&Go(t)?t:hu(t)}function qo(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=hu(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),i=wr(o);if(s){const a=Ga(i);return t.concat(i,i.visualViewport||[],Go(o)?o:[],a&&r?qo(a):[])}else return t.concat(o,qo(o,[],r))}function Ga(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gu(e){const t=zr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=sn(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:n,a=Us(r)!==s||Us(n)!==i;return a&&(r=s,n=i),{width:r,height:n,$:a}}function qa(e){return jr(e)?e:e.contextElement}function oo(e){const t=qa(e);if(!sn(t))return Kr(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=gu(t);let i=(s?Us(r.width):r.width)/n,a=(s?Us(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const pw=Kr(0);function yu(e){const t=wr(e);return!Ra()||!t.visualViewport?pw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mw(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==wr(e)?!1:t}function Dn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=qa(e);let i=Kr(1);t&&(n?jr(n)&&(i=oo(n)):i=oo(e));const a=mw(s,r,n)?yu(s):Kr(0);let d=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,l=o.width/i.x,f=o.height/i.y;if(s){const p=wr(s),m=n&&jr(n)?wr(n):n;let g=p,h=Ga(g);for(;h&&n&&m!==g;){const y=oo(h),v=h.getBoundingClientRect(),w=zr(h),x=v.left+(h.clientLeft+parseFloat(w.paddingLeft))*y.x,C=v.top+(h.clientTop+parseFloat(w.paddingTop))*y.y;d*=y.x,u*=y.y,l*=y.x,f*=y.y,d+=x,u+=C,g=wr(h),h=Ga(g)}}return Ws({width:l,height:f,x:d,y:u})}function Ks(e,t){const r=qs(e).scrollLeft;return t?t.left+r:Dn(Xr(e)).left+r}function bu(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Ks(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function hw(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",i=Xr(n),a=t?Gs(t.floating):!1;if(n===i||a&&s)return r;let d={scrollLeft:0,scrollTop:0},u=Kr(1);const l=Kr(0),f=sn(n);if((f||!f&&!s)&&((ro(n)!=="body"||Go(i))&&(d=qs(n)),f)){const m=Dn(n);u=oo(n),l.x=m.x+n.clientLeft,l.y=m.y+n.clientTop}const p=i&&!f&&!s?bu(i,d):Kr(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-d.scrollLeft*u.x+l.x+p.x,y:r.y*u.y-d.scrollTop*u.y+l.y+p.y}}function gw(e){return Array.from(e.getClientRects())}function yw(e){const t=Xr(e),r=qs(e),n=e.ownerDocument.body,o=vr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=vr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Ks(e);const a=-r.scrollTop;return zr(n).direction==="rtl"&&(i+=vr(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:i,y:a}}const vu=25;function bw(e,t){const r=wr(e),n=Xr(e),o=r.visualViewport;let s=n.clientWidth,i=n.clientHeight,a=0,d=0;if(o){s=o.width,i=o.height;const l=Ra();(!l||l&&t==="fixed")&&(a=o.offsetLeft,d=o.offsetTop)}const u=Ks(n);if(u<=0){const l=n.ownerDocument,f=l.body,p=getComputedStyle(f),m=l.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(n.clientWidth-f.clientWidth-m);g<=vu&&(s-=g)}else u<=vu&&(s+=u);return{width:s,height:i,x:a,y:d}}function vw(e,t){const r=Dn(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=sn(e)?oo(e):Kr(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,d=o*s.x,u=n*s.y;return{width:i,height:a,x:d,y:u}}function wu(e,t,r){let n;if(t==="viewport")n=bw(e,r);else if(t==="document")n=yw(Xr(e));else if(jr(t))n=vw(t,r);else{const o=yu(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ws(n)}function Su(e,t){const r=xn(e);return r===t||!jr(r)||no(r)?!1:zr(r).position==="fixed"||Su(r,t)}function ww(e,t){const r=t.get(e);if(r)return r;let n=qo(e,[],!1).filter(a=>jr(a)&&ro(a)!=="body"),o=null;const s=zr(e).position==="fixed";let i=s?xn(e):e;for(;jr(i)&&!no(i);){const a=zr(i),d=Wa(i);!d&&a.position==="fixed"&&(o=null),(s?!d&&!o:!d&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Go(i)&&!d&&Su(e,i))?n=n.filter(l=>l!==i):o=a,i=xn(i)}return t.set(e,n),n}function Sw(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?Gs(t)?[]:ww(t,this._c):[].concat(r),n],a=wu(t,i[0],o);let d=a.top,u=a.right,l=a.bottom,f=a.left;for(let p=1;p<i.length;p++){const m=wu(t,i[p],o);d=vr(m.top,d),u=Sn(m.right,u),l=Sn(m.bottom,l),f=vr(m.left,f)}return{width:u-f,height:l-d,x:f,y:d}}function xw(e){const{width:t,height:r}=gu(e);return{width:t,height:r}}function Aw(e,t,r){const n=sn(t),o=Xr(t),s=r==="fixed",i=Dn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const d=Kr(0);function u(){d.x=Ks(o)}if(n||!n&&!s)if((ro(t)!=="body"||Go(o))&&(a=qs(t)),n){const m=Dn(t,!0,s,t);d.x=m.x+t.clientLeft,d.y=m.y+t.clientTop}else o&&u();s&&!n&&o&&u();const l=o&&!n&&!s?bu(o,a):Kr(0),f=i.left+a.scrollLeft-d.x-l.x,p=i.top+a.scrollTop-d.y-l.y;return{x:f,y:p,width:i.width,height:i.height}}function Ka(e){return zr(e).position==="static"}function xu(e,t){if(!sn(e)||zr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Xr(e)===r&&(r=r.ownerDocument.body),r}function Au(e,t){const r=wr(e);if(Gs(e))return r;if(!sn(e)){let o=xn(e);for(;o&&!no(o);){if(jr(o)&&!Ka(o))return o;o=xn(o)}return r}let n=xu(e,t);for(;n&&cw(n)&&Ka(n);)n=xu(n,t);return n&&no(n)&&Ka(n)&&!Wa(n)?r:n||fw(e)||r}const Cw=async function(e){const t=this.getOffsetParent||Au,r=this.getDimensions,n=await r(e.floating);return{reference:Aw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Ew(e){return zr(e).direction==="rtl"}const Nw={convertOffsetParentRelativeRectToViewportRelativeRect:hw,getDocumentElement:Xr,getClippingRect:Sw,getOffsetParent:Au,getElementRects:Cw,getClientRects:gw,getDimensions:xw,getScale:oo,isElement:jr,isRTL:Ew};function Cu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Tw(e,t){let r=null,n;const o=Xr(e);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,d){a===void 0&&(a=!1),d===void 0&&(d=1),s();const u=e.getBoundingClientRect(),{left:l,top:f,width:p,height:m}=u;if(a||t(),!p||!m)return;const g=Vs(f),h=Vs(o.clientWidth-(l+p)),y=Vs(o.clientHeight-(f+m)),v=Vs(l),x={rootMargin:-g+"px "+-h+"px "+-y+"px "+-v+"px",threshold:vr(0,Sn(1,d))||1};let C=!0;function O(E){const _=E[0].intersectionRatio;if(_!==d){if(!C)return i();_?i(!1,_):n=setTimeout(()=>{i(!1,1e-7)},1e3)}_===1&&!Cu(u,e.getBoundingClientRect())&&i(),C=!1}try{r=new IntersectionObserver(O,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(O,x)}r.observe(e)}return i(!0),s}function _w(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=n,u=qa(e),l=o||s?[...u?qo(u):[],...t?qo(t):[]]:[];l.forEach(v=>{o&&v.addEventListener("scroll",r,{passive:!0}),s&&v.addEventListener("resize",r)});const f=u&&a?Tw(u,r):null;let p=-1,m=null;i&&(m=new ResizeObserver(v=>{let[w]=v;w&&w.target===u&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),r()}),u&&!d&&m.observe(u),t&&m.observe(t));let g,h=d?Dn(e):null;d&&y();function y(){const v=Dn(e);h&&!Cu(h,v)&&r(),h=v,g=requestAnimationFrame(y)}return r(),()=>{var v;l.forEach(w=>{o&&w.removeEventListener("scroll",r),s&&w.removeEventListener("resize",r)}),f?.(),(v=m)==null||v.disconnect(),m=null,d&&cancelAnimationFrame(g)}}const kw=sw,Fw=iw,Pw=rw,Ow=lw,Iw=nw,Eu=tw,Mw=aw,Lw=(e,t,r)=>{const n=new Map,o={platform:Nw,...r},s={...o.platform,_c:n};return ew(e,t,{...o,platform:s})};var Dw=typeof document<"u",Bw=function(){},Ys=Dw?S.useLayoutEffect:Bw;function Xs(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Xs(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!Xs(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Nu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Tu(e,t){const r=Nu(e);return Math.round(t*r)/r}function Ya(e){const t=b.useRef(e);return Ys(()=>{t.current=e}),t}function $w(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:d,open:u}=e,[l,f]=b.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=b.useState(n);Xs(p,n)||m(n);const[g,h]=b.useState(null),[y,v]=b.useState(null),w=b.useCallback(B=>{B!==E.current&&(E.current=B,h(B))},[]),x=b.useCallback(B=>{B!==_.current&&(_.current=B,v(B))},[]),C=s||g,O=i||y,E=b.useRef(null),_=b.useRef(null),T=b.useRef(l),A=d!=null,P=Ya(d),k=Ya(o),U=Ya(u),R=b.useCallback(()=>{if(!E.current||!_.current)return;const B={placement:t,strategy:r,middleware:p};k.current&&(B.platform=k.current),Lw(E.current,_.current,B).then(G=>{const D={...G,isPositioned:U.current!==!1};L.current&&!Xs(T.current,D)&&(T.current=D,Ss.flushSync(()=>{f(D)}))})},[p,t,r,k,U]);Ys(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(B=>({...B,isPositioned:!1})))},[u]);const L=b.useRef(!1);Ys(()=>(L.current=!0,()=>{L.current=!1}),[]),Ys(()=>{if(C&&(E.current=C),O&&(_.current=O),C&&O){if(P.current)return P.current(C,O,R);R()}},[C,O,R,P,A]);const q=b.useMemo(()=>({reference:E,floating:_,setReference:w,setFloating:x}),[w,x]),M=b.useMemo(()=>({reference:C,floating:O}),[C,O]),j=b.useMemo(()=>{const B={position:r,left:0,top:0};if(!M.floating)return B;const G=Tu(M.floating,l.x),D=Tu(M.floating,l.y);return a?{...B,transform:"translate("+G+"px, "+D+"px)",...Nu(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:G,top:D}},[r,a,M.floating,l.x,l.y]);return b.useMemo(()=>({...l,update:R,refs:q,elements:M,floatingStyles:j}),[l,R,q,M,j])}const jw=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Eu({element:n.current,padding:o}).fn(r):{}:n?Eu({element:n,padding:o}).fn(r):{}}}},zw=(e,t)=>{const r=kw(e);return{name:r.name,fn:r.fn,options:[e,t]}},Uw=(e,t)=>{const r=Fw(e);return{name:r.name,fn:r.fn,options:[e,t]}},Vw=(e,t)=>({fn:Mw(e).fn,options:[e,t]}),Hw=(e,t)=>{const r=Pw(e);return{name:r.name,fn:r.fn,options:[e,t]}},Ww=(e,t)=>{const r=Ow(e);return{name:r.name,fn:r.fn,options:[e,t]}},Rw=(e,t)=>{const r=Iw(e);return{name:r.name,fn:r.fn,options:[e,t]}},Gw=(e,t)=>{const r=jw(e);return{name:r.name,fn:r.fn,options:[e,t]}};var qw="Arrow",_u=b.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...s}=e;return c.jsx(Be.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});_u.displayName=qw;var Kw=_u;function Ko(e){const[t,r]=b.useState(void 0);return Xt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const d=s.borderBoxSize,u=Array.isArray(d)?d[0]:d;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Xa="Popper",[ku,Js]=br(Xa),[Yw,Fu]=ku(Xa),Pu=e=>{const{__scopePopper:t,children:r}=e,[n,o]=b.useState(null);return c.jsx(Yw,{scope:t,anchor:n,onAnchorChange:o,children:r})};Pu.displayName=Xa;var Ou="PopperAnchor",Iu=b.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,s=Fu(Ou,r),i=b.useRef(null),a=Qe(t,i),d=b.useRef(null);return b.useEffect(()=>{const u=d.current;d.current=n?.current||i.current,u!==d.current&&s.onAnchorChange(d.current)}),n?null:c.jsx(Be.div,{...o,ref:a})});Iu.displayName=Ou;var Ja="PopperContent",[Xw,Jw]=ku(Ja),Mu=b.forwardRef((e,t)=>{const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:l=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:g,...h}=e,y=Fu(Ja,r),[v,w]=b.useState(null),x=Qe(t,se=>w(se)),[C,O]=b.useState(null),E=Ko(C),_=E?.width??0,T=E?.height??0,A=n+(s!=="center"?"-"+s:""),P=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},k=Array.isArray(u)?u:[u],U=k.length>0,R={padding:P,boundary:k.filter(Zw),altBoundary:U},{refs:L,floatingStyles:q,placement:M,isPositioned:j,middlewareData:B}=$w({strategy:"fixed",placement:A,whileElementsMounted:(...se)=>_w(...se,{animationFrame:m==="always"}),elements:{reference:y.anchor},middleware:[zw({mainAxis:o+T,alignmentAxis:i}),d&&Uw({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Vw():void 0,...R}),d&&Hw({...R}),Ww({...R,apply:({elements:se,rects:ae,availableWidth:Fe,availableHeight:te})=>{const{width:ee,height:ge}=ae.reference,ce=se.floating.style;ce.setProperty("--radix-popper-available-width",`${Fe}px`),ce.setProperty("--radix-popper-available-height",`${te}px`),ce.setProperty("--radix-popper-anchor-width",`${ee}px`),ce.setProperty("--radix-popper-anchor-height",`${ge}px`)}}),C&&Gw({element:C,padding:a}),eS({arrowWidth:_,arrowHeight:T}),p&&Rw({strategy:"referenceHidden",...R})]}),[G,D]=Bu(M),he=sr(g);Xt(()=>{j&&he?.()},[j,he]);const I=B.arrow?.x,V=B.arrow?.y,Q=B.arrow?.centerOffset!==0,[le,re]=b.useState();return Xt(()=>{v&&re(window.getComputedStyle(v).zIndex)},[v]),c.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:j?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:le,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(Xw,{scope:r,placedSide:G,onArrowChange:O,arrowX:I,arrowY:V,shouldHideArrow:Q,children:c.jsx(Be.div,{"data-side":G,"data-align":D,...h,ref:x,style:{...h.style,animation:j?void 0:"none"}})})})});Mu.displayName=Ja;var Lu="PopperArrow",Qw={top:"bottom",right:"left",bottom:"top",left:"right"},Du=b.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,s=Jw(Lu,n),i=Qw[s.placedSide];return c.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:c.jsx(Kw,{...o,ref:r,style:{...o.style,display:"block"}})})});Du.displayName=Lu;function Zw(e){return e!==null}var eS=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,d=i?0:e.arrowHeight,[u,l]=Bu(r),f={start:"0%",center:"50%",end:"100%"}[l],p=(o.arrow?.x??0)+a/2,m=(o.arrow?.y??0)+d/2;let g="",h="";return u==="bottom"?(g=i?f:`${p}px`,h=`${-d}px`):u==="top"?(g=i?f:`${p}px`,h=`${n.floating.height+d}px`):u==="right"?(g=`${-d}px`,h=i?f:`${m}px`):u==="left"&&(g=`${n.floating.width+d}px`,h=i?f:`${m}px`),{data:{x:g,y:h}}}});function Bu(e){const[t,r="center"]=e.split("-");return[t,r]}var $u=Pu,Qa=Iu,ju=Mu,zu=Du,tS="Portal",Qs=b.forwardRef((e,t)=>{const{container:r,...n}=e,[o,s]=b.useState(!1);Xt(()=>s(!0),[]);const i=r||o&&globalThis?.document?.body;return i?Lc.createPortal(c.jsx(Be.div,{...n,ref:t}),i):null});Qs.displayName=tS;function rS(e){const t=nS(e),r=b.forwardRef((n,o)=>{const{children:s,...i}=n,a=b.Children.toArray(s),d=a.find(sS);if(d){const u=d.props.children,l=a.map(f=>f===d?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return c.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function nS(e){const t=b.forwardRef((r,n)=>{const{children:o,...s}=r;if(b.isValidElement(o)){const i=aS(o),a=iS(s,o.props);return o.type!==b.Fragment&&(a.ref=n?Mn(n,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var oS=Symbol("radix.slottable");function sS(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oS}function iS(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const d=s(...a);return o(...a),d}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function aS(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var lS=b[" useInsertionEffect ".trim().toString()]||Xt;function Jr({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,s,i]=cS({defaultProp:t,onChange:r}),a=e!==void 0,d=a?e:o;{const l=b.useRef(e!==void 0);b.useEffect(()=>{const f=l.current;f!==a&&console.warn(`${n} is changing from ${f?"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.`),l.current=a},[a,n])}const u=b.useCallback(l=>{if(a){const f=dS(l)?l(e):l;f!==e&&i.current?.(f)}else s(l)},[a,e,s,i]);return[d,u]}function cS({defaultProp:e,onChange:t}){const[r,n]=b.useState(e),o=b.useRef(r),s=b.useRef(t);return lS(()=>{s.current=t},[t]),b.useEffect(()=>{o.current!==r&&(s.current?.(r),o.current=r)},[r,o]),[r,n,s]}function dS(e){return typeof e=="function"}function Yo(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Uu=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"}),uS="VisuallyHidden",fS=b.forwardRef((e,t)=>c.jsx(Be.span,{...e,ref:t,style:{...Uu,...e.style}}));fS.displayName=uS;var pS=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},so=new WeakMap,Zs=new WeakMap,ei={},Za=0,Vu=function(e){return e&&(e.host||Vu(e.parentNode))},mS=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Vu(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},hS=function(e,t,r,n){var o=mS(t,Array.isArray(e)?e:[e]);ei[r]||(ei[r]=new WeakMap);var s=ei[r],i=[],a=new Set,d=new Set(o),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};o.forEach(u);var l=function(f){!f||d.has(f)||Array.prototype.forEach.call(f.children,function(p){if(a.has(p))l(p);else try{var m=p.getAttribute(n),g=m!==null&&m!=="false",h=(so.get(p)||0)+1,y=(s.get(p)||0)+1;so.set(p,h),s.set(p,y),i.push(p),h===1&&g&&Zs.set(p,!0),y===1&&p.setAttribute(r,"true"),g||p.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return l(t),a.clear(),Za++,function(){i.forEach(function(f){var p=so.get(f)-1,m=s.get(f)-1;so.set(f,p),s.set(f,m),p||(Zs.has(f)||f.removeAttribute(n),Zs.delete(f)),m||f.removeAttribute(r)}),Za--,Za||(so=new WeakMap,so=new WeakMap,Zs=new WeakMap,ei={})}},el=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=pS(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),hS(n,o,r,"aria-hidden")):function(){return null}},Qr=function(){return Qr=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},Qr.apply(this,arguments)};function Hu(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function gS(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var ti="right-scroll-bar-position",ri="width-before-scroll-bar",yS="with-scroll-bars-hidden",bS="--removed-body-scroll-bar-size";function tl(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function vS(e,t){var r=S.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var wS=typeof window<"u"?b.useLayoutEffect:b.useEffect,Wu=new WeakMap;function SS(e,t){var r=vS(null,function(n){return e.forEach(function(o){return tl(o,n)})});return wS(function(){var n=Wu.get(r);if(n){var o=new Set(n),s=new Set(e),i=r.current;o.forEach(function(a){s.has(a)||tl(a,null)}),s.forEach(function(a){o.has(a)||tl(a,i)})}Wu.set(r,e)},[e]),r}function xS(e){return e}function AS(e,t){t===void 0&&(t=xS);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var i=t(s,n);return r.push(i),function(){r=r.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(n=!0;r.length;){var i=r;r=[],i.forEach(s)}r={push:function(a){return s(a)},filter:function(){return r}}},assignMedium:function(s){n=!0;var i=[];if(r.length){var a=r;r=[],a.forEach(s),i=r}var d=function(){var l=i;i=[],l.forEach(s)},u=function(){return Promise.resolve().then(d)};u(),r={push:function(l){i.push(l),u()},filter:function(l){return i=i.filter(l),r}}}};return o}function CS(e){e===void 0&&(e={});var t=AS(null);return t.options=Qr({async:!0,ssr:!1},e),t}var Ru=function(e){var t=e.sideCar,r=Hu(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return b.createElement(n,Qr({},r))};Ru.isSideCarExport=!0;function ES(e,t){return e.useMedium(t),Ru}var Gu=CS(),rl=function(){},ni=b.forwardRef(function(e,t){var r=b.useRef(null),n=b.useState({onScrollCapture:rl,onWheelCapture:rl,onTouchMoveCapture:rl}),o=n[0],s=n[1],i=e.forwardProps,a=e.children,d=e.className,u=e.removeScrollBar,l=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,g=e.noIsolation,h=e.inert,y=e.allowPinchZoom,v=e.as,w=v===void 0?"div":v,x=e.gapMode,C=Hu(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=p,E=SS([r,t]),_=Qr(Qr({},C),o);return b.createElement(b.Fragment,null,l&&b.createElement(O,{sideCar:Gu,removeScrollBar:u,shards:f,noRelative:m,noIsolation:g,inert:h,setCallbacks:s,allowPinchZoom:!!y,lockRef:r,gapMode:x}),i?b.cloneElement(b.Children.only(a),Qr(Qr({},_),{ref:E})):b.createElement(w,Qr({},_,{className:d,ref:E}),a))});ni.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ni.classNames={fullWidth:ri,zeroRight:ti};var NS=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function TS(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=NS();return t&&e.setAttribute("nonce",t),e}function _S(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function kS(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var FS=function(){var e=0,t=null;return{add:function(r){e==0&&(t=TS())&&(_S(t,r),kS(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},PS=function(){var e=FS();return function(t,r){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},qu=function(){var e=PS(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},OS={left:0,top:0,right:0,gap:0},nl=function(e){return parseInt(e||"",10)||0},IS=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[nl(r),nl(n),nl(o)]},MS=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return OS;var t=IS(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},LS=qu(),io="data-scroll-locked",DS=function(e,t,r,n){var o=e.left,s=e.top,i=e.right,a=e.gap;return r===void 0&&(r="margin"),`
1
+ (function(me,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react/jsx-runtime"),require("react-router-dom"),require("react-dom"),require("sonner"),require("@tanstack/react-query")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-router-dom","react-dom","sonner","@tanstack/react-query"],S):(me=typeof globalThis<"u"?globalThis:me||self,S(me.FormBuilderRenderer={},me.React,me.jsxRuntime,me.ReactRouterDOM,me.ReactDOM,me.Sonner,me.ReactQuery))})(this,(function(me,S,c,ca,Lc,$t,mn){"use strict";function Dc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const b=Dc(S),Ss=Dc(Lc),da="iq-fbr",Fn="95px";function xs(e){return!e||typeof e.columns!="number"?null:{rows:e.rows??8,columns:e.columns,verticalSpacing:e.verticalSpacing||e.spacing||"16px",horizontalSpacing:e.horizontalSpacing||e.spacing||"16px",rowHeight:Fn}}function As(e,t){if(t!=null&&t!==void 0)return t;const r=e.config;if(r?.grid&&typeof r.grid.rows=="number"&&typeof r.grid.columns=="number")return{rows:r.grid.rows,columns:r.grid.columns,verticalSpacing:r.grid.verticalSpacing??r.grid.spacing,horizontalSpacing:r.grid.horizontalSpacing??r.grid.spacing,rowHeight:r.grid.rowHeight,spacing:r.grid.spacing};const n=r?.layout!=null&&typeof r.layout=="object"?r.layout:null;if(n&&typeof n.rows=="number"&&typeof n.columns=="number")return{rows:n.rows,columns:n.columns,verticalSpacing:n.verticalSpacing??n.spacing,horizontalSpacing:n.horizontalSpacing??n.spacing,rowHeight:n.rowHeight,spacing:n.spacing};const o=e.layout;if(o!=null&&typeof o=="object"&&typeof o.rows=="number"&&typeof o.columns=="number"){const s=o;return{rows:s.rows,columns:s.columns,verticalSpacing:s.verticalSpacing??s.spacing,horizontalSpacing:s.horizontalSpacing??s.spacing,rowHeight:s.rowHeight,spacing:s.spacing}}return null}function Bc(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Bc(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function $c(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Bc(e))&&(n&&(n+=" "),n+=t);return n}const cy=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},dy=(e,t)=>({classGroupId:e,validator:t}),jc=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Cs="-",zc=[],uy="arbitrary..",fy=e=>{const t=my(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return py(i);const a=i.split(Cs),d=a[0]===""&&a.length>1?1:0;return Uc(a,d,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const d=n[i],u=r[i];return d?u?cy(u,d):d:u||zc}return r[i]||zc}}},Uc=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],s=r.nextPart.get(o);if(s){const u=Uc(e,t+1,s);if(u)return u}const i=r.validators;if(i===null)return;const a=t===0?e.join(Cs):e.slice(t).join(Cs),d=i.length;for(let u=0;u<d;u++){const l=i[u];if(l.validator(a))return l.classGroupId}},py=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?uy+n:void 0})(),my=e=>{const{theme:t,classGroups:r}=e;return hy(r,t)},hy=(e,t)=>{const r=jc();for(const n in e){const o=e[n];ua(o,r,n,t)}return r},ua=(e,t,r,n)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];gy(i,t,r,n)}},gy=(e,t,r,n)=>{if(typeof e=="string"){yy(e,t,r);return}if(typeof e=="function"){by(e,t,r,n);return}vy(e,t,r,n)},yy=(e,t,r)=>{const n=e===""?t:Vc(t,e);n.classGroupId=r},by=(e,t,r,n)=>{if(wy(e)){ua(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(dy(r,e))},vy=(e,t,r,n)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[a,d]=o[i];ua(d,Vc(t,a),r,n)}},Vc=(e,t)=>{let r=e;const n=t.split(Cs),o=n.length;for(let s=0;s<o;s++){const i=n[s];let a=r.nextPart.get(i);a||(a=jc(),r.nextPart.set(i,a)),r=a}return r},wy=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Sy=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(s,i)=>{r[s]=i,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(s){let i=r[s];if(i!==void 0)return i;if((i=n[s])!==void 0)return o(s,i),i},set(s,i){s in r?r[s]=i:o(s,i)}}},fa="!",Hc=":",xy=[],Wc=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),Ay=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let i=0,a=0,d=0,u;const l=o.length;for(let h=0;h<l;h++){const y=o[h];if(i===0&&a===0){if(y===Hc){s.push(o.slice(d,h)),d=h+1;continue}if(y==="/"){u=h;continue}}y==="["?i++:y==="]"?i--:y==="("?a++:y===")"&&a--}const f=s.length===0?o:o.slice(d);let p=f,m=!1;f.endsWith(fa)?(p=f.slice(0,-1),m=!0):f.startsWith(fa)&&(p=f.slice(1),m=!0);const g=u&&u>d?u-d:void 0;return Wc(s,m,p,g)};if(t){const o=t+Hc,s=n;n=i=>i.startsWith(o)?s(i.slice(o.length)):Wc(xy,!1,i,void 0,!0)}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},Cy=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let s=0;s<r.length;s++){const i=r[s],a=i[0]==="[",d=t.has(i);a||d?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(i)):o.push(i)}return o.length>0&&(o.sort(),n.push(...o)),n}},Ey=e=>({cache:Sy(e.cacheSize),parseClassName:Ay(e),sortModifiers:Cy(e),...fy(e)}),Ny=/\s+/,Ty=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(Ny);let d="";for(let u=a.length-1;u>=0;u-=1){const l=a[u],{isExternal:f,modifiers:p,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:h}=r(l);if(f){d=l+(d.length>0?" "+d:d);continue}let y=!!h,v=n(y?g.substring(0,h):g);if(!v){if(!y){d=l+(d.length>0?" "+d:d);continue}if(v=n(g),!v){d=l+(d.length>0?" "+d:d);continue}y=!1}const w=p.length===0?"":p.length===1?p[0]:s(p).join(":"),x=m?w+fa:w,C=x+v;if(i.indexOf(C)>-1)continue;i.push(C);const O=o(v,y);for(let E=0;E<O.length;++E){const _=O[E];i.push(x+_)}d=l+(d.length>0?" "+d:d)}return d},_y=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=Rc(r))&&(o&&(o+=" "),o+=n);return o},Rc=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Rc(e[n]))&&(r&&(r+=" "),r+=t);return r},ky=(e,...t)=>{let r,n,o,s;const i=d=>{const u=t.reduce((l,f)=>f(l),e());return r=Ey(u),n=r.cache.get,o=r.cache.set,s=a,a(d)},a=d=>{const u=n(d);if(u)return u;const l=Ty(d,r);return o(d,l),l};return s=i,(...d)=>s(_y(...d))},Fy=[],Ht=e=>{const t=r=>r[e]||Fy;return t.isThemeGetter=!0,t},Gc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Py=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Oy=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Iy=/\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$/,My=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ly=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Dy=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,hn=e=>Py.test(e),ot=e=>!!e&&!Number.isNaN(Number(e)),gn=e=>!!e&&Number.isInteger(Number(e)),pa=e=>e.endsWith("%")&&ot(e.slice(0,-1)),tn=e=>Oy.test(e),Kc=()=>!0,By=e=>Iy.test(e)&&!My.test(e),ma=()=>!1,$y=e=>Ly.test(e),jy=e=>Dy.test(e),zy=e=>!Ne(e)&&!_e(e),Uy=e=>yn(e,ed,ma),Ne=e=>Gc.test(e),Pn=e=>yn(e,td,By),Yc=e=>yn(e,Yy,ot),Vy=e=>yn(e,nd,Kc),Hy=e=>yn(e,rd,ma),Xc=e=>yn(e,Qc,ma),Wy=e=>yn(e,Zc,jy),Es=e=>yn(e,od,$y),_e=e=>qc.test(e),Oo=e=>On(e,td),Ry=e=>On(e,rd),Jc=e=>On(e,Qc),Gy=e=>On(e,ed),qy=e=>On(e,Zc),Ns=e=>On(e,od,!0),Ky=e=>On(e,nd,!0),yn=(e,t,r)=>{const n=Gc.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},On=(e,t,r=!1)=>{const n=qc.exec(e);return n?n[1]?t(n[1]):r:!1},Qc=e=>e==="position"||e==="percentage",Zc=e=>e==="image"||e==="url",ed=e=>e==="length"||e==="size"||e==="bg-size",td=e=>e==="length",Yy=e=>e==="number",rd=e=>e==="family-name",nd=e=>e==="number"||e==="weight",od=e=>e==="shadow",Xy=ky(()=>{const e=Ht("color"),t=Ht("font"),r=Ht("text"),n=Ht("font-weight"),o=Ht("tracking"),s=Ht("leading"),i=Ht("breakpoint"),a=Ht("container"),d=Ht("spacing"),u=Ht("radius"),l=Ht("shadow"),f=Ht("inset-shadow"),p=Ht("text-shadow"),m=Ht("drop-shadow"),g=Ht("blur"),h=Ht("perspective"),y=Ht("aspect"),v=Ht("ease"),w=Ht("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...C(),_e,Ne],E=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],T=()=>[_e,Ne,d],A=()=>[hn,"full","auto",...T()],P=()=>[gn,"none","subgrid",_e,Ne],k=()=>["auto",{span:["full",gn,_e,Ne]},gn,_e,Ne],U=()=>[gn,"auto",_e,Ne],R=()=>["auto","min","max","fr",_e,Ne],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],q=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...T()],j=()=>[hn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],B=()=>[hn,"screen","full","dvw","lvw","svw","min","max","fit",...T()],G=()=>[hn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],D=()=>[e,_e,Ne],he=()=>[...C(),Jc,Xc,{position:[_e,Ne]}],I=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",Gy,Uy,{size:[_e,Ne]}],Q=()=>[pa,Oo,Pn],le=()=>["","none","full",u,_e,Ne],re=()=>["",ot,Oo,Pn],se=()=>["solid","dashed","dotted","double"],ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Fe=()=>[ot,pa,Jc,Xc],te=()=>["","none",g,_e,Ne],ee=()=>["none",ot,_e,Ne],ge=()=>["none",ot,_e,Ne],ce=()=>[ot,_e,Ne],rt=()=>[hn,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[tn],breakpoint:[tn],color:[Kc],container:[tn],"drop-shadow":[tn],ease:["in","out","in-out"],font:[zy],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[tn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[tn],shadow:[tn],spacing:["px",ot],text:[tn],"text-shadow":[tn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",hn,Ne,_e,y]}],container:["container"],columns:[{columns:[ot,Ne,_e,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{"inset-s":A(),start:A()}],end:[{"inset-e":A(),end:A()}],"inset-bs":[{"inset-bs":A()}],"inset-be":[{"inset-be":A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[gn,"auto",_e,Ne]}],basis:[{basis:[hn,"full","auto",a,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ot,hn,"auto","initial","none",Ne]}],grow:[{grow:["",ot,_e,Ne]}],shrink:[{shrink:["",ot,_e,Ne]}],order:[{order:[gn,"first","last","none",_e,Ne]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:k()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:k()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...q(),"normal"]}],"justify-self":[{"justify-self":["auto",...q()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...q(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...q(),"baseline"]}],"place-self":[{"place-self":["auto",...q()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pbs:[{pbs:T()}],pbe:[{pbe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],"inline-size":[{inline:["auto",...B()]}],"min-inline-size":[{"min-inline":["auto",...B()]}],"max-inline-size":[{"max-inline":["none",...B()]}],"block-size":[{block:["auto",...G()]}],"min-block-size":[{"min-block":["auto",...G()]}],"max-block-size":[{"max-block":["none",...G()]}],w:[{w:[a,"screen",...j()]}],"min-w":[{"min-w":[a,"screen","none",...j()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...j()]}],h:[{h:["screen","lh",...j()]}],"min-h":[{"min-h":["screen","lh","none",...j()]}],"max-h":[{"max-h":["screen","lh",...j()]}],"font-size":[{text:["base",r,Oo,Pn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Ky,Vy]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pa,Ne]}],"font-family":[{font:[Ry,Hy,t]}],"font-features":[{"font-features":[Ne]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,_e,Ne]}],"line-clamp":[{"line-clamp":[ot,"none",_e,Yc]}],leading:[{leading:[s,...T()]}],"list-image":[{"list-image":["none",_e,Ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",_e,Ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[ot,"from-font","auto",_e,Pn]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[ot,"auto",_e,Ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",_e,Ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",_e,Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:he()}],"bg-repeat":[{bg:I()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},gn,_e,Ne],radial:["",_e,Ne],conic:[gn,_e,Ne]},qy,Wy]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-bs":[{"border-bs":re()}],"border-w-be":[{"border-be":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-bs":[{"border-bs":D()}],"border-color-be":[{"border-be":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ot,_e,Ne]}],"outline-w":[{outline:["",ot,Oo,Pn]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",l,Ns,Es]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",f,Ns,Es]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[ot,Pn]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",p,Ns,Es]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[ot,_e,Ne]}],"mix-blend":[{"mix-blend":[...ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ae()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ot]}],"mask-image-linear-from-pos":[{"mask-linear-from":Fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":Fe()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":Fe()}],"mask-image-t-to-pos":[{"mask-t-to":Fe()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":Fe()}],"mask-image-r-to-pos":[{"mask-r-to":Fe()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":Fe()}],"mask-image-b-to-pos":[{"mask-b-to":Fe()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":Fe()}],"mask-image-l-to-pos":[{"mask-l-to":Fe()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":Fe()}],"mask-image-x-to-pos":[{"mask-x-to":Fe()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":Fe()}],"mask-image-y-to-pos":[{"mask-y-to":Fe()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[_e,Ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":Fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":Fe()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[ot]}],"mask-image-conic-from-pos":[{"mask-conic-from":Fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":Fe()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:he()}],"mask-repeat":[{mask:I()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",_e,Ne]}],filter:[{filter:["","none",_e,Ne]}],blur:[{blur:te()}],brightness:[{brightness:[ot,_e,Ne]}],contrast:[{contrast:[ot,_e,Ne]}],"drop-shadow":[{"drop-shadow":["","none",m,Ns,Es]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",ot,_e,Ne]}],"hue-rotate":[{"hue-rotate":[ot,_e,Ne]}],invert:[{invert:["",ot,_e,Ne]}],saturate:[{saturate:[ot,_e,Ne]}],sepia:[{sepia:["",ot,_e,Ne]}],"backdrop-filter":[{"backdrop-filter":["","none",_e,Ne]}],"backdrop-blur":[{"backdrop-blur":te()}],"backdrop-brightness":[{"backdrop-brightness":[ot,_e,Ne]}],"backdrop-contrast":[{"backdrop-contrast":[ot,_e,Ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ot,_e,Ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ot,_e,Ne]}],"backdrop-invert":[{"backdrop-invert":["",ot,_e,Ne]}],"backdrop-opacity":[{"backdrop-opacity":[ot,_e,Ne]}],"backdrop-saturate":[{"backdrop-saturate":[ot,_e,Ne]}],"backdrop-sepia":[{"backdrop-sepia":["",ot,_e,Ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",_e,Ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ot,"initial",_e,Ne]}],ease:[{ease:["linear","initial",v,_e,Ne]}],delay:[{delay:[ot,_e,Ne]}],animate:[{animate:["none",w,_e,Ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,_e,Ne]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[_e,Ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:rt()}],"translate-x":[{"translate-x":rt()}],"translate-y":[{"translate-y":rt()}],"translate-z":[{"translate-z":rt()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",_e,Ne]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mbs":[{"scroll-mbs":T()}],"scroll-mbe":[{"scroll-mbe":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pbs":[{"scroll-pbs":T()}],"scroll-pbe":[{"scroll-pbe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",_e,Ne]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[ot,Oo,Pn,Yc]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function $(...e){return Xy($c(e))}const Jy=["richtext","multiselect","radio","checkboxgroup","signature"],Qy=3;function Io(e){const t=e.position.rowSpan??1;if(e.type==="file"||e.type==="camera"||e.type==="photoChoice"||e.type==="textarea")return Math.max(t,1);if(e.type==="status")return Math.max(t,4);if(e.type==="selectablelist")return Math.max(Qy,t);if(e.type==="radio"||e.type==="checkboxgroup"){const r=e.properties?.options;return(Array.isArray(r)?r.length:0)<=2?1:Math.max(t,2)}return Jy.includes(e.type)?Math.max(t,2):t}function sd(e,t){if(e.type==="table"&&t!=null)return t;if(e.type!=="radio"&&e.type!=="checkboxgroup"){const s=e.position.columnSpan??1;return t!=null?Math.min(s,t):s}const r=e.properties?.options,n=Array.isArray(r)?r.length:0,o=Math.max(1,Math.ceil(n/2));return t!=null?Math.min(o,t):o}function Mo(e){const t=e?.size??"md",r=e?.variant??"default";return $(t==="sm"?"h-8 text-sm":t==="lg"?"min-h-12 text-lg py-2":"h-10 md:text-sm",r==="filled"?"border-transparent bg-muted shadow-none":r==="outlined"?"border-2 bg-transparent":"")}function id(e){const t=e?.size??"md",r=e?.variant??"default";return $(t==="sm"?"min-h-[48px] text-sm":t==="lg"?"min-h-[72px] text-lg":"min-h-[56px]",r==="filled"?"border-transparent bg-muted shadow-none":r==="outlined"?"border-2 bg-transparent":"")}function Zy(e){switch(e){case"left":return"flex flex-row items-start gap-4";case"right":return"flex flex-row-reverse items-start gap-4";case"center":return"flex flex-col items-center text-center w-full";case"floating":return"relative flex flex-col gap-2 w-full min-w-0";default:return"flex flex-col gap-2 w-full min-w-0"}}function eb(e,t){const r=t?"text-destructive":"";switch(e){case"left":return`shrink-0 w-32 pt-2 text-right text-sm font-medium ${r}`;case"right":return`shrink-0 w-32 pt-2 text-left text-sm font-medium ${r}`;case"center":return`w-full text-center text-sm font-medium ${r}`;case"floating":return`absolute left-3 top-2 z-[1] origin-[0] -translate-y-4 scale-75 bg-background px-1 text-sm ${r}`;default:return`text-sm font-medium ${r}`}}function tb(e){switch(e){case"left":case"right":return"flex-1 min-w-0 min-h-0 flex flex-col";case"center":return"w-full max-w-full flex flex-col flex-1 min-h-0";case"floating":return"flex flex-col flex-1 min-h-0 w-full pt-4";default:return"flex flex-col flex-1 min-h-0 w-full min-w-0"}}function Ts(e){return!e||e.widthMode==="full"?100:typeof e.widthPercent=="number"&&!Number.isNaN(e.widthPercent)?Math.min(100,Math.max(1,Math.round(e.widthPercent))):(e.widthMode==="percent",100)}function ha(e){const t=Ts(e);return{width:t>=100?"100%":`${t}%`,maxWidth:"100%"}}function rb(e){return ha(e)}function ga(e){if(typeof e!="string")return null;const t=e.trim().toLowerCase();return t==="start"||t==="center"||t==="end"||t==="stretch"?t:null}function ya(e){if(typeof e!="string")return null;const t=e.trim().toLowerCase();return t==="start"||t==="center"||t==="end"?t:null}function kr(e){if(!e)return"start";const t=ga(e.horizontalAlign);if(t)return t;const r=ga(e.contentAlign);if(r)return r;const n=ga(e.cellAlign);return n||"start"}function Lo(e){if(e?.verticalAlign!=null)return e.verticalAlign;const t=e?.cellJustify;return t==="center"?"center":t==="end"?"end":t==="stretch"?"stretch":t==="start"?"start":"stretch"}function _s(e){switch(e){case"center":return"items-center";case"end":return"items-end";case"stretch":return"items-stretch";default:return"items-start"}}function ba(e){switch(e){case"center":return"justify-center";case"end":return"justify-end";case"stretch":return"justify-stretch";default:return"justify-start"}}function Do(e){const t=ya(e.appearance?.contentVerticalAlign);if(t!==null)switch(t){case"center":return"justify-center";case"end":return"justify-end";default:return"justify-start"}return ba(va(e))}const nb=Do;function ks(e){if(Io(e)>1)return!0;const t=ya(e.appearance?.contentVerticalAlign);if(t==="center"||t==="end")return!1;if(t==="start")return!0;const r=va(e);return r!=="center"&&r!=="end"}function ad(e){const t=e[0];if(!t)return wa(void 0);if(e.length===1)return wa(t);const r=kr(t.appearance);return $("flex flex-col min-h-0 h-full w-full",_s(r),"justify-start")}function ld(e){const t=kr(e),r=Lo(e);return $("flex flex-col min-h-0 h-full w-full",_s(t),ba(r))}function cd(e){if(Ts(e)>=100)return"";const r=kr(e);return r==="center"?"mx-auto":r==="end"?"ml-auto":""}function dd(e){if(Ts(e)>=100)return"w-full";const r=kr(e);return r==="center"||r==="end"?"min-w-0":r==="stretch"?"min-w-0 self-stretch":"min-w-0 self-start"}function ud(e){return e?e.widthMode==="full"||e.widthMode==="percent"||typeof e.widthPercent=="number"&&!Number.isNaN(e.widthPercent):!1}function Qn(e){return(e.type==="button"||e.type==="editButton")&&!ud(e.appearance)}function fd(e){return Qn(e)?kr(e.appearance)==="stretch"?{width:"100%",maxWidth:"100%",minWidth:0}:{width:"auto",maxWidth:"100%"}:ha(e.appearance)}function pd(e){return fd(e)}function md(e){if(Qn(e))switch(kr(e.appearance)){case"center":return"self-center";case"end":return"self-end";case"stretch":return"self-stretch";default:return"self-start"}return dd(e.appearance)}function hd(e){return e?e.verticalAlign!=null||e.cellJustify!=null:!1}function va(e){return e.type!=="button"&&e.type!=="editButton"||hd(e.appearance)?Lo(e.appearance):"start"}function wa(e){if(!e)return ld(void 0);const t=kr(e.appearance);return $("flex flex-col min-h-0 h-full w-full",_s(t),Do(e))}function ob(e,t){const r={};e!==void 0&&(r.cellAlign=e),t!==void 0&&(r.cellJustify=t);const o=e===void 0&&t===void 0?void 0:r;return $(_s(kr(o)),ba(Lo(o)))}const Sa=S.createContext({gridStretch:!1});function Bo(){return S.useContext(Sa)}const gd=e=>{let t;const r=new Set,n=(u,l)=>{const f=typeof u=="function"?u(t):u;if(!Object.is(f,t)){const p=t;t=l??(typeof f!="object"||f===null)?f:Object.assign({},t,f),r.forEach(m=>m(t,p))}},o=()=>t,a={setState:n,getState:o,getInitialState:()=>d,subscribe:u=>(r.add(u),()=>r.delete(u))},d=t=e(n,o,a);return a},sb=(e=>e?gd(e):gd),ib=e=>e;function ab(e,t=ib){const r=S.useSyncExternalStore(e.subscribe,S.useCallback(()=>t(e.getState()),[e,t]),S.useCallback(()=>t(e.getInitialState()),[e,t]));return S.useDebugValue(r),r}const yd=e=>{const t=sb(e),r=n=>ab(t,n);return Object.assign(r,t),r},bd=(e=>e?yd(e):yd),lb=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,cb=/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/,db=/^\+?[\d\s-()]{10,}$/,ub={required:e=>e==null?!1:typeof e=="string"?e.trim().length>0:Array.isArray(e)?e.length>0:typeof e=="boolean"?e===!0:!0,minLength:(e,t)=>{if(typeof e!="string")return!0;const r=t.value;return e.length>=r},maxLength:(e,t)=>{if(typeof e!="string")return!0;const r=t.value;return e.length<=r},min:(e,t)=>{if(typeof e!="number")return!0;const r=t.value;return e>=r},max:(e,t)=>{if(typeof e!="number")return!0;const r=t.value;return e<=r},pattern:(e,t)=>{if(typeof e!="string")return!0;const r=t.value,n=t.params?.flags||"";return new RegExp(r,n).test(e)},email:e=>typeof e!="string"||!e?!0:lb.test(e),url:e=>typeof e!="string"||!e?!0:cb.test(e),phone:e=>typeof e!="string"||!e?!0:db.test(e),date:e=>{if(!e)return!0;const t=new Date(e);return!isNaN(t.getTime())},dateRange:(e,t)=>{if(!e)return!0;const r=new Date(e);if(isNaN(r.getTime()))return!1;const n=t.value,o=new Date;if(o.setHours(0,0,0,0),n.min){const s=n.min==="today"?o:new Date(n.min);if(r<s)return!1}if(n.max){const s=n.max==="today"?o:new Date(n.max);if(r>s)return!1}return!0},fileSize:(e,t)=>{if(!e)return!0;const r=t.value;return e instanceof File?e.size<=r:Array.isArray(e)?e.every(n=>n.size<=r):!0},fileType:(e,t)=>{if(!e)return!0;const r=t.value,n={"text/csv":[".csv"],"application/vnd.ms-excel":[".xls"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":[".xlsx"],"application/pdf":[".pdf"],"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"image/gif":[".gif"],"image/webp":[".webp"]},o=s=>r.some(i=>{if(i.endsWith("/*")){const u=i.replace("/*","");if(s.type.startsWith(u))return!0}else if(s.type===i)return!0;const a=s.name.toLowerCase(),d=n[i];return d?d.some(u=>a.endsWith(u)):i.startsWith(".")?a.endsWith(i.toLowerCase()):!1});return e instanceof File?o(e):Array.isArray(e)?e.every(s=>o(s)):!0},allowLetters:(e,t)=>typeof e!="string"||!e||t.value?!0:!/[a-zA-Z]/.test(e),allowNumbers:(e,t)=>typeof e!="string"||!e||t.value?!0:!/[0-9]/.test(e),allowSpecialChars:(e,t)=>typeof e!="string"||!e||t.value?!0:!/[^a-zA-Z0-9\s]/.test(e),minLetters:(e,t)=>{if(typeof e!="string"||!e)return!0;const r=t.value;return(e.match(/[a-zA-Z]/g)||[]).length>=r},maxLetters:(e,t)=>{if(typeof e!="string"||!e)return!0;const r=t.value;return(e.match(/[a-zA-Z]/g)||[]).length<=r},minNumbers:(e,t)=>{if(typeof e!="string"||!e)return!0;const r=t.value;return(e.match(/[0-9]/g)||[]).length>=r},maxNumbers:(e,t)=>{if(typeof e!="string"||!e)return!0;const r=t.value;return(e.match(/[0-9]/g)||[]).length<=r},minSpecialChars:(e,t)=>{if(typeof e!="string"||!e)return!0;const r=t.value;return(e.match(/[^a-zA-Z0-9\s]/g)||[]).length>=r},maxSpecialChars:(e,t)=>{if(typeof e!="string"||!e)return!0;const r=t.value;return(e.match(/[^a-zA-Z0-9\s]/g)||[]).length<=r},custom:(e,t,r)=>!0,async:()=>!0};function qr(e,t,r={}){const n=ub[t.type];if(!n)return!0;const o=n(e,t,r);return o===!1?t.message||fb(t):typeof o=="string"?o:!0}function fb(e){return{required:"This field is required",minLength:`Must be at least ${e.value} characters`,maxLength:`Must be at most ${e.value} characters`,min:`Must be at least ${e.value}`,max:`Must be at most ${e.value}`,pattern:"Invalid format",email:"Please enter a valid email address",url:"Please enter a valid URL",phone:"Please enter a valid phone number",date:"Please enter a valid date",dateRange:"Date is out of allowed range",fileSize:`File size must be less than ${pb(e.value)}`,fileType:"File type is not allowed",allowLetters:"Letters are not allowed in this field",allowNumbers:"Numbers are not allowed in this field",allowSpecialChars:"Special characters are not allowed in this field",minLetters:`Must contain at least ${e.value} letters`,maxLetters:`Must contain at most ${e.value} letters`,minNumbers:`Must contain at least ${e.value} numbers`,maxNumbers:`Must contain at most ${e.value} numbers`,minSpecialChars:`Must contain at least ${e.value} special characters`,maxSpecialChars:`Must contain at most ${e.value} special characters`,custom:"Validation failed",async:"Validation failed"}[e.type]||"Invalid value"}function pb(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}const mb=10;function Fs(e){const t=e.properties;return t?.maxFiles!=null&&t.maxFiles>0?Math.floor(t.maxFiles):t?.multiple===!0?mb:1}function vd(e){return typeof e=="object"&&e!==null&&"url"in e&&typeof e.url=="string"&&e.url.length>0}function wd(e){try{return e.split("?")[0].split("/").filter(Boolean).pop()||e}catch{return e}}function Ps(e){if(e==null)return[];if(typeof e=="string")return e.startsWith("http")?[{url:e,name:wd(e)}]:[];if(e instanceof File)return[e];if(Array.isArray(e)){const t=[];for(const r of e)r instanceof File?t.push(r):typeof r=="string"&&r.startsWith("http")?t.push({url:r,name:wd(r)}):vd(r)&&t.push(r);return t}return vd(e)?[e]:[]}function hb(e,t){return e.slice(0,t)}function xa(e,t){const r=hb(e,t);return r.length===0?null:t===1?r[0]??null:r}function gb(e){return Ps(e).length}function yb(e){return e==="file"||e==="camera"||e==="photoChoice"}function Aa(e,t){if(!yb(e.type))return;const r=Fs(e);if(gb(t)>r)return`Maximum ${r} file(s) allowed`}class Ca{static functions={SUM:(...t)=>t.flat().filter(n=>typeof n=="number").reduce((n,o)=>n+o,0),AVG:(...t)=>{const r=t.flat().filter(n=>typeof n=="number");return r.length===0?0:r.reduce((n,o)=>n+o,0)/r.length},MIN:(...t)=>{const r=t.flat().filter(n=>typeof n=="number");return r.length>0?Math.min(...r):0},MAX:(...t)=>{const r=t.flat().filter(n=>typeof n=="number");return r.length>0?Math.max(...r):0},ROUND:(t,r=0)=>{const n=Number(t);if(isNaN(n))return 0;const o=Math.pow(10,Number(r));return Math.round(n*o)/o},FLOOR:t=>Math.floor(Number(t)||0),CEIL:t=>Math.ceil(Number(t)||0),ABS:t=>Math.abs(Number(t)||0),CONCAT:(...t)=>t.map(String).join(""),UPPER:t=>String(t).toUpperCase(),LOWER:t=>String(t).toLowerCase(),TRIM:t=>String(t).trim(),LEN:t=>String(t).length,SUBSTR:(t,r,n)=>{const o=String(t),s=Number(r),i=n!==void 0?Number(n):void 0;return o.substring(s,i!==void 0?s+i:void 0)},IF:(t,r,n)=>t?r:n,IFEMPTY:(t,r)=>t==null||t===""?r:t,ISNUMBER:t=>typeof t=="number"&&!isNaN(t),ISEMPTY:t=>t==null?!0:typeof t=="string"?t.trim()==="":Array.isArray(t)?t.length===0:!1,TODAY:()=>new Date().toISOString().split("T")[0],NOW:()=>new Date().toISOString(),YEAR:t=>{const r=new Date(t);return isNaN(r.getTime())?null:r.getFullYear()},MONTH:t=>{const r=new Date(t);return isNaN(r.getTime())?null:r.getMonth()+1},DAY:t=>{const r=new Date(t);return isNaN(r.getTime())?null:r.getDate()},DATEDIFF:(t,r,n="days")=>{const o=new Date(t),s=new Date(r);if(isNaN(o.getTime())||isNaN(s.getTime()))return null;const a=(s.getTime()-o.getTime())/(1e3*60*60*24);switch(n){case"years":return a/365;case"months":return a/30;case"weeks":return a/7;case"hours":return a*24;case"minutes":return a*24*60;default:return a}},COUNT:t=>Array.isArray(t)?t.length:t?1:0,FIRST:t=>Array.isArray(t)?t[0]:t,LAST:t=>Array.isArray(t)?t[t.length-1]:t,SUMFIELD:(...t)=>{const r=t[0],n=t[1];return!Array.isArray(r)||typeof n!="string"?0:r.reduce((o,s)=>{if(typeof s=="object"&&s!==null){const i=s[n];return o+(Number(i)||0)}return o},0)}};calculate(t,r){try{const{fields:n,currentValue:o,previousValue:s}=r,i={...n};for(const f in i){const p=i[f];(p==null||p==="")&&(i[f]="")}const a={fields:i,currentValue:o,previousValue:s,...Ca.functions},d=Object.keys(a),u=Object.values(a),l=new Function(...d,`return ${t}`)(...u);if(l==null)return"";if(typeof l=="string"){if(l.includes("undefined"))return"";const f=l.trim();return f===""||/^\s+$/.test(l)?"":f}return l}catch{return""}}calculateAll(t,r){const n={...r};for(const o of t){const s={fields:n,currentValue:n[o.field],previousValue:r[o.field]},i=this.calculate(o.formula,s);n[o.field]=i===null?"":i}return n}validateFormula(t){try{return new Function("fields",`return ${t}`),{valid:!0}}catch(r){return{valid:!1,error:r instanceof Error?r.message:"Invalid formula"}}}getAvailableFunctions(){return[{name:"SUM",description:"Sum of values"},{name:"AVG",description:"Average of values"},{name:"MIN",description:"Minimum value"},{name:"MAX",description:"Maximum value"},{name:"ROUND",description:"Round to decimal places"},{name:"IF",description:"Conditional value"},{name:"CONCAT",description:"Concatenate strings"},{name:"TODAY",description:"Current date"},{name:"DATEDIFF",description:"Difference between dates"},{name:"COUNT",description:"Count of items"},{name:"SUMFIELD",description:"Sum field in array"}]}}const Sd=new Ca;function xd(e){if(e==null||e==="")return null;if(e instanceof Date)return Number.isNaN(e.getTime())?null:Os(e);if(typeof e=="string"){const t=e.trim();if(!t)return null;const r=t.match(/^(\d{4})-(\d{2})-(\d{2})/);if(r){const o=new Date(Number(r[1]),Number(r[2])-1,Number(r[3]));return Number.isNaN(o.getTime())?null:o}const n=new Date(t);return Number.isNaN(n.getTime())?null:Os(n)}return null}function Os(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function bb(e,t=new Date){const r=Os(e),n=Os(t);if(n<r)return{years:0,months:0,days:0};let o=n.getFullYear()-r.getFullYear(),s=n.getMonth()-r.getMonth(),i=n.getDate()-r.getDate();if(i<0){s-=1;const a=new Date(n.getFullYear(),n.getMonth(),0).getDate();i+=a}return s<0&&(o-=1,s+=12),{years:Math.max(0,o),months:Math.max(0,s),days:Math.max(0,i)}}function Ea(e){if(e.type!=="number")return;const t=e.properties?.deriveFromDate;if(!(!t?.sourceFieldName||!t.part))return t}function Fr(e){const t=e.indexOf("__addmore__");return t>=0?e.slice(0,t):e}function Na(e){const t=e.indexOf("__addmore__");return t>=0?e.slice(t):null}function vb(e,t){const r=Na(e);return r?`${t.sourceFieldName}${r}`:t.sourceFieldName}function Ad(e,t,r){const n=Na(t);if(n)return[`${e}${n}`];const o=new Set([e]),s=`${e}__addmore__`;for(const i of Object.keys(r))(i===e||i.startsWith(s))&&o.add(i);return[...o]}function wb(e,t,r){const n=r?vb(r,e):e.sourceFieldName,o=xd(t[n]);if(!o)return null;const s=e.referenceDate==="today"||e.referenceDate==null?new Date:xd(t[e.referenceDate])??new Date;return bb(o,s)[e.part]}function Cd(e,t){const r=Ea(e);return r?Fr(r.sourceFieldName)===Fr(t):!1}function Ta(e,t,r,n){const o={...t},s=n?Fr(n):void 0;for(const i of e){if(i.type!=="number")continue;const a=Ea(i);if(!a||!i.name||s&&Fr(a.sourceFieldName)!==s)continue;const d=n??a.sourceFieldName,u=Ad(i.name,d,o);for(const l of u){if(r.has(l))continue;const f=wb(a,o,l);o[l]=f}}return o}function Sb(e,t,r,n){const o={...t},s=Fr(n);for(const i of e){if(!Cd(i,s)||!i.name)continue;const a=Ad(i.name,n,o);for(const d of a)r.delete(d),o[d]=null}return o}function Ed(e,t){const r=Fr(t);return e.some(n=>Cd(n,r))}function Nd(e){if(e.apidata&&typeof e.apidata=="object")return e.apidata;if(e.metadata)try{const t=typeof e.metadata=="string"?JSON.parse(e.metadata):e.metadata;if(t.apiEndpoint||t.apiKey||t.valueSource==="api")return{apiKey:t.apiKey,valueSource:t.valueSource,apiEndpoint:t.apiEndpoint,apiAutoDetect:t.apiAutoDetect,apiLabelField:t.apiLabelField,apiValueField:t.apiValueField,apiMethod:t.apiMethod,apiRealtime:t.apiRealtime,apiQueryParams:t.apiQueryParams,apiClientFilter:t.apiClientFilter}}catch{}return null}function xb(e,t,r,n){let o=_a(e,r);return n&&(o=In(o,t,r)),o}function _a(e,t){return e.replace(/\{(?:ctx:|\@)(\w+)\}/g,(r,n)=>t?.[n]!==void 0&&t[n]!==null?String(t[n]):r)}function In(e,t,r){let n=e.replace(/\{(?:ctx:|\@)(\w+)\}/g,(o,s)=>r?.[s]!==void 0&&r[s]!==null?String(r[s]):o);return n=n.replace(/\{(\w+)\}/g,(o,s)=>{if(o.includes("ctx:")||o.includes("@"))return o;let i=t[s];if(i==null||i===""){const a=Object.keys(t).find(d=>d.toLowerCase()===s.toLowerCase());a&&(i=t[a])}return i!=null&&i!==""?String(i):o}),n}function Is(e,t){const r=e.match(/\{(\w+)\}/g)||[],n=[];t?.custom&&t.custom.forEach(({value:s})=>{if(s){const i=s.match(/\{(\w+)\}/g)||[];n.push(...i.filter(a=>!a.includes("ctx:")&&!a.includes("@")))}});const o=r.filter(s=>!s.includes("ctx:")&&!s.includes("@"));return new Set([...o.map(s=>s.replace(/[{}]/g,"")),...n.map(s=>s.replace(/[{}]/g,""))])}function Ab(e,t){const r=e[t];return r==null||r===""}function Td(e){const{apiEndpoint:t,apiMethod:r="GET",apiQueryParams:n={},formValues:o,submissionContext:s,apiRealtime:i,additionalRequiredFieldNames:a=[],excludeFormFieldNames:d=[]}=e,u=(r||"GET").toLowerCase(),l=Is(t,n),f=new Set((d||[]).filter(w=>typeof w=="string"&&w.length>0)),p=new Set((a||[]).filter(w=>typeof w=="string"&&w.length>0)),m=new Set([...l,...p]);let g=!1;for(const w of m){const x=!!(i&&l.has(w)),C=p.has(w);if((x||C)&&Ab(o,w)){g=!0;break}}if(g)return{blocked:!0,url:t,postBodyBase:null};let h=t;const y=t.match(/\{(\w+)\}/g)||[];if(h=_a(h,s),i&&(h=In(h,o,s)),n&&Object.keys(n).length>0){const w=n,x=[];if(w.limit){let C=w.limit;i&&(C=In(C,o,s)),x.push(`_limit=${encodeURIComponent(C)}`)}if(w.page){let C=w.page;i&&(C=In(C,o,s)),x.push(`page=${encodeURIComponent(C)}`)}if(w.sort){let C=w.sort;i&&(C=In(C,o,s)),x.push(`sort=${encodeURIComponent(C)}`)}if(w.orderBy){let C=w.orderBy;i&&(C=In(C,o,s)),x.push(`orderBy=${encodeURIComponent(C)}`)}if(w.custom?.length&&w.custom.forEach(({key:C,value:O})=>{if(!C||!O)return;let E=_a(O,s);i&&(E=In(E,o,s)),E.match(/\{[^}]+\}/)?E.match(/\{(?!ctx:|\@)(\w+)\}/g)||x.push(`${encodeURIComponent(C)}=`):x.push(`${encodeURIComponent(C)}=${encodeURIComponent(E)}`)}),x.length>0){const C=h.includes("?")?"&":"?";h=`${h}${C}${x.join("&")}`}}if(i&&Object.keys(o).length>0&&u==="get"){const w=E=>E.replace(/\{/g,"").replace(/\}/g,""),x=[];for(const E of n.custom||[])if(E.value){const _=E.value.match(/\{(\w+)\}/g)||[];x.push(..._.map(w))}const C=new Set([...y.map(w),...x]),O={};Object.keys(o).forEach(E=>{!C.has(E)&&!f.has(E)&&(O[E]=o[E])}),Object.keys(O).length>0&&(h=`${h}${h.includes("?")?"&":"?"}${new URLSearchParams(O).toString()}`)}let v=null;if(["post","put","patch"].includes(u))if(i&&Object.keys(o).length>0){v={...o};for(const w of f)delete v[w]}else{v={...o||{}};for(const w of f)delete v[w]}return{blocked:!1,url:h,postBodyBase:v}}const Cb=new Set(["select","multiselect","asyncsearch"]);function Eb(e){return e?.type==="multiselect"?[]:""}function _d(e){if(!Cb.has(e.type))return[];const t=e.properties??{},r=Nd(e),n=new Set,o=r?.apiClientFilter?.matchField?.trim()||t.apiClientFilter?.matchField?.trim();o&&n.add(o);const s=[...Array.isArray(t.dependentFields)?t.dependentFields:[],...Array.isArray(r?.dependentFields)?r.dependentFields:[]];for(const u of s)typeof u=="string"&&u.trim()&&n.add(u.trim());const i=r?.apiEndpoint||t.apiEndpoint,a=r?.apiRealtime??t.apiRealtime,d=r?.apiQueryParams||t.apiQueryParams;if(i&&a)for(const u of Is(i,d))n.add(u);return[...n]}function Nb(e,t){const r=Fr(t);return _d(e).some(n=>Fr(n)===r)}function Tb(e,t){const r=Fr(t);return e.some(n=>Nb(n,r))}function _b(e){const t=new Map;for(const r of e){const n=r.name;if(n)for(const o of _d(r)){const s=Fr(o),i=t.get(s)??new Set;i.add(n),t.set(s,i)}}return t}function kb(e,t,r){const n=Na(t);if(n)return[`${e}${n}`];const o=new Set([e]),s=`${e}__addmore__`;for(const i of Object.keys(r))(i===e||i.startsWith(s))&&o.add(i);return[...o]}function Fb(e,t){return e===t?!0:Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((r,n)=>r===t[n]):!1}function Pb(e,t,r){const n=_b(e),o=Fr(r),s=new Set,i=[o];for(;i.length>0;){const u=i.shift(),l=n.get(u);if(l)for(const f of l)s.has(f)||(s.add(f),i.push(f))}const a={...t},d=[];for(const u of s){const l=e.find(p=>p.name===u),f=Eb(l);for(const p of kb(u,r,a))Fb(a[p],f)||d.push(p),a[p]=f}return{values:a,clearedKeys:d}}function ka(e,t){const r=t instanceof Set?t:new Set(t);if(e.size!==r.size)return!1;for(const n of e)if(!r.has(n))return!1;return!0}const _t=bd((e,t)=>({schema:null,values:{},initialValues:{},errors:{},touched:{},isValidating:!1,isSubmitting:!1,submitCount:0,isValid:!0,currentStep:0,totalSteps:1,completedSteps:new Set,visibleFields:new Set,enabledFields:new Set,requiredFields:new Set,readOnlyFields:new Set,editableFields:new Set,formDisabled:!1,derivedFieldDirty:new Set,draftId:null,setSchema:(r,n)=>{const o=t(),s=o.schema!=null&&o.schema.id===r.id,i=n?.forceReset===!0,a={},d=new Set,u=new Set,l=new Set;r.fields.forEach(y=>{const v=y.name||y.key||y.id;v&&(y.defaultValue!==void 0&&(y.type==="multiselect"?a[v]=Array.isArray(y.defaultValue)?y.defaultValue:y.defaultValue!=null&&y.defaultValue!==""?[String(y.defaultValue)]:[]:a[v]=y.defaultValue),y.hidden||d.add(v),y.disabled||u.add(v),y.validation?.some(w=>w.type==="required")&&l.add(v))});const f=r.steps?.length||1,p=[];r.fields.forEach(y=>{const v=y.properties;v?.valueSource==="calculated"&&v?.formula&&p.push({field:y.name,formula:v.formula})});const m=p.length>0?Sd.calculateAll(p,a):{},g=Ta(r.fields,{...a,...m},new Set),h=s&&!i?{...g,...o.values}:g;e({schema:r,values:h,initialValues:g,errors:{},touched:{},currentStep:0,totalSteps:f,completedSteps:new Set,visibleFields:d,enabledFields:u,requiredFields:l,readOnlyFields:new Set,editableFields:new Set,formDisabled:!1,derivedFieldDirty:i||!s?new Set:o.derivedFieldDirty,isValid:!0,draftId:null})},setFieldValue:(r,n,o)=>{const s=t(),i=s.schema,a=o?.source??"user";let d=new Set(s.derivedFieldDirty);const u=s.values[r];let l={...s.values,[r]:n},f=[];if(i){const p=Fr(r),m=i.fields.find(v=>v.name===p);a==="user"&&m&&Ea(m)&&d.add(r);const g=n==null||n===""||Array.isArray(n)&&n.length===0;if(Ed(i.fields,r)&&g?l=Sb(i.fields,l,d,r):Ed(i.fields,r)&&(l=Ta(i.fields,l,d,r)),a==="user"&&u!==n&&!(Array.isArray(u)&&Array.isArray(n)&&u.length===n.length&&u.every((v,w)=>v===n[w]))&&Tb(i.fields,r)){const v=Pb(i.fields,l,r);l=v.values,f=v.clearedKeys}const y=[];if(i.fields.forEach(v=>{const w=v.properties;w?.valueSource==="calculated"&&w?.formula&&(w.formulaSteps||[]).some(O=>O.type==="field"&&O.fieldName===r)&&y.push({field:v.name,formula:w.formula})}),y.length>0){const v=Sd.calculateAll(y,l);l={...l,...v}}}e({values:l,derivedFieldDirty:d}),f.length>0&&e(p=>{const m={...p.errors};for(const g of f)delete m[g];return Object.keys(m).length===Object.keys(p.errors).length?p:{errors:m}}),i?.config.validateOnChange?t().validateField(r):e(p=>{const m={...p.errors};return delete m[r],{errors:m}})},setFieldTouched:(r,n=!0)=>{e(s=>({touched:{...s.touched,[r]:n}}));const o=t().schema;n&&o?.config.validateOnBlur&&t().validateField(r)},setFieldError:(r,n)=>{e(o=>{const s=!!o.errors[r];if(!n&&!s||n&&o.errors[r]===n)return o;const i={...o.errors};return n?i[r]=n:delete i[r],{errors:i,isValid:Object.keys(i).length===0}})},setValues:r=>{const n=t(),o=n.schema;if(!o){e({values:r});return}const s=Ta(o.fields,r,n.derivedFieldDirty);e({values:s})},setErrors:r=>{e({errors:r,isValid:Object.keys(r).length===0})},resetForm:()=>{const{initialValues:r}=t();e({values:{...r},errors:{},touched:{},currentStep:0,completedSteps:new Set,derivedFieldDirty:new Set,isValid:!0,submitCount:0})},clearForm:()=>{e({schema:null,values:{},initialValues:{},errors:{},touched:{},currentStep:0,totalSteps:1,completedSteps:new Set,visibleFields:new Set,enabledFields:new Set,requiredFields:new Set,readOnlyFields:new Set,editableFields:new Set,formDisabled:!1,derivedFieldDirty:new Set,isValid:!0,submitCount:0,draftId:null})},validateField:async r=>{const{schema:n,values:o}=t();if(!n)return;const s=n.fields.find(a=>a.name===r);if(!s)return;e({isValidating:!0});let i;if(s.validation)for(const a of s.validation){const d=qr(o[r],a,o);if(typeof d=="string"){i=d;break}}if(!i){const a=Aa(s,o[r]);a&&(i=a)}return e(a=>{const d={...a.errors};return i?d[r]=i:delete d[r],{errors:d,isValid:Object.keys(d).length===0,isValidating:!1}}),i},validateForm:async()=>{const{schema:r,values:n,visibleFields:o,requiredFields:s}=t();if(!r)return!1;e({isValidating:!0});const i={};for(const a of r.fields)if(o.has(a.name)){if(a.validation)for(const d of a.validation){if(d.type==="required"&&!s.has(a.name))continue;const u=qr(n[a.name],d,n);if(typeof u=="string"){i[a.name]=u;break}}if(!i[a.name]){const d=Aa(a,n[a.name]);d&&(i[a.name]=d)}}return e({errors:i,isValid:Object.keys(i).length===0,isValidating:!1}),Object.keys(i).length===0},validateStep:async r=>{const{schema:n,values:o,visibleFields:s}=t();if(!n||!n.steps)return!0;const i=n.steps[r];if(!i)return!0;e({isValidating:!0});const a={};for(const d of i.fields){const u=n.fields.find(l=>l.name===d);if(u&&s.has(u.name)){if(u.validation)for(const l of u.validation){const f=qr(o[u.name],l,o);if(typeof f=="string"){a[u.name]=f;break}}if(!a[u.name]){const l=Aa(u,o[u.name]);l&&(a[u.name]=l)}}}return e(d=>({errors:{...d.errors,...a},isValid:Object.keys(a).length===0,isValidating:!1})),Object.keys(a).length===0},nextStep:async()=>{const{currentStep:r,totalSteps:n,schema:o}=t();return o?.steps?.[r]?.validation==="onNext"&&!await t().validateStep(r)?!1:r<n-1?(e(i=>({currentStep:r+1,completedSteps:new Set([...i.completedSteps,r])})),!0):!1},prevStep:()=>{const{currentStep:r}=t();r>0&&e({currentStep:r-1})},goToStep:r=>{const{totalSteps:n,completedSteps:o,currentStep:s}=t();r>=0&&r<n&&(r<=s||o.has(r-1))&&e({currentStep:r})},setSubmitting:r=>e({isSubmitting:r}),incrementSubmitCount:()=>{e(r=>({submitCount:r.submitCount+1}))},updateVisibility:r=>{e(n=>{const o=new Set(r);return ka(n.visibleFields,o)?n:{visibleFields:o}})},updateEnabled:r=>{e(n=>{const o=new Set(r);return ka(n.enabledFields,o)?n:{enabledFields:o}})},updateRequired:r=>{e(n=>{const o=new Set(r);return ka(n.requiredFields,o)?n:{requiredFields:o}})},updateReadOnly:r=>{e({readOnlyFields:new Set(r)})},updateEditable:r=>{e({editableFields:new Set(r)})},updateFormDisabled:r=>{e({formDisabled:r})},saveDraft:()=>{const{schema:r,values:n}=t();if(!r)return;const o=`formsmith_draft_${r.id}`;try{localStorage.setItem(o,JSON.stringify({values:n,savedAt:new Date().toISOString()})),e({draftId:o})}catch{}},loadDraft:()=>{const{schema:r}=t();if(!r)return!1;const n=`formsmith_draft_${r.id}`;try{const o=localStorage.getItem(n);if(o){const{values:s}=JSON.parse(o);return e({values:s,draftId:n}),!0}}catch{}return!1},clearDraft:()=>{const{schema:r,draftId:n}=t();if(!r)return;const o=n||`formsmith_draft_${r.id}`;try{localStorage.removeItem(o),e({draftId:null})}catch{}}}));function Ob(){return _t.getState()}function kd({schema:e,initialValues:t,onSubmit:r,onChange:n,workflowStepId:o}){const{values:s,errors:i,touched:a,isValidating:d,isSubmitting:u,submitCount:l,isValid:f,currentStep:p,totalSteps:m,completedSteps:g,visibleFields:h,enabledFields:y,requiredFields:v,setSchema:w,setFieldValue:x,setFieldTouched:C,setFieldError:O,setValues:E,resetForm:_,validateField:T,validateForm:A,validateStep:P,nextStep:k,prevStep:U,goToStep:R,setSubmitting:L,incrementSubmitCount:q,saveDraft:M,loadDraft:j,clearDraft:B}=_t(),G=S.useRef(null);S.useLayoutEffect(()=>{if(w(e,{forceReset:!!o}),t&&Object.keys(t).length>0){const ce=_t.getState().values;E({...ce,...t});try{G.current=JSON.stringify(t)}catch{G.current=null}}else G.current=null},[e.id,o]),S.useLayoutEffect(()=>{if(!t||Object.keys(t).length===0)return;let ce;try{ce=JSON.stringify(t)}catch{return}if(ce===G.current)return;const rt=_t.getState().values;E({...rt,...t}),G.current=ce},[t,E]);const D=S.useCallback((ce,rt)=>{const ve={...s,[ce]:rt};x(ce,rt),n?.(ve,ce)},[x,n,s]),he=S.useCallback(async ce=>{if(ce?.preventDefault(),q(),!await A())return{success:!1,errors:Object.entries(i).map(([ve,we])=>({field:ve,rule:"validation",message:we}))};if(!r)return{success:!0};L(!0);try{const ve=await r(s);return ve.success&&B(),ve}catch(ve){return{success:!1,message:ve instanceof Error?ve.message:"Submission failed"}}finally{L(!1)}},[A,r,s,i,q,L,B]),I=S.useCallback(ce=>({value:s[ce],error:i[ce],touched:a[ce]||!1,isVisible:h.has(ce),isEnabled:y.has(ce),isRequired:v.has(ce)}),[s,i,a,h,y,v]),V=S.useMemo(()=>{if(!e.steps||e.steps.length===0)return e.fields;const ce=e.steps[p];return ce?e.fields.filter(rt=>ce.fields.includes(rt.name)):[]},[e,p]),Q=p===0,le=p===m-1,re=S.useCallback(ce=>g.has(ce),[g]),se=S.useMemo(()=>m<=1?100:Math.round(g.size/m*100),[g.size,m]),ae=S.useCallback(ce=>h.has(ce),[h]),Fe=S.useCallback(ce=>y.has(ce),[y]),te=S.useCallback(ce=>v.has(ce),[v]),ee=S.useMemo(()=>Object.entries(i).filter(([ce])=>h.has(ce)),[i,h]),ge=ee.length>0;return{values:s,errors:i,touched:a,isValidating:d,isSubmitting:u,submitCount:l,isValid:f,hasErrors:ge,visibleErrors:ee,currentStep:p,totalSteps:m,completedSteps:g,currentStepFields:V,isFirstStep:Q,isLastStep:le,isStepCompleted:re,progress:se,setFieldValue:D,setFieldTouched:C,setFieldError:O,setValues:E,validateField:T,getFieldState:I,shouldShowField:ae,isFieldEnabled:Fe,isFieldRequired:te,handleSubmit:he,resetForm:_,validateForm:A,validateStep:P,nextStep:k,prevStep:U,goToStep:R,saveDraft:M,loadDraft:j,clearDraft:B}}function Fd(e){return"logic"in e&&"conditions"in e}function $o(e){if(e==null||typeof e!="object")return!1;const t=e;if(t.status==="error")return!1;if(t.status==="success"||t.status==="COMPLETED")return!0;const r=t.code;return typeof r=="number"&&r>=200&&r<300||t.data!=null&&t.status!=="error"}function Pd(e,t){if(e==null||typeof t!="string"||t.trim()==="")return;const r=t.replace(/\[(\d+)\]/g,".$1").split(".").filter(Boolean);let n=e;for(const o of r){if(n==null||typeof n!="object")return;n=n[o]}return n}function st(e,t){if(e==null||typeof t!="string"||t.trim()==="")return;let r=Pd(e,t);if(r===void 0&&t.includes(".")){const n=t.split(".");if(n.length>=2){const o=n[0],s=n.slice(1).join("."),i=Pd(e,o);Array.isArray(i)&&i.length>0&&(r=st(i[0],s))}}return r}const Ib=new Set(["section","group","columns","divider","header","sectionHeading","spacer","textLabel","addmore","customizeSections"]);function Mb(e){return e===!0||e==="true"?!0:e===!1||e==="false"?!1:e}function Lb(e,t){if(e==null||typeof t.path!="string"||!t.path.trim())return!1;const r=st(e,t.path),n=Mb(t.value);switch(t.operator){case"equals":return r===n;case"notEquals":return r!==n;case"contains":return typeof r=="string"?r.includes(String(n)):Array.isArray(r)?r.includes(n):!1;case"notContains":return typeof r=="string"?!r.includes(String(n)):Array.isArray(r)?!r.includes(n):!0;case"startsWith":return typeof r=="string"&&r.startsWith(String(n));case"endsWith":return typeof r=="string"&&r.endsWith(String(n));case"greaterThan":return Number(r)>Number(n);case"lessThan":return Number(r)<Number(n);case"greaterThanOrEqual":return Number(r)>=Number(n);case"lessThanOrEqual":return Number(r)<=Number(n);case"isEmpty":return r==null?!0:typeof r=="string"?r.trim()==="":Array.isArray(r)?r.length===0:typeof r=="object"&&r!==null?Object.keys(r).length===0:!1;case"isNotEmpty":return r==null?!1:typeof r=="string"?r.trim()!=="":Array.isArray(r)?r.length>0:typeof r=="object"&&r!==null?Object.keys(r).length>0:!1;case"isTrue":return r===!0;case"isFalse":return r===!1;case"isNull":return r==null;case"isNotNull":return r!=null;case"in":return Array.isArray(n)?n.includes(r):!1;case"notIn":return Array.isArray(n)?!n.includes(r):!0;case"between":if(Array.isArray(n)&&n.length===2){const o=Number(r);return o>=Number(n[0])&&o<=Number(n[1])}return!1;case"regex":try{return new RegExp(String(n)).test(String(r??""))}catch{return!1}default:return!1}}function Db(e,t,r){return e?e==="__allFields__"?t.filter(n=>!Ib.has(n.type)).map(n=>r(n)).filter(Boolean):e==="__allButtons__"?t.filter(n=>n.type==="button"||n.type==="editButton").map(n=>r(n)).filter(Boolean):[e]:[]}const Od="__buttonResponse:";function Bb({fields:e,values:t,buttonResponses:r,prepopulateResponse:n=null,prepopulateResponseRules:o}){const{updateVisibility:s,updateEnabled:i,updateRequired:a,updateReadOnly:d,updateEditable:u,updateFormDisabled:l}=_t(),f=S.useCallback(E=>E.name||E.key||E.id,[]),p=S.useCallback((E,_)=>{if(!E)return f(_);const T=e.find(A=>A.id===E||A.name===E||A.key===E);return T?f(T):E},[e,f]),m=S.useCallback(E=>{const _=e.find(T=>T.id===E||T.name===E||T.key===E);return _?f(_):E},[e,f]),g=S.useCallback(E=>{const{field:_,operator:T,value:A}=E;if(typeof _=="string"&&_.startsWith(Od)){const U=_.slice(Od.length),R=r?.[U],L=$o(R);return A==="success"?L:A==="failure"?R!=null&&!L:!1}const P=m(_),k=t[P];switch(T){case"equals":return k===A;case"notEquals":return k!==A;case"contains":return typeof k=="string"?k.includes(String(A)):Array.isArray(k)?k.includes(A):!1;case"notContains":return typeof k=="string"?!k.includes(String(A)):Array.isArray(k)?!k.includes(A):!0;case"startsWith":return typeof k=="string"&&k.startsWith(String(A));case"endsWith":return typeof k=="string"&&k.endsWith(String(A));case"greaterThan":return Number(k)>Number(A);case"lessThan":return Number(k)<Number(A);case"greaterThanOrEqual":return Number(k)>=Number(A);case"lessThanOrEqual":return Number(k)<=Number(A);case"isEmpty":return k==null?!0:k instanceof File?!1:typeof k=="string"?k.trim()==="":Array.isArray(k)?(k.length>0&&k[0]instanceof File,k.length===0):typeof k=="object"&&k!==null?Object.keys(k).length===0:!1;case"isNotEmpty":return k==null?!1:k instanceof File?!0:typeof k=="string"?k.trim()!=="":Array.isArray(k)?(k.length>0&&k[0]instanceof File,k.length>0):typeof k=="object"&&k!==null?Object.keys(k).length>0:!1;case"isTrue":return k===!0;case"isFalse":return k===!1;case"isNull":return k==null;case"isNotNull":return k!=null;case"in":return Array.isArray(A)?A.includes(k):!1;case"notIn":return Array.isArray(A)?!A.includes(k):!0;case"between":if(Array.isArray(A)&&A.length===2){const U=Number(k);return U>=Number(A[0])&&U<=Number(A[1])}return!1;case"regex":try{return new RegExp(String(A)).test(String(k))}catch{return!1}default:return!0}},[t,m,r]),h=S.useCallback(E=>{const _=E.conditions.map(T=>Fd(T)?h(T):g(T));return E.logic==="and"?_.every(Boolean):_.some(Boolean)},[g]),y=S.useCallback(E=>Fd(E)?h(E):g(E),[g,h]),v=S.useCallback(()=>{const E=new Set,_=new Set,T=new Set,A=new Set,P=new Set;e.forEach(L=>{const q=f(L);L.hidden||E.add(q),L.disabled||_.add(q),L.validation?.some(M=>M.type==="required")&&T.add(q)});let k=!1;if(n!=null&&o?.length)for(const L of o){if(!Lb(n,L.when))continue;const{action:q,target:M}=L.then;if(q==="disableForm")k=!0;else if(q==="enableForm")k=!1;else{const j=Db(M,e,f);for(const B of j)switch(q){case"disable":_.delete(B);break;case"enable":_.add(B);break;case"hide":E.delete(B);break;case"show":E.add(B);break;case"readOnly":A.add(B),P.delete(B);break;case"editable":P.add(B),A.delete(B);break}}}e.forEach(L=>{L.conditions&&L.conditions.forEach(q=>{(y(q.when)?q.then:q.else||[]).forEach(B=>{switch(B.action){case"disableForm":k=!0;break;case"enableForm":k=!1;break;default:{const G=p(B.target,L);switch(B.action){case"show":E.add(G);break;case"hide":E.delete(G);break;case"enable":_.add(G);break;case"disable":_.delete(G);break;case"require":T.add(G);break;case"unrequire":T.delete(G);break}break}}})})});const U=L=>e.filter(q=>q.type!=="editButton"&&(q.name||q.key||q.id)).map(q=>f(q)),R=()=>e.filter(L=>L.type==="button").map(L=>f(L));return e.forEach(L=>{if(L.type!=="editButton")return;const q=f(L);if(!$o(r?.[q]))return;const M=L.properties;M?.rules&&M.rules.length>0?M.rules.forEach(j=>{const B=[];j.allFields&&B.push(...U(L.id)),j.allButtons&&B.push(...R()),j.fieldNames?.length&&j.fieldNames.forEach(G=>{const D=e.find(he=>f(he)===G||he.id===G||he.name===G);B.push(D?f(D):G)}),j.buttonNames?.length&&B.push(...j.buttonNames),B.forEach(G=>{switch(j.action){case"enable":_.add(G),A.delete(G);break;case"disable":_.delete(G);break;case"show":E.add(G);break;case"hide":E.delete(G);break;case"readOnly":A.add(G);break;case"editable":P.add(G);break}})}):((M?.enableFieldNames??[]).forEach(j=>_.add(j)),(M?.disableFieldNames??[]).forEach(j=>_.delete(j)),(M?.showFieldNames??[]).forEach(j=>E.add(j)),(M?.hideFieldNames??[]).forEach(j=>E.delete(j)))}),{visible:Array.from(E),enabled:Array.from(_),required:Array.from(T),readOnly:Array.from(A),editable:Array.from(P),formDisabled:k}},[e,y,f,p,t,r,n,o]),w=S.useMemo(()=>v(),[v]);S.useEffect(()=>{s(w.visible),i(w.enabled),a(w.required),d(w.readOnly??[]),u(w.editable??[]),l(w.formDisabled??!1)},[w,s,i,a,d,u,l]);const x=S.useCallback(E=>w.visible.includes(E),[w.visible]),C=S.useCallback(E=>w.enabled.includes(E),[w.enabled]),O=S.useCallback(E=>w.required.includes(E),[w.required]);return{evaluateCondition:y,evaluateExpression:g,evaluateGroup:h,isFieldVisible:x,isFieldEnabled:C,isFieldRequired:O,visibleFields:w.visible,enabledFields:w.enabled,requiredFields:w.required}}function Zn({className:e,type:t,...r}){return c.jsx("input",{type:t,"data-slot":"input",className:$("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground text-foreground dark:bg-secondary dark:border-input border-input flex h-9 w-full min-w-0 rounded-md border bg-background px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}function Id(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Mn(...e){return t=>{let r=!1;const n=e.map(o=>{const s=Id(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():Id(e[o],null)}}}}function Qe(...e){return b.useCallback(Mn(...e),e)}var $b=Symbol.for("react.lazy"),Ms=b[" use ".trim().toString()];function jb(e){return typeof e=="object"&&e!==null&&"then"in e}function Md(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===$b&&"_payload"in e&&jb(e._payload)}function Fa(e){const t=zb(e),r=b.forwardRef((n,o)=>{let{children:s,...i}=n;Md(s)&&typeof Ms=="function"&&(s=Ms(s._payload));const a=b.Children.toArray(s),d=a.find(Vb);if(d){const u=d.props.children,l=a.map(f=>f===d?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return c.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}var Ld=Fa("Slot");function zb(e){const t=b.forwardRef((r,n)=>{let{children:o,...s}=r;if(Md(o)&&typeof Ms=="function"&&(o=Ms(o._payload)),b.isValidElement(o)){const i=Wb(o),a=Hb(s,o.props);return o.type!==b.Fragment&&(a.ref=n?Mn(n,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ub=Symbol("radix.slottable");function Vb(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ub}function Hb(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const d=s(...a);return o(...a),d}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function Wb(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Rb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Gb=Rb.reduce((e,t)=>{const r=Fa(`Primitive.${t}`),n=b.forwardRef((o,s)=>{const{asChild:i,...a}=o,d=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(d,{...a,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),qb="Label",Dd=b.forwardRef((e,t)=>c.jsx(Gb.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Dd.displayName=qb;var Kb=Dd;function bn({className:e,...t}){return c.jsx(Kb,{"data-slot":"label",className:$("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50 mb-2",e),...t})}function gt(e){return`formsmith-field-${e.id}`}function Ls(e){return`formsmith-label-${e.id}`}function jo(e){return`formsmith-desc-${e.id}`}function zo(e){return`formsmith-error-${e.id}`}function Wt(e,t){const r=[];return e.description&&r.push(jo(e)),t&&r.push(zo(e)),r.length>0?r.join(" "):void 0}function er(e){return e?!0:void 0}const Yb={body:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:400},heading:{fontSize:"1.125rem",lineHeight:"1.5rem",fontWeight:600},label:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:500},caption:{fontSize:"0.75rem",lineHeight:"1rem",fontWeight:400,color:"var(--muted-foreground)"}};function vn(e){return e.ui?.cellStyle}function Xb(e){const t=e.ui;if(!t)return;const r=t.fontToken?Yb[t.fontToken]:void 0;if(!(!r&&!t.wrapperStyle))return{...r,...t.wrapperStyle}}function Jb(e){return e.type==="button"||e.type==="editButton"}const kt=({field:e,error:t,isRequired:r,children:n,className:o,hideLabel:s})=>{const{gridStretch:i}=Bo(),a=i&&ks(e),d=!(s??e.appearance?.hideLabel)&&e.label,u=e.appearance?.labelPlacement||"top",l=Xb(e),f=e.appearance?.minWidth!=null||e.appearance?.minHeight!=null?{...e.appearance.minWidth!=null?{minWidth:e.appearance.minWidth}:{},...e.appearance.minHeight!=null?{minHeight:e.appearance.minHeight}:{}}:void 0,p=e.appearance?.className,m=pd(e),g=Qn(e),h=Jb(e),y=kr(e.appearance);return c.jsx("div",{className:$(Zy(u),u!=="floating"&&"space-y-2",a&&!h&&"flex-1 min-h-0 h-full",i&&h&&"w-full shrink-0 self-start",p,o),style:l,"data-field-appearance":u,children:c.jsxs("div",{className:$("flex flex-col min-w-0",cd(e.appearance),md(e),a&&!h&&"flex-1 min-h-0",i&&h&&"shrink-0"),style:m,children:[d&&c.jsxs(bn,{id:Ls(e),htmlFor:gt(e),style:e.ui?.labelStyle,className:$(eb(u,!!t)),children:[e.label,r&&c.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),c.jsxs("div",{className:$(tb(u),h&&i&&"min-h-min !grow-0 !shrink-0 basis-auto",g&&y!=="stretch"&&"items-start",h&&y==="stretch"&&"items-start w-full [&_button]:w-full",!h&&y==="stretch"&&"items-stretch",a&&!h&&"flex-1 min-h-0",o?.includes("flex")&&u==="top"&&"flex flex-col min-h-0"),style:f,children:[n,c.jsxs("div",{className:$("mt-1.5 min-h-[18px]",u==="center"&&"text-center",o?.includes("flex")&&"shrink-0"),children:[e.description&&!t&&c.jsx("p",{id:jo(e),className:"text-xs text-muted-foreground",style:e.ui?.descriptionStyle,children:e.description}),t&&c.jsx("p",{id:zo(e),className:"text-xs text-destructive",role:"alert",children:typeof t=="string"?t:String(t||"An error occurred")})]})]})]})})},Pa=({field:e,value:t,onChange:r,onBlur:n,error:o,disabled:s,readOnly:i,isRequired:a,className:d})=>{const u=e.properties,l=S.useCallback(f=>{r(f.target.value)},[r]);return c.jsx(kt,{field:e,error:o,isRequired:a,className:d,children:c.jsx(Zn,{id:gt(e),type:"text",value:t||"",onChange:l,onBlur:n,placeholder:e.placeholder,disabled:s||e.disabled,readOnly:i||e.readOnly,minLength:u?.minLength,maxLength:u?.maxLength,pattern:u?.pattern,autoComplete:u?.autoComplete,inputMode:u?.inputMode,"aria-describedby":Wt(e,!!o),"aria-invalid":er(!!o),"aria-required":a,className:$(Mo(e.appearance),o&&"border-destructive focus-visible:ring-destructive",e.appearance?.className)})})},Bd=({field:e,value:t,onChange:r,onBlur:n,error:o,disabled:s,readOnly:i,isRequired:a,className:d})=>{const u=e.properties,l=u?.precision!=null||u?.step!=null&&!Number.isInteger(u.step),f=S.useCallback(m=>{const g=u?.allowNegative!==!1,h=m.target.value,y=l?h.replace(g?/[^\d.-]/g:/[^\d.]/g,""):h.replace(g?/[^\d-]/g:/\D/g,"");if(y===""){r(null);return}const v=parseFloat(y);isNaN(v)||r(v)},[r,u?.allowNegative,l]),p=S.useCallback(m=>{(m.key==="ArrowUp"||m.key==="ArrowDown"||m.key==="PageUp"||m.key==="PageDown")&&m.preventDefault()},[]);return c.jsx(kt,{field:e,error:o,isRequired:a,className:d,children:c.jsxs("div",{className:"relative",children:[u?.prefix&&c.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground text-sm",children:u.prefix}),c.jsx(Zn,{id:gt(e),type:"text",inputMode:l?"decimal":"numeric",autoComplete:"off",value:t??"",onChange:f,onKeyDown:p,onBlur:n,placeholder:e.placeholder,disabled:s||e.disabled,readOnly:i||e.readOnly,"aria-describedby":Wt(e,!!o),"aria-invalid":er(!!o),"aria-required":a,className:$(Mo(e.appearance),o&&"border-destructive focus-visible:ring-destructive",u?.prefix&&"pl-8",u?.suffix&&"pr-8",e.appearance?.className)}),u?.suffix&&c.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground text-sm",children:u.suffix})]})})};const Qb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Zb=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),$d=e=>{const t=Zb(e);return t.charAt(0).toUpperCase()+t.slice(1)},jd=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),ev=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var tv={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"};const rv=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:i,...a},d)=>S.createElement("svg",{ref:d,...tv,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:jd("lucide",o),...!s&&!ev(a)&&{"aria-hidden":"true"},...a},[...i.map(([u,l])=>S.createElement(u,l)),...Array.isArray(s)?s:[s]]));const Rt=(e,t)=>{const r=S.forwardRef(({className:n,...o},s)=>S.createElement(rv,{ref:s,iconNode:t,className:jd(`lucide-${Qb($d(e))}`,`lucide-${e}`,n),...o}));return r.displayName=$d(e),r};const nv=Rt("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const Ds=Rt("camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);const Bs=Rt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Uo=Rt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const zd=Rt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const ov=Rt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const sv=Rt("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const Ud=Rt("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const Vd=Rt("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const Hd=Rt("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Vo=Rt("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const iv=Rt("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);const av=Rt("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);const Wd=Rt("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const lv=Rt("sliders-horizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);const Rd=Rt("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);const Ho=Rt("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const $s=Rt("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);const Wo=Rt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Gd=({field:e,value:t,onChange:r,onBlur:n,error:o,disabled:s,readOnly:i,isRequired:a,className:d})=>{const u=S.useCallback(l=>{r(l.target.value)},[r]);return c.jsx(kt,{field:e,error:o,isRequired:a,className:d,children:c.jsxs("div",{className:"relative",children:[c.jsx(iv,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),c.jsx(Zn,{id:gt(e),type:"email",value:t||"",onChange:u,onBlur:n,placeholder:e.placeholder||"email@example.com",disabled:s||e.disabled,readOnly:i||e.readOnly,autoComplete:"email",inputMode:"email","aria-describedby":Wt(e,!!o),"aria-invalid":er(!!o),"aria-required":a,className:$(Mo(e.appearance),"pl-10",o&&"border-destructive focus-visible:ring-destructive",e.appearance?.className)})]})})},qd=({field:e,value:t,onChange:r,onBlur:n,error:o,disabled:s,readOnly:i,isRequired:a,className:d})=>{const u=S.useCallback(l=>{const f=l.target.value.replace(/[^\d\s+\-()]/g,"");r(f)},[r]);return c.jsx(kt,{field:e,error:o,isRequired:a,className:d,children:c.jsxs("div",{className:"relative",children:[c.jsx(av,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),c.jsx(Zn,{id:gt(e),type:"tel",value:t||"",onChange:u,onBlur:n,placeholder:e.placeholder||"+91 12345 67890",disabled:s||e.disabled,readOnly:i||e.readOnly,autoComplete:"tel",inputMode:"tel","aria-describedby":Wt(e,!!o),"aria-invalid":er(!!o),"aria-required":a,className:$(Mo(e.appearance),"pl-10",o&&"border-destructive focus-visible:ring-destructive",e.appearance?.className)})]})})};function cv({className:e,maxLength:t,showCharacterCount:r=!1,autoResize:n=!1,onChange:o,value:s,...i}){const a=b.useRef(null),[d,u]=b.useState(0),l=f=>{const p=f.target.value;u(p.length),n&&a.current&&(a.current.style.height="auto",a.current.style.height=`${a.current.scrollHeight}px`),o&&o(f)};return b.useEffect(()=>{s&&u(String(s).length)},[s]),c.jsxs("div",{className:"space-y-1",children:[c.jsx("textarea",{ref:a,"data-slot":"textarea",className:$("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n&&"resize-none",e),maxLength:t,onChange:l,value:s,...i}),r&&c.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[c.jsxs("span",{children:[d," characters"]}),t&&c.jsxs("span",{children:[t-d," remaining"]})]})]})}const Kd=({field:e,value:t,onChange:r,onBlur:n,error:o,disabled:s,readOnly:i,isRequired:a,className:d})=>{const{gridStretch:u}=Bo(),l=u&&ks(e),f=e.properties,p=S.useCallback(y=>{r(y.target.value)},[r]),m=(t||"").length,g=f?.maxLength,h=g&&g>0;return c.jsx(kt,{field:e,error:o,isRequired:a,className:d,children:c.jsxs("div",{className:$("relative flex flex-col",l&&"flex-1 min-h-0"),children:[c.jsx(cv,{id:gt(e),value:t||"",onChange:p,onBlur:n,placeholder:e.placeholder,disabled:s||e.disabled,readOnly:i||e.readOnly,minLength:f?.minLength,maxLength:f?.maxLength,rows:2,"aria-describedby":Wt(e,!!o),"aria-invalid":er(!!o),"aria-required":a,className:$(id(e.appearance),"resize-y",l&&"min-h-[120px] flex-1 flex-shrink-0",o&&"border-destructive focus-visible:ring-destructive",e.appearance?.className)}),h&&c.jsxs("span",{className:"absolute bottom-2 right-2 text-xs text-muted-foreground",children:[m,"/",g]})]})})};function Ro(e,[t,r]){return Math.min(r,Math.max(t,e))}function Me(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}function dv(e,t){const r=b.createContext(t),n=s=>{const{children:i,...a}=s,d=b.useMemo(()=>a,Object.values(a));return c.jsx(r.Provider,{value:d,children:i})};n.displayName=e+"Provider";function o(s){const i=b.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,o]}function br(e,t=[]){let r=[];function n(s,i){const a=b.createContext(i),d=r.length;r=[...r,i];const u=f=>{const{scope:p,children:m,...g}=f,h=p?.[e]?.[d]||a,y=b.useMemo(()=>g,Object.values(g));return c.jsx(h.Provider,{value:y,children:m})};u.displayName=s+"Provider";function l(f,p){const m=p?.[e]?.[d]||a,g=b.useContext(m);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,l]}const o=()=>{const s=r.map(i=>b.createContext(i));return function(a){const d=a?.[e]||s;return b.useMemo(()=>({[`__scope${e}`]:{...a,[e]:d}}),[a,d])}};return o.scopeName=e,[n,uv(o,...t)]}function uv(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=n.reduce((a,{useScope:d,scopeName:u})=>{const f=d(s)[`__scope${u}`];return{...a,...f}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function Yd(e){const t=fv(e),r=b.forwardRef((n,o)=>{const{children:s,...i}=n,a=b.Children.toArray(s),d=a.find(mv);if(d){const u=d.props.children,l=a.map(f=>f===d?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return c.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function fv(e){const t=b.forwardRef((r,n)=>{const{children:o,...s}=r;if(b.isValidElement(o)){const i=gv(o),a=hv(s,o.props);return o.type!==b.Fragment&&(a.ref=n?Mn(n,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pv=Symbol("radix.slottable");function mv(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pv}function hv(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const d=s(...a);return o(...a),d}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function gv(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Oa(e){const t=e+"CollectionProvider",[r,n]=br(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:y,children:v}=h,w=S.useRef(null),x=S.useRef(new Map).current;return c.jsx(o,{scope:y,itemMap:x,collectionRef:w,children:v})};i.displayName=t;const a=e+"CollectionSlot",d=Yd(a),u=S.forwardRef((h,y)=>{const{scope:v,children:w}=h,x=s(a,v),C=Qe(y,x.collectionRef);return c.jsx(d,{ref:C,children:w})});u.displayName=a;const l=e+"CollectionItemSlot",f="data-radix-collection-item",p=Yd(l),m=S.forwardRef((h,y)=>{const{scope:v,children:w,...x}=h,C=S.useRef(null),O=Qe(y,C),E=s(l,v);return S.useEffect(()=>(E.itemMap.set(C,{ref:C,...x}),()=>{E.itemMap.delete(C)})),c.jsx(p,{[f]:"",ref:O,children:w})});m.displayName=l;function g(h){const y=s(e+"CollectionConsumer",h);return S.useCallback(()=>{const w=y.collectionRef.current;if(!w)return[];const x=Array.from(w.querySelectorAll(`[${f}]`));return Array.from(y.itemMap.values()).sort((E,_)=>x.indexOf(E.ref.current)-x.indexOf(_.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:i,Slot:u,ItemSlot:m},g,n]}var yv=b.createContext(void 0);function eo(e){const t=b.useContext(yv);return e||t||"ltr"}function bv(e){const t=vv(e),r=b.forwardRef((n,o)=>{const{children:s,...i}=n,a=b.Children.toArray(s),d=a.find(Sv);if(d){const u=d.props.children,l=a.map(f=>f===d?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return c.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function vv(e){const t=b.forwardRef((r,n)=>{const{children:o,...s}=r;if(b.isValidElement(o)){const i=Av(o),a=xv(s,o.props);return o.type!==b.Fragment&&(a.ref=n?Mn(n,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var wv=Symbol("radix.slottable");function Sv(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===wv}function xv(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const d=s(...a);return o(...a),d}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function Av(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Cv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Be=Cv.reduce((e,t)=>{const r=bv(`Primitive.${t}`),n=b.forwardRef((o,s)=>{const{asChild:i,...a}=o,d=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(d,{...a,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Ev(e,t){e&&Ss.flushSync(()=>e.dispatchEvent(t))}function sr(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...r)=>t.current?.(...r),[])}function Nv(e,t=globalThis?.document){const r=sr(e);b.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Tv="DismissableLayer",Ia="dismissableLayer.update",_v="dismissableLayer.pointerDownOutside",kv="dismissableLayer.focusOutside",Xd,Jd=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),js=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...d}=e,u=b.useContext(Jd),[l,f]=b.useState(null),p=l?.ownerDocument??globalThis?.document,[,m]=b.useState({}),g=Qe(t,_=>f(_)),h=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(y),w=l?h.indexOf(l):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,C=w>=v,O=Ov(_=>{const T=_.target,A=[...u.branches].some(P=>P.contains(T));!C||A||(o?.(_),i?.(_),_.defaultPrevented||a?.())},p),E=Iv(_=>{const T=_.target;[...u.branches].some(P=>P.contains(T))||(s?.(_),i?.(_),_.defaultPrevented||a?.())},p);return Nv(_=>{w===u.layers.size-1&&(n?.(_),!_.defaultPrevented&&a&&(_.preventDefault(),a()))},p),b.useEffect(()=>{if(l)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Xd=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(l)),u.layers.add(l),Qd(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Xd)}},[l,p,r,u]),b.useEffect(()=>()=>{l&&(u.layers.delete(l),u.layersWithOutsidePointerEventsDisabled.delete(l),Qd())},[l,u]),b.useEffect(()=>{const _=()=>m({});return document.addEventListener(Ia,_),()=>document.removeEventListener(Ia,_)},[]),c.jsx(Be.div,{...d,ref:g,style:{pointerEvents:x?C?"auto":"none":void 0,...e.style},onFocusCapture:Me(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Me(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Me(e.onPointerDownCapture,O.onPointerDownCapture)})});js.displayName=Tv;var Fv="DismissableLayerBranch",Pv=b.forwardRef((e,t)=>{const r=b.useContext(Jd),n=b.useRef(null),o=Qe(t,n);return b.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),c.jsx(Be.div,{...e,ref:o})});Pv.displayName=Fv;function Ov(e,t=globalThis?.document){const r=sr(e),n=b.useRef(!1),o=b.useRef(()=>{});return b.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let d=function(){Zd(_v,r,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Iv(e,t=globalThis?.document){const r=sr(e),n=b.useRef(!1);return b.useEffect(()=>{const o=s=>{s.target&&!n.current&&Zd(kv,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Qd(){const e=new CustomEvent(Ia);document.dispatchEvent(e)}function Zd(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Ev(o,s):o.dispatchEvent(s)}var Ma=0;function La(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??eu()),document.body.insertAdjacentElement("beforeend",e[1]??eu()),Ma++,()=>{Ma===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ma--}},[])}function eu(){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 Da="focusScope.autoFocusOnMount",Ba="focusScope.autoFocusOnUnmount",tu={bubbles:!1,cancelable:!0},Mv="FocusScope",zs=b.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,d]=b.useState(null),u=sr(o),l=sr(s),f=b.useRef(null),p=Qe(t,h=>d(h)),m=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(n){let h=function(x){if(m.paused||!a)return;const C=x.target;a.contains(C)?f.current=C:wn(f.current,{select:!0})},y=function(x){if(m.paused||!a)return;const C=x.relatedTarget;C!==null&&(a.contains(C)||wn(f.current,{select:!0}))},v=function(x){if(document.activeElement===document.body)for(const O of x)O.removedNodes.length>0&&wn(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const w=new MutationObserver(v);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),w.disconnect()}}},[n,a,m.paused]),b.useEffect(()=>{if(a){ou.add(m);const h=document.activeElement;if(!a.contains(h)){const v=new CustomEvent(Da,tu);a.addEventListener(Da,u),a.dispatchEvent(v),v.defaultPrevented||(Lv(zv(ru(a)),{select:!0}),document.activeElement===h&&wn(a))}return()=>{a.removeEventListener(Da,u),setTimeout(()=>{const v=new CustomEvent(Ba,tu);a.addEventListener(Ba,l),a.dispatchEvent(v),v.defaultPrevented||wn(h??document.body,{select:!0}),a.removeEventListener(Ba,l),ou.remove(m)},0)}}},[a,u,l,m]);const g=b.useCallback(h=>{if(!r&&!n||m.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(y&&v){const w=h.currentTarget,[x,C]=Dv(w);x&&C?!h.shiftKey&&v===C?(h.preventDefault(),r&&wn(x,{select:!0})):h.shiftKey&&v===x&&(h.preventDefault(),r&&wn(C,{select:!0})):v===w&&h.preventDefault()}},[r,n,m.paused]);return c.jsx(Be.div,{tabIndex:-1,...i,ref:p,onKeyDown:g})});zs.displayName=Mv;function Lv(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(wn(n,{select:t}),document.activeElement!==r)return}function Dv(e){const t=ru(e),r=nu(t,e),n=nu(t.reverse(),e);return[r,n]}function ru(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function nu(e,t){for(const r of e)if(!Bv(r,{upTo:t}))return r}function Bv(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 $v(e){return e instanceof HTMLInputElement&&"select"in e}function wn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&$v(e)&&t&&e.select()}}var ou=jv();function jv(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=su(e,t),e.unshift(t)},remove(t){e=su(e,t),e[0]?.resume()}}}function su(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function zv(e){return e.filter(t=>t.tagName!=="A")}var Xt=globalThis?.document?b.useLayoutEffect:()=>{},Uv=b[" useId ".trim().toString()]||(()=>{}),Vv=0;function rn(e){const[t,r]=b.useState(Uv());return Xt(()=>{r(n=>n??String(Vv++))},[e]),e||(t?`radix-${t}`:"")}const Hv=["top","right","bottom","left"],Sn=Math.min,vr=Math.max,Us=Math.round,Vs=Math.floor,Kr=e=>({x:e,y:e}),Wv={left:"right",right:"left",bottom:"top",top:"bottom"};function $a(e,t,r){return vr(e,Sn(t,r))}function nn(e,t){return typeof e=="function"?e(t):e}function on(e){return e.split("-")[0]}function to(e){return e.split("-")[1]}function ja(e){return e==="x"?"y":"x"}function za(e){return e==="y"?"height":"width"}function Yr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ua(e){return ja(Yr(e))}function Rv(e,t,r){r===void 0&&(r=!1);const n=to(e),o=Ua(e),s=za(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Hs(i)),[i,Hs(i)]}function Gv(e){const t=Hs(e);return[Va(e),t,Va(t)]}function Va(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const iu=["left","right"],au=["right","left"],qv=["top","bottom"],Kv=["bottom","top"];function Yv(e,t,r){switch(e){case"top":case"bottom":return r?t?au:iu:t?iu:au;case"left":case"right":return t?qv:Kv;default:return[]}}function Xv(e,t,r,n){const o=to(e);let s=Yv(on(e),r==="start",n);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Va)))),s}function Hs(e){const t=on(e);return Wv[t]+e.slice(t.length)}function Jv(e){return{top:0,right:0,bottom:0,left:0,...e}}function lu(e){return typeof e!="number"?Jv(e):{top:e,right:e,bottom:e,left:e}}function Ws(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function cu(e,t,r){let{reference:n,floating:o}=e;const s=Yr(t),i=Ua(t),a=za(i),d=on(t),u=s==="y",l=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,p=n[a]/2-o[a]/2;let m;switch(d){case"top":m={x:l,y:n.y-o.height};break;case"bottom":m={x:l,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:f};break;case"left":m={x:n.x-o.width,y:f};break;default:m={x:n.x,y:n.y}}switch(to(t)){case"start":m[i]-=p*(r&&u?-1:1);break;case"end":m[i]+=p*(r&&u?-1:1);break}return m}async function Qv(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:i,elements:a,strategy:d}=e,{boundary:u="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=nn(t,e),g=lu(m),y=a[p?f==="floating"?"reference":"floating":f],v=Ws(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(y)))==null||r?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:l,strategy:d})),w=f==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},O=Ws(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:x,strategy:d}):w);return{top:(v.top-O.top+g.top)/C.y,bottom:(O.bottom-v.bottom+g.bottom)/C.y,left:(v.left-O.left+g.left)/C.x,right:(O.right-v.right+g.right)/C.x}}const Zv=50,ew=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:i}=r,a=i.detectOverflow?i:{...i,detectOverflow:Qv},d=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:f}=cu(u,n,d),p=n,m=0;const g={};for(let h=0;h<s.length;h++){const y=s[h];if(!y)continue;const{name:v,fn:w}=y,{x,y:C,data:O,reset:E}=await w({x:l,y:f,initialPlacement:n,placement:p,strategy:o,middlewareData:g,rects:u,platform:a,elements:{reference:e,floating:t}});l=x??l,f=C??f,g[v]={...g[v],...O},E&&m<Zv&&(m++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(u=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:l,y:f}=cu(u,p,d)),h=-1)}return{x:l,y:f,placement:p,strategy:o,middlewareData:g}},tw=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:i,elements:a,middlewareData:d}=t,{element:u,padding:l=0}=nn(e,t)||{};if(u==null)return{};const f=lu(l),p={x:r,y:n},m=Ua(o),g=za(m),h=await i.getDimensions(u),y=m==="y",v=y?"top":"left",w=y?"bottom":"right",x=y?"clientHeight":"clientWidth",C=s.reference[g]+s.reference[m]-p[m]-s.floating[g],O=p[m]-s.reference[m],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let _=E?E[x]:0;(!_||!await(i.isElement==null?void 0:i.isElement(E)))&&(_=a.floating[x]||s.floating[g]);const T=C/2-O/2,A=_/2-h[g]/2-1,P=Sn(f[v],A),k=Sn(f[w],A),U=P,R=_-h[g]-k,L=_/2-h[g]/2+T,q=$a(U,L,R),M=!d.arrow&&to(o)!=null&&L!==q&&s.reference[g]/2-(L<U?P:k)-h[g]/2<0,j=M?L<U?L-U:L-R:0;return{[m]:p[m]+j,data:{[m]:q,centerOffset:L-q-j,...M&&{alignmentOffset:j}},reset:M}}}),rw=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:d,elements:u}=t,{mainAxis:l=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...y}=nn(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const v=on(o),w=Yr(a),x=on(a)===a,C=await(d.isRTL==null?void 0:d.isRTL(u.floating)),O=p||(x||!h?[Hs(a)]:Gv(a)),E=g!=="none";!p&&E&&O.push(...Xv(a,h,g,C));const _=[a,...O],T=await d.detectOverflow(t,y),A=[];let P=((n=s.flip)==null?void 0:n.overflows)||[];if(l&&A.push(T[v]),f){const L=Rv(o,i,C);A.push(T[L[0]],T[L[1]])}if(P=[...P,{placement:o,overflows:A}],!A.every(L=>L<=0)){var k,U;const L=(((k=s.flip)==null?void 0:k.index)||0)+1,q=_[L];if(q&&(!(f==="alignment"?w!==Yr(q):!1)||P.every(B=>Yr(B.placement)===w?B.overflows[0]>0:!0)))return{data:{index:L,overflows:P},reset:{placement:q}};let M=(U=P.filter(j=>j.overflows[0]<=0).sort((j,B)=>j.overflows[1]-B.overflows[1])[0])==null?void 0:U.placement;if(!M)switch(m){case"bestFit":{var R;const j=(R=P.filter(B=>{if(E){const G=Yr(B.placement);return G===w||G==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(G=>G>0).reduce((G,D)=>G+D,0)]).sort((B,G)=>B[1]-G[1])[0])==null?void 0:R[0];j&&(M=j);break}case"initialPlacement":M=a;break}if(o!==M)return{reset:{placement:M}}}return{}}}};function du(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function uu(e){return Hv.some(t=>e[t]>=0)}const nw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:o="referenceHidden",...s}=nn(e,t);switch(o){case"referenceHidden":{const i=await n.detectOverflow(t,{...s,elementContext:"reference"}),a=du(i,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:uu(a)}}}case"escaped":{const i=await n.detectOverflow(t,{...s,altBoundary:!0}),a=du(i,r.floating);return{data:{escapedOffsets:a,escaped:uu(a)}}}default:return{}}}}},fu=new Set(["left","top"]);async function ow(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=on(r),a=to(r),d=Yr(r)==="y",u=fu.has(i)?-1:1,l=s&&d?-1:1,f=nn(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof g=="number"&&(m=a==="end"?g*-1:g),d?{x:m*l,y:p*u}:{x:p*u,y:m*l}}const sw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:i,middlewareData:a}=t,d=await ow(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+d.x,y:s+d.y,data:{...d,placement:i}}}}},iw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:d={fn:v=>{let{x:w,y:x}=v;return{x:w,y:x}}},...u}=nn(e,t),l={x:r,y:n},f=await s.detectOverflow(t,u),p=Yr(on(o)),m=ja(p);let g=l[m],h=l[p];if(i){const v=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=g+f[v],C=g-f[w];g=$a(x,g,C)}if(a){const v=p==="y"?"top":"left",w=p==="y"?"bottom":"right",x=h+f[v],C=h-f[w];h=$a(x,h,C)}const y=d.fn({...t,[m]:g,[p]:h});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[m]:i,[p]:a}}}}}},aw=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:d=!0,crossAxis:u=!0}=nn(e,t),l={x:r,y:n},f=Yr(o),p=ja(f);let m=l[p],g=l[f];const h=nn(a,t),y=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(d){const x=p==="y"?"height":"width",C=s.reference[p]-s.floating[x]+y.mainAxis,O=s.reference[p]+s.reference[x]-y.mainAxis;m<C?m=C:m>O&&(m=O)}if(u){var v,w;const x=p==="y"?"width":"height",C=fu.has(on(o)),O=s.reference[f]-s.floating[x]+(C&&((v=i.offset)==null?void 0:v[f])||0)+(C?0:y.crossAxis),E=s.reference[f]+s.reference[x]+(C?0:((w=i.offset)==null?void 0:w[f])||0)-(C?y.crossAxis:0);g<O?g=O:g>E&&(g=E)}return{[p]:m,[f]:g}}}},lw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:d=()=>{},...u}=nn(e,t),l=await i.detectOverflow(t,u),f=on(o),p=to(o),m=Yr(o)==="y",{width:g,height:h}=s.floating;let y,v;f==="top"||f==="bottom"?(y=f,v=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(v=f,y=p==="end"?"top":"bottom");const w=h-l.top-l.bottom,x=g-l.left-l.right,C=Sn(h-l[y],w),O=Sn(g-l[v],x),E=!t.middlewareData.shift;let _=C,T=O;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(T=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(_=w),E&&!p){const P=vr(l.left,0),k=vr(l.right,0),U=vr(l.top,0),R=vr(l.bottom,0);m?T=g-2*(P!==0||k!==0?P+k:vr(l.left,l.right)):_=h-2*(U!==0||R!==0?U+R:vr(l.top,l.bottom))}await d({...t,availableWidth:T,availableHeight:_});const A=await i.getDimensions(a.floating);return g!==A.width||h!==A.height?{reset:{rects:!0}}:{}}}};function Rs(){return typeof window<"u"}function ro(e){return pu(e)?(e.nodeName||"").toLowerCase():"#document"}function wr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xr(e){var t;return(t=(pu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pu(e){return Rs()?e instanceof Node||e instanceof wr(e).Node:!1}function jr(e){return Rs()?e instanceof Element||e instanceof wr(e).Element:!1}function sn(e){return Rs()?e instanceof HTMLElement||e instanceof wr(e).HTMLElement:!1}function mu(e){return!Rs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof wr(e).ShadowRoot}function Go(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=zr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&o!=="inline"&&o!=="contents"}function cw(e){return/^(table|td|th)$/.test(ro(e))}function Gs(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const dw=/transform|translate|scale|rotate|perspective|filter/,uw=/paint|layout|strict|content/,Ln=e=>!!e&&e!=="none";let Ha;function Wa(e){const t=jr(e)?zr(e):e;return Ln(t.transform)||Ln(t.translate)||Ln(t.scale)||Ln(t.rotate)||Ln(t.perspective)||!Ra()&&(Ln(t.backdropFilter)||Ln(t.filter))||dw.test(t.willChange||"")||uw.test(t.contain||"")}function fw(e){let t=xn(e);for(;sn(t)&&!no(t);){if(Wa(t))return t;if(Gs(t))return null;t=xn(t)}return null}function Ra(){return Ha==null&&(Ha=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ha}function no(e){return/^(html|body|#document)$/.test(ro(e))}function zr(e){return wr(e).getComputedStyle(e)}function qs(e){return jr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xn(e){if(ro(e)==="html")return e;const t=e.assignedSlot||e.parentNode||mu(e)&&e.host||Xr(e);return mu(t)?t.host:t}function hu(e){const t=xn(e);return no(t)?e.ownerDocument?e.ownerDocument.body:e.body:sn(t)&&Go(t)?t:hu(t)}function qo(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=hu(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),i=wr(o);if(s){const a=Ga(i);return t.concat(i,i.visualViewport||[],Go(o)?o:[],a&&r?qo(a):[])}else return t.concat(o,qo(o,[],r))}function Ga(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gu(e){const t=zr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=sn(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:n,a=Us(r)!==s||Us(n)!==i;return a&&(r=s,n=i),{width:r,height:n,$:a}}function qa(e){return jr(e)?e:e.contextElement}function oo(e){const t=qa(e);if(!sn(t))return Kr(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=gu(t);let i=(s?Us(r.width):r.width)/n,a=(s?Us(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const pw=Kr(0);function yu(e){const t=wr(e);return!Ra()||!t.visualViewport?pw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mw(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==wr(e)?!1:t}function Dn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=qa(e);let i=Kr(1);t&&(n?jr(n)&&(i=oo(n)):i=oo(e));const a=mw(s,r,n)?yu(s):Kr(0);let d=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,l=o.width/i.x,f=o.height/i.y;if(s){const p=wr(s),m=n&&jr(n)?wr(n):n;let g=p,h=Ga(g);for(;h&&n&&m!==g;){const y=oo(h),v=h.getBoundingClientRect(),w=zr(h),x=v.left+(h.clientLeft+parseFloat(w.paddingLeft))*y.x,C=v.top+(h.clientTop+parseFloat(w.paddingTop))*y.y;d*=y.x,u*=y.y,l*=y.x,f*=y.y,d+=x,u+=C,g=wr(h),h=Ga(g)}}return Ws({width:l,height:f,x:d,y:u})}function Ks(e,t){const r=qs(e).scrollLeft;return t?t.left+r:Dn(Xr(e)).left+r}function bu(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Ks(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function hw(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",i=Xr(n),a=t?Gs(t.floating):!1;if(n===i||a&&s)return r;let d={scrollLeft:0,scrollTop:0},u=Kr(1);const l=Kr(0),f=sn(n);if((f||!f&&!s)&&((ro(n)!=="body"||Go(i))&&(d=qs(n)),f)){const m=Dn(n);u=oo(n),l.x=m.x+n.clientLeft,l.y=m.y+n.clientTop}const p=i&&!f&&!s?bu(i,d):Kr(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-d.scrollLeft*u.x+l.x+p.x,y:r.y*u.y-d.scrollTop*u.y+l.y+p.y}}function gw(e){return Array.from(e.getClientRects())}function yw(e){const t=Xr(e),r=qs(e),n=e.ownerDocument.body,o=vr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=vr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Ks(e);const a=-r.scrollTop;return zr(n).direction==="rtl"&&(i+=vr(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:i,y:a}}const vu=25;function bw(e,t){const r=wr(e),n=Xr(e),o=r.visualViewport;let s=n.clientWidth,i=n.clientHeight,a=0,d=0;if(o){s=o.width,i=o.height;const l=Ra();(!l||l&&t==="fixed")&&(a=o.offsetLeft,d=o.offsetTop)}const u=Ks(n);if(u<=0){const l=n.ownerDocument,f=l.body,p=getComputedStyle(f),m=l.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(n.clientWidth-f.clientWidth-m);g<=vu&&(s-=g)}else u<=vu&&(s+=u);return{width:s,height:i,x:a,y:d}}function vw(e,t){const r=Dn(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=sn(e)?oo(e):Kr(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,d=o*s.x,u=n*s.y;return{width:i,height:a,x:d,y:u}}function wu(e,t,r){let n;if(t==="viewport")n=bw(e,r);else if(t==="document")n=yw(Xr(e));else if(jr(t))n=vw(t,r);else{const o=yu(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ws(n)}function Su(e,t){const r=xn(e);return r===t||!jr(r)||no(r)?!1:zr(r).position==="fixed"||Su(r,t)}function ww(e,t){const r=t.get(e);if(r)return r;let n=qo(e,[],!1).filter(a=>jr(a)&&ro(a)!=="body"),o=null;const s=zr(e).position==="fixed";let i=s?xn(e):e;for(;jr(i)&&!no(i);){const a=zr(i),d=Wa(i);!d&&a.position==="fixed"&&(o=null),(s?!d&&!o:!d&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Go(i)&&!d&&Su(e,i))?n=n.filter(l=>l!==i):o=a,i=xn(i)}return t.set(e,n),n}function Sw(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?Gs(t)?[]:ww(t,this._c):[].concat(r),n],a=wu(t,i[0],o);let d=a.top,u=a.right,l=a.bottom,f=a.left;for(let p=1;p<i.length;p++){const m=wu(t,i[p],o);d=vr(m.top,d),u=Sn(m.right,u),l=Sn(m.bottom,l),f=vr(m.left,f)}return{width:u-f,height:l-d,x:f,y:d}}function xw(e){const{width:t,height:r}=gu(e);return{width:t,height:r}}function Aw(e,t,r){const n=sn(t),o=Xr(t),s=r==="fixed",i=Dn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const d=Kr(0);function u(){d.x=Ks(o)}if(n||!n&&!s)if((ro(t)!=="body"||Go(o))&&(a=qs(t)),n){const m=Dn(t,!0,s,t);d.x=m.x+t.clientLeft,d.y=m.y+t.clientTop}else o&&u();s&&!n&&o&&u();const l=o&&!n&&!s?bu(o,a):Kr(0),f=i.left+a.scrollLeft-d.x-l.x,p=i.top+a.scrollTop-d.y-l.y;return{x:f,y:p,width:i.width,height:i.height}}function Ka(e){return zr(e).position==="static"}function xu(e,t){if(!sn(e)||zr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Xr(e)===r&&(r=r.ownerDocument.body),r}function Au(e,t){const r=wr(e);if(Gs(e))return r;if(!sn(e)){let o=xn(e);for(;o&&!no(o);){if(jr(o)&&!Ka(o))return o;o=xn(o)}return r}let n=xu(e,t);for(;n&&cw(n)&&Ka(n);)n=xu(n,t);return n&&no(n)&&Ka(n)&&!Wa(n)?r:n||fw(e)||r}const Cw=async function(e){const t=this.getOffsetParent||Au,r=this.getDimensions,n=await r(e.floating);return{reference:Aw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Ew(e){return zr(e).direction==="rtl"}const Nw={convertOffsetParentRelativeRectToViewportRelativeRect:hw,getDocumentElement:Xr,getClippingRect:Sw,getOffsetParent:Au,getElementRects:Cw,getClientRects:gw,getDimensions:xw,getScale:oo,isElement:jr,isRTL:Ew};function Cu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Tw(e,t){let r=null,n;const o=Xr(e);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,d){a===void 0&&(a=!1),d===void 0&&(d=1),s();const u=e.getBoundingClientRect(),{left:l,top:f,width:p,height:m}=u;if(a||t(),!p||!m)return;const g=Vs(f),h=Vs(o.clientWidth-(l+p)),y=Vs(o.clientHeight-(f+m)),v=Vs(l),x={rootMargin:-g+"px "+-h+"px "+-y+"px "+-v+"px",threshold:vr(0,Sn(1,d))||1};let C=!0;function O(E){const _=E[0].intersectionRatio;if(_!==d){if(!C)return i();_?i(!1,_):n=setTimeout(()=>{i(!1,1e-7)},1e3)}_===1&&!Cu(u,e.getBoundingClientRect())&&i(),C=!1}try{r=new IntersectionObserver(O,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(O,x)}r.observe(e)}return i(!0),s}function _w(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=n,u=qa(e),l=o||s?[...u?qo(u):[],...t?qo(t):[]]:[];l.forEach(v=>{o&&v.addEventListener("scroll",r,{passive:!0}),s&&v.addEventListener("resize",r)});const f=u&&a?Tw(u,r):null;let p=-1,m=null;i&&(m=new ResizeObserver(v=>{let[w]=v;w&&w.target===u&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),r()}),u&&!d&&m.observe(u),t&&m.observe(t));let g,h=d?Dn(e):null;d&&y();function y(){const v=Dn(e);h&&!Cu(h,v)&&r(),h=v,g=requestAnimationFrame(y)}return r(),()=>{var v;l.forEach(w=>{o&&w.removeEventListener("scroll",r),s&&w.removeEventListener("resize",r)}),f?.(),(v=m)==null||v.disconnect(),m=null,d&&cancelAnimationFrame(g)}}const kw=sw,Fw=iw,Pw=rw,Ow=lw,Iw=nw,Eu=tw,Mw=aw,Lw=(e,t,r)=>{const n=new Map,o={platform:Nw,...r},s={...o.platform,_c:n};return ew(e,t,{...o,platform:s})};var Dw=typeof document<"u",Bw=function(){},Ys=Dw?S.useLayoutEffect:Bw;function Xs(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Xs(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!Xs(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Nu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Tu(e,t){const r=Nu(e);return Math.round(t*r)/r}function Ya(e){const t=b.useRef(e);return Ys(()=>{t.current=e}),t}function $w(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:d,open:u}=e,[l,f]=b.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=b.useState(n);Xs(p,n)||m(n);const[g,h]=b.useState(null),[y,v]=b.useState(null),w=b.useCallback(B=>{B!==E.current&&(E.current=B,h(B))},[]),x=b.useCallback(B=>{B!==_.current&&(_.current=B,v(B))},[]),C=s||g,O=i||y,E=b.useRef(null),_=b.useRef(null),T=b.useRef(l),A=d!=null,P=Ya(d),k=Ya(o),U=Ya(u),R=b.useCallback(()=>{if(!E.current||!_.current)return;const B={placement:t,strategy:r,middleware:p};k.current&&(B.platform=k.current),Lw(E.current,_.current,B).then(G=>{const D={...G,isPositioned:U.current!==!1};L.current&&!Xs(T.current,D)&&(T.current=D,Ss.flushSync(()=>{f(D)}))})},[p,t,r,k,U]);Ys(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(B=>({...B,isPositioned:!1})))},[u]);const L=b.useRef(!1);Ys(()=>(L.current=!0,()=>{L.current=!1}),[]),Ys(()=>{if(C&&(E.current=C),O&&(_.current=O),C&&O){if(P.current)return P.current(C,O,R);R()}},[C,O,R,P,A]);const q=b.useMemo(()=>({reference:E,floating:_,setReference:w,setFloating:x}),[w,x]),M=b.useMemo(()=>({reference:C,floating:O}),[C,O]),j=b.useMemo(()=>{const B={position:r,left:0,top:0};if(!M.floating)return B;const G=Tu(M.floating,l.x),D=Tu(M.floating,l.y);return a?{...B,transform:"translate("+G+"px, "+D+"px)",...Nu(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:G,top:D}},[r,a,M.floating,l.x,l.y]);return b.useMemo(()=>({...l,update:R,refs:q,elements:M,floatingStyles:j}),[l,R,q,M,j])}const jw=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Eu({element:n.current,padding:o}).fn(r):{}:n?Eu({element:n,padding:o}).fn(r):{}}}},zw=(e,t)=>{const r=kw(e);return{name:r.name,fn:r.fn,options:[e,t]}},Uw=(e,t)=>{const r=Fw(e);return{name:r.name,fn:r.fn,options:[e,t]}},Vw=(e,t)=>({fn:Mw(e).fn,options:[e,t]}),Hw=(e,t)=>{const r=Pw(e);return{name:r.name,fn:r.fn,options:[e,t]}},Ww=(e,t)=>{const r=Ow(e);return{name:r.name,fn:r.fn,options:[e,t]}},Rw=(e,t)=>{const r=Iw(e);return{name:r.name,fn:r.fn,options:[e,t]}},Gw=(e,t)=>{const r=jw(e);return{name:r.name,fn:r.fn,options:[e,t]}};var qw="Arrow",_u=b.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...s}=e;return c.jsx(Be.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});_u.displayName=qw;var Kw=_u;function Ko(e){const[t,r]=b.useState(void 0);return Xt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const d=s.borderBoxSize,u=Array.isArray(d)?d[0]:d;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Xa="Popper",[ku,Js]=br(Xa),[Yw,Fu]=ku(Xa),Pu=e=>{const{__scopePopper:t,children:r}=e,[n,o]=b.useState(null);return c.jsx(Yw,{scope:t,anchor:n,onAnchorChange:o,children:r})};Pu.displayName=Xa;var Ou="PopperAnchor",Iu=b.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,s=Fu(Ou,r),i=b.useRef(null),a=Qe(t,i),d=b.useRef(null);return b.useEffect(()=>{const u=d.current;d.current=n?.current||i.current,u!==d.current&&s.onAnchorChange(d.current)}),n?null:c.jsx(Be.div,{...o,ref:a})});Iu.displayName=Ou;var Ja="PopperContent",[Xw,Jw]=ku(Ja),Mu=b.forwardRef((e,t)=>{const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:l=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:g,...h}=e,y=Fu(Ja,r),[v,w]=b.useState(null),x=Qe(t,se=>w(se)),[C,O]=b.useState(null),E=Ko(C),_=E?.width??0,T=E?.height??0,A=n+(s!=="center"?"-"+s:""),P=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},k=Array.isArray(u)?u:[u],U=k.length>0,R={padding:P,boundary:k.filter(Zw),altBoundary:U},{refs:L,floatingStyles:q,placement:M,isPositioned:j,middlewareData:B}=$w({strategy:"fixed",placement:A,whileElementsMounted:(...se)=>_w(...se,{animationFrame:m==="always"}),elements:{reference:y.anchor},middleware:[zw({mainAxis:o+T,alignmentAxis:i}),d&&Uw({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Vw():void 0,...R}),d&&Hw({...R}),Ww({...R,apply:({elements:se,rects:ae,availableWidth:Fe,availableHeight:te})=>{const{width:ee,height:ge}=ae.reference,ce=se.floating.style;ce.setProperty("--radix-popper-available-width",`${Fe}px`),ce.setProperty("--radix-popper-available-height",`${te}px`),ce.setProperty("--radix-popper-anchor-width",`${ee}px`),ce.setProperty("--radix-popper-anchor-height",`${ge}px`)}}),C&&Gw({element:C,padding:a}),eS({arrowWidth:_,arrowHeight:T}),p&&Rw({strategy:"referenceHidden",...R})]}),[G,D]=Bu(M),he=sr(g);Xt(()=>{j&&he?.()},[j,he]);const I=B.arrow?.x,V=B.arrow?.y,Q=B.arrow?.centerOffset!==0,[le,re]=b.useState();return Xt(()=>{v&&re(window.getComputedStyle(v).zIndex)},[v]),c.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:j?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:le,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(Xw,{scope:r,placedSide:G,onArrowChange:O,arrowX:I,arrowY:V,shouldHideArrow:Q,children:c.jsx(Be.div,{"data-side":G,"data-align":D,...h,ref:x,style:{...h.style,animation:j?void 0:"none"}})})})});Mu.displayName=Ja;var Lu="PopperArrow",Qw={top:"bottom",right:"left",bottom:"top",left:"right"},Du=b.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,s=Jw(Lu,n),i=Qw[s.placedSide];return c.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:c.jsx(Kw,{...o,ref:r,style:{...o.style,display:"block"}})})});Du.displayName=Lu;function Zw(e){return e!==null}var eS=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,d=i?0:e.arrowHeight,[u,l]=Bu(r),f={start:"0%",center:"50%",end:"100%"}[l],p=(o.arrow?.x??0)+a/2,m=(o.arrow?.y??0)+d/2;let g="",h="";return u==="bottom"?(g=i?f:`${p}px`,h=`${-d}px`):u==="top"?(g=i?f:`${p}px`,h=`${n.floating.height+d}px`):u==="right"?(g=`${-d}px`,h=i?f:`${m}px`):u==="left"&&(g=`${n.floating.width+d}px`,h=i?f:`${m}px`),{data:{x:g,y:h}}}});function Bu(e){const[t,r="center"]=e.split("-");return[t,r]}var $u=Pu,Qa=Iu,ju=Mu,zu=Du,tS="Portal",Qs=b.forwardRef((e,t)=>{const{container:r,...n}=e,[o,s]=b.useState(!1);Xt(()=>s(!0),[]);const i=r||o&&globalThis?.document?.body;return i?Lc.createPortal(c.jsx(Be.div,{...n,ref:t}),i):null});Qs.displayName=tS;function rS(e){const t=nS(e),r=b.forwardRef((n,o)=>{const{children:s,...i}=n,a=b.Children.toArray(s),d=a.find(sS);if(d){const u=d.props.children,l=a.map(f=>f===d?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return c.jsx(t,{...i,ref:o,children:b.isValidElement(u)?b.cloneElement(u,void 0,l):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function nS(e){const t=b.forwardRef((r,n)=>{const{children:o,...s}=r;if(b.isValidElement(o)){const i=aS(o),a=iS(s,o.props);return o.type!==b.Fragment&&(a.ref=n?Mn(n,i):i),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var oS=Symbol("radix.slottable");function sS(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oS}function iS(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const d=s(...a);return o(...a),d}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function aS(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var lS=b[" useInsertionEffect ".trim().toString()]||Xt;function Jr({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,s,i]=cS({defaultProp:t,onChange:r}),a=e!==void 0,d=a?e:o;{const l=b.useRef(e!==void 0);b.useEffect(()=>{const f=l.current;f!==a&&console.warn(`${n} is changing from ${f?"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.`),l.current=a},[a,n])}const u=b.useCallback(l=>{if(a){const f=dS(l)?l(e):l;f!==e&&i.current?.(f)}else s(l)},[a,e,s,i]);return[d,u]}function cS({defaultProp:e,onChange:t}){const[r,n]=b.useState(e),o=b.useRef(r),s=b.useRef(t);return lS(()=>{s.current=t},[t]),b.useEffect(()=>{o.current!==r&&(s.current?.(r),o.current=r)},[r,o]),[r,n,s]}function dS(e){return typeof e=="function"}function Yo(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Uu=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"}),uS="VisuallyHidden",fS=b.forwardRef((e,t)=>c.jsx(Be.span,{...e,ref:t,style:{...Uu,...e.style}}));fS.displayName=uS;var pS=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},so=new WeakMap,Zs=new WeakMap,ei={},Za=0,Vu=function(e){return e&&(e.host||Vu(e.parentNode))},mS=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Vu(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},hS=function(e,t,r,n){var o=mS(t,Array.isArray(e)?e:[e]);ei[r]||(ei[r]=new WeakMap);var s=ei[r],i=[],a=new Set,d=new Set(o),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};o.forEach(u);var l=function(f){!f||d.has(f)||Array.prototype.forEach.call(f.children,function(p){if(a.has(p))l(p);else try{var m=p.getAttribute(n),g=m!==null&&m!=="false",h=(so.get(p)||0)+1,y=(s.get(p)||0)+1;so.set(p,h),s.set(p,y),i.push(p),h===1&&g&&Zs.set(p,!0),y===1&&p.setAttribute(r,"true"),g||p.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return l(t),a.clear(),Za++,function(){i.forEach(function(f){var p=so.get(f)-1,m=s.get(f)-1;so.set(f,p),s.set(f,m),p||(Zs.has(f)||f.removeAttribute(n),Zs.delete(f)),m||f.removeAttribute(r)}),Za--,Za||(so=new WeakMap,so=new WeakMap,Zs=new WeakMap,ei={})}},el=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=pS(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),hS(n,o,r,"aria-hidden")):function(){return null}},Qr=function(){return Qr=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},Qr.apply(this,arguments)};function Hu(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function gS(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var ti="right-scroll-bar-position",ri="width-before-scroll-bar",yS="with-scroll-bars-hidden",bS="--removed-body-scroll-bar-size";function tl(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function vS(e,t){var r=S.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var wS=typeof window<"u"?b.useLayoutEffect:b.useEffect,Wu=new WeakMap;function SS(e,t){var r=vS(null,function(n){return e.forEach(function(o){return tl(o,n)})});return wS(function(){var n=Wu.get(r);if(n){var o=new Set(n),s=new Set(e),i=r.current;o.forEach(function(a){s.has(a)||tl(a,null)}),s.forEach(function(a){o.has(a)||tl(a,i)})}Wu.set(r,e)},[e]),r}function xS(e){return e}function AS(e,t){t===void 0&&(t=xS);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var i=t(s,n);return r.push(i),function(){r=r.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(n=!0;r.length;){var i=r;r=[],i.forEach(s)}r={push:function(a){return s(a)},filter:function(){return r}}},assignMedium:function(s){n=!0;var i=[];if(r.length){var a=r;r=[],a.forEach(s),i=r}var d=function(){var l=i;i=[],l.forEach(s)},u=function(){return Promise.resolve().then(d)};u(),r={push:function(l){i.push(l),u()},filter:function(l){return i=i.filter(l),r}}}};return o}function CS(e){e===void 0&&(e={});var t=AS(null);return t.options=Qr({async:!0,ssr:!1},e),t}var Ru=function(e){var t=e.sideCar,r=Hu(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return b.createElement(n,Qr({},r))};Ru.isSideCarExport=!0;function ES(e,t){return e.useMedium(t),Ru}var Gu=CS(),rl=function(){},ni=b.forwardRef(function(e,t){var r=b.useRef(null),n=b.useState({onScrollCapture:rl,onWheelCapture:rl,onTouchMoveCapture:rl}),o=n[0],s=n[1],i=e.forwardProps,a=e.children,d=e.className,u=e.removeScrollBar,l=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,g=e.noIsolation,h=e.inert,y=e.allowPinchZoom,v=e.as,w=v===void 0?"div":v,x=e.gapMode,C=Hu(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=p,E=SS([r,t]),_=Qr(Qr({},C),o);return b.createElement(b.Fragment,null,l&&b.createElement(O,{sideCar:Gu,removeScrollBar:u,shards:f,noRelative:m,noIsolation:g,inert:h,setCallbacks:s,allowPinchZoom:!!y,lockRef:r,gapMode:x}),i?b.cloneElement(b.Children.only(a),Qr(Qr({},_),{ref:E})):b.createElement(w,Qr({},_,{className:d,ref:E}),a))});ni.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ni.classNames={fullWidth:ri,zeroRight:ti};var NS=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function TS(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=NS();return t&&e.setAttribute("nonce",t),e}function _S(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function kS(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var FS=function(){var e=0,t=null;return{add:function(r){e==0&&(t=TS())&&(_S(t,r),kS(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},PS=function(){var e=FS();return function(t,r){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},qu=function(){var e=PS(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},OS={left:0,top:0,right:0,gap:0},nl=function(e){return parseInt(e||"",10)||0},IS=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[nl(r),nl(n),nl(o)]},MS=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return OS;var t=IS(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},LS=qu(),io="data-scroll-locked",DS=function(e,t,r,n){var o=e.left,s=e.top,i=e.right,a=e.gap;return r===void 0&&(r="margin"),`
2
2
  .`.concat(yS,` {
3
3
  overflow: hidden `).concat(n,`;
4
4
  padding-right: `).concat(a,"px ").concat(n,`;
@@ -1 +1 @@
1
- {"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../../../../../src/pages/systemAdmin/modules/formbuilder/components/fields/NumberField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,SAAS,EAAyB,MAAM,aAAa,CAAC;AASpE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAmElD,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../../../../../src/pages/systemAdmin/modules/formbuilder/components/fields/NumberField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,SAAS,EAAyB,MAAM,aAAa,CAAC;AASpE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAmFlD,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"uiSectionUtils.d.ts","sourceRoot":"","sources":["../../../../../../src/pages/systemAdmin/modules/formbuilder/utils/uiSectionUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAMhD,eAAO,MAAM,6BAA6B,aAaxC,CAAC;AAEH,wEAAwE;AACxE,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAGnE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAExD;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CAE5E;AAED,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,EAAE,CAM5E;AAED,yDAAyD;AACzD,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CASxF;AAED,wBAAgB,oCAAoC,CAClD,SAAS,EAAE,SAAS,EAAE,EACtB,cAAc,EAAE,SAAS,GACxB,SAAS,EAAE,CASb;AAED,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAe5F;AAED,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAClC,OAAO,CAST;AAED,wBAAgB,sCAAsC,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG;IAC3E,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,EAAE,CAiBF"}
1
+ {"version":3,"file":"uiSectionUtils.d.ts","sourceRoot":"","sources":["../../../../../../src/pages/systemAdmin/modules/formbuilder/utils/uiSectionUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAMhD,eAAO,MAAM,6BAA6B,aAYxC,CAAC;AAEH,wEAAwE;AACxE,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAGnE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAExD;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CAE5E;AAED,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,EAAE,CAM5E;AAED,yDAAyD;AACzD,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CASxF;AAED,wBAAgB,oCAAoC,CAClD,SAAS,EAAE,SAAS,EAAE,EACtB,cAAc,EAAE,SAAS,GACxB,SAAS,EAAE,CASb;AAED,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAe5F;AAED,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAClC,OAAO,CAST;AAED,wBAAgB,sCAAsC,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG;IAC3E,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,EAAE,CAiBF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iq-line-form-builder-renderer",
3
- "version": "1.1.94",
3
+ "version": "1.1.96",
4
4
  "type": "module",
5
5
  "main": "./dist/form-renderer.umd.js",
6
6
  "module": "./dist/form-renderer.es.js",