extended-dynamic-forms 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -6,6 +6,8 @@ export * from './events';
6
6
  export * from './types';
7
7
  export * from './utils';
8
8
  export * from './lib/utils';
9
- export type { FormProps } from '@rjsf/core';
10
- export type { RJSFSchema, UiSchema, WidgetProps, FieldProps, ArrayFieldTemplateProps, ObjectFieldTemplateProps, FieldTemplateProps } from '@rjsf/utils';
9
+ export type { FormProps, IChangeEvent } from '@rjsf/core';
10
+ export type { RJSFSchema, UiSchema, WidgetProps, FieldProps, ArrayFieldTemplateProps, ObjectFieldTemplateProps, FieldTemplateProps, } from '@rjsf/utils';
11
+ export { default as validator } from '@rjsf/validator-ajv8';
12
+ export { generateTheme } from '@rjsf/shadcn';
11
13
  export { ExtendedForm } from './ExtendedForm';
package/dist/index.es.js CHANGED
@@ -4,8 +4,10 @@ var se = (e, t, r) => Tr(e, typeof t != "symbol" ? t + "" : t, r);
4
4
  import * as y from "react";
5
5
  import re, { createContext as Ar, useContext as Mr, forwardRef as Or, createElement as dt, useRef as wt, useMemo as Fr, useEffect as $r } from "react";
6
6
  import "react-dom";
7
- import Vr from "@rjsf/shadcn";
8
- import Ir from "@rjsf/validator-ajv8";
7
+ import Vr from "@rjsf/validator-ajv8";
8
+ import { default as Ho } from "@rjsf/validator-ajv8";
9
+ import Ir from "@rjsf/shadcn";
10
+ import { generateTheme as Go } from "@rjsf/shadcn";
9
11
  var De = { exports: {} }, xe = {};
10
12
  /**
11
13
  * @license React
@@ -4703,12 +4705,12 @@ const _o = {
4703
4705
  ...b
4704
4706
  };
4705
4707
  return /* @__PURE__ */ u.jsx(An, { eventHub: V, formData: r, children: /* @__PURE__ */ u.jsx(
4706
- Vr,
4708
+ Ir,
4707
4709
  {
4708
4710
  schema: e,
4709
4711
  uiSchema: t,
4710
4712
  formData: r,
4711
- validator: Ir,
4713
+ validator: Vr,
4712
4714
  onSubmit: L,
4713
4715
  onChange: Y,
4714
4716
  onError: i,
@@ -4741,8 +4743,10 @@ export {
4741
4743
  $n as customFields,
4742
4744
  Co as customWidgets,
4743
4745
  _o as formDataUtils,
4746
+ Go as generateTheme,
4744
4747
  Po as schemaUtils,
4745
4748
  ue as useFieldEventHandlers,
4746
4749
  Mn as useFormEventHub,
4747
- Do as validationUtils
4750
+ Do as validationUtils,
4751
+ Ho as validator
4748
4752
  };
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(_,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("react"),require("react-dom"),require("@rjsf/shadcn"),require("@rjsf/validator-ajv8")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","@rjsf/shadcn","@rjsf/validator-ajv8"],A):(_=typeof globalThis<"u"?globalThis:_||self,A(_.ExtendedDynamicForms={},_.React,_.ReactDOM,_.RJSFShadcn,_.RJSFValidatorAjv8))})(this,function(_,A,ye,vr,yr){"use strict";var Po=Object.defineProperty;var No=(_,A,ye)=>A in _?Po(_,A,{enumerable:!0,configurable:!0,writable:!0,value:ye}):_[A]=ye;var ue=(_,A,ye)=>No(_,typeof A!="symbol"?A+"":A,ye);function xr(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 y=xr(A);var Fe={exports:{}},xe={};/**
1
+ (function(_,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("react"),require("react-dom"),require("@rjsf/validator-ajv8"),require("@rjsf/shadcn")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","@rjsf/validator-ajv8","@rjsf/shadcn"],A):(_=typeof globalThis<"u"?globalThis:_||self,A(_.ExtendedDynamicForms={},_.React,_.ReactDOM,_.RJSFValidatorAjv8,_.RJSFShadcn))})(this,function(_,A,ye,Je,Qe){"use strict";var Po=Object.defineProperty;var No=(_,A,ye)=>A in _?Po(_,A,{enumerable:!0,configurable:!0,writable:!0,value:ye}):_[A]=ye;var ue=(_,A,ye)=>No(_,typeof A!="symbol"?A+"":A,ye);function xr(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 y=xr(A);var Fe={exports:{}},xe={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Je;function wr(){if(Je)return xe;Je=1;var e=A,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function l(a,c,f){var p,d={},h=null,w=null;f!==void 0&&(h=""+f),c.key!==void 0&&(h=""+c.key),c.ref!==void 0&&(w=c.ref);for(p in c)n.call(c,p)&&!i.hasOwnProperty(p)&&(d[p]=c[p]);if(a&&a.defaultProps)for(p in c=a.defaultProps,c)d[p]===void 0&&(d[p]=c[p]);return{$$typeof:t,type:a,key:h,ref:w,props:d,_owner:s.current}}return xe.Fragment=r,xe.jsx=l,xe.jsxs=l,xe}var we={};/**
9
+ */var Xe;function wr(){if(Xe)return xe;Xe=1;var e=A,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function l(a,c,f){var p,d={},h=null,w=null;f!==void 0&&(h=""+f),c.key!==void 0&&(h=""+c.key),c.ref!==void 0&&(w=c.ref);for(p in c)n.call(c,p)&&!i.hasOwnProperty(p)&&(d[p]=c[p]);if(a&&a.defaultProps)for(p in c=a.defaultProps,c)d[p]===void 0&&(d[p]=c[p]);return{$$typeof:t,type:a,key:h,ref:w,props:d,_owner:s.current}}return xe.Fragment=r,xe.jsx=l,xe.jsxs=l,xe}var we={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,20 +14,20 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Qe;function Cr(){return Qe||(Qe=1,process.env.NODE_ENV!=="production"&&function(){var e=A,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),S=Symbol.iterator,v="@@iterator";function g(o){if(o===null||typeof o!="object")return null;var m=S&&o[S]||o[v];return typeof m=="function"?m:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(o){{for(var m=arguments.length,x=new Array(m>1?m-1:0),R=1;R<m;R++)x[R-1]=arguments[R];E("error",o,x)}}function E(o,m,x){{var R=b.ReactDebugCurrentFrame,F=R.getStackAddendum();F!==""&&(m+="%s",x=x.concat([F]));var O=x.map(function(T){return String(T)});O.unshift("Warning: "+m),Function.prototype.apply.call(console[o],console,O)}}var j=!1,z=!1,B=!1,J=!1,ce=!1,ne;ne=Symbol.for("react.module.reference");function D(o){return!!(typeof o=="string"||typeof o=="function"||o===n||o===i||ce||o===s||o===f||o===p||J||o===w||j||z||B||typeof o=="object"&&o!==null&&(o.$$typeof===h||o.$$typeof===d||o.$$typeof===l||o.$$typeof===a||o.$$typeof===c||o.$$typeof===ne||o.getModuleId!==void 0))}function $(o,m,x){var R=o.displayName;if(R)return R;var F=m.displayName||m.name||"";return F!==""?x+"("+F+")":x}function P(o){return o.displayName||"Context"}function W(o){if(o==null)return null;if(typeof o.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case s:return"StrictMode";case f:return"Suspense";case p:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case a:var m=o;return P(m)+".Consumer";case l:var x=o;return P(x._context)+".Provider";case c:return $(o,o.render,"ForwardRef");case d:var R=o.displayName||null;return R!==null?R:W(o.type)||"Memo";case h:{var F=o,O=F._payload,T=F._init;try{return W(T(O))}catch{return null}}}return null}var H=Object.assign,Q=0,q,X,G,re,Re,Z,tr;function rr(){}rr.__reactDisabledLog=!0;function to(){{if(Q===0){q=console.log,X=console.info,G=console.warn,re=console.error,Re=console.group,Z=console.groupCollapsed,tr=console.groupEnd;var o={configurable:!0,enumerable:!0,value:rr,writable:!0};Object.defineProperties(console,{info:o,log:o,warn:o,error:o,group:o,groupCollapsed:o,groupEnd:o})}Q++}}function ro(){{if(Q--,Q===0){var o={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H({},o,{value:q}),info:H({},o,{value:X}),warn:H({},o,{value:G}),error:H({},o,{value:re}),group:H({},o,{value:Re}),groupCollapsed:H({},o,{value:Z}),groupEnd:H({},o,{value:tr})})}Q<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Le=b.ReactCurrentDispatcher,Be;function Pe(o,m,x){{if(Be===void 0)try{throw Error()}catch(F){var R=F.stack.trim().match(/\n( *(at )?)/);Be=R&&R[1]||""}return`
18
- `+Be+o}}var He=!1,Ne;{var no=typeof WeakMap=="function"?WeakMap:Map;Ne=new no}function nr(o,m){if(!o||He)return"";{var x=Ne.get(o);if(x!==void 0)return x}var R;He=!0;var F=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var O;O=Le.current,Le.current=null,to();try{if(m){var T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[])}catch(K){R=K}Reflect.construct(o,[],T)}else{try{T.call()}catch(K){R=K}o.call(T.prototype)}}else{try{throw Error()}catch(K){R=K}o()}}catch(K){if(K&&R&&typeof K.stack=="string"){for(var N=K.stack.split(`
17
+ */var Ze;function Cr(){return Ze||(Ze=1,process.env.NODE_ENV!=="production"&&function(){var e=A,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),S=Symbol.iterator,v="@@iterator";function g(o){if(o===null||typeof o!="object")return null;var m=S&&o[S]||o[v];return typeof m=="function"?m:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(o){{for(var m=arguments.length,x=new Array(m>1?m-1:0),R=1;R<m;R++)x[R-1]=arguments[R];E("error",o,x)}}function E(o,m,x){{var R=b.ReactDebugCurrentFrame,F=R.getStackAddendum();F!==""&&(m+="%s",x=x.concat([F]));var O=x.map(function(T){return String(T)});O.unshift("Warning: "+m),Function.prototype.apply.call(console[o],console,O)}}var j=!1,z=!1,B=!1,J=!1,ce=!1,ne;ne=Symbol.for("react.module.reference");function D(o){return!!(typeof o=="string"||typeof o=="function"||o===n||o===i||ce||o===s||o===f||o===p||J||o===w||j||z||B||typeof o=="object"&&o!==null&&(o.$$typeof===h||o.$$typeof===d||o.$$typeof===l||o.$$typeof===a||o.$$typeof===c||o.$$typeof===ne||o.getModuleId!==void 0))}function $(o,m,x){var R=o.displayName;if(R)return R;var F=m.displayName||m.name||"";return F!==""?x+"("+F+")":x}function P(o){return o.displayName||"Context"}function W(o){if(o==null)return null;if(typeof o.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case s:return"StrictMode";case f:return"Suspense";case p:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case a:var m=o;return P(m)+".Consumer";case l:var x=o;return P(x._context)+".Provider";case c:return $(o,o.render,"ForwardRef");case d:var R=o.displayName||null;return R!==null?R:W(o.type)||"Memo";case h:{var F=o,O=F._payload,T=F._init;try{return W(T(O))}catch{return null}}}return null}var H=Object.assign,Q=0,q,X,G,re,Re,Z,nr;function or(){}or.__reactDisabledLog=!0;function to(){{if(Q===0){q=console.log,X=console.info,G=console.warn,re=console.error,Re=console.group,Z=console.groupCollapsed,nr=console.groupEnd;var o={configurable:!0,enumerable:!0,value:or,writable:!0};Object.defineProperties(console,{info:o,log:o,warn:o,error:o,group:o,groupCollapsed:o,groupEnd:o})}Q++}}function ro(){{if(Q--,Q===0){var o={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H({},o,{value:q}),info:H({},o,{value:X}),warn:H({},o,{value:G}),error:H({},o,{value:re}),group:H({},o,{value:Re}),groupCollapsed:H({},o,{value:Z}),groupEnd:H({},o,{value:nr})})}Q<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Le=b.ReactCurrentDispatcher,Be;function Pe(o,m,x){{if(Be===void 0)try{throw Error()}catch(F){var R=F.stack.trim().match(/\n( *(at )?)/);Be=R&&R[1]||""}return`
18
+ `+Be+o}}var He=!1,Ne;{var no=typeof WeakMap=="function"?WeakMap:Map;Ne=new no}function sr(o,m){if(!o||He)return"";{var x=Ne.get(o);if(x!==void 0)return x}var R;He=!0;var F=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var O;O=Le.current,Le.current=null,to();try{if(m){var T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[])}catch(K){R=K}Reflect.construct(o,[],T)}else{try{T.call()}catch(K){R=K}o.call(T.prototype)}}else{try{throw Error()}catch(K){R=K}o()}}catch(K){if(K&&R&&typeof K.stack=="string"){for(var N=K.stack.split(`
19
19
  `),U=R.stack.split(`
20
20
  `),V=N.length-1,I=U.length-1;V>=1&&I>=0&&N[V]!==U[I];)I--;for(;V>=1&&I>=0;V--,I--)if(N[V]!==U[I]){if(V!==1||I!==1)do if(V--,I--,I<0||N[V]!==U[I]){var ee=`
21
- `+N[V].replace(" at new "," at ");return o.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",o.displayName)),typeof o=="function"&&Ne.set(o,ee),ee}while(V>=1&&I>=0);break}}}finally{He=!1,Le.current=O,ro(),Error.prepareStackTrace=F}var ve=o?o.displayName||o.name:"",de=ve?Pe(ve):"";return typeof o=="function"&&Ne.set(o,de),de}function oo(o,m,x){return nr(o,!1)}function so(o){var m=o.prototype;return!!(m&&m.isReactComponent)}function Te(o,m,x){if(o==null)return"";if(typeof o=="function")return nr(o,so(o));if(typeof o=="string")return Pe(o);switch(o){case f:return Pe("Suspense");case p:return Pe("SuspenseList")}if(typeof o=="object")switch(o.$$typeof){case c:return oo(o.render);case d:return Te(o.type,m,x);case h:{var R=o,F=R._payload,O=R._init;try{return Te(O(F),m,x)}catch{}}}return""}var je=Object.prototype.hasOwnProperty,or={},sr=b.ReactDebugCurrentFrame;function Ae(o){if(o){var m=o._owner,x=Te(o.type,o._source,m?m.type:null);sr.setExtraStackFrame(x)}else sr.setExtraStackFrame(null)}function io(o,m,x,R,F){{var O=Function.call.bind(je);for(var T in o)if(O(o,T)){var N=void 0;try{if(typeof o[T]!="function"){var U=Error((R||"React class")+": "+x+" type `"+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[T]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw U.name="Invariant Violation",U}N=o[T](m,T,R,x,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(V){N=V}N&&!(N instanceof Error)&&(Ae(F),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",R||"React class",x,T,typeof N),Ae(null)),N instanceof Error&&!(N.message in or)&&(or[N.message]=!0,Ae(F),C("Failed %s type: %s",x,N.message),Ae(null))}}}var ao=Array.isArray;function Ue(o){return ao(o)}function lo(o){{var m=typeof Symbol=="function"&&Symbol.toStringTag,x=m&&o[Symbol.toStringTag]||o.constructor.name||"Object";return x}}function co(o){try{return ir(o),!1}catch{return!0}}function ir(o){return""+o}function ar(o){if(co(o))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",lo(o)),ir(o)}var lr=b.ReactCurrentOwner,uo={key:!0,ref:!0,__self:!0,__source:!0},cr,ur;function fo(o){if(je.call(o,"ref")){var m=Object.getOwnPropertyDescriptor(o,"ref").get;if(m&&m.isReactWarning)return!1}return o.ref!==void 0}function po(o){if(je.call(o,"key")){var m=Object.getOwnPropertyDescriptor(o,"key").get;if(m&&m.isReactWarning)return!1}return o.key!==void 0}function mo(o,m){typeof o.ref=="string"&&lr.current}function ho(o,m){{var x=function(){cr||(cr=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",m))};x.isReactWarning=!0,Object.defineProperty(o,"key",{get:x,configurable:!0})}}function go(o,m){{var x=function(){ur||(ur=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",m))};x.isReactWarning=!0,Object.defineProperty(o,"ref",{get:x,configurable:!0})}}var bo=function(o,m,x,R,F,O,T){var N={$$typeof:t,type:o,key:m,ref:x,props:T,_owner:O};return N._store={},Object.defineProperty(N._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(N,"_self",{configurable:!1,enumerable:!1,writable:!1,value:R}),Object.defineProperty(N,"_source",{configurable:!1,enumerable:!1,writable:!1,value:F}),Object.freeze&&(Object.freeze(N.props),Object.freeze(N)),N};function vo(o,m,x,R,F){{var O,T={},N=null,U=null;x!==void 0&&(ar(x),N=""+x),po(m)&&(ar(m.key),N=""+m.key),fo(m)&&(U=m.ref,mo(m,F));for(O in m)je.call(m,O)&&!uo.hasOwnProperty(O)&&(T[O]=m[O]);if(o&&o.defaultProps){var V=o.defaultProps;for(O in V)T[O]===void 0&&(T[O]=V[O])}if(N||U){var I=typeof o=="function"?o.displayName||o.name||"Unknown":o;N&&ho(T,I),U&&go(T,I)}return bo(o,N,U,F,R,lr.current,T)}}var Ge=b.ReactCurrentOwner,dr=b.ReactDebugCurrentFrame;function be(o){if(o){var m=o._owner,x=Te(o.type,o._source,m?m.type:null);dr.setExtraStackFrame(x)}else dr.setExtraStackFrame(null)}var Ke;Ke=!1;function Ye(o){return typeof o=="object"&&o!==null&&o.$$typeof===t}function fr(){{if(Ge.current){var o=W(Ge.current.type);if(o)return`
21
+ `+N[V].replace(" at new "," at ");return o.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",o.displayName)),typeof o=="function"&&Ne.set(o,ee),ee}while(V>=1&&I>=0);break}}}finally{He=!1,Le.current=O,ro(),Error.prepareStackTrace=F}var ve=o?o.displayName||o.name:"",de=ve?Pe(ve):"";return typeof o=="function"&&Ne.set(o,de),de}function oo(o,m,x){return sr(o,!1)}function so(o){var m=o.prototype;return!!(m&&m.isReactComponent)}function Te(o,m,x){if(o==null)return"";if(typeof o=="function")return sr(o,so(o));if(typeof o=="string")return Pe(o);switch(o){case f:return Pe("Suspense");case p:return Pe("SuspenseList")}if(typeof o=="object")switch(o.$$typeof){case c:return oo(o.render);case d:return Te(o.type,m,x);case h:{var R=o,F=R._payload,O=R._init;try{return Te(O(F),m,x)}catch{}}}return""}var je=Object.prototype.hasOwnProperty,ir={},ar=b.ReactDebugCurrentFrame;function Ae(o){if(o){var m=o._owner,x=Te(o.type,o._source,m?m.type:null);ar.setExtraStackFrame(x)}else ar.setExtraStackFrame(null)}function io(o,m,x,R,F){{var O=Function.call.bind(je);for(var T in o)if(O(o,T)){var N=void 0;try{if(typeof o[T]!="function"){var U=Error((R||"React class")+": "+x+" type `"+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[T]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw U.name="Invariant Violation",U}N=o[T](m,T,R,x,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(V){N=V}N&&!(N instanceof Error)&&(Ae(F),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",R||"React class",x,T,typeof N),Ae(null)),N instanceof Error&&!(N.message in ir)&&(ir[N.message]=!0,Ae(F),C("Failed %s type: %s",x,N.message),Ae(null))}}}var ao=Array.isArray;function Ue(o){return ao(o)}function lo(o){{var m=typeof Symbol=="function"&&Symbol.toStringTag,x=m&&o[Symbol.toStringTag]||o.constructor.name||"Object";return x}}function co(o){try{return lr(o),!1}catch{return!0}}function lr(o){return""+o}function cr(o){if(co(o))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",lo(o)),lr(o)}var ur=b.ReactCurrentOwner,uo={key:!0,ref:!0,__self:!0,__source:!0},dr,fr;function fo(o){if(je.call(o,"ref")){var m=Object.getOwnPropertyDescriptor(o,"ref").get;if(m&&m.isReactWarning)return!1}return o.ref!==void 0}function po(o){if(je.call(o,"key")){var m=Object.getOwnPropertyDescriptor(o,"key").get;if(m&&m.isReactWarning)return!1}return o.key!==void 0}function mo(o,m){typeof o.ref=="string"&&ur.current}function ho(o,m){{var x=function(){dr||(dr=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",m))};x.isReactWarning=!0,Object.defineProperty(o,"key",{get:x,configurable:!0})}}function go(o,m){{var x=function(){fr||(fr=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",m))};x.isReactWarning=!0,Object.defineProperty(o,"ref",{get:x,configurable:!0})}}var bo=function(o,m,x,R,F,O,T){var N={$$typeof:t,type:o,key:m,ref:x,props:T,_owner:O};return N._store={},Object.defineProperty(N._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(N,"_self",{configurable:!1,enumerable:!1,writable:!1,value:R}),Object.defineProperty(N,"_source",{configurable:!1,enumerable:!1,writable:!1,value:F}),Object.freeze&&(Object.freeze(N.props),Object.freeze(N)),N};function vo(o,m,x,R,F){{var O,T={},N=null,U=null;x!==void 0&&(cr(x),N=""+x),po(m)&&(cr(m.key),N=""+m.key),fo(m)&&(U=m.ref,mo(m,F));for(O in m)je.call(m,O)&&!uo.hasOwnProperty(O)&&(T[O]=m[O]);if(o&&o.defaultProps){var V=o.defaultProps;for(O in V)T[O]===void 0&&(T[O]=V[O])}if(N||U){var I=typeof o=="function"?o.displayName||o.name||"Unknown":o;N&&ho(T,I),U&&go(T,I)}return bo(o,N,U,F,R,ur.current,T)}}var Ge=b.ReactCurrentOwner,pr=b.ReactDebugCurrentFrame;function be(o){if(o){var m=o._owner,x=Te(o.type,o._source,m?m.type:null);pr.setExtraStackFrame(x)}else pr.setExtraStackFrame(null)}var Ke;Ke=!1;function Ye(o){return typeof o=="object"&&o!==null&&o.$$typeof===t}function mr(){{if(Ge.current){var o=W(Ge.current.type);if(o)return`
22
22
 
23
- Check the render method of \``+o+"`."}return""}}function yo(o){return""}var pr={};function xo(o){{var m=fr();if(!m){var x=typeof o=="string"?o:o.displayName||o.name;x&&(m=`
23
+ Check the render method of \``+o+"`."}return""}}function yo(o){return""}var hr={};function xo(o){{var m=mr();if(!m){var x=typeof o=="string"?o:o.displayName||o.name;x&&(m=`
24
24
 
25
- Check the top-level render call using <`+x+">.")}return m}}function mr(o,m){{if(!o._store||o._store.validated||o.key!=null)return;o._store.validated=!0;var x=xo(m);if(pr[x])return;pr[x]=!0;var R="";o&&o._owner&&o._owner!==Ge.current&&(R=" It was passed a child from "+W(o._owner.type)+"."),be(o),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',x,R),be(null)}}function hr(o,m){{if(typeof o!="object")return;if(Ue(o))for(var x=0;x<o.length;x++){var R=o[x];Ye(R)&&mr(R,m)}else if(Ye(o))o._store&&(o._store.validated=!0);else if(o){var F=g(o);if(typeof F=="function"&&F!==o.entries)for(var O=F.call(o),T;!(T=O.next()).done;)Ye(T.value)&&mr(T.value,m)}}}function wo(o){{var m=o.type;if(m==null||typeof m=="string")return;var x;if(typeof m=="function")x=m.propTypes;else if(typeof m=="object"&&(m.$$typeof===c||m.$$typeof===d))x=m.propTypes;else return;if(x){var R=W(m);io(x,o.props,"prop",R,o)}else if(m.PropTypes!==void 0&&!Ke){Ke=!0;var F=W(m);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",F||"Unknown")}typeof m.getDefaultProps=="function"&&!m.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Co(o){{for(var m=Object.keys(o.props),x=0;x<m.length;x++){var R=m[x];if(R!=="children"&&R!=="key"){be(o),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",R),be(null);break}}o.ref!==null&&(be(o),C("Invalid attribute `ref` supplied to `React.Fragment`."),be(null))}}var gr={};function br(o,m,x,R,F,O){{var T=D(o);if(!T){var N="";(o===void 0||typeof o=="object"&&o!==null&&Object.keys(o).length===0)&&(N+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var U=yo();U?N+=U:N+=fr();var V;o===null?V="null":Ue(o)?V="array":o!==void 0&&o.$$typeof===t?(V="<"+(W(o.type)||"Unknown")+" />",N=" Did you accidentally export a JSX literal instead of a component?"):V=typeof o,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",V,N)}var I=vo(o,m,x,F,O);if(I==null)return I;if(T){var ee=m.children;if(ee!==void 0)if(R)if(Ue(ee)){for(var ve=0;ve<ee.length;ve++)hr(ee[ve],o);Object.freeze&&Object.freeze(ee)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else hr(ee,o)}if(je.call(m,"key")){var de=W(o),K=Object.keys(m).filter(function(_o){return _o!=="key"}),qe=K.length>0?"{key: someKey, "+K.join(": ..., ")+": ...}":"{key: someKey}";if(!gr[de+qe]){var ko=K.length>0?"{"+K.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+x+">.")}return m}}function gr(o,m){{if(!o._store||o._store.validated||o.key!=null)return;o._store.validated=!0;var x=xo(m);if(hr[x])return;hr[x]=!0;var R="";o&&o._owner&&o._owner!==Ge.current&&(R=" It was passed a child from "+W(o._owner.type)+"."),be(o),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',x,R),be(null)}}function br(o,m){{if(typeof o!="object")return;if(Ue(o))for(var x=0;x<o.length;x++){var R=o[x];Ye(R)&&gr(R,m)}else if(Ye(o))o._store&&(o._store.validated=!0);else if(o){var F=g(o);if(typeof F=="function"&&F!==o.entries)for(var O=F.call(o),T;!(T=O.next()).done;)Ye(T.value)&&gr(T.value,m)}}}function wo(o){{var m=o.type;if(m==null||typeof m=="string")return;var x;if(typeof m=="function")x=m.propTypes;else if(typeof m=="object"&&(m.$$typeof===c||m.$$typeof===d))x=m.propTypes;else return;if(x){var R=W(m);io(x,o.props,"prop",R,o)}else if(m.PropTypes!==void 0&&!Ke){Ke=!0;var F=W(m);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",F||"Unknown")}typeof m.getDefaultProps=="function"&&!m.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Co(o){{for(var m=Object.keys(o.props),x=0;x<m.length;x++){var R=m[x];if(R!=="children"&&R!=="key"){be(o),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",R),be(null);break}}o.ref!==null&&(be(o),C("Invalid attribute `ref` supplied to `React.Fragment`."),be(null))}}var vr={};function yr(o,m,x,R,F,O){{var T=D(o);if(!T){var N="";(o===void 0||typeof o=="object"&&o!==null&&Object.keys(o).length===0)&&(N+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var U=yo();U?N+=U:N+=mr();var V;o===null?V="null":Ue(o)?V="array":o!==void 0&&o.$$typeof===t?(V="<"+(W(o.type)||"Unknown")+" />",N=" Did you accidentally export a JSX literal instead of a component?"):V=typeof o,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",V,N)}var I=vo(o,m,x,F,O);if(I==null)return I;if(T){var ee=m.children;if(ee!==void 0)if(R)if(Ue(ee)){for(var ve=0;ve<ee.length;ve++)br(ee[ve],o);Object.freeze&&Object.freeze(ee)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else br(ee,o)}if(je.call(m,"key")){var de=W(o),K=Object.keys(m).filter(function(_o){return _o!=="key"}),qe=K.length>0?"{key: someKey, "+K.join(": ..., ")+": ...}":"{key: someKey}";if(!vr[de+qe]){var ko=K.length>0?"{"+K.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,qe,de,ko,de),gr[de+qe]=!0}}return o===n?Co(I):wo(I),I}}function So(o,m,x){return br(o,m,x,!0)}function Ro(o,m,x){return br(o,m,x,!1)}var jo=Ro,Eo=So;we.Fragment=n,we.jsx=jo,we.jsxs=Eo}()),we}process.env.NODE_ENV==="production"?Fe.exports=wr():Fe.exports=Cr();var u=Fe.exports;function Xe(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Xe(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ze(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Xe(e))&&(n&&(n+=" "),n+=t);return n}const Oe="-",Sr=e=>{const t=jr(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:l=>{const a=l.split(Oe);return a[0]===""&&a.length!==1&&a.shift(),et(a,t)||Rr(l)},getConflictingClassGroupIds:(l,a)=>{const c=r[l]||[];return a&&n[l]?[...c,...n[l]]:c}}},et=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?et(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Oe);return(l=t.validators.find(({validator:a})=>a(i)))==null?void 0:l.classGroupId},tt=/^\[(.+)\]$/,Rr=e=>{if(tt.test(e)){const t=tt.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},jr=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return kr(Object.entries(e.classGroups),r).forEach(([i,l])=>{Me(l,n,i,t)}),n},Me=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:rt(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(Er(s)){Me(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,l])=>{Me(l,rt(t,i),r,n)})})},rt=(e,t)=>{let r=e;return t.split(Oe).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Er=e=>e.isThemeGetter,kr=(e,t)=>t?e.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,a])=>[t+l,a])):i);return[r,s]}):e,_r=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(i,l)=>{r.set(i,l),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let l=r.get(i);if(l!==void 0)return l;if((l=n.get(i))!==void 0)return s(i,l),l},set(i,l){r.has(i)?r.set(i,l):s(i,l)}}},nt="!",Pr=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],i=t.length,l=a=>{const c=[];let f=0,p=0,d;for(let g=0;g<a.length;g++){let b=a[g];if(f===0){if(b===s&&(n||a.slice(g,g+i)===t)){c.push(a.slice(p,g)),p=g+i;continue}if(b==="/"){d=g;continue}}b==="["?f++:b==="]"&&f--}const h=c.length===0?a:a.substring(p),w=h.startsWith(nt),S=w?h.substring(1):h,v=d&&d>p?d-p:void 0;return{modifiers:c,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:v}};return r?a=>r({className:a,parseClassName:l}):l},Nr=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},Tr=e=>({cache:_r(e.cacheSize),parseClassName:Pr(e),...Sr(e)}),Ar=/\s+/,Fr=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,i=[],l=e.trim().split(Ar);let a="";for(let c=l.length-1;c>=0;c-=1){const f=l[c],{modifiers:p,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:w}=r(f);let S=!!w,v=n(S?h.substring(0,w):h);if(!v){if(!S){a=f+(a.length>0?" "+a:a);continue}if(v=n(h),!v){a=f+(a.length>0?" "+a:a);continue}S=!1}const g=Nr(p).join(":"),b=d?g+nt:g,C=b+v;if(i.includes(C))continue;i.push(C);const E=s(v,S);for(let j=0;j<E.length;++j){const z=E[j];i.push(b+z)}a=f+(a.length>0?" "+a:a)}return a};function Or(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=ot(t))&&(n&&(n+=" "),n+=r);return n}const ot=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=ot(e[n]))&&(r&&(r+=" "),r+=t);return r};function Mr(e,...t){let r,n,s,i=l;function l(c){const f=t.reduce((p,d)=>d(p),e());return r=Tr(f),n=r.cache.get,s=r.cache.set,i=a,a(c)}function a(c){const f=n(c);if(f)return f;const p=Fr(c,r);return s(c,p),p}return function(){return i(Or.apply(null,arguments))}}const M=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},st=/^\[(?:([a-z-]+):)?(.+)\]$/i,$r=/^\d+\/\d+$/,Vr=new Set(["px","full","screen"]),Ir=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zr=/\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$/,Dr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Wr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Lr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oe=e=>fe(e)||Vr.has(e)||$r.test(e),se=e=>pe(e,"length",Jr),fe=e=>!!e&&!Number.isNaN(Number(e)),$e=e=>pe(e,"number",fe),Ce=e=>!!e&&Number.isInteger(Number(e)),Br=e=>e.endsWith("%")&&fe(e.slice(0,-1)),k=e=>st.test(e),ie=e=>Ir.test(e),Hr=new Set(["length","size","percentage"]),Ur=e=>pe(e,Hr,it),Gr=e=>pe(e,"position",it),Kr=new Set(["image","url"]),Yr=e=>pe(e,Kr,Xr),qr=e=>pe(e,"",Qr),Se=()=>!0,pe=(e,t,r)=>{const n=st.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Jr=e=>zr.test(e)&&!Dr.test(e),it=()=>!1,Qr=e=>Wr.test(e),Xr=e=>Lr.test(e),Zr=Mr(()=>{const e=M("colors"),t=M("spacing"),r=M("blur"),n=M("brightness"),s=M("borderColor"),i=M("borderRadius"),l=M("borderSpacing"),a=M("borderWidth"),c=M("contrast"),f=M("grayscale"),p=M("hueRotate"),d=M("invert"),h=M("gap"),w=M("gradientColorStops"),S=M("gradientColorStopPositions"),v=M("inset"),g=M("margin"),b=M("opacity"),C=M("padding"),E=M("saturate"),j=M("scale"),z=M("sepia"),B=M("skew"),J=M("space"),ce=M("translate"),ne=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",k,t],P=()=>[k,t],W=()=>["",oe,se],H=()=>["auto",fe,k],Q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],q=()=>["solid","dashed","dotted","double","none"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>["start","end","center","between","around","evenly","stretch"],re=()=>["","0",k],Re=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Z=()=>[fe,k];return{cacheSize:500,separator:":",theme:{colors:[Se],spacing:[oe,se],blur:["none","",ie,k],brightness:Z(),borderColor:[e],borderRadius:["none","","full",ie,k],borderSpacing:P(),borderWidth:W(),contrast:Z(),grayscale:re(),hueRotate:Z(),invert:re(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[Br,se],inset:$(),margin:$(),opacity:Z(),padding:P(),saturate:Z(),scale:Z(),sepia:re(),skew:Z(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",k]}],container:["container"],columns:[{columns:[ie]}],"break-after":[{"break-after":Re()}],"break-before":[{"break-before":Re()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Q(),k]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:ne()}],"overscroll-x":[{"overscroll-x":ne()}],"overscroll-y":[{"overscroll-y":ne()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ce,k]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",k]}],grow:[{grow:re()}],shrink:[{shrink:re()}],order:[{order:["first","last","none",Ce,k]}],"grid-cols":[{"grid-cols":[Se]}],"col-start-end":[{col:["auto",{span:["full",Ce,k]},k]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[Se]}],"row-start-end":[{row:["auto",{span:[Ce,k]},k]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",k]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",k]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...G()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...G(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...G(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[C]}],px:[{px:[C]}],py:[{py:[C]}],ps:[{ps:[C]}],pe:[{pe:[C]}],pt:[{pt:[C]}],pr:[{pr:[C]}],pb:[{pb:[C]}],pl:[{pl:[C]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[J]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[J]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",k,t]}],"min-w":[{"min-w":[k,t,"min","max","fit"]}],"max-w":[{"max-w":[k,t,"none","full","min","max","fit","prose",{screen:[ie]},ie]}],h:[{h:[k,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[k,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[k,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[k,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ie,se]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",$e]}],"font-family":[{font:[Se]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",k]}],"line-clamp":[{"line-clamp":["none",fe,$e]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",oe,k]}],"list-image":[{"list-image":["none",k]}],"list-style-type":[{list:["none","disc","decimal",k]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",oe,se]}],"underline-offset":[{"underline-offset":["auto",oe,k]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",k]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",k]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Q(),Gr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ur]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Yr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...q(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:q()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...q()]}],"outline-offset":[{"outline-offset":[oe,k]}],"outline-w":[{outline:[oe,se]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[oe,se]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ie,qr]}],"shadow-color":[{shadow:[Se]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...X(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":X()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",ie,k]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[d]}],saturate:[{saturate:[E]}],sepia:[{sepia:[z]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",k]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",k]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",k]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[Ce,k]}],"translate-x":[{"translate-x":[ce]}],"translate-y":[{"translate-y":[ce]}],"skew-x":[{"skew-x":[B]}],"skew-y":[{"skew-y":[B]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",k]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",k]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",k]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[oe,se,$e]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function L(...e){return Zr(Ze(e))}const te=y.forwardRef(({className:e,type:t,...r},n)=>u.jsx("input",{type:t,className:L("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...r}));te.displayName="Input";function at(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lt(...e){return t=>{let r=!1;const n=e.map(s=>{const i=at(s,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let s=0;s<n.length;s++){const i=n[s];typeof i=="function"?i():at(e[s],null)}}}}function ae(...e){return y.useCallback(lt(...e),e)}function Ee(e){const t=tn(e),r=y.forwardRef((n,s)=>{const{children:i,...l}=n,a=y.Children.toArray(i),c=a.find(nn);if(c){const f=c.props.children,p=a.map(d=>d===c?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:d);return u.jsx(t,{...l,ref:s,children:y.isValidElement(f)?y.cloneElement(f,void 0,p):null})}return u.jsx(t,{...l,ref:s,children:i})});return r.displayName=`${e}.Slot`,r}var en=Ee("Slot");function tn(e){const t=y.forwardRef((r,n)=>{const{children:s,...i}=r;if(y.isValidElement(s)){const l=sn(s),a=on(i,s.props);return s.type!==y.Fragment&&(a.ref=n?lt(n,l):l),y.cloneElement(s,a)}return y.Children.count(s)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rn=Symbol("radix.slottable");function nn(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rn}function on(e,t){const r={...t};for(const n in t){const s=e[n],i=t[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{const c=i(...a);return s(...a),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...e,...r}}function sn(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var an=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],me=an.reduce((e,t)=>{const r=Ee(`Primitive.${t}`),n=y.forwardRef((s,i)=>{const{asChild:l,...a}=s,c=l?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(c,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),ln="Label",ct=y.forwardRef((e,t)=>u.jsx(me.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));ct.displayName=ln;var ut=ct;const dt=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ft=Ze,Ve=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return ft(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=t,l=Object.keys(s).map(f=>{const p=r==null?void 0:r[f],d=i==null?void 0:i[f];if(p===null)return null;const h=dt(p)||dt(d);return s[f][h]}),a=r&&Object.entries(r).reduce((f,p)=>{let[d,h]=p;return h===void 0||(f[d]=h),f},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((f,p)=>{let{class:d,className:h,...w}=p;return Object.entries(w).every(S=>{let[v,g]=S;return Array.isArray(g)?g.includes({...i,...a}[v]):{...i,...a}[v]===g})?[...f,d,h]:f},[]);return ft(e,l,c,r==null?void 0:r.class,r==null?void 0:r.className)},cn=Ve("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Y=y.forwardRef(({className:e,...t},r)=>u.jsx(ut,{ref:r,className:L(cn(),e),...t}));Y.displayName=ut.displayName;const pt=y.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:L("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));pt.displayName="Card";const mt=y.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:L("flex flex-col space-y-1.5 p-6",e),...t}));mt.displayName="CardHeader";const ht=y.forwardRef(({className:e,...t},r)=>u.jsx("h3",{ref:r,className:L("text-2xl font-semibold leading-none tracking-tight",e),...t}));ht.displayName="CardTitle";const un=y.forwardRef(({className:e,...t},r)=>u.jsx("p",{ref:r,className:L("text-sm text-muted-foreground",e),...t}));un.displayName="CardDescription";const gt=y.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:L("p-6 pt-0",e),...t}));gt.displayName="CardContent";const dn=y.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:L("flex items-center p-6 pt-0",e),...t}));dn.displayName="CardFooter";const bt=({formData:e,onChange:t,required:r,disabled:n,readonly:s,schema:i,idSchema:l})=>{const a=c=>f=>{t({...e,[c]:f.target.value})};return u.jsxs(pt,{children:[u.jsx(mt,{className:"pb-4",children:u.jsx(ht,{className:"text-lg",children:i.title||"Address"})}),u.jsxs(gt,{className:"space-y-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:`${l.$id}_street`,children:["Street Address",r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:`${l.$id}_street`,type:"text",value:(e==null?void 0:e.street)||"",onChange:a("street"),disabled:n||s,placeholder:"123 Main St"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:`${l.$id}_city`,children:["City",r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:`${l.$id}_city`,type:"text",value:(e==null?void 0:e.city)||"",onChange:a("city"),disabled:n||s,placeholder:"New York"})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:`${l.$id}_state`,children:["State/Province",r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:`${l.$id}_state`,type:"text",value:(e==null?void 0:e.state)||"",onChange:a("state"),disabled:n||s,placeholder:"NY"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:`${l.$id}_zip`,children:["ZIP/Postal Code",r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:`${l.$id}_zip`,type:"text",value:(e==null?void 0:e.zip)||"",onChange:a("zip"),disabled:n||s,placeholder:"10001"})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Y,{htmlFor:`${l.$id}_country`,children:"Country"}),u.jsx(te,{id:`${l.$id}_country`,type:"text",value:(e==null?void 0:e.country)||"",onChange:a("country"),disabled:n||s,placeholder:"United States"})]})]})]})},vt=A.createContext(null),yt=({eventHub:e,formData:t,children:r})=>u.jsx(vt.Provider,{value:{eventHub:e,formData:t},children:r}),xt=()=>{const e=A.useContext(vt);if(!e)throw new Error("useFormEventHub must be used within a FormEventProvider");return e},le=(e,t,r)=>{const{eventHub:n,formData:s}=xt();return A.useMemo(()=>n.createFieldEventHandlers(e,t,s,r),[n,e,t,s,r])},wt=({formData:e,onChange:t,required:r,disabled:n,readonly:s,schema:i,idSchema:l})=>{const a=le(l.$id,i),c=p=>{const d=p.replace(/\D/g,""),h=d.length;return h<4?d:h<7?`(${d.slice(0,3)}) ${d.slice(3)}`:`(${d.slice(0,3)}) ${d.slice(3,6)}-${d.slice(6,10)}`},f=async p=>{const d=c(p.target.value);t(d),await a.onChange(d)};return u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:l.$id,children:[i.title||"Phone Number",r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:l.$id,type:"tel",value:e||"",onChange:f,disabled:n||s,placeholder:"(555) 123-4567",maxLength:14})]})},Ct=({formData:e,onChange:t,required:r,disabled:n,readonly:s,schema:i,uiSchema:l,idSchema:a})=>{var S,v;const c=((S=l==null?void 0:l["ui:options"])==null?void 0:S.currency)||"USD",f=((v=l==null?void 0:l["ui:options"])==null?void 0:v.symbol)||"$",p=le(a.$id,i),d=g=>{const b=parseFloat(g.replace(/[^0-9.-]+/g,""));return isNaN(b)?"":b.toFixed(2)},h=async g=>{const b=g.target.value.replace(/[^0-9.-]+/g,""),C=b?parseFloat(b):void 0;t(C),await p.onChange(C)},w=async g=>{const b=d(g.target.value),C=b?parseFloat(b):void 0;t(C),await p.onBlur(C)};return u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:a.$id,children:[i.title||"Amount",r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsxs("div",{className:"relative",children:[u.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:String(f)}),u.jsx(te,{id:a.$id,type:"text",inputMode:"decimal",value:e||"",onChange:h,onBlur:w,disabled:n||s,placeholder:"0.00",className:"pl-8 pr-12"}),u.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:String(c)})]})]})},St={address:bt,phone:wt,currency:Ct},Rt=({id:e,value:t,required:r,disabled:n,readonly:s,label:i,onChange:l,onBlur:a,onFocus:c,schema:f})=>{const p=le(e,f),d=async S=>{const v=S.target.value;l(v),await p.onChange(v)},h=async S=>{const v=S.target.value;a&&a(e,v),await p.onBlur(v)},w=async S=>{const v=S.target.value;c&&c(e,v),await p.onFocus(v)};return u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:e,children:[i||f.title,r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:e,type:"color",value:t||"#000000",required:r,disabled:n||s,onChange:d,onBlur:h,onFocus:w,className:"h-10 w-full cursor-pointer"})]})},jt=({id:e,value:t,required:r,disabled:n,readonly:s,label:i,onChange:l,onBlur:a,onFocus:c,options:f,schema:p})=>{const d=f.inputType||"date",h=le(e,p),w=async g=>{const b=g.target.value;l(b),await h.onChange(b)},S=async g=>{const b=g.target.value;a&&a(e,b),await h.onBlur(b)},v=async g=>{const b=g.target.value;c&&c(e,b),await h.onFocus(b)};return u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:e,children:[i||p.title,r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:e,type:d,value:t||"",required:r,disabled:n||s,onChange:w,onBlur:S,onFocus:v,min:typeof f.minDate=="string"||typeof f.minDate=="number"?f.minDate:void 0,max:typeof f.maxDate=="string"||typeof f.maxDate=="number"?f.maxDate:void 0,className:"w-full"})]})},fn=Ve("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),ke=y.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},i)=>{const l=n?en:"button";return u.jsx(l,{className:L(fn({variant:t,size:r,className:e})),ref:i,...s})});ke.displayName="Button";const pn=Ve("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Et({className:e,variant:t,...r}){return u.jsx("div",{className:L(pn({variant:t}),e),...r})}/**
30
+ <%s key={someKey} {...props} />`,qe,de,ko,de),vr[de+qe]=!0}}return o===n?Co(I):wo(I),I}}function So(o,m,x){return yr(o,m,x,!0)}function Ro(o,m,x){return yr(o,m,x,!1)}var jo=Ro,Eo=So;we.Fragment=n,we.jsx=jo,we.jsxs=Eo}()),we}process.env.NODE_ENV==="production"?Fe.exports=wr():Fe.exports=Cr();var u=Fe.exports;function et(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=et(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function tt(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=et(e))&&(n&&(n+=" "),n+=t);return n}const Oe="-",Sr=e=>{const t=jr(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:l=>{const a=l.split(Oe);return a[0]===""&&a.length!==1&&a.shift(),rt(a,t)||Rr(l)},getConflictingClassGroupIds:(l,a)=>{const c=r[l]||[];return a&&n[l]?[...c,...n[l]]:c}}},rt=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?rt(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Oe);return(l=t.validators.find(({validator:a})=>a(i)))==null?void 0:l.classGroupId},nt=/^\[(.+)\]$/,Rr=e=>{if(nt.test(e)){const t=nt.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},jr=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return kr(Object.entries(e.classGroups),r).forEach(([i,l])=>{Me(l,n,i,t)}),n},Me=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:ot(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(Er(s)){Me(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,l])=>{Me(l,ot(t,i),r,n)})})},ot=(e,t)=>{let r=e;return t.split(Oe).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Er=e=>e.isThemeGetter,kr=(e,t)=>t?e.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,a])=>[t+l,a])):i);return[r,s]}):e,_r=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(i,l)=>{r.set(i,l),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let l=r.get(i);if(l!==void 0)return l;if((l=n.get(i))!==void 0)return s(i,l),l},set(i,l){r.has(i)?r.set(i,l):s(i,l)}}},st="!",Pr=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],i=t.length,l=a=>{const c=[];let f=0,p=0,d;for(let g=0;g<a.length;g++){let b=a[g];if(f===0){if(b===s&&(n||a.slice(g,g+i)===t)){c.push(a.slice(p,g)),p=g+i;continue}if(b==="/"){d=g;continue}}b==="["?f++:b==="]"&&f--}const h=c.length===0?a:a.substring(p),w=h.startsWith(st),S=w?h.substring(1):h,v=d&&d>p?d-p:void 0;return{modifiers:c,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:v}};return r?a=>r({className:a,parseClassName:l}):l},Nr=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},Tr=e=>({cache:_r(e.cacheSize),parseClassName:Pr(e),...Sr(e)}),Ar=/\s+/,Fr=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,i=[],l=e.trim().split(Ar);let a="";for(let c=l.length-1;c>=0;c-=1){const f=l[c],{modifiers:p,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:w}=r(f);let S=!!w,v=n(S?h.substring(0,w):h);if(!v){if(!S){a=f+(a.length>0?" "+a:a);continue}if(v=n(h),!v){a=f+(a.length>0?" "+a:a);continue}S=!1}const g=Nr(p).join(":"),b=d?g+st:g,C=b+v;if(i.includes(C))continue;i.push(C);const E=s(v,S);for(let j=0;j<E.length;++j){const z=E[j];i.push(b+z)}a=f+(a.length>0?" "+a:a)}return a};function Or(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=it(t))&&(n&&(n+=" "),n+=r);return n}const it=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=it(e[n]))&&(r&&(r+=" "),r+=t);return r};function Mr(e,...t){let r,n,s,i=l;function l(c){const f=t.reduce((p,d)=>d(p),e());return r=Tr(f),n=r.cache.get,s=r.cache.set,i=a,a(c)}function a(c){const f=n(c);if(f)return f;const p=Fr(c,r);return s(c,p),p}return function(){return i(Or.apply(null,arguments))}}const M=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},at=/^\[(?:([a-z-]+):)?(.+)\]$/i,$r=/^\d+\/\d+$/,Vr=new Set(["px","full","screen"]),Ir=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zr=/\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$/,Dr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Wr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Lr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oe=e=>fe(e)||Vr.has(e)||$r.test(e),se=e=>pe(e,"length",Jr),fe=e=>!!e&&!Number.isNaN(Number(e)),$e=e=>pe(e,"number",fe),Ce=e=>!!e&&Number.isInteger(Number(e)),Br=e=>e.endsWith("%")&&fe(e.slice(0,-1)),k=e=>at.test(e),ie=e=>Ir.test(e),Hr=new Set(["length","size","percentage"]),Ur=e=>pe(e,Hr,lt),Gr=e=>pe(e,"position",lt),Kr=new Set(["image","url"]),Yr=e=>pe(e,Kr,Xr),qr=e=>pe(e,"",Qr),Se=()=>!0,pe=(e,t,r)=>{const n=at.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Jr=e=>zr.test(e)&&!Dr.test(e),lt=()=>!1,Qr=e=>Wr.test(e),Xr=e=>Lr.test(e),Zr=Mr(()=>{const e=M("colors"),t=M("spacing"),r=M("blur"),n=M("brightness"),s=M("borderColor"),i=M("borderRadius"),l=M("borderSpacing"),a=M("borderWidth"),c=M("contrast"),f=M("grayscale"),p=M("hueRotate"),d=M("invert"),h=M("gap"),w=M("gradientColorStops"),S=M("gradientColorStopPositions"),v=M("inset"),g=M("margin"),b=M("opacity"),C=M("padding"),E=M("saturate"),j=M("scale"),z=M("sepia"),B=M("skew"),J=M("space"),ce=M("translate"),ne=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",k,t],P=()=>[k,t],W=()=>["",oe,se],H=()=>["auto",fe,k],Q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],q=()=>["solid","dashed","dotted","double","none"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>["start","end","center","between","around","evenly","stretch"],re=()=>["","0",k],Re=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Z=()=>[fe,k];return{cacheSize:500,separator:":",theme:{colors:[Se],spacing:[oe,se],blur:["none","",ie,k],brightness:Z(),borderColor:[e],borderRadius:["none","","full",ie,k],borderSpacing:P(),borderWidth:W(),contrast:Z(),grayscale:re(),hueRotate:Z(),invert:re(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[Br,se],inset:$(),margin:$(),opacity:Z(),padding:P(),saturate:Z(),scale:Z(),sepia:re(),skew:Z(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",k]}],container:["container"],columns:[{columns:[ie]}],"break-after":[{"break-after":Re()}],"break-before":[{"break-before":Re()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Q(),k]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:ne()}],"overscroll-x":[{"overscroll-x":ne()}],"overscroll-y":[{"overscroll-y":ne()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ce,k]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",k]}],grow:[{grow:re()}],shrink:[{shrink:re()}],order:[{order:["first","last","none",Ce,k]}],"grid-cols":[{"grid-cols":[Se]}],"col-start-end":[{col:["auto",{span:["full",Ce,k]},k]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[Se]}],"row-start-end":[{row:["auto",{span:[Ce,k]},k]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",k]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",k]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...G()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...G(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...G(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[C]}],px:[{px:[C]}],py:[{py:[C]}],ps:[{ps:[C]}],pe:[{pe:[C]}],pt:[{pt:[C]}],pr:[{pr:[C]}],pb:[{pb:[C]}],pl:[{pl:[C]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[J]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[J]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",k,t]}],"min-w":[{"min-w":[k,t,"min","max","fit"]}],"max-w":[{"max-w":[k,t,"none","full","min","max","fit","prose",{screen:[ie]},ie]}],h:[{h:[k,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[k,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[k,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[k,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ie,se]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",$e]}],"font-family":[{font:[Se]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",k]}],"line-clamp":[{"line-clamp":["none",fe,$e]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",oe,k]}],"list-image":[{"list-image":["none",k]}],"list-style-type":[{list:["none","disc","decimal",k]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",oe,se]}],"underline-offset":[{"underline-offset":["auto",oe,k]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",k]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",k]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Q(),Gr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ur]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Yr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...q(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:q()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...q()]}],"outline-offset":[{"outline-offset":[oe,k]}],"outline-w":[{outline:[oe,se]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[oe,se]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ie,qr]}],"shadow-color":[{shadow:[Se]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...X(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":X()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",ie,k]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[d]}],saturate:[{saturate:[E]}],sepia:[{sepia:[z]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",k]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",k]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",k]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[Ce,k]}],"translate-x":[{"translate-x":[ce]}],"translate-y":[{"translate-y":[ce]}],"skew-x":[{"skew-x":[B]}],"skew-y":[{"skew-y":[B]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",k]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",k]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",k]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[oe,se,$e]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function L(...e){return Zr(tt(e))}const te=y.forwardRef(({className:e,type:t,...r},n)=>u.jsx("input",{type:t,className:L("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...r}));te.displayName="Input";function ct(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ut(...e){return t=>{let r=!1;const n=e.map(s=>{const i=ct(s,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let s=0;s<n.length;s++){const i=n[s];typeof i=="function"?i():ct(e[s],null)}}}}function ae(...e){return y.useCallback(ut(...e),e)}function Ee(e){const t=tn(e),r=y.forwardRef((n,s)=>{const{children:i,...l}=n,a=y.Children.toArray(i),c=a.find(nn);if(c){const f=c.props.children,p=a.map(d=>d===c?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:d);return u.jsx(t,{...l,ref:s,children:y.isValidElement(f)?y.cloneElement(f,void 0,p):null})}return u.jsx(t,{...l,ref:s,children:i})});return r.displayName=`${e}.Slot`,r}var en=Ee("Slot");function tn(e){const t=y.forwardRef((r,n)=>{const{children:s,...i}=r;if(y.isValidElement(s)){const l=sn(s),a=on(i,s.props);return s.type!==y.Fragment&&(a.ref=n?ut(n,l):l),y.cloneElement(s,a)}return y.Children.count(s)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rn=Symbol("radix.slottable");function nn(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rn}function on(e,t){const r={...t};for(const n in t){const s=e[n],i=t[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{const c=i(...a);return s(...a),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...e,...r}}function sn(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var an=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],me=an.reduce((e,t)=>{const r=Ee(`Primitive.${t}`),n=y.forwardRef((s,i)=>{const{asChild:l,...a}=s,c=l?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(c,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),ln="Label",dt=y.forwardRef((e,t)=>u.jsx(me.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));dt.displayName=ln;var ft=dt;const pt=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,mt=tt,Ve=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return mt(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=t,l=Object.keys(s).map(f=>{const p=r==null?void 0:r[f],d=i==null?void 0:i[f];if(p===null)return null;const h=pt(p)||pt(d);return s[f][h]}),a=r&&Object.entries(r).reduce((f,p)=>{let[d,h]=p;return h===void 0||(f[d]=h),f},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((f,p)=>{let{class:d,className:h,...w}=p;return Object.entries(w).every(S=>{let[v,g]=S;return Array.isArray(g)?g.includes({...i,...a}[v]):{...i,...a}[v]===g})?[...f,d,h]:f},[]);return mt(e,l,c,r==null?void 0:r.class,r==null?void 0:r.className)},cn=Ve("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Y=y.forwardRef(({className:e,...t},r)=>u.jsx(ft,{ref:r,className:L(cn(),e),...t}));Y.displayName=ft.displayName;const ht=y.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:L("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));ht.displayName="Card";const gt=y.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:L("flex flex-col space-y-1.5 p-6",e),...t}));gt.displayName="CardHeader";const bt=y.forwardRef(({className:e,...t},r)=>u.jsx("h3",{ref:r,className:L("text-2xl font-semibold leading-none tracking-tight",e),...t}));bt.displayName="CardTitle";const un=y.forwardRef(({className:e,...t},r)=>u.jsx("p",{ref:r,className:L("text-sm text-muted-foreground",e),...t}));un.displayName="CardDescription";const vt=y.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:L("p-6 pt-0",e),...t}));vt.displayName="CardContent";const dn=y.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:L("flex items-center p-6 pt-0",e),...t}));dn.displayName="CardFooter";const yt=({formData:e,onChange:t,required:r,disabled:n,readonly:s,schema:i,idSchema:l})=>{const a=c=>f=>{t({...e,[c]:f.target.value})};return u.jsxs(ht,{children:[u.jsx(gt,{className:"pb-4",children:u.jsx(bt,{className:"text-lg",children:i.title||"Address"})}),u.jsxs(vt,{className:"space-y-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:`${l.$id}_street`,children:["Street Address",r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:`${l.$id}_street`,type:"text",value:(e==null?void 0:e.street)||"",onChange:a("street"),disabled:n||s,placeholder:"123 Main St"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:`${l.$id}_city`,children:["City",r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:`${l.$id}_city`,type:"text",value:(e==null?void 0:e.city)||"",onChange:a("city"),disabled:n||s,placeholder:"New York"})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:`${l.$id}_state`,children:["State/Province",r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:`${l.$id}_state`,type:"text",value:(e==null?void 0:e.state)||"",onChange:a("state"),disabled:n||s,placeholder:"NY"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:`${l.$id}_zip`,children:["ZIP/Postal Code",r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:`${l.$id}_zip`,type:"text",value:(e==null?void 0:e.zip)||"",onChange:a("zip"),disabled:n||s,placeholder:"10001"})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Y,{htmlFor:`${l.$id}_country`,children:"Country"}),u.jsx(te,{id:`${l.$id}_country`,type:"text",value:(e==null?void 0:e.country)||"",onChange:a("country"),disabled:n||s,placeholder:"United States"})]})]})]})},xt=A.createContext(null),wt=({eventHub:e,formData:t,children:r})=>u.jsx(xt.Provider,{value:{eventHub:e,formData:t},children:r}),Ct=()=>{const e=A.useContext(xt);if(!e)throw new Error("useFormEventHub must be used within a FormEventProvider");return e},le=(e,t,r)=>{const{eventHub:n,formData:s}=Ct();return A.useMemo(()=>n.createFieldEventHandlers(e,t,s,r),[n,e,t,s,r])},St=({formData:e,onChange:t,required:r,disabled:n,readonly:s,schema:i,idSchema:l})=>{const a=le(l.$id,i),c=p=>{const d=p.replace(/\D/g,""),h=d.length;return h<4?d:h<7?`(${d.slice(0,3)}) ${d.slice(3)}`:`(${d.slice(0,3)}) ${d.slice(3,6)}-${d.slice(6,10)}`},f=async p=>{const d=c(p.target.value);t(d),await a.onChange(d)};return u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:l.$id,children:[i.title||"Phone Number",r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:l.$id,type:"tel",value:e||"",onChange:f,disabled:n||s,placeholder:"(555) 123-4567",maxLength:14})]})},Rt=({formData:e,onChange:t,required:r,disabled:n,readonly:s,schema:i,uiSchema:l,idSchema:a})=>{var S,v;const c=((S=l==null?void 0:l["ui:options"])==null?void 0:S.currency)||"USD",f=((v=l==null?void 0:l["ui:options"])==null?void 0:v.symbol)||"$",p=le(a.$id,i),d=g=>{const b=parseFloat(g.replace(/[^0-9.-]+/g,""));return isNaN(b)?"":b.toFixed(2)},h=async g=>{const b=g.target.value.replace(/[^0-9.-]+/g,""),C=b?parseFloat(b):void 0;t(C),await p.onChange(C)},w=async g=>{const b=d(g.target.value),C=b?parseFloat(b):void 0;t(C),await p.onBlur(C)};return u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:a.$id,children:[i.title||"Amount",r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsxs("div",{className:"relative",children:[u.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:String(f)}),u.jsx(te,{id:a.$id,type:"text",inputMode:"decimal",value:e||"",onChange:h,onBlur:w,disabled:n||s,placeholder:"0.00",className:"pl-8 pr-12"}),u.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:String(c)})]})]})},jt={address:yt,phone:St,currency:Rt},Et=({id:e,value:t,required:r,disabled:n,readonly:s,label:i,onChange:l,onBlur:a,onFocus:c,schema:f})=>{const p=le(e,f),d=async S=>{const v=S.target.value;l(v),await p.onChange(v)},h=async S=>{const v=S.target.value;a&&a(e,v),await p.onBlur(v)},w=async S=>{const v=S.target.value;c&&c(e,v),await p.onFocus(v)};return u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:e,children:[i||f.title,r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:e,type:"color",value:t||"#000000",required:r,disabled:n||s,onChange:d,onBlur:h,onFocus:w,className:"h-10 w-full cursor-pointer"})]})},kt=({id:e,value:t,required:r,disabled:n,readonly:s,label:i,onChange:l,onBlur:a,onFocus:c,options:f,schema:p})=>{const d=f.inputType||"date",h=le(e,p),w=async g=>{const b=g.target.value;l(b),await h.onChange(b)},S=async g=>{const b=g.target.value;a&&a(e,b),await h.onBlur(b)},v=async g=>{const b=g.target.value;c&&c(e,b),await h.onFocus(b)};return u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:e,children:[i||p.title,r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:e,type:d,value:t||"",required:r,disabled:n||s,onChange:w,onBlur:S,onFocus:v,min:typeof f.minDate=="string"||typeof f.minDate=="number"?f.minDate:void 0,max:typeof f.maxDate=="string"||typeof f.maxDate=="number"?f.maxDate:void 0,className:"w-full"})]})},fn=Ve("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),ke=y.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},i)=>{const l=n?en:"button";return u.jsx(l,{className:L(fn({variant:t,size:r,className:e})),ref:i,...s})});ke.displayName="Button";const pn=Ve("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function _t({className:e,variant:t,...r}){return u.jsx("div",{className:L(pn({variant:t}),e),...r})}/**
31
31
  * @license lucide-react v0.303.0 - ISC
32
32
  *
33
33
  * This source code is licensed under the ISC license.
@@ -37,14 +37,14 @@ React keys must be passed directly to JSX without using spread:
37
37
  *
38
38
  * This source code is licensed under the ISC license.
39
39
  * See the LICENSE file in the root directory of this source tree.
40
- */const hn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),kt=(e,t)=>{const r=A.forwardRef(({color:n="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:a="",children:c,...f},p)=>A.createElement("svg",{ref:p,...mn,width:s,height:s,stroke:n,strokeWidth:l?Number(i)*24/Number(s):i,className:["lucide",`lucide-${hn(e)}`,a].join(" "),...f},[...t.map(([d,h])=>A.createElement(d,h)),...Array.isArray(c)?c:[c]]));return r.displayName=`${e}`,r};/**
40
+ */const hn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),Pt=(e,t)=>{const r=A.forwardRef(({color:n="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:a="",children:c,...f},p)=>A.createElement("svg",{ref:p,...mn,width:s,height:s,stroke:n,strokeWidth:l?Number(i)*24/Number(s):i,className:["lucide",`lucide-${hn(e)}`,a].join(" "),...f},[...t.map(([d,h])=>A.createElement(d,h)),...Array.isArray(c)?c:[c]]));return r.displayName=`${e}`,r};/**
41
41
  * @license lucide-react v0.303.0 - ISC
42
42
  *
43
43
  * This source code is licensed under the ISC license.
44
44
  * See the LICENSE file in the root directory of this source tree.
45
- */const gn=kt("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
45
+ */const gn=Pt("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
46
46
  * @license lucide-react v0.303.0 - ISC
47
47
  *
48
48
  * This source code is licensed under the ISC license.
49
49
  * See the LICENSE file in the root directory of this source tree.
50
- */const _t=kt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Pt=({id:e,value:t,required:r,disabled:n,readonly:s,label:i,onChange:l,options:a,schema:c})=>{const f=A.useRef(null),p=a.accept||"*/*",d=a.multiple||!1,h=le(e,c),w=async g=>{const b=g.target.files;if(!b)return;let C;if(d){const E=Array.from(b).map(j=>({name:j.name,size:j.size,type:j.type,lastModified:j.lastModified}));C=E,l(E)}else{const E=b[0];E&&(C={name:E.name,size:E.size,type:E.type,lastModified:E.lastModified},l(C))}C&&await h.onChange(C)},S=async()=>{f.current&&(f.current.value=""),l(null),await h.onChange(null)},v=g=>g<1024?g+" B":g<1024*1024?(g/1024).toFixed(1)+" KB":(g/(1024*1024)).toFixed(1)+" MB";return u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:e,children:[i||c.title,r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{ref:f,id:e,type:"file",accept:p,multiple:d,required:r,disabled:n||s,onChange:w,className:"cursor-pointer"}),t&&u.jsx("div",{className:"space-y-2",children:d&&Array.isArray(t)?u.jsx("div",{className:"flex flex-wrap gap-2",children:t.map((g,b)=>u.jsxs(Et,{variant:"secondary",className:"flex items-center gap-1 pr-1",children:[u.jsxs("span",{className:"text-xs",children:[g.name," (",v(g.size),")"]}),!n&&!s&&u.jsx(ke,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-transparent",onClick:S,children:u.jsx(_t,{className:"h-3 w-3"})})]},b))}):t&&typeof t=="object"&&"name"in t?u.jsxs(Et,{variant:"secondary",className:"inline-flex items-center gap-1 pr-1",children:[u.jsxs("span",{className:"text-xs",children:[t.name," (",v(t.size),")"]}),!n&&!s&&u.jsx(ke,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-transparent",onClick:S,children:u.jsx(_t,{className:"h-3 w-3"})})]}):null})]})};function Nt(e,[t,r]){return Math.min(r,Math.max(t,e))}function he(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function Tt(e,t=[]){let r=[];function n(i,l){const a=y.createContext(l),c=r.length;r=[...r,l];const f=d=>{var b;const{scope:h,children:w,...S}=d,v=((b=h==null?void 0:h[e])==null?void 0:b[c])||a,g=y.useMemo(()=>S,Object.values(S));return u.jsx(v.Provider,{value:g,children:w})};f.displayName=i+"Provider";function p(d,h){var v;const w=((v=h==null?void 0:h[e])==null?void 0:v[c])||a,S=y.useContext(w);if(S)return S;if(l!==void 0)return l;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[f,p]}const s=()=>{const i=r.map(l=>y.createContext(l));return function(a){const c=(a==null?void 0:a[e])||i;return y.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return s.scopeName=e,[n,bn(s,...t)]}function bn(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const l=n.reduce((a,{useScope:c,scopeName:f})=>{const d=c(i)[`__scope${f}`];return{...a,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return r.scopeName=t.scopeName,r}var At=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},vn=y[" useInsertionEffect ".trim().toString()]||At;function yn({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,i,l]=xn({defaultProp:t,onChange:r}),a=e!==void 0,c=a?e:s;{const p=y.useRef(e!==void 0);y.useEffect(()=>{const d=p.current;d!==a&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=a},[a,n])}const f=y.useCallback(p=>{var d;if(a){const h=wn(p)?p(e):p;h!==e&&((d=l.current)==null||d.call(l,h))}else i(p)},[a,e,i,l]);return[c,f]}function xn({defaultProp:e,onChange:t}){const[r,n]=y.useState(e),s=y.useRef(r),i=y.useRef(t);return vn(()=>{i.current=t},[t]),y.useEffect(()=>{var l;s.current!==r&&((l=i.current)==null||l.call(i,r),s.current=r)},[r,s]),[r,n,i]}function wn(e){return typeof e=="function"}var Cn=y.createContext(void 0);function Sn(e){const t=y.useContext(Cn);return e||t||"ltr"}function Rn(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function jn(e){const[t,r]=y.useState(void 0);return At(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let l,a;if("borderBoxSize"in i){const c=i.borderBoxSize,f=Array.isArray(c)?c[0]:c;l=f.inlineSize,a=f.blockSize}else l=e.offsetWidth,a=e.offsetHeight;r({width:l,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}function En(e){const t=e+"CollectionProvider",[r,n]=Tt(t),[s,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),l=v=>{const{scope:g,children:b}=v,C=A.useRef(null),E=A.useRef(new Map).current;return u.jsx(s,{scope:g,itemMap:E,collectionRef:C,children:b})};l.displayName=t;const a=e+"CollectionSlot",c=Ee(a),f=A.forwardRef((v,g)=>{const{scope:b,children:C}=v,E=i(a,b),j=ae(g,E.collectionRef);return u.jsx(c,{ref:j,children:C})});f.displayName=a;const p=e+"CollectionItemSlot",d="data-radix-collection-item",h=Ee(p),w=A.forwardRef((v,g)=>{const{scope:b,children:C,...E}=v,j=A.useRef(null),z=ae(g,j),B=i(p,b);return A.useEffect(()=>(B.itemMap.set(j,{ref:j,...E}),()=>void B.itemMap.delete(j))),u.jsx(h,{[d]:"",ref:z,children:C})});w.displayName=p;function S(v){const g=i(e+"CollectionConsumer",v);return A.useCallback(()=>{const C=g.collectionRef.current;if(!C)return[];const E=Array.from(C.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((B,J)=>E.indexOf(B.ref.current)-E.indexOf(J.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:l,Slot:f,ItemSlot:w},S,n]}var Ft=["PageUp","PageDown"],Ot=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Mt={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ge="Slider",[Ie,kn,_n]=En(ge),[$t,Ao]=Tt(ge,[_n]),[Pn,_e]=$t(ge),Vt=y.forwardRef((e,t)=>{const{name:r,min:n=0,max:s=100,step:i=1,orientation:l="horizontal",disabled:a=!1,minStepsBetweenThumbs:c=0,defaultValue:f=[n],value:p,onValueChange:d=()=>{},onValueCommit:h=()=>{},inverted:w=!1,form:S,...v}=e,g=y.useRef(new Set),b=y.useRef(0),E=l==="horizontal"?Nn:Tn,[j=[],z]=yn({prop:p,defaultProp:f,onChange:$=>{var W;(W=[...g.current][b.current])==null||W.focus(),d($)}}),B=y.useRef(j);function J($){const P=$n(j,$);D($,P)}function ce($){D($,b.current)}function ne(){const $=B.current[b.current];j[b.current]!==$&&h(j)}function D($,P,{commit:W}={commit:!1}){const H=Dn(i),Q=Wn(Math.round(($-n)/i)*i+n,H),q=Nt(Q,[n,s]);z((X=[])=>{const G=On(X,q,P);if(zn(G,c*i)){b.current=G.indexOf(q);const re=String(G)!==String(X);return re&&W&&h(G),re?G:X}else return X})}return u.jsx(Pn,{scope:e.__scopeSlider,name:r,disabled:a,min:n,max:s,valueIndexToChangeRef:b,thumbs:g.current,values:j,orientation:l,form:S,children:u.jsx(Ie.Provider,{scope:e.__scopeSlider,children:u.jsx(Ie.Slot,{scope:e.__scopeSlider,children:u.jsx(E,{"aria-disabled":a,"data-disabled":a?"":void 0,...v,ref:t,onPointerDown:he(v.onPointerDown,()=>{a||(B.current=j)}),min:n,max:s,inverted:w,onSlideStart:a?void 0:J,onSlideMove:a?void 0:ce,onSlideEnd:a?void 0:ne,onHomeKeyDown:()=>!a&&D(n,0,{commit:!0}),onEndKeyDown:()=>!a&&D(s,j.length-1,{commit:!0}),onStepKeyDown:({event:$,direction:P})=>{if(!a){const Q=Ft.includes($.key)||$.shiftKey&&Ot.includes($.key)?10:1,q=b.current,X=j[q],G=i*Q*P;D(X+G,q,{commit:!0})}}})})})})});Vt.displayName=ge;var[It,zt]=$t(ge,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Nn=y.forwardRef((e,t)=>{const{min:r,max:n,dir:s,inverted:i,onSlideStart:l,onSlideMove:a,onSlideEnd:c,onStepKeyDown:f,...p}=e,[d,h]=y.useState(null),w=ae(t,E=>h(E)),S=y.useRef(void 0),v=Sn(s),g=v==="ltr",b=g&&!i||!g&&i;function C(E){const j=S.current||d.getBoundingClientRect(),z=[0,j.width],J=We(z,b?[r,n]:[n,r]);return S.current=j,J(E-j.left)}return u.jsx(It,{scope:e.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:u.jsx(Dt,{dir:v,"data-orientation":"horizontal",...p,ref:w,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:E=>{const j=C(E.clientX);l==null||l(j)},onSlideMove:E=>{const j=C(E.clientX);a==null||a(j)},onSlideEnd:()=>{S.current=void 0,c==null||c()},onStepKeyDown:E=>{const z=Mt[b?"from-left":"from-right"].includes(E.key);f==null||f({event:E,direction:z?-1:1})}})})}),Tn=y.forwardRef((e,t)=>{const{min:r,max:n,inverted:s,onSlideStart:i,onSlideMove:l,onSlideEnd:a,onStepKeyDown:c,...f}=e,p=y.useRef(null),d=ae(t,p),h=y.useRef(void 0),w=!s;function S(v){const g=h.current||p.current.getBoundingClientRect(),b=[0,g.height],E=We(b,w?[n,r]:[r,n]);return h.current=g,E(v-g.top)}return u.jsx(It,{scope:e.__scopeSlider,startEdge:w?"bottom":"top",endEdge:w?"top":"bottom",size:"height",direction:w?1:-1,children:u.jsx(Dt,{"data-orientation":"vertical",...f,ref:d,style:{...f.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:v=>{const g=S(v.clientY);i==null||i(g)},onSlideMove:v=>{const g=S(v.clientY);l==null||l(g)},onSlideEnd:()=>{h.current=void 0,a==null||a()},onStepKeyDown:v=>{const b=Mt[w?"from-bottom":"from-top"].includes(v.key);c==null||c({event:v,direction:b?-1:1})}})})}),Dt=y.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:n,onSlideMove:s,onSlideEnd:i,onHomeKeyDown:l,onEndKeyDown:a,onStepKeyDown:c,...f}=e,p=_e(ge,r);return u.jsx(me.span,{...f,ref:t,onKeyDown:he(e.onKeyDown,d=>{d.key==="Home"?(l(d),d.preventDefault()):d.key==="End"?(a(d),d.preventDefault()):Ft.concat(Ot).includes(d.key)&&(c(d),d.preventDefault())}),onPointerDown:he(e.onPointerDown,d=>{const h=d.target;h.setPointerCapture(d.pointerId),d.preventDefault(),p.thumbs.has(h)?h.focus():n(d)}),onPointerMove:he(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&s(d)}),onPointerUp:he(e.onPointerUp,d=>{const h=d.target;h.hasPointerCapture(d.pointerId)&&(h.releasePointerCapture(d.pointerId),i(d))})})}),Wt="SliderTrack",Lt=y.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,s=_e(Wt,r);return u.jsx(me.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});Lt.displayName=Wt;var ze="SliderRange",Bt=y.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,s=_e(ze,r),i=zt(ze,r),l=y.useRef(null),a=ae(t,l),c=s.values.length,f=s.values.map(h=>Gt(h,s.min,s.max)),p=c>1?Math.min(...f):0,d=100-Math.max(...f);return u.jsx(me.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[i.startEdge]:p+"%",[i.endEdge]:d+"%"}})});Bt.displayName=ze;var De="SliderThumb",Ht=y.forwardRef((e,t)=>{const r=kn(e.__scopeSlider),[n,s]=y.useState(null),i=ae(t,a=>s(a)),l=y.useMemo(()=>n?r().findIndex(a=>a.ref.current===n):-1,[r,n]);return u.jsx(An,{...e,ref:i,index:l})}),An=y.forwardRef((e,t)=>{const{__scopeSlider:r,index:n,name:s,...i}=e,l=_e(De,r),a=zt(De,r),[c,f]=y.useState(null),p=ae(t,C=>f(C)),d=c?l.form||!!c.closest("form"):!0,h=jn(c),w=l.values[n],S=w===void 0?0:Gt(w,l.min,l.max),v=Mn(n,l.values.length),g=h==null?void 0:h[a.size],b=g?Vn(g,S,a.direction):0;return y.useEffect(()=>{if(c)return l.thumbs.add(c),()=>{l.thumbs.delete(c)}},[c,l.thumbs]),u.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${S}% + ${b}px)`},children:[u.jsx(Ie.ItemSlot,{scope:e.__scopeSlider,children:u.jsx(me.span,{role:"slider","aria-label":e["aria-label"]||v,"aria-valuemin":l.min,"aria-valuenow":w,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...i,ref:p,style:w===void 0?{display:"none"}:e.style,onFocus:he(e.onFocus,()=>{l.valueIndexToChangeRef.current=n})})}),d&&u.jsx(Ut,{name:s??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:w},n)]})});Ht.displayName=De;var Fn="RadioBubbleInput",Ut=y.forwardRef(({__scopeSlider:e,value:t,...r},n)=>{const s=y.useRef(null),i=ae(s,n),l=Rn(t);return y.useEffect(()=>{const a=s.current;if(!a)return;const c=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(c,"value").set;if(l!==t&&p){const d=new Event("input",{bubbles:!0});p.call(a,t),a.dispatchEvent(d)}},[l,t]),u.jsx(me.input,{style:{display:"none"},...r,ref:i,defaultValue:t})});Ut.displayName=Fn;function On(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,i)=>s-i)}function Gt(e,t,r){const i=100/(r-t)*(e-t);return Nt(i,[0,100])}function Mn(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function $n(e,t){if(e.length===1)return 0;const r=e.map(s=>Math.abs(s-t)),n=Math.min(...r);return r.indexOf(n)}function Vn(e,t,r){const n=e/2,i=We([0,50],[0,n]);return(n-i(t)*r)*r}function In(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function zn(e,t){if(t>0){const r=In(e);return Math.min(...r)>=t}return!0}function We(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Dn(e){return(String(e).split(".")[1]||"").length}function Wn(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var Kt=Vt,Ln=Lt,Bn=Bt,Hn=Ht;const Yt=y.forwardRef(({className:e,...t},r)=>u.jsxs(Kt,{ref:r,className:L("relative flex w-full touch-none select-none items-center",e),...t,children:[u.jsx(Ln,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:u.jsx(Bn,{className:"absolute h-full bg-primary"})}),u.jsx(Hn,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));Yt.displayName=Kt.displayName;const qt=({id:e,value:t,required:r,disabled:n,readonly:s,label:i,onChange:l,onBlur:a,schema:c})=>{const f=c.minimum||0,p=c.maximum||100,d=c.multipleOf||1,h=le(e,c),w=async S=>{const v=S[0];l(v),a&&a(e,v),await h.onChange(v)};return u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs(Y,{htmlFor:e,children:[i||c.title,r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx("span",{className:"text-sm font-medium tabular-nums",children:t||f})]}),u.jsx(Yt,{id:e,min:f,max:p,step:d,value:[t||f],onValueChange:w,disabled:n||s,className:"w-full"})]})},Jt=({id:e,value:t,required:r,disabled:n,readonly:s,label:i,onChange:l,options:a,schema:c})=>{const f=Number(a.max||c.maximum||5),p=Array.from({length:f},(w,S)=>S+1),d=le(e,c),h=async w=>{!n&&!s&&(l(w),await d.onChange(w))};return u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:e,children:[i||c.title,r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx("div",{className:"flex items-center gap-1",role:"radiogroup","aria-labelledby":e,children:p.map(w=>u.jsx(ke,{type:"button",variant:"ghost",size:"icon",className:L("h-8 w-8 p-0 hover:bg-transparent",n||s?"cursor-not-allowed opacity-50":"cursor-pointer"),onClick:()=>h(w),disabled:n||s,"aria-label":`Rate ${w} out of ${f}`,role:"radio","aria-checked":w===t,children:u.jsx(gn,{className:L("h-5 w-5 transition-colors",w<=(t||0)?"fill-yellow-400 text-yellow-400":"text-muted-foreground")})},w))})]})},Qt={color:Rt,date:jt,file:Pt,range:qt,rating:Jt},Un={small:"space-y-2",medium:"space-y-4",large:"space-y-6"},Gn=({children:e,spacing:t="medium",className:r=""})=>u.jsx("div",{className:L("flex flex-col",Un[t],r),children:e}),Kn={small:"space-x-2",medium:"space-x-4",large:"space-x-6"},Yn={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},qn=({children:e,spacing:t="medium",align:r="center",className:n=""})=>u.jsx("div",{className:L("flex flex-row",Kn[t],Yn[r],n),children:e}),Jn={small:"gap-2",medium:"gap-4",large:"gap-6"},Qn=({children:e,columns:t="auto-fit",gap:r="medium",minItemWidth:n="250px",className:s=""})=>{const i={display:"grid"};return typeof t=="number"?i.gridTemplateColumns=`repeat(${t}, 1fr)`:i.gridTemplateColumns=`repeat(${t}, minmax(${n}, 1fr))`,u.jsx("div",{className:L("grid",Jn[r],s),style:i,children:e})};class Xn{constructor(t){ue(this,"handlers");this.handlers=t}async handleBeforeSubmit(t){return this.handlers.beforeSubmit?await this.handlers.beforeSubmit(t):t}async handleAfterSubmit(t){this.handlers.afterSubmit&&await this.handlers.afterSubmit(t)}async handleBeforeValidation(t){return this.handlers.beforeValidation?await this.handlers.beforeValidation(t):t}async handleAfterValidation(t,r){this.handlers.afterValidation&&await this.handlers.afterValidation(t,r)}}class Xt{constructor(t,r={},n=[]){ue(this,"formHandlers");ue(this,"fieldHandlers");ue(this,"webhooks");ue(this,"debounceTimers",new Map);ue(this,"webhookQueue",[]);ue(this,"isProcessingQueue",!1);this.formHandlers=t,this.fieldHandlers=r,this.webhooks=n}async handleBeforeSubmit(t){return this.formHandlers.beforeSubmit?await this.formHandlers.beforeSubmit(t):t}async handleAfterSubmit(t){this.formHandlers.afterSubmit&&await this.formHandlers.afterSubmit(t)}async handleBeforeValidation(t){return this.formHandlers.beforeValidation?await this.formHandlers.beforeValidation(t):t}async handleAfterValidation(t,r){this.formHandlers.afterValidation&&await this.formHandlers.afterValidation(t,r)}async handleFieldEvent(t,r,n,s,i,l){const a={eventType:t,fieldId:r,fieldValue:n,schema:s,formData:i,timestamp:Date.now(),fieldPath:l};try{switch(t){case"focus":this.fieldHandlers.onFieldFocus&&await this.fieldHandlers.onFieldFocus(a);break;case"blur":this.fieldHandlers.onFieldBlur&&await this.fieldHandlers.onFieldBlur(a);break;case"change":this.fieldHandlers.onFieldChange&&await this.fieldHandlers.onFieldChange(a);break}}catch(c){console.error(`Error in field event handler (${t}):`,c)}this.processWebhooks(a)}processWebhooks(t){const r=this.webhooks.filter(n=>!n.events||n.events.includes(t.eventType));for(const n of r)n.debounceMs&&n.debounceMs>0?this.debounceWebhook(n,t):this.queueWebhook(n,t)}debounceWebhook(t,r){const n=`${t.url}-${r.fieldId}-${r.eventType}`;this.debounceTimers.has(n)&&clearTimeout(this.debounceTimers.get(n));const s=setTimeout(()=>{this.queueWebhook(t,r),this.debounceTimers.delete(n)},t.debounceMs);this.debounceTimers.set(n,s)}queueWebhook(t,r){this.webhookQueue.push({config:t,event:r,retryCount:0}),this.isProcessingQueue||this.processWebhookQueue()}async processWebhookQueue(){if(!(this.isProcessingQueue||this.webhookQueue.length===0)){for(this.isProcessingQueue=!0;this.webhookQueue.length>0;){const t=this.webhookQueue.shift();try{await this.callWebhook(t.config,t.event)}catch(r){const n=t.config.retries||3;t.retryCount<n?(t.retryCount++,setTimeout(()=>{this.webhookQueue.push(t)},Math.pow(2,t.retryCount)*1e3)):console.error(`Webhook failed after ${n} retries:`,r)}}this.isProcessingQueue=!1}}async callWebhook(t,r){const n={event:r,timestamp:Date.now(),source:"extended-dynamic-forms"},s={method:t.method||"POST",headers:{"Content-Type":"application/json",...t.headers},body:JSON.stringify(n)};t.timeout&&(s.signal=AbortSignal.timeout(t.timeout));const i=await fetch(t.url,s);if(!i.ok)throw new Error(`Webhook request failed: ${i.status} ${i.statusText}`)}createFieldEventHandlers(t,r,n,s){return{onFocus:i=>this.handleFieldEvent("focus",t,i,r,n,s),onBlur:i=>this.handleFieldEvent("blur",t,i,r,n,s),onChange:i=>this.handleFieldEvent("change",t,i,r,n,s)}}cleanup(){for(const t of this.debounceTimers.values())clearTimeout(t);this.debounceTimers.clear()}}const Zt={cloneFormData:e=>JSON.parse(JSON.stringify(e)),mergeFormData:(e,t)=>({...e,...t}),getNestedValue:(e,t)=>{const r=t.split(".");let n=e;for(const s of r)if(n&&typeof n=="object"&&s in n)n=n[s];else return;return n},setNestedValue:(e,t,r)=>{const n=t.split("."),s={...e};let i=s;for(let l=0;l<n.length-1;l++){const a=n[l];(!(a in i)||typeof i[a]!="object")&&(i[a]={}),i=i[a]}return i[n[n.length-1]]=r,s},removeEmptyValues:e=>{if(Array.isArray(e))return e.filter(t=>t!=null&&t!=="");if(e!==null&&typeof e=="object"){const t={};for(const[r,n]of Object.entries(e))n!=null&&n!==""&&(t[r]=Zt.removeEmptyValues(n));return t}return e}},er={getRequiredFields:e=>e.required||[],isFieldRequired:(e,t)=>(e.required||[]).includes(t),getFieldSchema:(e,t)=>{const r=t.split(".");let n=e;for(const s of r)if(n.type==="object"&&n.properties)n=n.properties[s];else if(n.type==="array"&&n.items)n=n.items;else return;return n},mergeSchemas:(e,t)=>({...e,...t,properties:{...e.properties,...t.properties},required:[...new Set([...e.required||[],...t.required||[]])]}),getAllFieldPaths:(e,t="")=>{const r=[];if(e.type==="object"&&e.properties)for(const[n,s]of Object.entries(e.properties)){const i=t?`${t}.${n}`:n;r.push(i),r.push(...er.getAllFieldPaths(s,i))}return r}},Zn={isValidEmail:e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),isValidPhone:e=>/^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/.test(e),isValidUrl:e=>{try{return new URL(e),!0}catch{return!1}},isValidDate:e=>{const t=new Date(e);return t instanceof Date&&!isNaN(t.getTime())},isInRange:(e,t,r)=>!(t!==void 0&&e<t||r!==void 0&&e>r),getValidationMessage:(e,t)=>({required:"This field is required",email:"Please enter a valid email address",phone:"Please enter a valid phone number",url:"Please enter a valid URL",date:"Please enter a valid date",min:`Value must be at least ${t==null?void 0:t.min}`,max:`Value must be at most ${t==null?void 0:t.max}`,minLength:`Must be at least ${t==null?void 0:t.minLength} characters`,maxLength:`Must be at most ${t==null?void 0:t.maxLength} characters`})[e]||"Invalid value"},eo=({schema:e,uiSchema:t,formData:r,onSubmit:n,onChange:s,onError:i,onBlur:l,onFocus:a,beforeSubmit:c,afterSubmit:f,beforeValidation:p,afterValidation:d,onFieldFocus:h,onFieldBlur:w,onFieldChange:S,webhooks:v=[],widgets:g={},fields:b={},templates:C={},...E})=>{const j=A.useRef(null),z=A.useMemo(()=>{const D=new Xt({beforeSubmit:c,afterSubmit:f,beforeValidation:p,afterValidation:d},{onFieldFocus:h,onFieldBlur:w,onFieldChange:S},v);return j.current=D,D},[c,f,p,d,h,w,S,v]);A.useEffect(()=>()=>{j.current&&j.current.cleanup()},[]);const B=async(D,$)=>{const P=await z.handleBeforeSubmit(D);n&&await n(P,$),await z.handleAfterSubmit(P)},J=D=>{s&&s(D)},ce={...Qt,...g},ne={...St,...b};return u.jsx(yt,{eventHub:z,formData:r,children:u.jsx(vr,{schema:e,uiSchema:t,formData:r,validator:yr,onSubmit:B,onChange:J,onError:i,onBlur:l,onFocus:a,widgets:ce,fields:ne,templates:C,...E})})};_.AddressField=bt,_.ColorWidget=Rt,_.CurrencyField=Ct,_.DateWidget=jt,_.ExtendedForm=eo,_.FileWidget=Pt,_.FormEventHub=Xt,_.FormEventManager=Xn,_.FormEventProvider=yt,_.GridLayout=Qn,_.HorizontalLayout=qn,_.PhoneField=wt,_.RangeWidget=qt,_.RatingWidget=Jt,_.VerticalLayout=Gn,_.cn=L,_.customFields=St,_.customWidgets=Qt,_.formDataUtils=Zt,_.schemaUtils=er,_.useFieldEventHandlers=le,_.useFormEventHub=xt,_.validationUtils=Zn,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
50
+ */const Nt=Pt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Tt=({id:e,value:t,required:r,disabled:n,readonly:s,label:i,onChange:l,options:a,schema:c})=>{const f=A.useRef(null),p=a.accept||"*/*",d=a.multiple||!1,h=le(e,c),w=async g=>{const b=g.target.files;if(!b)return;let C;if(d){const E=Array.from(b).map(j=>({name:j.name,size:j.size,type:j.type,lastModified:j.lastModified}));C=E,l(E)}else{const E=b[0];E&&(C={name:E.name,size:E.size,type:E.type,lastModified:E.lastModified},l(C))}C&&await h.onChange(C)},S=async()=>{f.current&&(f.current.value=""),l(null),await h.onChange(null)},v=g=>g<1024?g+" B":g<1024*1024?(g/1024).toFixed(1)+" KB":(g/(1024*1024)).toFixed(1)+" MB";return u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:e,children:[i||c.title,r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{ref:f,id:e,type:"file",accept:p,multiple:d,required:r,disabled:n||s,onChange:w,className:"cursor-pointer"}),t&&u.jsx("div",{className:"space-y-2",children:d&&Array.isArray(t)?u.jsx("div",{className:"flex flex-wrap gap-2",children:t.map((g,b)=>u.jsxs(_t,{variant:"secondary",className:"flex items-center gap-1 pr-1",children:[u.jsxs("span",{className:"text-xs",children:[g.name," (",v(g.size),")"]}),!n&&!s&&u.jsx(ke,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-transparent",onClick:S,children:u.jsx(Nt,{className:"h-3 w-3"})})]},b))}):t&&typeof t=="object"&&"name"in t?u.jsxs(_t,{variant:"secondary",className:"inline-flex items-center gap-1 pr-1",children:[u.jsxs("span",{className:"text-xs",children:[t.name," (",v(t.size),")"]}),!n&&!s&&u.jsx(ke,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-transparent",onClick:S,children:u.jsx(Nt,{className:"h-3 w-3"})})]}):null})]})};function At(e,[t,r]){return Math.min(r,Math.max(t,e))}function he(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function Ft(e,t=[]){let r=[];function n(i,l){const a=y.createContext(l),c=r.length;r=[...r,l];const f=d=>{var b;const{scope:h,children:w,...S}=d,v=((b=h==null?void 0:h[e])==null?void 0:b[c])||a,g=y.useMemo(()=>S,Object.values(S));return u.jsx(v.Provider,{value:g,children:w})};f.displayName=i+"Provider";function p(d,h){var v;const w=((v=h==null?void 0:h[e])==null?void 0:v[c])||a,S=y.useContext(w);if(S)return S;if(l!==void 0)return l;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[f,p]}const s=()=>{const i=r.map(l=>y.createContext(l));return function(a){const c=(a==null?void 0:a[e])||i;return y.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return s.scopeName=e,[n,bn(s,...t)]}function bn(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const l=n.reduce((a,{useScope:c,scopeName:f})=>{const d=c(i)[`__scope${f}`];return{...a,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return r.scopeName=t.scopeName,r}var Ot=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},vn=y[" useInsertionEffect ".trim().toString()]||Ot;function yn({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,i,l]=xn({defaultProp:t,onChange:r}),a=e!==void 0,c=a?e:s;{const p=y.useRef(e!==void 0);y.useEffect(()=>{const d=p.current;d!==a&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=a},[a,n])}const f=y.useCallback(p=>{var d;if(a){const h=wn(p)?p(e):p;h!==e&&((d=l.current)==null||d.call(l,h))}else i(p)},[a,e,i,l]);return[c,f]}function xn({defaultProp:e,onChange:t}){const[r,n]=y.useState(e),s=y.useRef(r),i=y.useRef(t);return vn(()=>{i.current=t},[t]),y.useEffect(()=>{var l;s.current!==r&&((l=i.current)==null||l.call(i,r),s.current=r)},[r,s]),[r,n,i]}function wn(e){return typeof e=="function"}var Cn=y.createContext(void 0);function Sn(e){const t=y.useContext(Cn);return e||t||"ltr"}function Rn(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function jn(e){const[t,r]=y.useState(void 0);return Ot(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let l,a;if("borderBoxSize"in i){const c=i.borderBoxSize,f=Array.isArray(c)?c[0]:c;l=f.inlineSize,a=f.blockSize}else l=e.offsetWidth,a=e.offsetHeight;r({width:l,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}function En(e){const t=e+"CollectionProvider",[r,n]=Ft(t),[s,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),l=v=>{const{scope:g,children:b}=v,C=A.useRef(null),E=A.useRef(new Map).current;return u.jsx(s,{scope:g,itemMap:E,collectionRef:C,children:b})};l.displayName=t;const a=e+"CollectionSlot",c=Ee(a),f=A.forwardRef((v,g)=>{const{scope:b,children:C}=v,E=i(a,b),j=ae(g,E.collectionRef);return u.jsx(c,{ref:j,children:C})});f.displayName=a;const p=e+"CollectionItemSlot",d="data-radix-collection-item",h=Ee(p),w=A.forwardRef((v,g)=>{const{scope:b,children:C,...E}=v,j=A.useRef(null),z=ae(g,j),B=i(p,b);return A.useEffect(()=>(B.itemMap.set(j,{ref:j,...E}),()=>void B.itemMap.delete(j))),u.jsx(h,{[d]:"",ref:z,children:C})});w.displayName=p;function S(v){const g=i(e+"CollectionConsumer",v);return A.useCallback(()=>{const C=g.collectionRef.current;if(!C)return[];const E=Array.from(C.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((B,J)=>E.indexOf(B.ref.current)-E.indexOf(J.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:l,Slot:f,ItemSlot:w},S,n]}var Mt=["PageUp","PageDown"],$t=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Vt={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ge="Slider",[Ie,kn,_n]=En(ge),[It,Ao]=Ft(ge,[_n]),[Pn,_e]=It(ge),zt=y.forwardRef((e,t)=>{const{name:r,min:n=0,max:s=100,step:i=1,orientation:l="horizontal",disabled:a=!1,minStepsBetweenThumbs:c=0,defaultValue:f=[n],value:p,onValueChange:d=()=>{},onValueCommit:h=()=>{},inverted:w=!1,form:S,...v}=e,g=y.useRef(new Set),b=y.useRef(0),E=l==="horizontal"?Nn:Tn,[j=[],z]=yn({prop:p,defaultProp:f,onChange:$=>{var W;(W=[...g.current][b.current])==null||W.focus(),d($)}}),B=y.useRef(j);function J($){const P=$n(j,$);D($,P)}function ce($){D($,b.current)}function ne(){const $=B.current[b.current];j[b.current]!==$&&h(j)}function D($,P,{commit:W}={commit:!1}){const H=Dn(i),Q=Wn(Math.round(($-n)/i)*i+n,H),q=At(Q,[n,s]);z((X=[])=>{const G=On(X,q,P);if(zn(G,c*i)){b.current=G.indexOf(q);const re=String(G)!==String(X);return re&&W&&h(G),re?G:X}else return X})}return u.jsx(Pn,{scope:e.__scopeSlider,name:r,disabled:a,min:n,max:s,valueIndexToChangeRef:b,thumbs:g.current,values:j,orientation:l,form:S,children:u.jsx(Ie.Provider,{scope:e.__scopeSlider,children:u.jsx(Ie.Slot,{scope:e.__scopeSlider,children:u.jsx(E,{"aria-disabled":a,"data-disabled":a?"":void 0,...v,ref:t,onPointerDown:he(v.onPointerDown,()=>{a||(B.current=j)}),min:n,max:s,inverted:w,onSlideStart:a?void 0:J,onSlideMove:a?void 0:ce,onSlideEnd:a?void 0:ne,onHomeKeyDown:()=>!a&&D(n,0,{commit:!0}),onEndKeyDown:()=>!a&&D(s,j.length-1,{commit:!0}),onStepKeyDown:({event:$,direction:P})=>{if(!a){const Q=Mt.includes($.key)||$.shiftKey&&$t.includes($.key)?10:1,q=b.current,X=j[q],G=i*Q*P;D(X+G,q,{commit:!0})}}})})})})});zt.displayName=ge;var[Dt,Wt]=It(ge,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Nn=y.forwardRef((e,t)=>{const{min:r,max:n,dir:s,inverted:i,onSlideStart:l,onSlideMove:a,onSlideEnd:c,onStepKeyDown:f,...p}=e,[d,h]=y.useState(null),w=ae(t,E=>h(E)),S=y.useRef(void 0),v=Sn(s),g=v==="ltr",b=g&&!i||!g&&i;function C(E){const j=S.current||d.getBoundingClientRect(),z=[0,j.width],J=We(z,b?[r,n]:[n,r]);return S.current=j,J(E-j.left)}return u.jsx(Dt,{scope:e.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:u.jsx(Lt,{dir:v,"data-orientation":"horizontal",...p,ref:w,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:E=>{const j=C(E.clientX);l==null||l(j)},onSlideMove:E=>{const j=C(E.clientX);a==null||a(j)},onSlideEnd:()=>{S.current=void 0,c==null||c()},onStepKeyDown:E=>{const z=Vt[b?"from-left":"from-right"].includes(E.key);f==null||f({event:E,direction:z?-1:1})}})})}),Tn=y.forwardRef((e,t)=>{const{min:r,max:n,inverted:s,onSlideStart:i,onSlideMove:l,onSlideEnd:a,onStepKeyDown:c,...f}=e,p=y.useRef(null),d=ae(t,p),h=y.useRef(void 0),w=!s;function S(v){const g=h.current||p.current.getBoundingClientRect(),b=[0,g.height],E=We(b,w?[n,r]:[r,n]);return h.current=g,E(v-g.top)}return u.jsx(Dt,{scope:e.__scopeSlider,startEdge:w?"bottom":"top",endEdge:w?"top":"bottom",size:"height",direction:w?1:-1,children:u.jsx(Lt,{"data-orientation":"vertical",...f,ref:d,style:{...f.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:v=>{const g=S(v.clientY);i==null||i(g)},onSlideMove:v=>{const g=S(v.clientY);l==null||l(g)},onSlideEnd:()=>{h.current=void 0,a==null||a()},onStepKeyDown:v=>{const b=Vt[w?"from-bottom":"from-top"].includes(v.key);c==null||c({event:v,direction:b?-1:1})}})})}),Lt=y.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:n,onSlideMove:s,onSlideEnd:i,onHomeKeyDown:l,onEndKeyDown:a,onStepKeyDown:c,...f}=e,p=_e(ge,r);return u.jsx(me.span,{...f,ref:t,onKeyDown:he(e.onKeyDown,d=>{d.key==="Home"?(l(d),d.preventDefault()):d.key==="End"?(a(d),d.preventDefault()):Mt.concat($t).includes(d.key)&&(c(d),d.preventDefault())}),onPointerDown:he(e.onPointerDown,d=>{const h=d.target;h.setPointerCapture(d.pointerId),d.preventDefault(),p.thumbs.has(h)?h.focus():n(d)}),onPointerMove:he(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&s(d)}),onPointerUp:he(e.onPointerUp,d=>{const h=d.target;h.hasPointerCapture(d.pointerId)&&(h.releasePointerCapture(d.pointerId),i(d))})})}),Bt="SliderTrack",Ht=y.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,s=_e(Bt,r);return u.jsx(me.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});Ht.displayName=Bt;var ze="SliderRange",Ut=y.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,s=_e(ze,r),i=Wt(ze,r),l=y.useRef(null),a=ae(t,l),c=s.values.length,f=s.values.map(h=>Yt(h,s.min,s.max)),p=c>1?Math.min(...f):0,d=100-Math.max(...f);return u.jsx(me.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[i.startEdge]:p+"%",[i.endEdge]:d+"%"}})});Ut.displayName=ze;var De="SliderThumb",Gt=y.forwardRef((e,t)=>{const r=kn(e.__scopeSlider),[n,s]=y.useState(null),i=ae(t,a=>s(a)),l=y.useMemo(()=>n?r().findIndex(a=>a.ref.current===n):-1,[r,n]);return u.jsx(An,{...e,ref:i,index:l})}),An=y.forwardRef((e,t)=>{const{__scopeSlider:r,index:n,name:s,...i}=e,l=_e(De,r),a=Wt(De,r),[c,f]=y.useState(null),p=ae(t,C=>f(C)),d=c?l.form||!!c.closest("form"):!0,h=jn(c),w=l.values[n],S=w===void 0?0:Yt(w,l.min,l.max),v=Mn(n,l.values.length),g=h==null?void 0:h[a.size],b=g?Vn(g,S,a.direction):0;return y.useEffect(()=>{if(c)return l.thumbs.add(c),()=>{l.thumbs.delete(c)}},[c,l.thumbs]),u.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${S}% + ${b}px)`},children:[u.jsx(Ie.ItemSlot,{scope:e.__scopeSlider,children:u.jsx(me.span,{role:"slider","aria-label":e["aria-label"]||v,"aria-valuemin":l.min,"aria-valuenow":w,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...i,ref:p,style:w===void 0?{display:"none"}:e.style,onFocus:he(e.onFocus,()=>{l.valueIndexToChangeRef.current=n})})}),d&&u.jsx(Kt,{name:s??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:w},n)]})});Gt.displayName=De;var Fn="RadioBubbleInput",Kt=y.forwardRef(({__scopeSlider:e,value:t,...r},n)=>{const s=y.useRef(null),i=ae(s,n),l=Rn(t);return y.useEffect(()=>{const a=s.current;if(!a)return;const c=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(c,"value").set;if(l!==t&&p){const d=new Event("input",{bubbles:!0});p.call(a,t),a.dispatchEvent(d)}},[l,t]),u.jsx(me.input,{style:{display:"none"},...r,ref:i,defaultValue:t})});Kt.displayName=Fn;function On(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,i)=>s-i)}function Yt(e,t,r){const i=100/(r-t)*(e-t);return At(i,[0,100])}function Mn(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function $n(e,t){if(e.length===1)return 0;const r=e.map(s=>Math.abs(s-t)),n=Math.min(...r);return r.indexOf(n)}function Vn(e,t,r){const n=e/2,i=We([0,50],[0,n]);return(n-i(t)*r)*r}function In(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function zn(e,t){if(t>0){const r=In(e);return Math.min(...r)>=t}return!0}function We(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Dn(e){return(String(e).split(".")[1]||"").length}function Wn(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var qt=zt,Ln=Ht,Bn=Ut,Hn=Gt;const Jt=y.forwardRef(({className:e,...t},r)=>u.jsxs(qt,{ref:r,className:L("relative flex w-full touch-none select-none items-center",e),...t,children:[u.jsx(Ln,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:u.jsx(Bn,{className:"absolute h-full bg-primary"})}),u.jsx(Hn,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));Jt.displayName=qt.displayName;const Qt=({id:e,value:t,required:r,disabled:n,readonly:s,label:i,onChange:l,onBlur:a,schema:c})=>{const f=c.minimum||0,p=c.maximum||100,d=c.multipleOf||1,h=le(e,c),w=async S=>{const v=S[0];l(v),a&&a(e,v),await h.onChange(v)};return u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs(Y,{htmlFor:e,children:[i||c.title,r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx("span",{className:"text-sm font-medium tabular-nums",children:t||f})]}),u.jsx(Jt,{id:e,min:f,max:p,step:d,value:[t||f],onValueChange:w,disabled:n||s,className:"w-full"})]})},Xt=({id:e,value:t,required:r,disabled:n,readonly:s,label:i,onChange:l,options:a,schema:c})=>{const f=Number(a.max||c.maximum||5),p=Array.from({length:f},(w,S)=>S+1),d=le(e,c),h=async w=>{!n&&!s&&(l(w),await d.onChange(w))};return u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:e,children:[i||c.title,r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx("div",{className:"flex items-center gap-1",role:"radiogroup","aria-labelledby":e,children:p.map(w=>u.jsx(ke,{type:"button",variant:"ghost",size:"icon",className:L("h-8 w-8 p-0 hover:bg-transparent",n||s?"cursor-not-allowed opacity-50":"cursor-pointer"),onClick:()=>h(w),disabled:n||s,"aria-label":`Rate ${w} out of ${f}`,role:"radio","aria-checked":w===t,children:u.jsx(gn,{className:L("h-5 w-5 transition-colors",w<=(t||0)?"fill-yellow-400 text-yellow-400":"text-muted-foreground")})},w))})]})},Zt={color:Et,date:kt,file:Tt,range:Qt,rating:Xt},Un={small:"space-y-2",medium:"space-y-4",large:"space-y-6"},Gn=({children:e,spacing:t="medium",className:r=""})=>u.jsx("div",{className:L("flex flex-col",Un[t],r),children:e}),Kn={small:"space-x-2",medium:"space-x-4",large:"space-x-6"},Yn={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},qn=({children:e,spacing:t="medium",align:r="center",className:n=""})=>u.jsx("div",{className:L("flex flex-row",Kn[t],Yn[r],n),children:e}),Jn={small:"gap-2",medium:"gap-4",large:"gap-6"},Qn=({children:e,columns:t="auto-fit",gap:r="medium",minItemWidth:n="250px",className:s=""})=>{const i={display:"grid"};return typeof t=="number"?i.gridTemplateColumns=`repeat(${t}, 1fr)`:i.gridTemplateColumns=`repeat(${t}, minmax(${n}, 1fr))`,u.jsx("div",{className:L("grid",Jn[r],s),style:i,children:e})};class Xn{constructor(t){ue(this,"handlers");this.handlers=t}async handleBeforeSubmit(t){return this.handlers.beforeSubmit?await this.handlers.beforeSubmit(t):t}async handleAfterSubmit(t){this.handlers.afterSubmit&&await this.handlers.afterSubmit(t)}async handleBeforeValidation(t){return this.handlers.beforeValidation?await this.handlers.beforeValidation(t):t}async handleAfterValidation(t,r){this.handlers.afterValidation&&await this.handlers.afterValidation(t,r)}}class er{constructor(t,r={},n=[]){ue(this,"formHandlers");ue(this,"fieldHandlers");ue(this,"webhooks");ue(this,"debounceTimers",new Map);ue(this,"webhookQueue",[]);ue(this,"isProcessingQueue",!1);this.formHandlers=t,this.fieldHandlers=r,this.webhooks=n}async handleBeforeSubmit(t){return this.formHandlers.beforeSubmit?await this.formHandlers.beforeSubmit(t):t}async handleAfterSubmit(t){this.formHandlers.afterSubmit&&await this.formHandlers.afterSubmit(t)}async handleBeforeValidation(t){return this.formHandlers.beforeValidation?await this.formHandlers.beforeValidation(t):t}async handleAfterValidation(t,r){this.formHandlers.afterValidation&&await this.formHandlers.afterValidation(t,r)}async handleFieldEvent(t,r,n,s,i,l){const a={eventType:t,fieldId:r,fieldValue:n,schema:s,formData:i,timestamp:Date.now(),fieldPath:l};try{switch(t){case"focus":this.fieldHandlers.onFieldFocus&&await this.fieldHandlers.onFieldFocus(a);break;case"blur":this.fieldHandlers.onFieldBlur&&await this.fieldHandlers.onFieldBlur(a);break;case"change":this.fieldHandlers.onFieldChange&&await this.fieldHandlers.onFieldChange(a);break}}catch(c){console.error(`Error in field event handler (${t}):`,c)}this.processWebhooks(a)}processWebhooks(t){const r=this.webhooks.filter(n=>!n.events||n.events.includes(t.eventType));for(const n of r)n.debounceMs&&n.debounceMs>0?this.debounceWebhook(n,t):this.queueWebhook(n,t)}debounceWebhook(t,r){const n=`${t.url}-${r.fieldId}-${r.eventType}`;this.debounceTimers.has(n)&&clearTimeout(this.debounceTimers.get(n));const s=setTimeout(()=>{this.queueWebhook(t,r),this.debounceTimers.delete(n)},t.debounceMs);this.debounceTimers.set(n,s)}queueWebhook(t,r){this.webhookQueue.push({config:t,event:r,retryCount:0}),this.isProcessingQueue||this.processWebhookQueue()}async processWebhookQueue(){if(!(this.isProcessingQueue||this.webhookQueue.length===0)){for(this.isProcessingQueue=!0;this.webhookQueue.length>0;){const t=this.webhookQueue.shift();try{await this.callWebhook(t.config,t.event)}catch(r){const n=t.config.retries||3;t.retryCount<n?(t.retryCount++,setTimeout(()=>{this.webhookQueue.push(t)},Math.pow(2,t.retryCount)*1e3)):console.error(`Webhook failed after ${n} retries:`,r)}}this.isProcessingQueue=!1}}async callWebhook(t,r){const n={event:r,timestamp:Date.now(),source:"extended-dynamic-forms"},s={method:t.method||"POST",headers:{"Content-Type":"application/json",...t.headers},body:JSON.stringify(n)};t.timeout&&(s.signal=AbortSignal.timeout(t.timeout));const i=await fetch(t.url,s);if(!i.ok)throw new Error(`Webhook request failed: ${i.status} ${i.statusText}`)}createFieldEventHandlers(t,r,n,s){return{onFocus:i=>this.handleFieldEvent("focus",t,i,r,n,s),onBlur:i=>this.handleFieldEvent("blur",t,i,r,n,s),onChange:i=>this.handleFieldEvent("change",t,i,r,n,s)}}cleanup(){for(const t of this.debounceTimers.values())clearTimeout(t);this.debounceTimers.clear()}}const tr={cloneFormData:e=>JSON.parse(JSON.stringify(e)),mergeFormData:(e,t)=>({...e,...t}),getNestedValue:(e,t)=>{const r=t.split(".");let n=e;for(const s of r)if(n&&typeof n=="object"&&s in n)n=n[s];else return;return n},setNestedValue:(e,t,r)=>{const n=t.split("."),s={...e};let i=s;for(let l=0;l<n.length-1;l++){const a=n[l];(!(a in i)||typeof i[a]!="object")&&(i[a]={}),i=i[a]}return i[n[n.length-1]]=r,s},removeEmptyValues:e=>{if(Array.isArray(e))return e.filter(t=>t!=null&&t!=="");if(e!==null&&typeof e=="object"){const t={};for(const[r,n]of Object.entries(e))n!=null&&n!==""&&(t[r]=tr.removeEmptyValues(n));return t}return e}},rr={getRequiredFields:e=>e.required||[],isFieldRequired:(e,t)=>(e.required||[]).includes(t),getFieldSchema:(e,t)=>{const r=t.split(".");let n=e;for(const s of r)if(n.type==="object"&&n.properties)n=n.properties[s];else if(n.type==="array"&&n.items)n=n.items;else return;return n},mergeSchemas:(e,t)=>({...e,...t,properties:{...e.properties,...t.properties},required:[...new Set([...e.required||[],...t.required||[]])]}),getAllFieldPaths:(e,t="")=>{const r=[];if(e.type==="object"&&e.properties)for(const[n,s]of Object.entries(e.properties)){const i=t?`${t}.${n}`:n;r.push(i),r.push(...rr.getAllFieldPaths(s,i))}return r}},Zn={isValidEmail:e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),isValidPhone:e=>/^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/.test(e),isValidUrl:e=>{try{return new URL(e),!0}catch{return!1}},isValidDate:e=>{const t=new Date(e);return t instanceof Date&&!isNaN(t.getTime())},isInRange:(e,t,r)=>!(t!==void 0&&e<t||r!==void 0&&e>r),getValidationMessage:(e,t)=>({required:"This field is required",email:"Please enter a valid email address",phone:"Please enter a valid phone number",url:"Please enter a valid URL",date:"Please enter a valid date",min:`Value must be at least ${t==null?void 0:t.min}`,max:`Value must be at most ${t==null?void 0:t.max}`,minLength:`Must be at least ${t==null?void 0:t.minLength} characters`,maxLength:`Must be at most ${t==null?void 0:t.maxLength} characters`})[e]||"Invalid value"},eo=({schema:e,uiSchema:t,formData:r,onSubmit:n,onChange:s,onError:i,onBlur:l,onFocus:a,beforeSubmit:c,afterSubmit:f,beforeValidation:p,afterValidation:d,onFieldFocus:h,onFieldBlur:w,onFieldChange:S,webhooks:v=[],widgets:g={},fields:b={},templates:C={},...E})=>{const j=A.useRef(null),z=A.useMemo(()=>{const D=new er({beforeSubmit:c,afterSubmit:f,beforeValidation:p,afterValidation:d},{onFieldFocus:h,onFieldBlur:w,onFieldChange:S},v);return j.current=D,D},[c,f,p,d,h,w,S,v]);A.useEffect(()=>()=>{j.current&&j.current.cleanup()},[]);const B=async(D,$)=>{const P=await z.handleBeforeSubmit(D);n&&await n(P,$),await z.handleAfterSubmit(P)},J=D=>{s&&s(D)},ce={...Zt,...g},ne={...jt,...b};return u.jsx(wt,{eventHub:z,formData:r,children:u.jsx(Qe,{schema:e,uiSchema:t,formData:r,validator:Je,onSubmit:B,onChange:J,onError:i,onBlur:l,onFocus:a,widgets:ce,fields:ne,templates:C,...E})})};_.validator=Je,Object.defineProperty(_,"generateTheme",{enumerable:!0,get:()=>Qe.generateTheme}),_.AddressField=yt,_.ColorWidget=Et,_.CurrencyField=Rt,_.DateWidget=kt,_.ExtendedForm=eo,_.FileWidget=Tt,_.FormEventHub=er,_.FormEventManager=Xn,_.FormEventProvider=wt,_.GridLayout=Qn,_.HorizontalLayout=qn,_.PhoneField=St,_.RangeWidget=Qt,_.RatingWidget=Xt,_.VerticalLayout=Gn,_.cn=L,_.customFields=jt,_.customWidgets=Zt,_.formDataUtils=tr,_.schemaUtils=rr,_.useFieldEventHandlers=le,_.useFormEventHub=Ct,_.validationUtils=Zn,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "extended-dynamic-forms",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Extended React JSON Schema Form (RJSF) v6 with custom components, widgets, templates, layouts, and form events",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -70,4 +70,4 @@
70
70
  "dependencies": {
71
71
  "@radix-ui/react-slot": "^1.0.2"
72
72
  }
73
- }
73
+ }